From nobody Mon Nov 8 16:28:57 2021 X-Original-To: freebsd-pkg@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C373C1834721 for ; Mon, 8 Nov 2021 16:29:00 +0000 (UTC) (envelope-from se@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HnxQ44zNYz3vMR; Mon, 8 Nov 2021 16:29:00 +0000 (UTC) (envelope-from se@freebsd.org) Received: from [IPV6:2003:cd:5f1a:8b00:9131:dbe1:c009:1416] (p200300cd5f1a8b009131dbe1c0091416.dip0.t-ipconnect.de [IPv6:2003:cd:5f1a:8b00:9131:dbe1:c009:1416]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 78ADAB6A7; Mon, 8 Nov 2021 16:28:59 +0000 (UTC) (envelope-from se@freebsd.org) Message-ID: <624a7435-eaf3-03db-c47c-29783f45ede9@freebsd.org> Date: Mon, 8 Nov 2021 17:28:57 +0100 List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Questions about /usr/local/lib/compat/pkg Content-Language: en-US To: Baptiste Daroussin Cc: freebsd-pkg@FreeBSD.org, freebsd@ohreally.nl References: <15967907-03dc-a2ab-df86-6097d8d808f6@ohreally.nl> <20211108075438.jtqkak6n22n5rlg7@aniel.nours.eu> <9df3553b-b2c3-6b35-f06c-f123b981a613@ohreally.nl> <20211108095919.wfqj3kr2m6du5xsr@aniel.nours.eu> <9ea022cc-0886-6bfe-4f5c-993b2a683e3e@ohreally.nl> <4d28dae0-043f-dffd-ce79-644ee6e226e0@freebsd.org> <668211f6-e7db-8875-1c1e-214ed2d4388c@ohreally.nl> <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu> From: Stefan Esser In-Reply-To: <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------p1C68ghgx0Pm7xNLcu9VLsJJ" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------p1C68ghgx0Pm7xNLcu9VLsJJ Content-Type: multipart/mixed; boundary="------------c53r2AE0JnLEiU0dZtXmytr2"; protected-headers="v1" From: Stefan Esser To: Baptiste Daroussin Cc: freebsd-pkg@FreeBSD.org, freebsd@ohreally.nl Message-ID: <624a7435-eaf3-03db-c47c-29783f45ede9@freebsd.org> Subject: Re: Questions about /usr/local/lib/compat/pkg References: <15967907-03dc-a2ab-df86-6097d8d808f6@ohreally.nl> <20211108075438.jtqkak6n22n5rlg7@aniel.nours.eu> <9df3553b-b2c3-6b35-f06c-f123b981a613@ohreally.nl> <20211108095919.wfqj3kr2m6du5xsr@aniel.nours.eu> <9ea022cc-0886-6bfe-4f5c-993b2a683e3e@ohreally.nl> <4d28dae0-043f-dffd-ce79-644ee6e226e0@freebsd.org> <668211f6-e7db-8875-1c1e-214ed2d4388c@ohreally.nl> <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu> In-Reply-To: <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu> --------------c53r2AE0JnLEiU0dZtXmytr2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 08.11.21 um 16:06 schrieb Baptiste Daroussin: > On Mon, Nov 08, 2021 at 04:03:56PM +0100, freebsd@ohreally.nl wrote: >> Thank you, Stefan. >> I am creating an issue at the portupgrade/pkgtools GitHub project as w= e >> speak. I will include all the information that Baptiste and you have g= iven >> me. >> >> Best, >> Rob >> >=20 > Just the "No such file or directory @ rb_check_realpath_internal" shows= it comes > from portupgrade and not pkg itself, I missed it in my first review. >=20 > Note that portmaster and portupgrade do not need to support that featur= e anymore > as it is provided by pkg directly (they just need to activate it or not= if they > wants for backward compatibility). Hi Baptiste, thank you for the information, I did not know about BACKUP_LIBRARIES. But I think that the functionality is somewhat different. Portmaster creates a copy of a local library before invoking "pkg delete" to keep it around for any ports that still depend on it. If a port is being upgraded and a library with the same name is installed to /usr/local/lib, the backup in compat/pkg will be deleted. AFAIUI, the effect of BACKUP_LIBRARIES, it has no effect on any command besides "pkg add", and it specifically does not protect against the remov= al of a shared library that is still required by some installed package. It does not appear to have any effect if "make install" is used to instal= l a port (since that only uses "pkg register", not "pkg add".) The pkg command could check whether any of the libraries to be deleted by "pkg delete" is still depended on by any other package (i.e. in the list generated by "pkg query %B") and then copy it to compat/pkg, if still being depended on. OTOH if a new package is installed, any library in compat/pkg that is in the list of newly installed libraries can be removed from compat/pkg. This is important, since I found that "ldconfig -m" tends to add newly created shared library locations to the end of the search path, and as a result if a shared library has been saved to compat/pkg, it will take precedence over a newly installed one. Therefore, removal of libraries from compat/pkg is required in that case, to make the newly installed libraries accessible. Regards, STefan PS: The documentation of BACKUP_LIBRARIES in pkg.conf(5) is not very precise. And this parameter could be added to the list of environment variables checked by "pkg add" in pkg-add(8). --------------c53r2AE0JnLEiU0dZtXmytr2-- --------------p1C68ghgx0Pm7xNLcu9VLsJJ Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmGJUEkFAwAAAAAACgkQR+u171r99URw uAgAvlh7K1RqxWuGeUUxQVS70W4vhvhhgFUCZXNFAcwIijrRTulALobu47w7aCzxXWAqo750ZrXz 8GQzwTjf/6p14azdUN0kvx98280CiDZg7qDFfGovGhW70N19EbpZh/jpySb7cupMbQltgVz2G6dS m1+M1C3hGVLcoS4wUv3kt/k/Z3tR5KzB6Vf8QK6wBh+KQGP1CL84B0RG3/rLm+7doY4MNGDRHdFH z9slQ9j3VgzALCdjBOHL9scQEp/NWYPsCcfLIlXz0hV27NX4AHZcnsREKato7LcEdnfHqyRSq8bY wZZpwOMsCwMGH15AyVT5W5VBEG0tW+0xqNvzYmvt1Q== =sd8A -----END PGP SIGNATURE----- --------------p1C68ghgx0Pm7xNLcu9VLsJJ--