From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:49660) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hm4tX-0004xi-JT for guix-patches@gnu.org; Fri, 12 Jul 2019 19:24:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hm4tW-0006RT-7v for guix-patches@gnu.org; Fri, 12 Jul 2019 19:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60334) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hm4tW-0006Qs-0h for guix-patches@gnu.org; Fri, 12 Jul 2019 19:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hm4tV-0002X8-Q8 for guix-patches@gnu.org; Fri, 12 Jul 2019 19:24:01 -0400 Subject: [bug#36535] [PATCH] gnu: gobject-introspection: Update absolute-shlib-path.patch. Resent-Message-ID: References: <20190707104803.23662-1-mail@cbaines.net> <87d0il9deh.fsf@cbaines.net> <875zocr4hl.fsf@devup.no> <87bly4a566.fsf@cbaines.net> <87zhlopjzv.fsf@devup.no> <87zhljks93.fsf@devup.no> From: Christopher Baines In-reply-to: <87zhljks93.fsf@devup.no> Date: Sat, 13 Jul 2019 00:22:59 +0100 Message-ID: <87v9w6zvl8.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Marius Bakke Cc: 36535@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Marius Bakke writes: > severity 36535 important > >>>>> ++def _get_default_fallback_libpath(): >>>>> ++ # Newer multiple-output-optimized stdenv has an environment var= iable >>>>> ++ # $outputLib which in turn specifies another variable which the= n is used as >>>>> ++ # the destination for the library contents (${!outputLib}/lib). >>>>> ++ store_path =3D os.environ.get(os.environ.get("outputLib")) if "= outputLib" in os.environ else None >>>>> ++ if store_path is None: >>>>> ++ outputs =3D os.environ.get("outputs", "out").split() >>>> >>>> gnu-build-system does not currently export an "outputs" variable. >>>> Perhaps it should? >>> >>> Ah, I didn't realise this part of the patch was as Nix specific as it >>> is... >>> >>> At least for the change I was trying to affect, this seems to be >>> probably redundant, or somehow doing the job. Maybe this part of the >>> patch relating to the fallback_libpath should be removed. >> >> I'd keep the "$outputs" logic, it sounds like a useful and easy change >> to do in gnu-build-system, although maybe not for this 'core-updates' >> round. We can use it in package recipes for fun and profit meanwhile. > > We now have a user of the $outputs variable: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D7555d539245ff3456= 848c02d61f9e601ee5af463 Ooh, interesting :) > Incidentally, then package was broken because of the very same feature :-) > > But we can not merge this with the hard-coded /gnu/store paths, as that > is likely to cause strange problems for users with a non-default store > prefix. > > Unless someone steps up to fix it within a few days, I think we'll have > to revert it for now. I have some time now to look at this, I'm currently building libsoup with these changes to the patch. modified gnu/packages/patches/gobject-introspection-absolute-shlib-path.p= atch @@ -61,12 +61,14 @@ parser.add_option_group(group) --- a/giscanner/shlibs.py +++ b/giscanner/shlibs.py =2D@@ -57,6 +57,12 @@ def _ldd_library_pattern(library_name): +@@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name): $""" % re.escape(library_name), re.VERBOSE) =20=20 =20=20 +def _ldd_library_guix_pattern(library_name): =2D+ store_dir =3D re.escape('/gnu/store') ++ store_dir =3D re.escape( ++ os.environ.get("NIX_STORE", default=3D"/gnu/store") ++ ) + pattern =3D r'(%s(?:/[^/]*)+lib%s[^A-Za-z0-9_-][^\s\(\)]*)' + return re.compile(pattern % (store_dir, re.escape(library_name))) + @@ -109,14 +111,15 @@ if len(patterns) =3D=3D 0: return [] =20=20 =2D@@ -139,8 +145,11 @@ def resolve_from_ldd_output(libraries, output): +@@ -139,8 +145,12 @@ def resolve_from_ldd_output(libraries, output): if line.endswith(':'): continue for word in line.split(): - for library, pattern in patterns.items(): - m =3D pattern.match(word) + for library, (pattern, guix_pattern) in patterns.items(): =2D+ if line.find('/gnu/store') !=3D -1: ++ store_dir =3D os.environ.get("NIX_STORE", default=3D"/gnu= /store") ++ if line.find(store_dir) !=3D -1: + m =3D guix_pattern.match(word) + else: + m =3D pattern.match(word) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl0pFlNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdLag//dOnNp6O2zgepM3LtiryRdbIkyVslnNr9kWdZ0X463x1lZKoIQLFCji1q BXsgRo7yNZ8eqaAOXSoLM4MQD8rk90/s1x5jGmUb0Cs1LfX2PHo14UWdPWTvhSxy jTgRu71CFCFvhBuzxrEkhea+GHo7hQc3N63y+fVQhAGO6TLzBGhditWioQPSMF/3 Lnsku0Wt3EUfms3xIpdDA20lfEBL6dvGKWvWy1rYNFpSDUAQpComDBvp9allz/0D WYs/Q23Hw7QD2SkvTzKUJtMhSbCskoEUAEj3IjDmrsEQdbevhDBisUzJXn9/zuls ybf0B+lNSFEQJv1deJM4YOlPOFBTDWcZAwn+OzPbvhR87nmoqwHFZ79W7vXXeC0z Alg8EDHW+segc+r3lOqF92RsAAnq4NhCzVDU2aI9SKKi4MzEFfrAAsbI1PkUp2DH z0ZiJLP+b3wa3ygHOpBS1smy92OmK67yG9Wpkbq2fSE7PIYzC2Eah8ZFmmpgXZ8k 8OU9oHQdNM53Vs2CXx1LkyOcgGNyToHrnFiV6accdkl6/LqNwph6Mb5r6t/6pi20 dvZhAZx0r7BP7Fm+V9IVGnK9okyemggFpWTW27InGWbLfDd/7GaLdkBH1tHBw4Y4 ce5L8P/ajMXf+Ot44UjQ/QjTHRFh04jXLyFf7ezSlkYFIeMUB2Q= =DfBw -----END PGP SIGNATURE----- --=-=-=--