From patchwork Mon Sep 30 08:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 68527 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 B172827BBE2; Mon, 30 Sep 2024 09:21:56 +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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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=unavailable 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 4558127BBE9 for ; Mon, 30 Sep 2024 09:21:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svBcs-0007jv-Lh; Mon, 30 Sep 2024 04:19:26 -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 1svBaz-000749-W8 for guix-patches@gnu.org; Mon, 30 Sep 2024 04:17:37 -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 1svBaz-0005yO-Lb for guix-patches@gnu.org; Mon, 30 Sep 2024 04:17:29 -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:To:In-Reply-To:References:Subject; bh=jMklndtch/z2TrFAYz0zHAuCoH+XWgv+2eDsGuf5iAU=; b=m1CSPSLit4thpJjcf/Bm/xUDm1z+tYRzu3nrdIVZo8bgWC74w+urXMj3clCr99dpJzbYuVDk07HuC7CH/DmxbkP8Gev1MOdUjKKqmdH81V/EaCqKyglP9igL3uJXQFHj1BHxqbIj4lEElAodZ1/EWI48cy+ldu5CW1XK27zGy10D09LBm2FVmJKviyP7OIdtyZN5InX+hpEuZcyl4j6sO/Z9idmQO3J6ic5IHqrdMVPkDkZObs6SjClz1lhhZlz6YhDB9cUKARnJeZrywgD+t77ISJPY8/t1ZePQb3EG7HPidGrYpKXsj4bVy+fCKQcJtJyuPTeFhgfCSQTA+ylcGA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svBbW-0001zF-2h for guix-patches@gnu.org; Mon, 30 Sep 2024 04:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73529] [PATCH core v2] gnu: patchelf: Build from git References: <91e06adbec896b8e685d7bc2501da3e7dc932233.1727525522.git.attila@lendvai.name> In-Reply-To: <91e06adbec896b8e685d7bc2501da3e7dc932233.1727525522.git.attila@lendvai.name> Resent-From: attila.lendvai@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Sep 2024 08:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73529 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73529@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 73529-submit@debbugs.gnu.org id=B73529.17276842297596 (code B ref 73529); Mon, 30 Sep 2024 08:18:02 +0000 Received: (at 73529) by debbugs.gnu.org; 30 Sep 2024 08:17:09 +0000 Received: from localhost ([127.0.0.1]:44664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svBae-0001yS-Mk for submit@debbugs.gnu.org; Mon, 30 Sep 2024 04:17:09 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:43275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svBab-0001y0-4p for 73529@debbugs.gnu.org; Mon, 30 Sep 2024 04:17:07 -0400 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5c87ab540b3so5946785a12.1 for <73529@debbugs.gnu.org>; Mon, 30 Sep 2024 01:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727684127; x=1728288927; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jMklndtch/z2TrFAYz0zHAuCoH+XWgv+2eDsGuf5iAU=; b=FhMKuHooDqvLsc8p2hMz9eO/Xhl9+EqZKTPkjw92AQtQreoOHcMeQkfCx9pjQxLeIE js1RI2wRi9/lqVmB9aFnBlDgYR8xrxqms2FKNiHVjyaflEghNoTDO5ofMcPOhQIR9VpA 0GlqqsXwZvPA7jB54yxGBXxq+Q1Fq6VvLhh1wqwts+78RNaIWbxIeJprnY9eg/+fo5Fl fCRE3ZgcTTULpNBkVieU92xAmjFIS7qJ4MGrBsv9MucUrF+aey2Kxc0n4UL7A37KAIZa DKmyEveXBmy3hqHYOuKOkC5W7cn+lS2SR7PJiA5xvP+18hB+62R+b+Y5fmnLoqfoFFcS LQ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727684127; x=1728288927; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jMklndtch/z2TrFAYz0zHAuCoH+XWgv+2eDsGuf5iAU=; b=DT/QgVWWZF5hHVox/SIWf4VTDtc7MhDKiXvFXTA0eCiuYNstWt9plKt8roh2r4wTM9 9cvNkq+XnwLHIcAL0VqbRKbxmohE1KjJ5s7KG1OVGyiD1Mr5GRa+HrMfaV3NeYbeCUu1 wcMcXqjyT7+GWw0n3QsDRD/bKvLlJLpHCSv5pqN4KhJscY7JYRl9P8HbQvL7cDM6btqr Mxtjf6IZ3SUTy6AyOGrtQ3EArtZChX78Blmci63EfEDfqYQYZUuymLKtuC9RNkoifqhd /5W7rbObjWn3XsB/7pIoGKvcMK7J0aj7bwE/YEOtSBHeRRPZnKZiRQqQD1fbCoH+up0O +GCQ== X-Gm-Message-State: AOJu0YxjKeC/wKPCgguZfJxA9fTi98ZS38HbR/9xSCesw4U9knTJofVj jHp6NA9KL7h+EGsZ0967+yfdvgwOmofcnWivz2GXYbePrIls4CKAPJSV0g== X-Google-Smtp-Source: AGHT+IFSI/VhKmKfyMLTSLnAnYhwQ+IH/PxSsDRwsrwl+AWtbzzkZD2A0j3fp0yTj80CNV9t2a6P5g== X-Received: by 2002:a05:6402:2424:b0:5c4:1c89:6e36 with SMTP id 4fb4d7f45d1cf-5c8777f3231mr16829513a12.19.1727684126715; Mon, 30 Sep 2024 01:15:26 -0700 (PDT) Received: from lelap.lan (2a00-1f40-b161-3580--477.pool6.panelnet.hu. [2a00:1f40:b161:3580::477]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c882405166sm4283329a12.9.2024.09.30.01.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 01:15:26 -0700 (PDT) From: attila.lendvai@gmail.com X-Google-Original-From: attila@lendvai.name Date: Mon, 30 Sep 2024 10:15:10 +0200 Message-ID: <9706446756fd9c5c9e40ae1fa8fc6ca326407178.1727684109.git.attila@lendvai.name> X-Mailer: git-send-email 2.46.0 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 From: Attila Lendvai Rationale: it makes it much easier for anyone to build a pending PR (simply by using `(commit "pull/544/head")` in the origin). It also makes it more resilient against attacks hidden in release tarballs. * gnu/packages/elf.scm (patchelf): Change source origin to the git repo and adjust inputs accordingly. [native-inputs]: Add autoconf, automake. Change-Id: I94eaedcd826c32b2c90823fe026718213f8d5962 --- gnu/packages/elf.scm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) base-commit: d74fc6c8e6428c37a5bfad85b08999ff47000208 diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index dc2db836321..98b80c24b3e 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -278,14 +278,14 @@ (define-public patchelf (name "patchelf") (version "0.18.0") (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/NixOS/patchelf/releases/download/" - version - "/patchelf-" version ".tar.bz2")) - (sha256 - (base32 - "02s7ap86rx6yagfh9xwp96sgsj0p6hp99vhiq9wn4mxshakv4lhr")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/NixOS/patchelf") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1v5mh8wdax4a97hw79nvzy0dixkbs0h487xkskkljkkdamq4rj5z")))) (build-system gnu-build-system) (arguments '(#:phases @@ -298,8 +298,8 @@ (define-public patchelf ;; Disable checking for an empty runpath: (("^if test.*") "") ;; Find libgcc_s.so, which is necessary for the test: - (("/xxxxxxxxxxxxxxx") (string-append (assoc-ref inputs "gcc:lib") - "/lib"))) + (("/xxxxxxxxxxxxxxx") + (dirname (search-input-file inputs "/lib/libgcc_s.so")))) (substitute* "tests/replace-needed.sh" ;; This test assumes that only libc will be linked alongside ;; libfoo, but we also link libgcc_s. @@ -309,10 +309,13 @@ (define-public patchelf ;; we still need to find libgcc_s (see above). (("^\"\\$\\{SCRATCH\\}\"\\/simple.$") "")) ;; Skip this test for now. - (substitute* "tests/Makefile.in" + (substitute* "tests/Makefile.am" ((".*shared-rpath\\.sh \\.*") ""))))))) (native-inputs - `(("gcc:lib" ,gcc "lib"))) + (list + autoconf + automake + (list gcc "lib"))) (home-page "https://nixos.org/patchelf.html") (synopsis "Modify the dynamic linker and RPATH of ELF executables") (description