GNU bug report logs - #76594
[PATCH 0/3] some quilt things

Previous Next

Package: guix-patches;

Reported by: Morgan Smith <Morgan.J.Smith <at> outlook.com>

Date: Wed, 26 Feb 2025 17:24:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 76594 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Wed, 26 Feb 2025 17:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 26 Feb 2025 17:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: guix-patches <at> gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 0/3] some quilt things
Date: Wed, 26 Feb 2025 12:17:20 -0500
While updating emacs I was perplexed as to how to create the patchfiles
located in 'gnu/packages/patches'.  I saw no mention of how to do so in the
manual so I just added git diffs (which did work but the reviewer was not
pleased).  I have since been informed I should have used quilt.

Morgan Smith (3):
  doc: Mention that patch files should be generated with quilt.
  gnu: quilt: Don't install emacs package.
  gnu: Add emacs-quilt.

 doc/guix.texi               |  7 +++++--
 gnu/packages/patchutils.scm | 20 ++++++++++++++++++++
 2 files changed, 25 insertions(+), 2 deletions(-)


base-commit: 61428ccf41f21f5ea1e4f1eec722ef9b1efc3a0e
-- 
2.48.1





Information forwarded to ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Wed, 26 Feb 2025 17:45:03 GMT) Full text and rfc822 format available.

Message #8 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 1/3] doc: Mention that patch files should be generated with
 quilt.
Date: Wed, 26 Feb 2025 12:44:17 -0500
* doc/guix.texi: Add a reference to the command quilt in the places that
mention patch files

Change-Id: If6ed0556ee57f383d04c9d98aaaeba9323d43390
---
 doc/guix.texi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b525913c15..ffcd012b5a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7730,7 +7730,8 @@ Defining Packages
 @cindex patches
 When needed, the @code{origin} form can also have a @code{patches} field
 listing patches to be applied, and a @code{snippet} field giving a
-Scheme expression to modify the source code.
+Scheme expression to modify the source code.  The patch files can be
+created using @command{quilt}.
 
 @item
 @cindex GNU Build System
@@ -8232,6 +8233,7 @@ origin Reference
 @item @code{patches} (default: @code{'()})
 A list of file names, origins, or file-like objects (@pxref{G-Expressions,
 file-like objects}) pointing to patches to be applied to the source.
+The patch files can be created using @command{quilt}.
 
 This list of patches must be unconditional.  In particular, it cannot
 depend on the value of @code{%current-system} or
@@ -13508,7 +13510,8 @@ Package Transformation Options
 @var{file} must contain a patch; it is applied with the flags specified
 in the @code{origin} of @var{package} (@pxref{origin Reference}), which
 by default includes @code{-p1} (@pxref{patch Directories,,, diffutils,
-Comparing and Merging Files}).
+Comparing and Merging Files}).  The patch files can be created using
+@command{quilt}.
 
 As an example, the command below rebuilds Coreutils with the GNU C
 Library (glibc) patched with the given patch:
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Wed, 26 Feb 2025 17:45:04 GMT) Full text and rfc822 format available.

