From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 47144@debbugs.gnu.org
Cc: "Mark H Weaver" <mhw@netris.org>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
"Mark H Weaver" <mhw@netris.org>,
"Ludovic Courtès" <ludo@gnu.org>,
"Léo Le Bouter" <lle-bout@zaclys.net>,
"Leo Famulari" <leo@famulari.name>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
"Simon Tournier" <zimon.toutoune@gmail.com>
Subject: bug#47144: [PATCH v3 3/3] gnu: patch: Graft to latest commit [security fixes].
Date: Tue, 4 Jun 2024 21:24:28 -0400 [thread overview]
Message-ID: <6637c8e33997272ab489b7f35e587c3abd77b82b.1717550623.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <a3641c8501b839cb4490edca279bf15a8141b8ea.1717550623.git.maxim.cournoyer@gmail.com>
* gnu/packages/base.scm (patch/fixed): New variable.
(patch) [replacement]: Graft with the above.
Fixes: https://issues.guix.gnu.org/47144
Reported-by: Mark H Weaver <mhw@netris.org>
Change-Id: I54ae41b735f5ba0ebad30ebdfaabe0ccdc3f9873
---
Changes in v3:
- Do not use inheritance for patch/fixed origin
Changes in v2:
- Use same version to have the same store length, a graft requirement
- Copy the gnulib source in a phase to avoid introducing a dependency cycle
gnu/packages/base.scm | 52 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index bbe5b8cf57..3246b7bd0a 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -19,7 +19,7 @@
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
@@ -46,8 +46,10 @@ (define-module (gnu packages base)
#:use-module (gnu packages acl)
#:use-module (gnu packages algebra)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages gcc)
#:use-module (gnu packages guile)
#:use-module (gnu packages multiprecision)
@@ -263,6 +265,7 @@ (define-public tar
(define-public patch
(package
+ (replacement patch/fixed)
(name "patch")
(version "2.7.6")
(source (origin
@@ -291,6 +294,53 @@ (define-public patch
(license gpl3+)
(home-page "https://savannah.gnu.org/projects/patch/")))
+(define patch/fixed
+ ;; The latest release is from 2018, and lacks multiple security related
+ ;; patches. Since Fedora carries 23 patches, simply use the latest commit
+ ;; until a proper release is made.
+ (let ((revision "0")
+ (commit "f144b35425d9d7732ea5485034c1a6b7a106ab92"))
+ (package
+ (inherit patch)
+ (name "patch")
+ ;; TODO: Uncomment when ungrafting.
+ ;;(version (git-version "2.7.6" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/patch.git")
+ (commit commit)))
+ ;; TODO: Uncomment when ungrafting and using the above
+ ;; 'git-version'-computed version.
+ ;;(file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1bk38169c0xh01b0q0zmnrjqz8k9byz3arp4q7q66sn6xwf94nvz"))
+ (patches (search-patches "patch-hurd-path-max.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments patch)
+ ((#:phases phases '%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'copy-gnulib-sources
+ (lambda _
+ ;; XXX: We copy the source instead of using 'gnulib' as a
+ ;; native input to avoid introducing a dependency cycle with.
+ (copy-recursively #+gnulib "gnulib")
+ (setenv "GNULIB_SRCDIR"
+ (string-append (getcwd) "/gnulib/src/gnulib"))))
+ (add-after 'copy-gnulib-sources 'update-bootstrap-script
+ (lambda _
+ (copy-file "gnulib/src/gnulib/build-aux/bootstrap"
+ "bootstrap")))
+ (add-after 'unpack 'patch-configure.ac
+ (lambda _
+ (substitute* "configure.ac"
+ ;; The gnulib-provided git-version-gen script has a plain
+ ;; shebang of #!/bin/sh; avoid using it.
+ (("build-aux/git-version-gen" all)
+ (string-append "sh " all)))))))))
+ (native-inputs (list autoconf automake bison ed)))))
+
(define-public diffutils
(package
(name "diffutils")
--
2.45.1
next prev parent reply other threads:[~2024-06-05 1:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 3:14 security patching of 'patch' package Léo Le Bouter
2021-03-14 21:37 ` bug#47144: " Mark H Weaver
2021-03-15 18:26 ` bug#47144: [PATCH 0/1] gnu: patch: Update to 2.7.6-7623b2d [security fixes] Léo Le Bouter via Bug reports for GNU Guix
2021-03-15 18:26 ` bug#47144: [PATCH 1/1] " Léo Le Bouter via Bug reports for GNU Guix
2021-03-18 21:58 ` Ludovic Courtès
2022-03-23 3:03 ` bug#47144: security patching of 'patch' package Maxim Cournoyer
2021-04-14 21:54 ` Leo Famulari
2024-05-31 2:59 ` bug#47144: [PATCH 1/3] gnu: ucd: Update to 15.1.0 Maxim Cournoyer
2024-05-31 2:59 ` bug#47144: [PATCH 2/3] gnu: gnulib: Update to 2024-05-30-1.ac4b301 Maxim Cournoyer
2024-05-31 2:59 ` bug#47144: [PATCH 3/3] gnu: patch: Graft to latest commit [security fixes] Maxim Cournoyer
2024-05-31 16:13 ` Simon Tournier
2024-06-01 1:49 ` Maxim Cournoyer
2024-06-04 15:39 ` Simon Tournier
2024-06-05 1:08 ` Maxim Cournoyer
2024-06-01 11:34 ` Maxim Cournoyer
2024-06-01 14:32 ` Ludovic Courtès
2024-06-01 15:02 ` Maxim Cournoyer
2024-06-05 16:04 ` bug#47144: security patching of 'patch' package Ludovic Courtès
2024-06-05 16:44 ` Simon Tournier
2024-06-06 0:49 ` Maxim Cournoyer
2024-06-01 12:56 ` bug#47144: [PATCH v2 1/3] gnu: ucd: Update to 15.1.0 Maxim Cournoyer
2024-06-01 12:56 ` bug#47144: [PATCH v2 2/3] gnu: gnulib: Update to 2024-05-30-1.ac4b301 Maxim Cournoyer
2024-06-01 12:56 ` bug#47144: [PATCH v2 3/3] gnu: patch: Graft to latest commit [security fixes] Maxim Cournoyer
2024-06-05 1:24 ` bug#47144: [PATCH v3 1/3] gnu: ucd: Update to 15.1.0 Maxim Cournoyer
2024-06-05 1:24 ` bug#47144: [PATCH v3 2/3] gnu: gnulib: Update to 2024-05-30-1.ac4b301 Maxim Cournoyer
2024-06-05 1:24 ` Maxim Cournoyer [this message]
2024-06-06 0:46 ` bug#47144: [PATCH v4 1/3] gnu: ucd: Update to 15.1.0 Maxim Cournoyer
2024-06-06 0:46 ` bug#47144: [PATCH v4 2/3] gnu: gnulib: Update to 2024-05-30-1.ac4b301 Maxim Cournoyer
2024-06-06 0:46 ` bug#47144: [PATCH v4 3/3] gnu: patch: Update to latest commit [security fixes] Maxim Cournoyer
2024-06-24 4:43 ` bug#47144: security patching of 'patch' package Maxim Cournoyer
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=6637c8e33997272ab489b7f35e587c3abd77b82b.1717550623.git.maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=47144@debbugs.gnu.org \
--cc=leo@famulari.name \
--cc=lle-bout@zaclys.net \
--cc=ludo@gnu.org \
--cc=mhw@netris.org \
--cc=zimon.toutoune@gmail.com \
/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.