From owner-freebsd-pkg@freebsd.org Thu Dec 3 10:35:48 2020 Return-Path: Delivered-To: freebsd-pkg@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06BF44A2704 for ; Thu, 3 Dec 2020 10:35:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CmsgR6S7nz3Mwk; Thu, 3 Dec 2020 10:35:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (unknown [IPv6:2001:41d0:8:db4c::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id B93902DB5B; Thu, 3 Dec 2020 10:35:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 7382A48037; Thu, 3 Dec 2020 11:35:44 +0100 (CET) Date: Thu, 3 Dec 2020 11:35:44 +0100 From: Baptiste Daroussin To: Stefan Parvu Cc: freebsd-pkg@freebsd.org Subject: Re: FreeBSD 11.4 / 12.2 pkg-install problems startup service Message-ID: <20201203103544.omchaeelpaaylwll@ivaldir.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ya3ek5c7l6oukikg" Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2020 10:35:48 -0000 --ya3ek5c7l6oukikg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 02, 2020 at 04:46:00PM +0200, Stefan Parvu wrote: > Hi, >=20 > We been using for past 3,4 years FreeBSD (amd64/aarch64) for our own prod= ucts,=20 > without problems. We are creating our own software, and we build FreeBSD = binary=20 > packages from our software. So our software does install as a FreeBSD bin= ary package. >=20 > We have noticed changes starting with 12.2 and 11.4 releases. For example= we cannot=20 > start anymore our own services, using pkg-install script [1] during pkg a= dd | install phase.=20 >=20 > This works fine on under FreeBSD 10.x, 11.3, 12.0, 12.1 but not on 12.2 o= r 11.4=20 >=20 > Are there any big changes regarding pkg and the way pkg-install or pkg-de= install work? > Any ideas ? We need to be able to start automatically our sofyware after = we have installed the > binaries and configurations =E2=80=A6=20 >=20 > Thanks, > Stefan >=20 > [1] - https://gitlab.com/kronometrix/recording/-/blob/master/pkg/freebsd/= pkg-install =20 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 become= s 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 wor= ked on 12.1. Stopping and starting daemons etc, is not package management in the first p= lace, 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 s= cript 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 comm= it itself about this exact use case: https://github.com/freebsd/pkg/commit/dd0732c1747c472ed7899a025fbc8eabd5f04= 227 I do hope this helps, Best regards, Bapt --ya3ek5c7l6oukikg Content-Type: application/pgp-signature; name="signature.asc" -----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----- --ya3ek5c7l6oukikg--