Message #11 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 2/3] gnu: quilt: Don't install emacs package.
Date: Wed, 26 Feb 2025 12:44:18 -0500
* gnu/packages/patchutils.scm (quilt): Don't install quilt.el.  This is to be
moved to it's own guix package 'emacs-quilt'.

Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
---
 gnu/packages/patchutils.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 3cd3507b07..686b289778 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -187,6 +187,11 @@ (define-public quilt
      '(#:parallel-tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'no-emacs
+           ;; Installed in emacs-quilt package
+           (lambda _
+             (substitute* "Makefile.in"
+               ((".*lib/quilt.el.*") ""))))
          (delete 'check)
          (add-after 'install 'wrap-program
            ;; quilt's configure checks for the absolute path to the utilities it
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Wed, 26 Feb 2025 17:45:04 GMT) Full text and rfc822 format available.

Message #14 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH 3/3] gnu: Add emacs-quilt.
Date: Wed, 26 Feb 2025 12:44:19 -0500
* gnu/packages/patchutils.scm (emacs-quilt): New variable.

Change-Id: I0571cce902ff327dbe18f132b8ce0811dc8c3b19
---
 gnu/packages/patchutils.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 686b289778..3dd7f7f99b 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -31,6 +31,7 @@ (define-module (gnu packages patchutils)
   #:use-module (guix licenses)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system emacs)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system meson)
@@ -250,6 +251,20 @@ (define-public quilt
 refreshed, and more.")
     (license gpl2)))
 
+(define-public emacs-quilt
+  (package
+    (inherit quilt)
+    (name "emacs-quilt")
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-elisp
+           ;; Elisp directory is not in root of the source.
+           (lambda _
+             (chdir "lib"))))))
+    (synopsis "Emacs interface to the quilt patch management software")))
+
 (define-public colordiff
   (package
     (name "colordiff")
-- 
2.48.1





Information forwarded to andrew <at> trop.in, divya <at> subvertising.org, ian <at> retrospec.tv, cox.katherine.e+guix <at> gmail.com, liliana.prikler <at> gmail.com, guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Wed, 26 Feb 2025 18:03:02 GMT) Full text and rfc822 format available.

Message #17 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Subject: [PATCH v2 5/4] build-system/emacs: Allow usage of
 #:{allowed/disallowed}-references key
Date: Wed, 26 Feb 2025 13:00:41 -0500
* guix/build-system/emacs.scm (emacs-build): Pass '#:allowed-references' and
'#:disallowed-references' keys to builder.

Change-Id: Ib9a35a7b2115365b96675fb7ca3914b0ae7e67c7
---

oops.  Forgot to add this one to the series.  Going to sneek this in here

 guix/build-system/emacs.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 03273d738b..06eec43ec4 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -95,7 +95,9 @@ (define* (emacs-build name inputs
                       (imported-modules %emacs-build-system-modules)
                       (modules '((guix build emacs-build-system)
                                  (guix build utils)
-                                 (guix build emacs-utils))))
+                                 (guix build emacs-utils)))
+                      allowed-references
+                      disallowed-references)
   "Build SOURCE using EMACS, and with INPUTS."
   (define builder
     (with-imported-modules imported-modules
@@ -120,6 +122,8 @@ (define* (emacs-build name inputs
                                                   system #:graft? #f)))
     (gexp->derivation name builder
                       #:system system
+                      #:allowed-references allowed-references
+                      #:disallowed-references disallowed-references
                       #:guile-for-build guile)))
 
 (define emacs-build-system

base-commit: 61428ccf41f21f5ea1e4f1eec722ef9b1efc3a0e
prerequisite-patch-id: c2ff0e5fe8ce40e8881779f771c56fee374bb48d
prerequisite-patch-id: 52a44595bd17d655afce51a485b930c44b4ff772
prerequisite-patch-id: c88c4e03afc4fdfb112a40f356bc97db80fb06b0
prerequisite-patch-id: cef5c8dde54b1d3790e6f84fdeafde5a9d8e619b
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 14:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: Ian Eure <ian <at> retrospec.tv>,
 Katherine Cox-Buday <cox.katherine.e+guix <at> gmail.com>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Andrew Tropin <andrew <at> trop.in>, 76594 <at> debbugs.gnu.org,
 Divya Ranjan Pattanaik <divya <at> subvertising.org>
Subject: Re: [bug#76594] [PATCH v2 5/4] build-system/emacs: Allow usage of
 #:{allowed/disallowed}-references key
Date: Thu, 27 Feb 2025 23:15:44 +0900
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> * guix/build-system/emacs.scm (emacs-build): Pass '#:allowed-references' and
> '#:disallowed-references' keys to builder.
>
> Change-Id: Ib9a35a7b2115365b96675fb7ca3914b0ae7e67c7

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 14:21:02 GMT) Full text and rfc822 format available.

Message #23 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Thu, 27 Feb 2025 23:19:44 +0900
Hi Morgan,

Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> * doc/guix.texi: Add a reference to the command quilt in the places that
> mention patch files

I'm not sure quilt is really relevant still, in this git-is-everywhere
era?  I think it was mostly used on Debian, mostly useful back in the
day where there was no distributed VCS I'd assume.

I'd drop this commit.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 14:21:02 GMT) Full text and rfc822 format available.

Message #26 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 2/3] gnu: quilt: Don't install emacs package.
Date: Thu, 27 Feb 2025 23:20:04 +0900
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> * gnu/packages/patchutils.scm (quilt): Don't install quilt.el.  This is to be
> moved to it's own guix package 'emacs-quilt'.
>
> Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 14:22:02 GMT) Full text and rfc822 format available.

Message #29 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>
Cc: 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 3/3] gnu: Add emacs-quilt.
Date: Thu, 27 Feb 2025 23:20:55 +0900
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:

> * gnu/packages/patchutils.scm (emacs-quilt): New variable.
>
> Change-Id: I0571cce902ff327dbe18f132b8ce0811dc8c3b19

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 16:33:02 GMT) Full text and rfc822 format available.

Message #32 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 76594 <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Thu, 27 Feb 2025 11:32:13 -0500
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Hi Morgan,
>
> Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:
>
>> * doc/guix.texi: Add a reference to the command quilt in the places that
>> mention patch files
>
> I'm not sure quilt is really relevant still, in this git-is-everywhere
> era?  I think it was mostly used on Debian, mostly useful back in the
> day where there was no distributed VCS I'd assume.
>
> I'd drop this commit.

I'm not sure you saw my coverpage for this bug so I'll copy that in
here:

=====
While updating emacs I was perplexed as to how to create the patchfiles
located in 'gnu/packages/patches'.  I saw no mention of how to do so in the
manual so I just added git diffs (which did work but the reviewer was not
pleased).  I have since been informed I should have used quilt.
====

I'll CC the reviewer here (Liliana Marie Prikler) to ask why they felt I
should've used quilt.  I'm now realizing it might have simply been to
minimize the changes to the patch file (which is a valid reason).

I still think we should document some way of creating the patches just
so we have a canonical way of doing it (even if we don't require strict
adherence).

Personally, I think we should use `git format-patch` as that's what
contributors would be used to using.





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Thu, 27 Feb 2025 18:57:02 GMT) Full text and rfc822 format available.

Message #35 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>, Maxim Cournoyer
 <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Thu, 27 Feb 2025 19:57:17 +0100
Am Donnerstag, dem 27.02.2025 um 11:32 -0500 schrieb Morgan Smith:
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> 
> > Hi Morgan,
> > 
> > Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:
> > 
> > > * doc/guix.texi: Add a reference to the command quilt in the
> > > places that mention patch files
> > 
> > I'm not sure quilt is really relevant still, in this git-is-
> > everywhere era?  I think it was mostly used on Debian, mostly
> > useful back in the day where there was no distributed VCS I'd
> > assume.
> > 
> > I'd drop this commit.
> 
> I'm not sure you saw my coverpage for this bug so I'll copy that in
> here:
> 
> =====
> While updating emacs I was perplexed as to how to create the
> patchfiles located in 'gnu/packages/patches'.  I saw no mention of
> how to do so in the manual so I just added git diffs (which did work
> but the reviewer was not pleased).  I have since been informed I
> should have used quilt.
> ====
> 
> I'll CC the reviewer here (Liliana Marie Prikler) to ask why they
> felt I should've used quilt.  I'm now realizing it might have simply
> been to minimize the changes to the patch file (which is a valid
> reason).
Yes, that's exactly why :)

> I still think we should document some way of creating the patches
> just so we have a canonical way of doing it (even if we don't require
> strict adherence).
> 
> Personally, I think we should use `git format-patch` as that's what
> contributors would be used to using.
I prefer quilt for sources that aren't backed by git, in particular
everything fetched with url-fetch.  But we do import patches from Git
too, so `git format-patch` should be used where it's useful.

Cheers




Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Thu, 27 Feb 2025 19:48:01 GMT) Full text and rfc822 format available.

Notification sent to Morgan Smith <Morgan.J.Smith <at> outlook.com>:
bug acknowledged by developer. (Thu, 27 Feb 2025 19:48:01 GMT) Full text and rfc822 format available.

Message #40 received at 76594-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, Morgan Smith
 <Morgan.J.Smith <at> outlook.com>
Cc: Katherine Cox-Buday <cox.katherine.e+guix <at> gmail.com>,
 Ian Eure <ian <at> retrospec.tv>, 76594-done <at> debbugs.gnu.org,
 Divya Ranjan Pattanaik <divya <at> subvertising.org>,
 Andrew Tropin <andrew <at> trop.in>
Subject: Re: [bug#76594] [PATCH v2 5/4] build-system/emacs: Allow usage of
 #:{allowed/disallowed}-references key
Date: Thu, 27 Feb 2025 20:48:24 +0100
Am Donnerstag, dem 27.02.2025 um 23:15 +0900 schrieb Maxim Cournoyer:
> Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:
> 
> > * guix/build-system/emacs.scm (emacs-build): Pass '#:allowed-
> > references' and
> > '#:disallowed-references' keys to builder.
> > 
> > Change-Id: Ib9a35a7b2115365b96675fb7ca3914b0ae7e67c7
> 
> Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Pushed to emacs-team, along with the rest of v2.

Cheers





Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Feb 2025 20:19:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Fri, 28 Feb 2025 00:25:02 GMT) Full text and rfc822 format available.

Message #45 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>,
 Ludovic Courtès <ludo <at> gnu.org>,
 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Fri, 28 Feb 2025 09:24:22 +0900
Hi,

Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:

[...]

>> I still think we should document some way of creating the patches
>> just so we have a canonical way of doing it (even if we don't require
>> strict adherence).

That's just one flow; what I personally do, for example is checkout the
project sources (typically, via git) at the correct release, and apply
the patch with 'git apply' or 'patch -p1 < the-change.patch', fix it up
if it only partially applied.  Then I have a revised patch in git that I
can forward to upstream if it's upstream integration is pursued, and
it's easier for the next time I need to do that again.  It's also
possible to work from a failed build by copying the current file to a
new file and using diff between both, though I'd say that's a bit more
error prone and less maintainable in the long term.

>> Personally, I think we should use `git format-patch` as that's what
>> contributors would be used to using.
> I prefer quilt for sources that aren't backed by git, in particular
> everything fetched with url-fetch.  But we do import patches from Git
> too, so `git format-patch` should be used where it's useful.

Maybe something that could be worth documenting is that typically we
produces just diffs (with 'git diff' for example) without the git
authorship metadata for our custom patches, as that can be misleading
and/or a pain to maintain across later reworks.

The exceptions to the above are when using an unreleased upstream git
commit directly, where it makes sense to preserve all metadata, or when
authoring a commit from your own work and forwarding it to upstream.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Mon, 17 Mar 2025 18:53:07 GMT) Full text and rfc822 format available.

Message #48 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 76594 <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Mon, 17 Mar 2025 14:52:03 -0400
While some documentation changes might be nice, it doesn't seem to be as
important as I originally thought.

Could we simply apply the other 2 patches from this bug and move on?

The two other patches:
[PATCH 2/3] gnu: quilt: Don't install emacs package.
[PATCH 3/3] gnu: Add emacs-quilt.




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Mon, 17 Mar 2025 21:13:04 GMT) Full text and rfc822 format available.

Message #51 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>, Maxim Cournoyer
 <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 76594 <at> debbugs.gnu.org
Subject: Re: [bug#76594] [PATCH 1/3] doc: Mention that patch files should be
 generated with quilt.
Date: Mon, 17 Mar 2025 22:12:01 +0100
Am Montag, dem 17.03.2025 um 14:52 -0400 schrieb Morgan Smith:
> While some documentation changes might be nice, it doesn't seem to be
> as
> important as I originally thought.
> 
> Could we simply apply the other 2 patches from this bug and move on?
> 
> The two other patches:
> [PATCH 2/3] gnu: quilt: Don't install emacs package.
> [PATCH 3/3] gnu: Add emacs-quilt.
2/3 is probably fine, but 3/3 might need additional bits for testing. 
Can you check this on top of the emacs-team branch?




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:02 GMT) Full text and rfc822 format available.

Message #54 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 0/5] quilt update + emacs package
Date: Sun, 13 Apr 2025 10:57:01 -0400
If we'd like we can install the first 3 patches to master and last 2 to
emacs-team.  That will create a merge conflict between the branches due to the
4th patch ("gnu: quilt: Don't install emacs package.") but it's an easy one to
fix.

Alternatively, we could just put all of these on the emacs-team branch (which
is what I did locally hence the base-commit of the patch series).

Morgan Smith (5):
  gnu: quilt: Respect #:tests? key in check phase.
  gnu: quilt: Use gexps.
  gnu: quilt: Update to 0.68.
  gnu: quilt: Don't install emacs package.
  gnu: Add emacs-quilt.

 gnu/local.mk                                 |   1 -
 gnu/packages/patches/quilt-grep-compat.patch | 145 -------------------
 gnu/packages/patchutils.scm                  | 135 ++++++++++-------
 3 files changed, 79 insertions(+), 202 deletions(-)
 delete mode 100644 gnu/packages/patches/quilt-grep-compat.patch


