unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: 27811@debbugs.gnu.org
Subject: bug#27811: net-tools patch has no effect?
Date: Tue, 25 Jul 2017 00:59:47 -0400	[thread overview]
Message-ID: <20170725045947.GA531@jasmine.lan> (raw)
In-Reply-To: <20170725041225.GA31642@jasmine.lan>

[-- Attachment #1: Type: text/plain, Size: 2549 bytes --]

On Tue, Jul 25, 2017 at 12:12:25AM -0400, Leo Famulari wrote:
> This problem with the wrong number of arguments being passed to
> parse_media() is introduced in the Debian patch, so we should check if
> there is a better version of the patch or if fixes are being applied
> upstream.

Actually, the first issue is that the patch doesn't apply to the source
fully. I tried a later patch from Debian, but it also doesn't apply. I
haven't been able to try fetching a later revision of the net-tools Git
repo, because I first have to make Git not depend on net-tools.

This patch will try to apply the patch and handle the exit codes of
gunzip and patch correctly:

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 456909a94..cab6abb32 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1220,14 +1217,15 @@ messages and are accompanied by a set of manpages.")
                      (zero? (system* "patch" "-p1" "--force"
                                      "--input" file)))
 
-                   (let ((patch.gz (assoc-ref inputs "patch")))
+                   (let ((patch.gz (assoc-ref inputs "debian-patch")))
                      (format #t "applying Debian patch set '~a'...~%"
                              patch.gz)
-                     (system (string-append "gunzip < " patch.gz " > the-patch"))
-                     (and (apply-patch "the-patch")
-                          (for-each apply-patch
-                                    (find-files "debian/patches"
-                                                "\\.patch")))))
+                     (and
+                       (zero? (system (string-append "gunzip < " patch.gz " > debian-patch")))
+                       (and (apply-patch "debian-patch")
+                            (every apply-patch
+                                      (find-files "debian/patches"
+                                                  "\\.patch"))))))
                  (alist-replace
                   'configure
                   (lambda* (#:key outputs #:allow-other-keys)
@@ -1270,7 +1268,7 @@ messages and are accompanied by a set of manpages.")
 
     ;; Use the big Debian patch set (the thing does not even compile out of
     ;; the box.)
-    (inputs `(("patch" ,(origin
+    (inputs `(("debian-patch" ,(origin
                          (method url-fetch)
                          (uri
                           "http://ftp.de.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz")

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-07-25  5:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 22:02 bug#27811: net-tools patch has no effect? Leo Famulari
2017-07-25  4:12 ` Leo Famulari
2017-07-25  4:59   ` Leo Famulari [this message]
2017-07-25  8:27     ` Ludovic Courtès
2017-07-25 16:10       ` Leo Famulari
2017-07-25 17:52       ` Leo Famulari
2017-07-25 17:53         ` Leo Famulari
2017-07-25 18:03         ` Leo Famulari
2017-07-25 18:08           ` Leo Famulari
2017-07-25 21:30             ` Ludovic Courtès
2017-07-25 21:33         ` Ludovic Courtès
2017-07-26 16:08           ` Leo Famulari
2017-07-26 16:11         ` Leo Famulari
2017-07-26 21:04           ` Ludovic Courtès
2017-07-27 17:41             ` Leo Famulari

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20170725045947.GA531@jasmine.lan \
    --to=leo@famulari.name \
    --cc=27811@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).