Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2020 11:35:44 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Stefan Parvu <sparvu@kronometrix.org>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: FreeBSD 11.4 / 12.2 pkg-install problems startup service
Message-ID:  <20201203103544.omchaeelpaaylwll@ivaldir.net>
In-Reply-To: <B4DB2170-8F4C-484E-9217-85B92B4753EE@kronometrix.org>
References:  <B4DB2170-8F4C-484E-9217-85B92B4753EE@kronometrix.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl/Iv34ACgkQY4mL3PG3
Plr8ZQ/9GfKJTDsR8FmZxEHfyddef26yzlSG+A/5BbEOKy325tOUQshsn09/Pmfk
raC2JjJvT0yDL/6z/z++h/iZNg0tmC3oCR4h6mMydYcWVNQrIPV1LHAvYb9pRlQk
+xvBaQaDhYwOwnh7hNcwzPfwiCZPjvo6mxs/P8/wYeglhfPZ+y+xzrUozh8RaQwM
R9fsjF8YIwtPIm1cWAq8pydt28eKRUUnsh4y/w4Vdw2WRwo4n3bGWK+rmytAv0E/
usSULm0dCEL1qGX19HITZ2rV0A1l7olLBY/K8SLTbkLpFXiUZqv2k1jhkJKQkIST
CqIlRlkvS0n2QaPnWrR5sev5+0kBPdiHXXnoJOLCr8U5MYmAtshU8s6jVxol0T3f
/Z7ITero6XGcqmYnMuUG9Xg1Kkjuvmi+d6U4akpGS0iBfDDNn6S4gpQzja9XRmDC
21tGl4mzafvvKne9JD+07AtEjcx7r1KsLYlKmvrWM+Fc3PQ7+KyHztUZrIEHvMl1
9YQsZpVy9MeylUQTN3JYe7ipguJSJU+NKbuxFqFO5sVfViW0ZFK/XPk3yowwgdo0
m5ixFdMucc5for8b0yZnNTM2YxItfDZc+70GmJpubkfGwEAqljvyCdGDGQf5+MKg
CEtHmf3ONmjzVOutf0dXDNdyE0I9cxsaVo3NeY6TKkVeEzCA6pI=
=r2OI
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201203103544.omchaeelpaaylwll>