base-commit: 03edfea126a88110b520469e96eae73ce86d4b7d
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:02 GMT) Full text and rfc822 format available.

Message #57 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 1/5] gnu: quilt: Respect #:tests? key in check phase.
Date: Sun, 13 Apr 2025 10:57:02 -0400
* gnu/packages/patchutils.scm (quilt): Respect #:tests? key in check phase.

Change-Id: Ie44938ee080f2ac6b3947899e9589174fd3c6446
---
 gnu/packages/patchutils.scm | 65 +++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 3cd3507b07..8ba227a3d3 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -205,38 +205,39 @@ (define-public quilt
                    ,(map cmd-path
                          (list "find" "grep" "mkdir")))))))
          (add-after 'compress-documentation 'check
-           (lambda _
-             (substitute* '("test/run" "test/edit.test")
-               (("/bin/sh") (which "sh"))
-               (("rm -rf") (string-append (which "rm") " -rf")))
-             (substitute* "Makefile"
-               (("^(PATH|QUILT_DIR).*" &)
-                (string-append "#" &)) ; Test the installed 'quilt'
-               (("export QUILT_DIR") "export")
-               (("\\| sort") (string-append "| " (which "sort")))
-               (("\\| sed") (string-append "| " (which "sed")))
-               (("(chmod|touch)" &) (which &)))
-             ;; Tests are scripts interpreted by `test/run` and may specify
-             ;; the execution of several tools.  But PATH will be empty, so
-             ;; rewrite with the full file name:
-             (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
-             (substitute* (find-files "test" "\\.test$")
-               (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
-                 & > cmd <)
-                (if (string=? cmd "zcat")
-                    ;; The `zcat` program is a script, and it will not be able
-                    ;; to invoke its `gzip` with PATH unset.  It's a simple
-                    ;; script though, so just translate here:
-                    (string-append > (which "gzip") " -cd " <)
-                    (or (and=> (which cmd)
-                               (lambda (p) (string-append > p <)))
-                        &))))
-             (let ((make (which "make")))
-               ;; Assert the installed 'quilt' can find utilities it needs.
-               (unsetenv "PATH")
-               ;; Used by some tests for access to internal "scripts"
-               (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
-               (invoke make "check")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (substitute* '("test/run" "test/edit.test")
+                 (("/bin/sh") (which "sh"))
+                 (("rm -rf") (string-append (which "rm") " -rf")))
+               (substitute* "Makefile"
+                 (("^(PATH|QUILT_DIR).*" &)
+                  (string-append "#" &)) ; Test the installed 'quilt'
+                 (("export QUILT_DIR") "export")
+                 (("\\| sort") (string-append "| " (which "sort")))
+                 (("\\| sed") (string-append "| " (which "sed")))
+                 (("(chmod|touch)" &) (which &)))
+               ;; Tests are scripts interpreted by `test/run` and may specify
+               ;; the execution of several tools.  But PATH will be empty, so
+               ;; rewrite with the full file name:
+               (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
+               (substitute* (find-files "test" "\\.test$")
+                 (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
+                   & > cmd <)
+                  (if (string=? cmd "zcat")
+                      ;; The `zcat` program is a script, and it will not be able
+                      ;; to invoke its `gzip` with PATH unset.  It's a simple
+                      ;; script though, so just translate here:
+                      (string-append > (which "gzip") " -cd " <)
+                      (or (and=> (which cmd)
+                                 (lambda (p) (string-append > p <)))
+                          &))))
+               (let ((make (which "make")))
+                 ;; Assert the installed 'quilt' can find utilities it needs.
+                 (unsetenv "PATH")
+                 ;; Used by some tests for access to internal "scripts"
+                 (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
+                 (invoke make "check"))))))))
     (home-page "https://savannah.nongnu.org/projects/quilt/")
     (synopsis "Script for managing patches to software")
     (description
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:03 GMT) Full text and rfc822 format available.

Message #60 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 2/5] gnu: quilt: Use gexps.
Date: Sun, 13 Apr 2025 10:57:03 -0400
* gnu/packages/patchutils.scm (quilt): Use gexps.

Change-Id: I81373365d0729b90b3e31e122eaede2daa7ae5cb
---
 gnu/packages/patchutils.scm | 113 ++++++++++++++++++------------------
 1 file changed, 58 insertions(+), 55 deletions(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 8ba227a3d3..07f1d671ed 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -52,6 +52,7 @@ (define-module (gnu packages patchutils)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages less)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages text-editors)
@@ -182,62 +183,64 @@ (define-public quilt
      (list gettext-minimal))
     (inputs
      (list bash-minimal perl less file gzip ed
-           diffutils diffstat findutils tar))
+           diffutils diffstat findutils tar
+           ;; for wrap-script
+           guile-3.0))
     (arguments
-     '(#:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'check)
-         (add-after 'install 'wrap-program
-           ;; quilt's configure checks for the absolute path to the utilities it
-           ;; needs, but uses only the name when invoking them, so we need to
-           ;; make sure the quilt script can find those utilities when run.
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((cmd-path (lambda (cmd) (dirname (which cmd))))
-                   (out      (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/bin/quilt")
-                 `("PATH" ":" prefix
-                   ,(map cmd-path
-                         (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
-                               "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
-               (wrap-program (string-append out "/share/quilt/scripts/backup-files")
-                 `("PATH" ":" prefix
-                   ,(map cmd-path
-                         (list "find" "grep" "mkdir")))))))
-         (add-after 'compress-documentation 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (substitute* '("test/run" "test/edit.test")
-                 (("/bin/sh") (which "sh"))
-                 (("rm -rf") (string-append (which "rm") " -rf")))
-               (substitute* "Makefile"
-                 (("^(PATH|QUILT_DIR).*" &)
-                  (string-append "#" &)) ; Test the installed 'quilt'
-                 (("export QUILT_DIR") "export")
-                 (("\\| sort") (string-append "| " (which "sort")))
-                 (("\\| sed") (string-append "| " (which "sed")))
-                 (("(chmod|touch)" &) (which &)))
-               ;; Tests are scripts interpreted by `test/run` and may specify
-               ;; the execution of several tools.  But PATH will be empty, so
-               ;; rewrite with the full file name:
-               (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
-               (substitute* (find-files "test" "\\.test$")
-                 (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
-                   & > cmd <)
-                  (if (string=? cmd "zcat")
-                      ;; The `zcat` program is a script, and it will not be able
-                      ;; to invoke its `gzip` with PATH unset.  It's a simple
-                      ;; script though, so just translate here:
-                      (string-append > (which "gzip") " -cd " <)
-                      (or (and=> (which cmd)
-                                 (lambda (p) (string-append > p <)))
-                          &))))
-               (let ((make (which "make")))
-                 ;; Assert the installed 'quilt' can find utilities it needs.
-                 (unsetenv "PATH")
-                 ;; Used by some tests for access to internal "scripts"
-                 (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
-                 (invoke make "check"))))))))
+     (list
+      #:parallel-tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'check)
+          (add-after 'install 'wrap-script
+            ;; quilt's configure checks for the absolute path to the utilities it
+            ;; needs, but uses only the name when invoking them, so we need to
+            ;; make sure the quilt script can find those utilities when run.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((cmd-path (lambda (cmd) (dirname (which cmd)))))
+                (wrap-script (string-append #$output "/bin/quilt")
+                  `("PATH" ":" prefix
+                    ,(map cmd-path
+                          (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
+                                "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
+                (wrap-script (string-append #$output "/share/quilt/scripts/backup-files")
+                  `("PATH" ":" prefix
+                    ,(map cmd-path
+                          (list "find" "grep" "mkdir")))))))
+          (add-after 'compress-documentation 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (substitute* '("test/run" "test/edit.test")
+                  (("/bin/sh") (which "sh"))
+                  (("rm -rf") (string-append (which "rm") " -rf")))
+                (substitute* "Makefile"
+                  (("^(PATH|QUILT_DIR).*" &)
+                   (string-append "#" &)) ; Test the installed 'quilt'
+                  (("export QUILT_DIR") "export")
+                  (("\\| sort") (string-append "| " (which "sort")))
+                  (("\\| sed") (string-append "| " (which "sed")))
+                  (("(chmod|touch)" &) (which &)))
+                ;; Tests are scripts interpreted by `test/run` and may specify
+                ;; the execution of several tools.  But PATH will be empty, so
+                ;; rewrite with the full file name:
+                (setenv "PATH" (string-append #$output "/bin" ":" (getenv "PATH")))
+                (substitute* (find-files "test" "\\.test$")
+                  (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
+                    & > cmd <)
+                   (if (string=? cmd "zcat")
+                       ;; The `zcat` program is a script, and it will not be able
+                       ;; to invoke its `gzip` with PATH unset.  It's a simple
+                       ;; script though, so just translate here:
+                       (string-append > (which "gzip") " -cd " <)
+                       (or (and=> (which cmd)
+                                  (lambda (p) (string-append > p <)))
+                           &))))
+                (let ((make (which "make")))
+                  ;; Assert the installed 'quilt' can find utilities it needs.
+                  (unsetenv "PATH")
+                  ;; Used by some tests for access to internal "scripts"
+                  (setenv "QUILT_DIR" (string-append #$output "/share/quilt"))
+                  (invoke make "check"))))))))
     (home-page "https://savannah.nongnu.org/projects/quilt/")
     (synopsis "Script for managing patches to software")
     (description
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:03 GMT) Full text and rfc822 format available.

