guix_mirror_bot pushed a commit to branch add-compress-debug-symbols-phase in repository guix.
commit 6d1d7b2dad7113ff3e2a6ec343477d9ceb9c8ab6 Author: Maxim Cournoyer <[email protected]> AuthorDate: Mon Oct 20 09:18:38 2025 +0900 gnu: patch/pinned: Subsume into patch. * gnu/packages/base.scm (patch/pinned): Subsume into... (patch): ... this, merging the configure flags and deleting patches. * gnu/packages/patches/patch-hurd-path-max.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Adjust references with: git grep -l patch/pinned | xargs sed 's,patch/pinned,patch,g' -i Change-Id: Ifd8d09640426d453c5c30cb757a4a5b4e59de455 --- gnu/local.mk | 1 - gnu/packages/base.scm | 64 +++++++++----------------- gnu/packages/commencement.scm | 8 ++-- gnu/packages/lisp.scm | 2 +- gnu/packages/patches/patch-hurd-path-max.patch | 49 -------------------- guix/packages.scm | 2 +- 6 files changed, 29 insertions(+), 97 deletions(-) diff --git a/gnu/local.mk b/gnu/local.mk index 6f29186ea1..9d07fb7900 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2084,7 +2084,6 @@ dist_patch_DATA = \ %D%/packages/patches/strace-readlink-tests.patch \ %D%/packages/patches/sunxi-tools-remove-sys-io.patch \ %D%/packages/patches/p11-kit-hurd.patch \ - %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-5.14-autosplit-default-time.patch \ %D%/packages/patches/perl-5.14-module-pluggable-search.patch \ %D%/packages/patches/perl-5.14-no-sys-dirs.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d9cfb09a16..d2c7400342 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2021 Leo Le Bouter <[email protected]> ;;; Copyright © 2021 Maxime Devos <[email protected]> ;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]> -;;; Copyright © 2021, 2024 Maxim Cournoyer <[email protected]> +;;; Copyright © 2021, 2024, 2025 Maxim Cournoyer <[email protected]> ;;; Copyright © 2022 zamfofex <[email protected]> ;;; Copyright © 2022 John Kehayias <[email protected]> ;;; Copyright © 2023 Josselin Poiret <[email protected]> @@ -299,41 +299,8 @@ standard utility.") (license gpl3+) (home-page "https://www.gnu.org/software/tar/"))) -;;; TODO: Replace/merge with 'patch' on core-updates. -(define-public patch/pinned - (hidden-package - (package - (name "patch") - (version "2.7.6") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/patch/patch-" - version ".tar.xz")) - (sha256 - (base32 - "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc")) - (patches (search-patches "patch-hurd-path-max.patch")))) - (build-system gnu-build-system) - (arguments - ;; Work around a cross-compilation bug whereby libpatch.a would provide - ;; '__mktime_internal', which conflicts with the one in libc.a. - (if (%current-target-system) - `(#:configure-flags '("gl_cv_func_working_mktime=yes")) - '())) - (native-inputs (list ed)) - (synopsis "Apply differences to originals, with optional backups") - (description - "Patch is a program that applies changes to files based on differences -laid out as by the program \"diff\". The changes may be applied to one or more -files depending on the contents of the diff file. It accepts several -different diff formats. It may also be used to revert previously applied -differences.") - (license gpl3+) - (home-page "https://savannah.gnu.org/projects/patch/")))) - (define-public patch (package - (inherit patch/pinned) (name "patch") (version "2.8") (source (origin @@ -343,14 +310,29 @@ differences.") (sha256 (base32 "1qssgwgy3mfahkpgg99a35gl38vamlqb15m3c2zzrd62xrlywz7q")))) + (build-system gnu-build-system) (arguments - (substitute-keyword-arguments (package-arguments patch/pinned) - ((#:configure-flags flags #~'()) - (if (and (target-hurd?) (not (target-64bit?))) - #~(cons* "--disable-year2038" - #$flags) - flags)))) - (properties '()))) + (list + #:configure-flags + #~(list #$@(if (%current-target-system) + ;; Work around a cross-compilation bug whereby + ;; libpatch.a would provide '__mktime_internal', which + ;; conflicts with the one in libc.a. + #~("gl_cv_func_working_mktime=yes") + #~()) + #$@(if (and (target-hurd?) (not (target-64bit?))) + #~("--disable-year2038") + #~())))) + (native-inputs (list ed)) + (synopsis "Apply differences to originals, with optional backups") + (description + "Patch is a program that applies changes to files based on differences +laid out as by the program \"diff\". The changes may be applied to one or more +files depending on the contents of the diff file. It accepts several +different diff formats. It may also be used to revert previously applied +differences.") + (license gpl3+) + (home-page "https://savannah.gnu.org/projects/patch/"))) (define-public diffutils (package diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 5869131a95..8b63ded494 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -847,7 +847,7 @@ MesCC-Tools), and finally M2-Planet.") (define patch-mesboot ;; The initial patch. (package - (inherit patch/pinned) + (inherit patch) (name "patch-mesboot") (version "2.5.9") (source (origin @@ -2175,8 +2175,8 @@ exec " gcc "/bin/" program (define patch-boot0 (package - (inherit patch/pinned) - (source (bootstrap-origin (package-source patch/pinned))) + (inherit patch) + (source (bootstrap-origin (package-source patch))) (name "patch-boot0") (native-inputs '()) (inputs @@ -3648,7 +3648,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("bzip2" ,bzip2) ("file" ,file) ("diffutils" ,diffutils) - ("patch" ,patch/pinned) + ("patch" ,patch) ("findutils" ,findutils) ("gawk" ,(package/inherit gawk (native-inputs diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index e4227f2c8a..c4aa39ff6d 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -495,7 +495,7 @@ interface.") (build-system trivial-build-system) (native-inputs `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch")) - ("patch" ,patch/pinned))) + ("patch" ,patch))) (arguments `(#:modules ((guix build utils) (guix build lisp-utils)) diff --git a/gnu/packages/patches/patch-hurd-path-max.patch b/gnu/packages/patches/patch-hurd-path-max.patch deleted file mode 100644 index 1845a5803b..0000000000 --- a/gnu/packages/patches/patch-hurd-path-max.patch +++ /dev/null @@ -1,49 +0,0 @@ -See <http://lists.gnu.org/archive/html/bug-patch/2015-06/msg00009.html> - -From 0507dfad5f060161f01840067e1bb1615257b636 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <[email protected]> -Date: Mon, 8 Jun 2015 17:27:56 +0200 -Subject: [PATCH] Do not rely on PATH_MAX when reading a symlink target. - -* src/util.c (move_file, copy_file): Use 'fromst->st_size + 1' and -'tost->st_size + 1' for the allocation, and 'fromst->st_size' and -'tost->st_size' instead of PATH_MAX. Fixes compilation on GNU/Hurd. ---- - src/util.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/util.c b/src/util.c -index 1cc08ba..67dbd3a 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -460,12 +460,12 @@ move_file (char const *from, bool *from_needs_removal, - - /* FROM contains the contents of the symlink we have patched; need - to convert that back into a symlink. */ -- char *buffer = xmalloc (PATH_MAX); -+ char *buffer = xmalloc (fromst->st_size + 1); - int fd, size = 0, i; - - if ((fd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0) - pfatal ("Can't reopen file %s", quotearg (from)); -- while ((i = read (fd, buffer + size, PATH_MAX - size)) > 0) -+ while ((i = read (fd, buffer + size, fromst->st_size - size)) > 0) - size += i; - if (i != 0 || close (fd) != 0) - read_fatal (); -@@ -610,10 +610,10 @@ copy_file (char const *from, char const *to, struct stat *tost, - - if (S_ISLNK (mode)) - { -- char *buffer = xmalloc (PATH_MAX + 1); -+ char *buffer = xmalloc (tost->st_size + 1); - ssize_t r; - -- if ((r = safe_readlink (from, buffer, PATH_MAX)) < 0) -+ if ((r = safe_readlink (from, buffer, tost->st_size)) < 0) - pfatal ("Can't read %s %s", "symbolic link", from); - buffer[r] = '\0'; - if (safe_symlink (buffer, to) != 0) --- -2.16.2 - diff --git a/guix/packages.scm b/guix/packages.scm index 272cb99915..199c30b75b 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -943,7 +943,7 @@ identifiers. The result is inferred from the file names of patches." ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) - ("patch" ,(ref '(gnu packages base) 'patch/pinned))))) + ("patch" ,(ref '(gnu packages base) 'patch))))) (define (default-guile) "Return the default Guile package used to run the build code of
