all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: attila.lendvai@gmail.com
To: 73529@debbugs.gnu.org
Cc: Attila Lendvai <attila@lendvai.name>
Subject: [bug#73529] [PATCH core] gnu: patchelf: Build from git sources.
Date: Sat, 28 Sep 2024 14:12:03 +0200	[thread overview]
Message-ID: <91e06adbec896b8e685d7bc2501da3e7dc932233.1727525522.git.attila@lendvai.name> (raw)

From: Attila Lendvai <attila@lendvai.name>

Rationale: it makes it much easier to build a pending PR by using
`(commit "pull/544/head")` in the origin, or in general to experiment
with different patchelf versions.  It also makes it more resilient
against attacks hidden in release tarballs.

Change-Id: I94eaedcd826c32b2c90823fe026718213f8d5962
---

sadly, this leads to endless rebuilds...

 gnu/packages/elf.scm | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index dc2db836321..21228a9d878 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -278,19 +278,19 @@ (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 "patchelf" version))
+              (sha256
+               (base32
+                "1v5mh8wdax4a97hw79nvzy0dixkbs0h487xkskkljkkdamq4rj5z"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'fix-tests
+         (add-after 'bootstrap 'fix-tests
            ;; Our GCC code ensures that RUNPATH is never empty, it includes
            ;; at least glibc/lib and gcc:lib/lib.
            (lambda* (#:key inputs #:allow-other-keys)
@@ -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.
@@ -312,7 +312,10 @@ (define-public patchelf
              (substitute* "tests/Makefile.in"
                ((".*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

base-commit: 4f86fa20179ded1e6314eeba7da17309d501a32f
-- 
2.46.0





             reply	other threads:[~2024-09-28 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-28 12:12 attila.lendvai [this message]
2024-09-29 16:12 ` [bug#73529] [PATCH core] gnu: patchelf: Build from git sources Z572
2024-09-30  8:14   ` Attila Lendvai
2024-09-30  8:15 ` [bug#73529] [PATCH core v2] gnu: patchelf: Build from git attila.lendvai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91e06adbec896b8e685d7bc2501da3e7dc932233.1727525522.git.attila@lendvai.name \
    --to=attila.lendvai@gmail.com \
    --cc=73529@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.