Message #63 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 3/5] gnu: quilt: Update to 0.68.
Date: Sun, 13 Apr 2025 10:57:04 -0400
* gnu/packages/patchutils.scm (quilt): Update to 0.68.  Enable parallel tests
as upstream fixed it.
* /gnu/packages/patches/quilt-grep-compat.patch: Delete file.
* gnu/local.mk: Remove quilt-grep-compat.patch.

Change-Id: I5da532c07c83d00363799a1cc7f48e0fe63864fe
---
 gnu/local.mk                                 |   1 -
 gnu/packages/patches/quilt-grep-compat.patch | 145 -------------------
 gnu/packages/patchutils.scm                  |   6 +-
 3 files changed, 2 insertions(+), 150 deletions(-)
 delete mode 100644 gnu/packages/patches/quilt-grep-compat.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c0b9a76cd2..9d8b17f94a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2164,7 +2164,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/qtscript-disable-tests.patch		\
   %D%/packages/patches/quagga-reproducible-build.patch          \
   %D%/packages/patches/quickswitch-fix-dmenu-check.patch	\
-  %D%/packages/patches/quilt-grep-compat.patch 			\
   %D%/packages/patches/qmk-firmware-fix-hacker-dvorak.patch 	\
   %D%/packages/patches/qtwayland-dont-recreate-callbacks.patch	\
   %D%/packages/patches/qtwayland-cleanup-callbacks.patch	\
