From patchwork Mon Apr 21 13:47:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 41863 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF88927BC4B; Mon, 21 Apr 2025 16:00:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F2DB27BC49 for ; Mon, 21 Apr 2025 16:00:37 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u6scG-0006sW-GJ; Mon, 21 Apr 2025 10:59:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u6sc0-0006mq-Bf for guix-patches@gnu.org; Mon, 21 Apr 2025 10:59:10 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u6sbz-0000hl-5s for guix-patches@gnu.org; Mon, 21 Apr 2025 10:59:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:References:In-Reply-To:To:Subject; bh=t3Z89wXJQEe5gyRmsMlsDsvcCdRVGrIFOt6O4/co8S4=; b=AFjwe12HSF8YpBOcv1S8+mDDkRwSUXRBqg1Bs0GQXIpSDl0B8cbnaHfjVdeRUYXnMpW40HoAnxD8WpK1rbju0YM+A6tPs5G+G8iRx7Cwnv7HKVuCfGSbkAYBylqYI52UtTrXSjtUThGcc8PrcGVEIPDf4+FZzKWQ8s2fb6uumGaljoVG9jFbAkbXurbWP1t1Vh0AcFJIrVaWLeH2MoW/0Etg494JvQwLpEwqml7+TNROb52+OUJHQuw9MJo7Zj/eOGStKe0DrnFAqWWow2CGNpzPM+dfvHi4DwFJLViJjgS+1GLQDPkwbVi6AI1+hD1K+iuDLaWKohFJl8gsULBBkQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u6sbx-0005vM-9E; Mon, 21 Apr 2025 10:59:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77956] [PATCH gnome-team 04/23] gnu: gobject-introspection: Delete unnecessary patches. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, noelopez@free.fr, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 21 Apr 2025 14:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77956 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77956@debbugs.gnu.org Cc: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, noelopez@free.fr, vivien@planete-kraus.eu X-Debbugs-Original-Xcc: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, noelopez@free.fr, vivien@planete-kraus.eu Received: via spool by 77956-submit@debbugs.gnu.org id=B77956.174524751722544 (code B ref 77956); Mon, 21 Apr 2025 14:59:05 +0000 Received: (at 77956) by debbugs.gnu.org; 21 Apr 2025 14:58:37 +0000 Received: from localhost ([127.0.0.1]:36326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6sbU-0005rL-As for submit@debbugs.gnu.org; Mon, 21 Apr 2025 10:58:37 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:45488) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6sbH-0005oN-9G for 77956@debbugs.gnu.org; Mon, 21 Apr 2025 10:58:24 -0400 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-43ed8d32a95so35235545e9.3 for <77956@debbugs.gnu.org>; Mon, 21 Apr 2025 07:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745247497; x=1745852297; darn=debbugs.gnu.org; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :from:to:cc:subject:date:message-id:reply-to; bh=t3Z89wXJQEe5gyRmsMlsDsvcCdRVGrIFOt6O4/co8S4=; b=jylNvVTAv3hW9HNHLxS9KLhTvHxtY27R5fT0WlZrWW98LFVdOQchMFq7k9n87uPgC9 ydGXoIna1Mz/tHb7HVMLlI/aTLEoQcJbp/ZbqIJ71O1de90As7IiKR8NIEXSQy0smdO8 BMyB1gieHmCugQgpxBTXCwMWpXFC/QtCOwndSRpxI8qBCkkUAul0QGPN487izRkyCwvx 0bk+v/5RWn7kOoUgtwMqaXfR9kCqbFm6TnFkzyGJikBM8wOxrtFZLrjeE0MCLtpy+6tl aSyDsSEpunIE+6aFr9qAw5OvEspw3h7pfS5EQxEYZJ2YGux6rjOb1FTG9XW/KP8aGhvJ 89Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745247497; x=1745852297; h=mime-version:to:subject:date:from:references:in-reply-to:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t3Z89wXJQEe5gyRmsMlsDsvcCdRVGrIFOt6O4/co8S4=; b=LqUNz1fHz3mTJwlpRb1EGSU6A5hpUdrD+7nmajUpjgSmn/UNQhJkHg0hIGrSGdupQG i8ocCmgkUiGKArEx5uDGLLzu04nqx21Z02SEBdFUyad7bJ6GxBsHz/5ChWxs/Uyth2gp lborBRnxJxxsSpvwiL+EtynapCF1i22Kn5LLcgM/pd29QJmuxCHLo7bqClpEiN4gUWOO PIvUC+FKK/Ux0MZNHL2pu823XvVi7IS1f3w0rrzvGUzdASTaE0MQEmN9Pgs5L994Wxkq AeLDIdJFDDXR5LxNY3L3Yy0k42k9n77REeXPp+9fpTGDY+NkCU/U7HNM6oOWtEDiV2y/ F1Jg== X-Gm-Message-State: AOJu0Yz0zXPmbcqrJrhhNfoyLHGa4sOElH98hp6t3jzGWWGQHwLKxWgn 1TJmpGu/edkpuW3LzlaAVHulxD/HoAPydZHXMSQKBd0QfOQ+ot0iccdhNeFV X-Gm-Gg: ASbGncs6B7YFToDd+Fc0NGFosz/hvFTTSi+tGo9Gw1Ydb2Sh8GwZrFE74e4UB+axpoi QrJ0ZEr4X6PEPgAIy/nsdYxTvkHIDqEmUOi6f++Kn3I1ks0sHZaMHaLd2jmCpGiLWCBkftt7xWh 3ukLtnzzPe+7BlV7aBZ3pJPI5Z+GIzXeEagi5Mi7o34WPa08+7WMzcnrhWLuMVcQ55Mc6ArgUj3 uqT+NdJMX6wBc8vULuWmW2LdhfIFcLjzkMIxNxiaz2ffMBpaAoGzh9pm+ltLSgbHArP8bgfqazj AYpK4r0D+qTmrKZ2IUHAIoDQYJEZGr38W+qfdTlbKzQ1d2YhGRv1QkrD07fSwqZTxPRwKB5IEgj LcX2e9IWo1SykGpdzE8Fw6WLZ3iA= X-Google-Smtp-Source: AGHT+IFZUhdWDCPjVz3KO9R12KYYVs5qD0FpCDU9SPDv2Fbyn9EButrd1Qg5+OOAPRvlG53cuei97g== X-Received: by 2002:a05:600c:35cd:b0:43c:fe90:1279 with SMTP id 5b1f17b1804b1-4406abffc69mr88155355e9.21.1745247497096; Mon, 21 Apr 2025 07:58:17 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5acce9sm138719555e9.13.2025.04.21.07.58.16 for <77956@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Apr 2025 07:58:16 -0700 (PDT) Message-ID: <767d4ba6b221c5c076076ae0898c96abe1471f9a.1745243273.git.liliana.prikler@gmail.com> In-Reply-To: References: From: Liliana Marie Prikler Date: Mon, 21 Apr 2025 15:47:47 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/gobject-introspection-cc-1.72.patch: Delete file. * gnu/packages/patches/gobject-introspection-absolute-shlib-1.72.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Unregister them. --- gnu/local.mk | 2 - ...trospection-absolute-shlib-path-1.72.patch | 173 ------------------ .../gobject-introspection-cc-1.72.patch | 15 -- 3 files changed, 190 deletions(-) delete mode 100644 gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch delete mode 100644 gnu/packages/patches/gobject-introspection-cc-1.72.patch diff --git a/gnu/local.mk b/gnu/local.mk index 62cfe230bb3..9929877bbbe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1509,9 +1509,7 @@ dist_patch_DATA = \ %D%/packages/patches/gnupg-1-build-with-gcc10.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ - %D%/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ - %D%/packages/patches/gobject-introspection-cc-1.72.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ %D%/packages/patches/go-fix-script-tests.patch \ %D%/packages/patches/go-gopkg-in-yaml-v3-32bit.patch \ diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch deleted file mode 100644 index 8bb86467c08..00000000000 --- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path-1.72.patch +++ /dev/null @@ -1,173 +0,0 @@ -Names of libraries included in typelib files are opened by dlopen. -Here we add the full path. - -This patch was provided by Luca Bruno , -for 'gobject-introspection' 1.40.0 in Nix. - -It has since been updated to work with newer versions of -gobject-introspection. - -diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py -index 1d39ab84..e12ed24e 100644 ---- a/giscanner/scannermain.py -+++ b/giscanner/scannermain.py -@@ -95,6 +95,39 @@ def get_windows_option_group(parser): - return group - - -+def _get_default_fallback_libpath(): -+ # Newer multiple-output-optimized stdenv has an environment variable -+ # $outputLib which in turn specifies another variable which then is used as -+ # the destination for the library contents (${!outputLib}/lib). -+ store_path = os.environ.get(os.environ.get("outputLib")) if "outputLib" in os.environ else None -+ if store_path is None: -+ outputs = os.environ.get("outputs", "out").split() -+ if "lib" in outputs: -+ # For multiple output derivations let's try whether there is a $lib -+ # environment variable and use that as the base store path. -+ store_path = os.environ.get("lib") -+ elif "out" in outputs: -+ # Otherwise we have a single output derivation, so the libraries -+ # most certainly will end up in "$out/lib". -+ store_path = os.environ.get("out") -+ -+ if store_path is not None: -+ # Even if we have a $lib as output, there still should be a $lib/lib -+ # directory. -+ return os.path.join(store_path, 'lib') -+ else: -+ # If we haven't found a possible scenario, let's return an empty string -+ # so that the shared library won't be prepended with a path. -+ # -+ # Note that this doesn't mean that all hope is lost, because after all -+ # we can still use --fallback-library-path to set one. -+ # -+ # Also, we're not returning None, because that would make it very -+ # difficult to disable adding fallback paths altogether using something -+ # like: --fallback-library-path="" -+ return "" -+ -+ - def _get_option_parser(): - parser = optparse.OptionParser('%prog [options] sources', - version='%prog ' + giscanner.__version__) -@@ -220,6 +253,10 @@ match the namespace prefix.""") - parser.add_option("", "--compiler", - action="store", dest="compiler", default=None, - help="the C compiler to use internally") -+ parser.add_option("", "--fallback-library-path", -+ action="store", dest="fallback_libpath", -+ default=_get_default_fallback_libpath(), -+ help="Path to prepend to unknown shared libraries") - - group = get_preprocessor_option_group(parser) - parser.add_option_group(group) -diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py -index 9f8ab5df..8aa37c99 100644 ---- a/giscanner/shlibs.py -+++ b/giscanner/shlibs.py -@@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name): - $""" % re.escape(library_name), re.VERBOSE) - - -+def _ldd_library_guix_pattern(library_name): -+ store_dir = re.escape( -+ os.environ.get("NIX_STORE", default="/gnu/store") -+ ) -+ pattern = r'(%s(?:/[^/]*)+lib%s[^A-Za-z0-9_-][^\s\(\)]*)' -+ return re.compile(pattern % (store_dir, re.escape(library_name))) -+ -+ - # This is a what we do for non-la files. We assume that we are on an - # ELF-like system where ldd exists and the soname extracted with ldd is - # a filename that can be opened with dlopen(). -@@ -108,7 +116,8 @@ def _resolve_non_libtool(options, binary, libraries): - output = output.decode("utf-8", "replace") - - shlibs = resolve_from_ldd_output(libraries, output) -- return list(map(sanitize_shlib_path, shlibs)) -+ fallback_libpath = options.fallback_libpath or ""; -+ return list(map(lambda p: os.path.join(fallback_libpath, p), map(sanitize_shlib_path, shlibs))) - - - def sanitize_shlib_path(lib): -@@ -117,19 +126,18 @@ def sanitize_shlib_path(lib): - # In case we get relative paths on macOS (like @rpath) then we fall - # back to the basename as well: - # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222 -- if sys.platform == "darwin": -- if not os.path.isabs(lib): -- return os.path.basename(lib) -- return lib -- else: -+ -+ # Always use absolute paths if available -+ if not os.path.isabs(lib): - return os.path.basename(lib) -+ return lib - - - def resolve_from_ldd_output(libraries, output): - patterns = {} - for library in libraries: - if not os.path.isfile(library): -- patterns[library] = _ldd_library_pattern(library) -+ patterns[library] = (_ldd_library_pattern(library), _ldd_library_guix_pattern(library)) - if len(patterns) == 0: - return [] - -@@ -141,8 +149,12 @@ def resolve_from_ldd_output(libraries, output): - if line.endswith(':'): - continue - for word in line.split(): -- for library, pattern in patterns.items(): -- m = pattern.match(word) -+ for library, (pattern, guix_pattern) in patterns.items(): -+ store_dir = os.environ.get("NIX_STORE", default="/gnu/store") -+ if line.find(store_dir) != -1: -+ m = guix_pattern.match(word) -+ else: -+ m = pattern.match(word) - if m: - del patterns[library] - shlibs.append(m.group()) -diff --git a/giscanner/utils.py b/giscanner/utils.py -index 31c7ea48..630002a8 100644 ---- a/giscanner/utils.py -+++ b/giscanner/utils.py -@@ -114,16 +114,11 @@ def extract_libtool_shlib(la_file): - if dlname is None: - return None - -- # Darwin uses absolute paths where possible; since the libtool files never -- # contain absolute paths, use the libdir field -- if platform.system() == 'Darwin': -- dlbasename = os.path.basename(dlname) -- libdir = _extract_libdir_field(la_file) -- if libdir is None: -- return dlbasename -- return libdir + '/' + dlbasename -- # Older libtools had a path rather than the raw dlname -- return os.path.basename(dlname) -+ dlbasename = os.path.basename(dlname) -+ libdir = _extract_libdir_field(la_file) -+ if libdir is None: -+ return dlbasename -+ return libdir + '/' + dlbasename - - - # Returns arguments for invoking libtool, if applicable, otherwise None -diff --git a/tests/scanner/test_shlibs.py b/tests/scanner/test_shlibs.py -index a8337c60..7f123103 100644 ---- a/tests/scanner/test_shlibs.py -+++ b/tests/scanner/test_shlibs.py -@@ -40,7 +40,8 @@ class TestLddParser(unittest.TestCase): - - self.assertEqual( - sanitize_shlib_path('/foo/bar'), -- '/foo/bar' if sys.platform == 'darwin' else 'bar') -+ # Always use an absolute filename for Guix -+ '/foo/bar') - - def test_unresolved_library(self): - output = '' diff --git a/gnu/packages/patches/gobject-introspection-cc-1.72.patch b/gnu/packages/patches/gobject-introspection-cc-1.72.patch deleted file mode 100644 index d3b1df82af1..00000000000 --- a/gnu/packages/patches/gobject-introspection-cc-1.72.patch +++ /dev/null @@ -1,15 +0,0 @@ -Use gcc as the default C compiler if CC is not set. - -diff --git a/giscanner/__init__.py b/giscanner/__init__.py -index 7c2f365a..607fe341 100644 ---- a/giscanner/__init__.py -+++ b/giscanner/__init__.py -@@ -21,6 +21,8 @@ import os - builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') - if builddir is not None: - __path__.append(os.path.join(builddir, 'giscanner')) # type: ignore # mypy issue #1422 -+if not 'CC' in os.environ: -+ os.environ['CC'] = 'gcc' - try: - from ._version import __version__ - except ImportError: