FreeBSD 11.4 / 12.2 pkg-install problems startup service
Baptiste Daroussin
bapt at FreeBSD.org
Thu Dec 3 10:35:48 UTC 2020
On Wed, Dec 02, 2020 at 04:46:00PM +0200, Stefan Parvu wrote:
> Hi,
>
> We been using for past 3,4 years FreeBSD (amd64/aarch64) for our own products,
> without problems. We are creating our own software, and we build FreeBSD binary
> packages from our software. So our software does install as a FreeBSD binary package.
>
> We have noticed changes starting with 12.2 and 11.4 releases. For example we cannot
> start anymore our own services, using pkg-install script [1] during pkg add | install phase.
>
> This works fine on under FreeBSD 10.x, 11.3, 12.0, 12.1 but not on 12.2 or 11.4
>
> Are there any big changes regarding pkg and the way pkg-install or pkg-deinstall work?
> Any ideas ? We need to be able to start automatically our sofyware after we have installed the
> binaries and configurations …
>
> Thanks,
> Stefan
>
> [1] - https://gitlab.com/kronometrix/recording/-/blob/master/pkg/freebsd/pkg-install <https://gitlab.com/kronometrix/recording/-/blob/master/pkg/freebsd/pkg-install>
I would like to know more about your use cases, it is not recent that pkg
prevent starting automatically daemon during the install phases, pkg becomes the
reaper of the scripts it does run and at the end of the run it kills all the
children process (including any daemon that may have been started).
It is done for security reasons, for a while, I am surprised you say it worked
on 12.1.
Stopping and starting daemons etc, is not package management in the first place,
it is configuration management, the two concept are different for a reason.
That said because we know a lot of people have been doing that for a while, pkg
has an option (off by default) HANDLE_RC_SCRIPT
if you set it to true when installing your package it will start the rc.d script
so you don't need to install that in your post install script.
The behaviour described above is the default since pkg 1.5.0
Note that at the time of this change there have been discussion on the commit
itself about this exact use case:
https://github.com/freebsd/pkg/commit/dd0732c1747c472ed7899a025fbc8eabd5f04227
I do hope this helps,
Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20201203/463f11e3/attachment.sig>
More information about the freebsd-pkg
mailing list