diff --git a/gnu/packages/patches/quilt-grep-compat.patch b/gnu/packages/patches/quilt-grep-compat.patch
deleted file mode 100644
index 25fef506d1..0000000000
--- a/gnu/packages/patches/quilt-grep-compat.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From upstream
-https://git.savannah.nongnu.org/cgit/quilt.git/patch/?id=f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f
-
-From f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare <at> suse.de>
-Date: Fri, 9 Sep 2022 10:10:37 +0200
-Subject: Avoid warnings with grep 3.8
-
-GNU grep version 3.8 became more strict about needless quoting in
-patterns. We have one occurrence of that in quilt, where "/"
-characters are being quoted by default. There are cases where they
-indeed need to be quoted (typically when used in a sed s/// command)
-but most of the time they do not, and this results in the following
-warning:
-
-grep: warning: stray \ before /
-
-So rename quote_bre() to quote_sed_re(), and introduce
-quote_grep_re() which does not quote "/".
-
-Signed-off-by: Jean Delvare <jdelvare <at> suse.de>
----
- quilt/diff.in             |  2 +-
- quilt/patches.in          |  2 +-
- quilt/scripts/patchfns.in | 20 +++++++++++++-------
- quilt/upgrade.in          |  4 ++--
- 4 files changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/quilt/diff.in b/quilt/diff.in
-index e90dc33..07788ff 100644
---- a/quilt/diff.in
-+++ b/quilt/diff.in
-@@ -255,7 +255,7 @@ then
- 	# Add all files in the snapshot into the file list (they may all
- 	# have changed).
- 	files=( $(find $QUILT_PC/$snap_subdir -type f \
--		  | sed -e "s/^$(quote_bre $QUILT_PC/$snap_subdir/)//" \
-+		  | sed -e "s/^$(quote_sed_re $QUILT_PC/$snap_subdir/)//" \
- 		  | sort) )
- 	printf "%s\n" "${files[@]}" >&4
- 	unset files
-diff --git a/quilt/patches.in b/quilt/patches.in
-index bb17a46..eac45a9 100644
---- a/quilt/patches.in
-+++ b/quilt/patches.in
-@@ -60,7 +60,7 @@ scan_unapplied()
- 	# Quote each file name only once
- 	for file in "${opt_files[@]}"
- 	do
--		files_bre[${#files_bre[@]}]=$(quote_bre "$file")
-+		files_bre[${#files_bre[@]}]=$(quote_grep_re "$file")
- 	done
- 
- 	# "Or" all files in a single pattern
-diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
-index c2d5f9d..1bd7233 100644
---- a/quilt/scripts/patchfns.in
-+++ b/quilt/scripts/patchfns.in
-@@ -78,8 +78,14 @@ array_join()
- 	done
- }
- 
--# Quote a string for use in a basic regular expression.
--quote_bre()
-+# Quote a string for use in a regular expression for a grep pattern.
-+quote_grep_re()
-+{
-+	echo "$1" | sed -e 's:\([][^$.*\\]\):\\\1:g'
-+}
-+
-+# Quote a string for use in a regular expression for a sed s/// command.
-+quote_sed_re()
- {
- 	echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g'
- }
-@@ -215,7 +221,7 @@ patch_in_series()
- 
- 	if [ -e "$SERIES" ]
- 	then
--		grep -q "^$(quote_bre $patch)\([ \t]\|$\)" "$SERIES"
-+		grep -q "^$(quote_grep_re $patch)\([ \t]\|$\)" "$SERIES"
- 	else
- 		return 1
- 	fi
-@@ -365,7 +371,7 @@ is_applied()
- {
- 	local patch=$1
- 	[ -e $DB ] || return 1
--	grep -q "^$(quote_bre $patch)\$" $DB
-+	grep -q "^$(quote_grep_re $patch)\$" $DB
- }
- 
- applied_patches()
-@@ -465,7 +471,7 @@ remove_from_db()
- 	local tmpfile
- 	if tmpfile=$(gen_tempfile)
- 	then
--		grep -v "^$(quote_bre $patch)\$" $DB > $tmpfile
-+		grep -v "^$(quote_grep_re $patch)\$" $DB > $tmpfile
- 		cat $tmpfile > $DB
- 		rm -f $tmpfile
- 		[ -s $DB ] || rm -f $DB
-@@ -520,7 +526,7 @@ find_patch()
- 		fi
- 
- 		local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/}
--		local bre=$(quote_bre "$patch")
-+		local bre=$(quote_sed_re "$patch")
- 		set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\|\.lz\)\([ "$'\t'"]\|$\)/!d" \
- 			       -e 's/[ '$'\t''].*//' "$SERIES")
- 		if [ $# -eq 1 ]
-@@ -631,7 +637,7 @@ files_in_patch()
- 	then
- 		find "$path" -type f \
- 			       -a ! -path "$(quote_glob "$path")/.timestamp" |
--		sed -e "s/$(quote_bre "$path")\///"
-+		sed -e "s/$(quote_sed_re "$path")\///"
- 	fi
- }
- 
-diff --git a/quilt/upgrade.in b/quilt/upgrade.in
-index dbf7d05..866aa33 100644
---- a/quilt/upgrade.in
-+++ b/quilt/upgrade.in
-@@ -74,7 +74,7 @@ printf $"Converting meta-data to version %s\n" "$DB_VERSION"
- 
- for patch in $(applied_patches)
- do
--	proper_name="$(grep "^$(quote_bre $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
-+	proper_name="$(grep "^$(quote_grep_re $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
- 	proper_name=${proper_name#$QUILT_PATCHES/}
- 	proper_name=${proper_name%% *}
- 	if [ -z "$proper_name" ]
-@@ -84,7 +84,7 @@ do
- 	fi
- 
- 	if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \
--	   && grep -q "^$(quote_bre $patch)\$" \
-+	   && grep -q "^$(quote_grep_re $patch)\$" \
- 		   $QUILT_PC/applied-patches
- 	then
- 		mv $QUILT_PC/$patch $QUILT_PC/$proper_name \
--- 
-cgit v1.1
-
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 07f1d671ed..41a2daa36a 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -169,15 +169,14 @@ (define-public patchutils
 (define-public quilt
   (package
     (name "quilt")
-    (version "0.67")
+    (version "0.68")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://savannah/quilt/"
                            "quilt-" version ".tar.gz"))
        (sha256
-        (base32 "1hiw05aqysbnnl15zg2n5cr11k0z7rz85fvq8qv6qap7hw4vxqrv"))
-       (patches (search-patches "quilt-grep-compat.patch"))))
+        (base32 "09l4nf6qb8y8l62z8ypdg5mraz0lvqxg1j1p6xdyh1n10gg0k37y"))))
     (build-system gnu-build-system)
     (native-inputs
      (list gettext-minimal))
@@ -188,7 +187,6 @@ (define-public quilt
            guile-3.0))
     (arguments
      (list
-      #:parallel-tests? #f
       #:phases
       #~(modify-phases %standard-phases
           (delete 'check)
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:04 GMT) Full text and rfc822 format available.

Message #66 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 4/5] gnu: quilt: Don't install emacs package.
Date: Sun, 13 Apr 2025 10:57:05 -0400
* gnu/packages/patchutils.scm (quilt): Don't install quilt.el.  This is to be
moved to it's own guix package 'emacs-quilt'.

Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
---
 gnu/packages/patchutils.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 41a2daa36a..319b0e1284 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -189,6 +189,11 @@ (define-public quilt
      (list
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'no-emacs
+           ;; Installed in emacs-quilt package
+           (lambda _
+             (substitute* "Makefile.in"
+               ((".*lib/quilt.el.*") ""))))
           (delete 'check)
           (add-after 'install 'wrap-script
             ;; quilt's configure checks for the absolute path to the utilities it
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:09:04 GMT) Full text and rfc822 format available.

Message #69 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v2 5/5] gnu: Add emacs-quilt.
Date: Sun, 13 Apr 2025 10:57:06 -0400
* gnu/packages/patchutils.scm (emacs-quilt): New variable.

Change-Id: I0571cce902ff327dbe18f132b8ce0811dc8c3b19
---
 gnu/packages/patchutils.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 319b0e1284..2067e589ff 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -31,6 +31,7 @@ (define-module (gnu packages patchutils)
   #:use-module (guix licenses)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system emacs)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system meson)
@@ -252,6 +253,21 @@ (define-public quilt
 refreshed, and more.")
     (license gpl2)))
 
+(define-public emacs-quilt
+  (package
+    (inherit quilt)
+    (name "emacs-quilt")
+    (build-system emacs-build-system)
+    (arguments
+     (list
+      #:tests? #f                      ; no tests
+      #:lisp-directory "lib"
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install-license-files 'leave-subdirectory
+            (lambda _ (chdir ".."))))))
+    (synopsis "Emacs interface to the quilt patch management software")))
+
 (define-public colordiff
   (package
     (name "colordiff")
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:43:01 GMT) Full text and rfc822 format available.

Message #72 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>, 76594 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com
Subject: Re: [PATCH v2 4/5] gnu: quilt: Don't install emacs package.
Date: Sun, 13 Apr 2025 17:42:30 +0200
Am Sonntag, dem 13.04.2025 um 10:57 -0400 schrieb Morgan Smith:
> * gnu/packages/patchutils.scm (quilt): Don't install quilt.el.  This
> is to be moved to it's own guix package 'emacs-quilt'.
> 
> Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
> ---
What is the purpose of this and 5/5?  If it's the native compilation,
you could copy over the relevant phases from emacs-build-system.  There
are some packages that do that.


Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 15:46:01 GMT) Full text and rfc822 format available.

Message #75 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>, 76594 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com
Subject: Re: [PATCH v2 1/5] gnu: quilt: Respect #:tests? key in check phase.
Date: Sun, 13 Apr 2025 17:45:18 +0200
Am Sonntag, dem 13.04.2025 um 10:57 -0400 schrieb Morgan Smith:
> * gnu/packages/patchutils.scm (quilt): Respect #:tests? key in check
> phase.
> 
> Change-Id: Ie44938ee080f2ac6b3947899e9589174fd3c6446
> ---
>  gnu/packages/patchutils.scm | 65 +++++++++++++++++++----------------
> --
>  1 file changed, 33 insertions(+), 32 deletions(-)
> 
> diff --git a/gnu/packages/patchutils.scm
> b/gnu/packages/patchutils.scm
> index 3cd3507b07..8ba227a3d3 100644
> --- a/gnu/packages/patchutils.scm
> +++ b/gnu/packages/patchutils.scm
> @@ -205,38 +205,39 @@ (define-public quilt
>                     ,(map cmd-path
>                           (list "find" "grep" "mkdir")))))))
>           (add-after 'compress-documentation 'check
> -           (lambda _
> -             (substitute* '("test/run" "test/edit.test")
> -               (("/bin/sh") (which "sh"))
> -               (("rm -rf") (string-append (which "rm") " -rf")))
> -             (substitute* "Makefile"
> -               (("^(PATH|QUILT_DIR).*" &)
> -                (string-append "#" &)) ; Test the installed 'quilt'
> -               (("export QUILT_DIR") "export")
> -               (("\\| sort") (string-append "| " (which "sort")))
> -               (("\\| sed") (string-append "| " (which "sed")))
> -               (("(chmod|touch)" &) (which &)))
> -             ;; Tests are scripts interpreted by `test/run` and may
> specify
> -             ;; the execution of several tools.  But PATH will be
> empty, so
> -             ;; rewrite with the full file name:
> -             (setenv "PATH" (string-append %output "/bin" ":"
> (getenv "PATH")))
> -             (substitute* (find-files "test" "\\.test$")
> -               (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
> -                 & > cmd <)
> -                (if (string=? cmd "zcat")
> -                    ;; The `zcat` program is a script, and it will
> not be able
> -                    ;; to invoke its `gzip` with PATH unset.  It's a
> simple
> -                    ;; script though, so just translate here:
> -                    (string-append > (which "gzip") " -cd " <)
> -                    (or (and=> (which cmd)
> -                               (lambda (p) (string-append > p <)))
> -                        &))))
> -             (let ((make (which "make")))
> -               ;; Assert the installed 'quilt' can find utilities it
> needs.
> -               (unsetenv "PATH")
> -               ;; Used by some tests for access to internal
> "scripts"
> -               (setenv "QUILT_DIR" (string-append %output
> "/share/quilt"))
> -               (invoke make "check")))))))
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (when tests?
> +               (substitute* '("test/run" "test/edit.test")
> +                 (("/bin/sh") (which "sh"))
> +                 (("rm -rf") (string-append (which "rm") " -rf")))
> +               (substitute* "Makefile"
> +                 (("^(PATH|QUILT_DIR).*" &)
> +                  (string-append "#" &)) ; Test the installed
> 'quilt'
> +                 (("export QUILT_DIR") "export")
> +                 (("\\| sort") (string-append "| " (which "sort")))
> +                 (("\\| sed") (string-append "| " (which "sed")))
> +                 (("(chmod|touch)" &) (which &)))
> +               ;; Tests are scripts interpreted by `test/run` and
> may specify
> +               ;; the execution of several tools.  But PATH will be
> empty, so
> +               ;; rewrite with the full file name:
> +               (setenv "PATH" (string-append %output "/bin" ":"
> (getenv "PATH")))
> +               (substitute* (find-files "test" "\\.test$")
> +                 (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
> +                   & > cmd <)
> +                  (if (string=? cmd "zcat")
> +                      ;; The `zcat` program is a script, and it will
> not be able
> +                      ;; to invoke its `gzip` with PATH unset.  It's
> a simple
> +                      ;; script though, so just translate here:
> +                      (string-append > (which "gzip") " -cd " <)
> +                      (or (and=> (which cmd)
> +                                 (lambda (p) (string-append > p <)))
> +                          &))))
Everything above this line should probably be done in a pre-check or
post-unpack phase.

> +               (let ((make (which "make")))
> +                 ;; Assert the installed 'quilt' can find utilities
> it needs.
> +                 (unsetenv "PATH")
> +                 ;; Used by some tests for access to internal
> "scripts"
> +                 (setenv "QUILT_DIR" (string-append %output
> "/share/quilt"))
> +                 (invoke make "check"))))))))
Could this be handled with arguments to make?

Cheers

Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 17:41:01 GMT) Full text and rfc822 format available.

Message #78 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v3 1/4] gnu: quilt: Use gexps.
Date: Sun, 13 Apr 2025 13:39:41 -0400
* gnu/packages/patchutils.scm (quilt): Use gexps.

Change-Id: I81373365d0729b90b3e31e122eaede2daa7ae5cb
---
 gnu/packages/patchutils.scm | 111 ++++++++++++++++++------------------
 1 file changed, 57 insertions(+), 54 deletions(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 3cd3507b07..b929ed9a5a 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -52,6 +52,7 @@ (define-module (gnu packages patchutils)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages less)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages text-editors)
@@ -182,61 +183,63 @@ (define-public quilt
      (list gettext-minimal))
     (inputs
      (list bash-minimal perl less file gzip ed
-           diffutils diffstat findutils tar))
+           diffutils diffstat findutils tar
+           ;; for wrap-script
+           guile-3.0))
     (arguments
-     '(#:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'check)
-         (add-after 'install 'wrap-program
-           ;; quilt's configure checks for the absolute path to the utilities it
-           ;; needs, but uses only the name when invoking them, so we need to
-           ;; make sure the quilt script can find those utilities when run.
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((cmd-path (lambda (cmd) (dirname (which cmd))))
-                   (out      (assoc-ref outputs "out")))
-               (wrap-program (string-append out "/bin/quilt")
-                 `("PATH" ":" prefix
-                   ,(map cmd-path
-                         (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
-                               "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
-               (wrap-program (string-append out "/share/quilt/scripts/backup-files")
-                 `("PATH" ":" prefix
-                   ,(map cmd-path
-                         (list "find" "grep" "mkdir")))))))
-         (add-after 'compress-documentation 'check
-           (lambda _
-             (substitute* '("test/run" "test/edit.test")
-               (("/bin/sh") (which "sh"))
-               (("rm -rf") (string-append (which "rm") " -rf")))
-             (substitute* "Makefile"
-               (("^(PATH|QUILT_DIR).*" &)
-                (string-append "#" &)) ; Test the installed 'quilt'
-               (("export QUILT_DIR") "export")
-               (("\\| sort") (string-append "| " (which "sort")))
-               (("\\| sed") (string-append "| " (which "sed")))
-               (("(chmod|touch)" &) (which &)))
-             ;; Tests are scripts interpreted by `test/run` and may specify
-             ;; the execution of several tools.  But PATH will be empty, so
-             ;; rewrite with the full file name:
-             (setenv "PATH" (string-append %output "/bin" ":" (getenv "PATH")))
-             (substitute* (find-files "test" "\\.test$")
-               (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
-                 & > cmd <)
-                (if (string=? cmd "zcat")
-                    ;; The `zcat` program is a script, and it will not be able
-                    ;; to invoke its `gzip` with PATH unset.  It's a simple
-                    ;; script though, so just translate here:
-                    (string-append > (which "gzip") " -cd " <)
-                    (or (and=> (which cmd)
-                               (lambda (p) (string-append > p <)))
-                        &))))
-             (let ((make (which "make")))
-               ;; Assert the installed 'quilt' can find utilities it needs.
-               (unsetenv "PATH")
-               ;; Used by some tests for access to internal "scripts"
-               (setenv "QUILT_DIR" (string-append %output "/share/quilt"))
-               (invoke make "check")))))))
+     (list
+      #:parallel-tests? #f
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'check)
+          (add-after 'install 'wrap-script
+            ;; quilt's configure checks for the absolute path to the utilities it
+            ;; needs, but uses only the name when invoking them, so we need to
+            ;; make sure the quilt script can find those utilities when run.
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((cmd-path (lambda (cmd) (dirname (which cmd)))))
+                (wrap-script (string-append #$output "/bin/quilt")
+                  `("PATH" ":" prefix
+                    ,(map cmd-path
+                          (list "bash" "diff" "diffstat" "ed" "file" "find" "grep"
+                                "gzip" "less" "patch" "perl" "rm" "sed" "tar"))))
+                (wrap-script (string-append #$output "/share/quilt/scripts/backup-files")
+                  `("PATH" ":" prefix
+                    ,(map cmd-path
+                          (list "find" "grep" "mkdir")))))))
+          (add-after 'compress-documentation 'check
+            (lambda _
+              (substitute* '("test/run" "test/edit.test")
+                (("/bin/sh") (which "sh"))
+                (("rm -rf") (string-append (which "rm") " -rf")))
+              (substitute* "Makefile"
+                (("^(PATH|QUILT_DIR).*" &)
+                 (string-append "#" &)) ; Test the installed 'quilt'
+                (("export QUILT_DIR") "export")
+                (("\\| sort") (string-append "| " (which "sort")))
+                (("\\| sed") (string-append "| " (which "sed")))
+                (("(chmod|touch)" &) (which &)))
+              ;; Tests are scripts interpreted by `test/run` and may specify
+              ;; the execution of several tools.  But PATH will be empty, so
+              ;; rewrite with the full file name:
+              (setenv "PATH" (string-append #$output "/bin" ":" (getenv "PATH")))
+              (substitute* (find-files "test" "\\.test$")
+                (("([\\$\\|] )([[:graph:]]+)([[:blank:]\n]+)"
+                  & > cmd <)
+                 (if (string=? cmd "zcat")
+                     ;; The `zcat` program is a script, and it will not be able
+                     ;; to invoke its `gzip` with PATH unset.  It's a simple
+                     ;; script though, so just translate here:
+                     (string-append > (which "gzip") " -cd " <)
+                     (or (and=> (which cmd)
+                                (lambda (p) (string-append > p <)))
+                         &))))
+              (let ((make (which "make")))
+                ;; Assert the installed 'quilt' can find utilities it needs.
+                (unsetenv "PATH")
+                ;; Used by some tests for access to internal "scripts"
+                (setenv "QUILT_DIR" (string-append #$output "/share/quilt"))
+                (invoke make "check")))))))
     (home-page "https://savannah.nongnu.org/projects/quilt/")
     (synopsis "Script for managing patches to software")
     (description

base-commit: 03edfea126a88110b520469e96eae73ce86d4b7d
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 17:41:02 GMT) Full text and rfc822 format available.

Message #81 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v3 2/4] gnu: quilt: Update to 0.68.
Date: Sun, 13 Apr 2025 13:39:42 -0400
* gnu/packages/patchutils.scm (quilt): Update to 0.68.  Enable parallel tests
as upstream fixed it.
* /gnu/packages/patches/quilt-grep-compat.patch: Delete file.
* gnu/local.mk: Remove quilt-grep-compat.patch.

Change-Id: I5da532c07c83d00363799a1cc7f48e0fe63864fe
---
 gnu/local.mk                                 |   1 -
 gnu/packages/patches/quilt-grep-compat.patch | 145 -------------------
 gnu/packages/patchutils.scm                  |   6 +-
 3 files changed, 2 insertions(+), 150 deletions(-)
 delete mode 100644 gnu/packages/patches/quilt-grep-compat.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c0b9a76cd2..9d8b17f94a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2164,7 +2164,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/qtscript-disable-tests.patch		\
   %D%/packages/patches/quagga-reproducible-build.patch          \
   %D%/packages/patches/quickswitch-fix-dmenu-check.patch	\
-  %D%/packages/patches/quilt-grep-compat.patch 			\
   %D%/packages/patches/qmk-firmware-fix-hacker-dvorak.patch 	\
   %D%/packages/patches/qtwayland-dont-recreate-callbacks.patch	\
   %D%/packages/patches/qtwayland-cleanup-callbacks.patch	\
diff --git a/gnu/packages/patches/quilt-grep-compat.patch b/gnu/packages/patches/quilt-grep-compat.patch
deleted file mode 100644
index 25fef506d1..0000000000
--- a/gnu/packages/patches/quilt-grep-compat.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From upstream
-https://git.savannah.nongnu.org/cgit/quilt.git/patch/?id=f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f
-
-From f73f8d7f71de2878d3f92881a5fcb8eafd78cb5f Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare <at> suse.de>
-Date: Fri, 9 Sep 2022 10:10:37 +0200
-Subject: Avoid warnings with grep 3.8
-
-GNU grep version 3.8 became more strict about needless quoting in
-patterns. We have one occurrence of that in quilt, where "/"
-characters are being quoted by default. There are cases where they
-indeed need to be quoted (typically when used in a sed s/// command)
-but most of the time they do not, and this results in the following
-warning:
-
-grep: warning: stray \ before /
-
-So rename quote_bre() to quote_sed_re(), and introduce
-quote_grep_re() which does not quote "/".
-
-Signed-off-by: Jean Delvare <jdelvare <at> suse.de>
----
- quilt/diff.in             |  2 +-
- quilt/patches.in          |  2 +-
- quilt/scripts/patchfns.in | 20 +++++++++++++-------
- quilt/upgrade.in          |  4 ++--
- 4 files changed, 17 insertions(+), 11 deletions(-)
-
-diff --git a/quilt/diff.in b/quilt/diff.in
-index e90dc33..07788ff 100644
---- a/quilt/diff.in
-+++ b/quilt/diff.in
-@@ -255,7 +255,7 @@ then
- 	# Add all files in the snapshot into the file list (they may all
- 	# have changed).
- 	files=( $(find $QUILT_PC/$snap_subdir -type f \
--		  | sed -e "s/^$(quote_bre $QUILT_PC/$snap_subdir/)//" \
-+		  | sed -e "s/^$(quote_sed_re $QUILT_PC/$snap_subdir/)//" \
- 		  | sort) )
- 	printf "%s\n" "${files[@]}" >&4
- 	unset files
-diff --git a/quilt/patches.in b/quilt/patches.in
-index bb17a46..eac45a9 100644
---- a/quilt/patches.in
-+++ b/quilt/patches.in
-@@ -60,7 +60,7 @@ scan_unapplied()
- 	# Quote each file name only once
- 	for file in "${opt_files[@]}"
- 	do
--		files_bre[${#files_bre[@]}]=$(quote_bre "$file")
-+		files_bre[${#files_bre[@]}]=$(quote_grep_re "$file")
- 	done
- 
- 	# "Or" all files in a single pattern
-diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
-index c2d5f9d..1bd7233 100644
---- a/quilt/scripts/patchfns.in
-+++ b/quilt/scripts/patchfns.in
-@@ -78,8 +78,14 @@ array_join()
- 	done
- }
- 
--# Quote a string for use in a basic regular expression.
--quote_bre()
-+# Quote a string for use in a regular expression for a grep pattern.
-+quote_grep_re()
-+{
-+	echo "$1" | sed -e 's:\([][^$.*\\]\):\\\1:g'
-+}
-+
-+# Quote a string for use in a regular expression for a sed s/// command.
-+quote_sed_re()
- {
- 	echo "$1" | sed -e 's:\([][^$/.*\\]\):\\\1:g'
- }
-@@ -215,7 +221,7 @@ patch_in_series()
- 
- 	if [ -e "$SERIES" ]
- 	then
--		grep -q "^$(quote_bre $patch)\([ \t]\|$\)" "$SERIES"
-+		grep -q "^$(quote_grep_re $patch)\([ \t]\|$\)" "$SERIES"
- 	else
- 		return 1
- 	fi
-@@ -365,7 +371,7 @@ is_applied()
- {
- 	local patch=$1
- 	[ -e $DB ] || return 1
--	grep -q "^$(quote_bre $patch)\$" $DB
-+	grep -q "^$(quote_grep_re $patch)\$" $DB
- }
- 
- applied_patches()
-@@ -465,7 +471,7 @@ remove_from_db()
- 	local tmpfile
- 	if tmpfile=$(gen_tempfile)
- 	then
--		grep -v "^$(quote_bre $patch)\$" $DB > $tmpfile
-+		grep -v "^$(quote_grep_re $patch)\$" $DB > $tmpfile
- 		cat $tmpfile > $DB
- 		rm -f $tmpfile
- 		[ -s $DB ] || rm -f $DB
-@@ -520,7 +526,7 @@ find_patch()
- 		fi
- 
- 		local patch=${1#$SUBDIR_DOWN$QUILT_PATCHES/}
--		local bre=$(quote_bre "$patch")
-+		local bre=$(quote_sed_re "$patch")
- 		set -- $(sed -e "/^$bre\(\|\.patch\|\.diff\?\)\(\|\.gz\|\.bz2\|\.xz\|\.lzma\|\.lz\)\([ "$'\t'"]\|$\)/!d" \
- 			       -e 's/[ '$'\t''].*//' "$SERIES")
- 		if [ $# -eq 1 ]
-@@ -631,7 +637,7 @@ files_in_patch()
- 	then
- 		find "$path" -type f \
- 			       -a ! -path "$(quote_glob "$path")/.timestamp" |
--		sed -e "s/$(quote_bre "$path")\///"
-+		sed -e "s/$(quote_sed_re "$path")\///"
- 	fi
- }
- 
-diff --git a/quilt/upgrade.in b/quilt/upgrade.in
-index dbf7d05..866aa33 100644
---- a/quilt/upgrade.in
-+++ b/quilt/upgrade.in
-@@ -74,7 +74,7 @@ printf $"Converting meta-data to version %s\n" "$DB_VERSION"
- 
- for patch in $(applied_patches)
- do
--	proper_name="$(grep "^$(quote_bre $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
-+	proper_name="$(grep "^$(quote_grep_re $patch)"'\(\|\.patch\|\.diff?\)\(\|\.gz\|\.bz2\)\([ \t]\|$\)' $SERIES)"
- 	proper_name=${proper_name#$QUILT_PATCHES/}
- 	proper_name=${proper_name%% *}
- 	if [ -z "$proper_name" ]
-@@ -84,7 +84,7 @@ do
- 	fi
- 
- 	if [ "$patch" != "$proper_name" -a -d $QUILT_PC/$patch ] \
--	   && grep -q "^$(quote_bre $patch)\$" \
-+	   && grep -q "^$(quote_grep_re $patch)\$" \
- 		   $QUILT_PC/applied-patches
- 	then
- 		mv $QUILT_PC/$patch $QUILT_PC/$proper_name \
--- 
-cgit v1.1
-
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index b929ed9a5a..ea784c5acd 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -169,15 +169,14 @@ (define-public patchutils
 (define-public quilt
   (package
     (name "quilt")
-    (version "0.67")
+    (version "0.68")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://savannah/quilt/"
                            "quilt-" version ".tar.gz"))
        (sha256
-        (base32 "1hiw05aqysbnnl15zg2n5cr11k0z7rz85fvq8qv6qap7hw4vxqrv"))
-       (patches (search-patches "quilt-grep-compat.patch"))))
+        (base32 "09l4nf6qb8y8l62z8ypdg5mraz0lvqxg1j1p6xdyh1n10gg0k37y"))))
     (build-system gnu-build-system)
     (native-inputs
      (list gettext-minimal))
@@ -188,7 +187,6 @@ (define-public quilt
            guile-3.0))
     (arguments
      (list
-      #:parallel-tests? #f
       #:phases
       #~(modify-phases %standard-phases
           (delete 'check)
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 17:41:02 GMT) Full text and rfc822 format available.

Message #84 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v3 3/4] gnu: quilt: Use standard check phase.
Date: Sun, 13 Apr 2025 13:39:43 -0400
* gnu/packages/patchutils.scm (quilt): Use standard check phase.

Change-Id: I79cb2828a877b7b6ba3cf7b16a56f454ea44803d
---
 gnu/packages/patchutils.scm | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index ea784c5acd..3da1e7b3b4 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -206,7 +206,9 @@ (define-public quilt
                     ,(map cmd-path
                           (list "find" "grep" "mkdir")))))))
           (add-after 'compress-documentation 'check
-            (lambda _
+            (assoc-ref %standard-phases 'check))
+          (add-before 'check 'fix-check
+            (lambda* (#:key inputs #:allow-other-keys)
               (substitute* '("test/run" "test/edit.test")
                 (("/bin/sh") (which "sh"))
                 (("rm -rf") (string-append (which "rm") " -rf")))
@@ -232,12 +234,12 @@ (define-public quilt
                      (or (and=> (which cmd)
                                 (lambda (p) (string-append > p <)))
                          &))))
-              (let ((make (which "make")))
-                ;; Assert the installed 'quilt' can find utilities it needs.
-                (unsetenv "PATH")
-                ;; Used by some tests for access to internal "scripts"
-                (setenv "QUILT_DIR" (string-append #$output "/share/quilt"))
-                (invoke make "check")))))))
+              ;; Assert the installed 'quilt' can find utilities it needs by
+              ;; emptying PATH of everything except make.
+              (setenv "PATH" (string-append (assoc-ref inputs "make") "/bin"))
+
+              ;; Used by some tests for access to internal "scripts"
+              (setenv "QUILT_DIR" (string-append #$output "/share/quilt")))))))
     (home-page "https://savannah.nongnu.org/projects/quilt/")
     (synopsis "Script for managing patches to software")
     (description
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 17:44:02 GMT) Full text and rfc822 format available.

Message #87 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v3 4/4] gnu: quilt: Build emacs package.
Date: Sun, 13 Apr 2025 13:39:46 -0400
* gnu/packages/patchutils.scm (quilt): Build emacs package.

Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
---

Look at this absolute abomination!  I'm so proud of this!

Please tell me all the reasons why this a terrible idea because I know it is
but the specific reasons elude me.

 gnu/packages/patchutils.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 3da1e7b3b4..64283d4ac1 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -44,6 +44,7 @@ (define-module (gnu packages patchutils)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages django)
+  #:use-module (gnu packages emacs)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gawk)
@@ -179,7 +180,7 @@ (define-public quilt
         (base32 "09l4nf6qb8y8l62z8ypdg5mraz0lvqxg1j1p6xdyh1n10gg0k37y"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list gettext-minimal))
+     (list emacs-minimal gettext-minimal))
     (inputs
      (list bash-minimal perl less file gzip ed
            diffutils diffstat findutils tar
@@ -187,8 +188,31 @@ (define-public quilt
            guile-3.0))
     (arguments
      (list
+      #:imported-modules `(,@%default-gnu-imported-modules
+                           (guix build emacs-build-system)
+                           (guix build emacs-utils))
+      #:modules `(,@%default-gnu-modules
+                  ((guix build emacs-build-system) #:prefix emacs:)
+                  (guix build emacs-utils))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'emacs-build
+            (lambda* (#:rest args)
+              ;; Don't build using makefile
+              (substitute* "Makefile.in"
+                ((".*lib/quilt.el.*") ""))
+              (with-directory-excursion "lib"
+                ;; Run the `emacs-build-system' phases that aren't 'unpack' or
+                ;; duplicated in %standard-phases
+                (for-each
+                 (lambda (phase)
+                   (apply (cdr phase)
+                          ;; No tests
+                          (append args '(#:tests? #f))))
+                 (filter (lambda (phase)
+                           (not (or (eq? 'unpack (car phase))
+                                    (memq phase %standard-phases))))
+                         emacs:%standard-phases)))))
           (delete 'check)
           (add-after 'install 'wrap-script
             ;; quilt's configure checks for the absolute path to the utilities it
-- 
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 18:43:02 GMT) Full text and rfc822 format available.

Message #90 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Morgan Smith <Morgan.J.Smith <at> outlook.com>, 76594 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com
Subject: Re: [PATCH v3 4/4] gnu: quilt: Build emacs package.
Date: Sun, 13 Apr 2025 20:42:12 +0200
Am Sonntag, dem 13.04.2025 um 13:39 -0400 schrieb Morgan Smith:
> * gnu/packages/patchutils.scm (quilt): Build emacs package.
> 
> Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
> ---
> 
> Look at this absolute abomination!  I'm so proud of this!
> 
> Please tell me all the reasons why this a terrible idea because I
> know it is
> but the specific reasons elude me.
> 
>  gnu/packages/patchutils.scm | 26 +++++++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/patchutils.scm
> b/gnu/packages/patchutils.scm
> index 3da1e7b3b4..64283d4ac1 100644
> --- a/gnu/packages/patchutils.scm
> +++ b/gnu/packages/patchutils.scm
> @@ -44,6 +44,7 @@ (define-module (gnu packages patchutils)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages databases)
>    #:use-module (gnu packages django)
> +  #:use-module (gnu packages emacs)
>    #:use-module (gnu packages freedesktop)
>    #:use-module (gnu packages file)
>    #:use-module (gnu packages gawk)
> @@ -179,7 +180,7 @@ (define-public quilt
>          (base32
> "09l4nf6qb8y8l62z8ypdg5mraz0lvqxg1j1p6xdyh1n10gg0k37y"))))
>      (build-system gnu-build-system)
>      (native-inputs
> -     (list gettext-minimal))
> +     (list emacs-minimal gettext-minimal))
>      (inputs
>       (list bash-minimal perl less file gzip ed
>             diffutils diffstat findutils tar
> @@ -187,8 +188,31 @@ (define-public quilt
>             guile-3.0))
>      (arguments
>       (list
> +      #:imported-modules `(,@%default-gnu-imported-modules
> +                           (guix build emacs-build-system)
> +                           (guix build emacs-utils))
> +      #:modules `(,@%default-gnu-modules
> +                  ((guix build emacs-build-system) #:prefix emacs:)
> +                  (guix build emacs-utils))
>        #:phases
>        #~(modify-phases %standard-phases
> +          (add-after 'unpack 'emacs-build
> +            (lambda* (#:rest args)
> +              ;; Don't build using makefile
> +              (substitute* "Makefile.in"
> +                ((".*lib/quilt.el.*") ""))
> +              (with-directory-excursion "lib"
> +                ;; Run the `emacs-build-system' phases that aren't
> 'unpack' or
> +                ;; duplicated in %standard-phases
> +                (for-each
> +                 (lambda (phase)
> +                   (apply (cdr phase)
> +                          ;; No tests
> +                          (append args '(#:tests? #f))))
> +                 (filter (lambda (phase)
> +                           (not (or (eq? 'unpack (car phase))
> +                                    (memq phase %standard-phases))))
> +                         emacs:%standard-phases)))))
While smart, please spell out the phases and run them once each :)

See other packages for reference.

Cheers


Information forwarded to guix-patches <at> gnu.org:
bug#76594; Package guix-patches. (Sun, 13 Apr 2025 20:10:01 GMT) Full text and rfc822 format available.

Message #93 received at 76594 <at> debbugs.gnu.org (full text, mbox):

From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
To: 76594 <at> debbugs.gnu.org
Cc: Morgan Smith <Morgan.J.Smith <at> outlook.com>, liliana.prikler <at> gmail.com,
 maxim.cournoyer <at> gmail.com
Subject: [PATCH v4 4/4] gnu: quilt: Build emacs package.
Date: Sun, 13 Apr 2025 16:08:16 -0400
* gnu/packages/patchutils.scm (quilt): Build emacs package.

Change-Id: I4d70ad1c137a377f71cd9d3f1b69f5ed95e4debd
---
 gnu/packages/patchutils.scm | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 3da1e7b3b4..4b0fcde8a8 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -44,6 +44,7 @@ (define-module (gnu packages patchutils)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages django)
+  #:use-module (gnu packages emacs)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages file)
   #:use-module (gnu packages gawk)
@@ -179,7 +180,7 @@ (define-public quilt
         (base32 "09l4nf6qb8y8l62z8ypdg5mraz0lvqxg1j1p6xdyh1n10gg0k37y"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list gettext-minimal))
+     (list emacs-minimal gettext-minimal))
     (inputs
      (list bash-minimal perl less file gzip ed
            diffutils diffstat findutils tar
@@ -187,8 +188,36 @@ (define-public quilt
            guile-3.0))
     (arguments
      (list
+      #:imported-modules `(,@%default-gnu-imported-modules
+                           (guix build emacs-build-system)
+                           (guix build emacs-utils))
+      #:modules `(,@%default-gnu-modules
+                  ((guix build emacs-build-system) #:prefix emacs:)
+                  (guix build emacs-utils))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'no-emacs-build
+            (lambda _
+              ;; Don't build using makefile
+              (substitute* "Makefile.in"
+                ((".*lib/quilt.el.*") ""))))
+          (add-after 'no-emacs-build 'chdir-emacs-build
+            (lambda _
+              (chdir "lib")))
+          (add-after 'chdir-emacs-build 'emacs-ensure-package-description
+            (assoc-ref emacs:%standard-phases 'ensure-package-description))
+          (add-after 'emacs-ensure-package-description 'emacs-make-autoloads
+            (assoc-ref emacs:%standard-phases 'make-autoloads))
+          ;; Don't include Emacs check phase as there are no Emacs tests
+          (add-after 'emacs-make-autoloads 'emacs-install
+            (assoc-ref emacs:%standard-phases 'install))
+          (add-after 'emacs-install 'emacs-build
+            (assoc-ref emacs:%standard-phases 'build))
+          (add-after 'emacs-build 'emacs-validate-compiled-autoloads
+            (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads))
+          (add-after 'emacs-validate-compiled-autoloads 'chdir-out-of-emacs-build
+            (lambda _
+              (chdir "..")))
           (delete 'check)
           (add-after 'install 'wrap-script
             ;; quilt's configure checks for the absolute path to the utilities it

base-commit: 03edfea126a88110b520469e96eae73ce86d4b7d
prerequisite-patch-id: f80d0520f7c77a03803856fd859879875614851b
prerequisite-patch-id: f94ece5e1fb310c55583bca97c977d3132ae2a78
prerequisite-patch-id: 93f40b5d1a83ff8a6c9a9243f2141f7f4c1f4af1
-- 
2.49.0





This bug report was last modified 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.