From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#27811: net-tools patch has no effect? Date: Wed, 26 Jul 2017 12:11:46 -0400 Message-ID: <20170726161146.GB6239@jasmine.lan> References: <20170725041225.GA31642@jasmine.lan> <20170725045947.GA531@jasmine.lan> <87shhkncq3.fsf@gnu.org> <20170725175202.GA27528@jasmine.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2JFBq9zoW8cOFH7v" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daOvs-0000NN-Ig for bug-guix@gnu.org; Wed, 26 Jul 2017 12:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daOvm-0005D3-OK for bug-guix@gnu.org; Wed, 26 Jul 2017 12:13:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1daOvm-0005Cf-JF for bug-guix@gnu.org; Wed, 26 Jul 2017 12:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1daOvm-0002VW-5Q for bug-guix@gnu.org; Wed, 26 Jul 2017 12:13:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20170725175202.GA27528@jasmine.lan> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27811@debbugs.gnu.org --2JFBq9zoW8cOFH7v Content-Type: multipart/mixed; boundary="eJnRUKwClWJh1Khz" Content-Disposition: inline --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote: > From f57732d79ac265917f154da5791ff203c82c9733 Mon Sep 17 00:00:00 2001 > From: Leo Famulari > Date: Tue, 25 Jul 2017 01:46:38 -0400 > Subject: [PATCH 2/2] gnu: net-tools: Update to 1.60-0.90da8a0. >=20 > Fixes . >=20 > * gnu/packages/linux.scm (net-tools): Update to 1.60-0.90da8a0. > [inputs]: Remove the Debian patch. > [arguments]: Use modify-phases. Remove the 'patch' phase. Disable > SELINUX and AFBLUETOOTH from build configuration. Revisions! The first patch is the same as before, but the second one uses git-fetch and builds from the latest upstream commit. I'll squash them if we choose to build from Git. --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-net-tools-Update-to-1.60-0.90da8a0.patch" Content-Transfer-Encoding: quoted-printable =46rom 6cd4159e355b9414b0678608e74fa53b8e173834 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Tue, 25 Jul 2017 20:33:27 -0400 Subject: [PATCH 1/2] gnu: net-tools: Update to 1.60-0.90da8a0. This leaves net-tools-for-tests unchanged. Fixes . * gnu/packages/linux.scm (net-tools): Update to 1.60-0.90da8a0. [inputs]: Remove the Debian patch. [arguments]: Use modify-phases. Remove the 'patch' phase. Disable SELINUX and AFBLUETOOTH from build configuration. --- gnu/packages/linux.scm | 103 ++++++++++++++++++++++++++++++++++++++++++---= ---- 1 file changed, 88 insertions(+), 15 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7412ee571..d55eb6a11 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1187,14 +1187,96 @@ consists of several tools, of which the most import= ant are @command{ip} and messages and are accompanied by a set of manpages.") (license license:gpl2+))) =20 +;; There are two packages for net-tools. The first, net-tools, is more rec= ent +;; and probably safer to use with untrusted inputs (i.e. the internet). T= he +;; second, net-tools-for-tests, is relatively old and buggy. It can be use= d in +;; package test suites and should never be referred to by a built package.= Use +;; #:disallowed-references to enforce this. +;; +;; When we are able to rebuild many packages (i.e. core-updates), we can u= pdate +;; net-tools-for-tests if appropriate. +;; +;; See for more information. (define-public net-tools ;; XXX: This package is basically unmaintained, but it provides a few ;; commands not yet provided by Inetutils, such as 'route', so we have to ;; live with it. (package (name "net-tools") - (version "1.60") + (version "1.60-0.90da8a0") + ;; This tarball from Debian is equivalent to a Git checkout of the ups= tream + ;; repo, , commit + ;; 90da8a01bd27a945bb85c7773e8174a6cb7037a1. + ;; Git depends on net-tools, transitively, so we fetch this tarball to= avoid + ;; a reference cycle. We should find a better workaround for this prob= lem so + ;; that we can use the latest upstream source. + (source (origin + (method url-fetch) + (uri (string-append "http://http.debian.net/debian/pool/main/= n/" + "net-tools/net-tools_1.60+git20161116.90d= a8a0" + ".orig.tar.gz")) + (sha256 + (base32 + "0ahrqhxrgqk0x785ghzlpcfgs7418cj1xcpbajxv46slf15mrhnk")))) (home-page "http://net-tools.sourceforge.net/") + (build-system gnu-build-system) + (arguments + '(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/bin")) + (mkdir-p (string-append out "/sbin")) + + ;; Pretend we have everything... + (system "yes | make config") + + ;; ... except for the things we don't have. + ;; HAVE_AFDECnet requires libdnet, which we don't have. + ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers + ;; that have been removed. + ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we = should + ;; think about adding them later. + (substitute* '("config.make" "config.h") + (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ = =3D]1.*$") + ""))))) + (add-after 'install 'remove-redundant-commands + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove commands and man pages redundant with Inetutils. + (let* ((out (assoc-ref outputs "out")) + (dup (append-map (cut find-files out <>) + '("^hostname" + "^(yp|nis|dns)?domainname")))) + (for-each delete-file dup) + #t)))) + ;; Binaries that depend on libnet-tools.a don't declare that + ;; dependency, making it parallel-unsafe. + #:parallel-build? #f + + #:tests? #f ; no test suite + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "CC=3Dgcc" + (string-append "BASEDIR=3D" out) + (string-append "INSTALLNLSDIR=3D" out "/share/= locale") + (string-append "mandir=3D/share/man"))))) + (native-inputs `(("gettext" ,gettext-minimal))) + (synopsis "Tools for controlling the network subsystem in Linux") + (description + "This package includes the important tools for controlling the network +subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp= and +route. Additionally, this package contains utilities relating to particul= ar +network hardware types (plipconfig, slattach) and advanced aspects of IP +configuration (iptunnel, ipmaddr).") + (license license:gpl2+))) + +(define-public net-tools-for-tests + (hidden-package (package (inherit net-tools) + (version "1.60") (source (origin (method url-fetch) (uri (list (string-append @@ -1270,26 +1352,17 @@ messages and are accompanied by a set of manpages.") =20 ;; Use the big Debian patch set (the thing does not even compile out of ;; the box.) + ;; XXX The patch is not actually applied, due to a bug in the 'patch' = phase + ;; above. However, this package variant is only used in GnuTLS's tests= =2E It + ;; will be adjusted when convenient for the build farm. + ;; See for more information. (inputs `(("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") (sha256 (base32 - "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzh= jc030p")))))) - (native-inputs `(("gettext" ,gettext-minimal))) - - (synopsis "Tools for controlling the network subsystem in Linux") - (description - "This package includes the important tools for controlling the network -subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp= and -route. Additionally, this package contains utilities relating to particul= ar -network hardware types (plipconfig, slattach) and advanced aspects of IP -configuration (iptunnel, ipmaddr).") - (license license:gpl2+))) - -(define-public net-tools-for-tests - (hidden-package net-tools)) + "0p93lsqx23v5fv4hpbrydmfvw1ha2rgqpn2zqbs2jhxkzh= jc030p"))))))))) =20 (define-public libcap (package --=20 2.13.3 --eJnRUKwClWJh1Khz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-gnu-net-tools-Update-to-1.60-1.479bb4a7.patch" Content-Transfer-Encoding: quoted-printable =46rom 0eccb8538c8deda5cf06b5ad98974b5fd62a0f5b Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Wed, 26 Jul 2017 11:54:20 -0400 Subject: [PATCH 2/2] gnu: net-tools: Update to 1.60-1.479bb4a7. * gnu/packages/linux.scm (net-tools): Update to 1.60-0.479bb4a7. [source]: Use git-fetch. --- gnu/packages/linux.scm | 137 +++++++++++++++++++++++++--------------------= ---- 1 file changed, 69 insertions(+), 68 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d55eb6a11..9226cebf9 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -106,6 +106,7 @@ #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) @@ -1201,82 +1202,82 @@ messages and are accompanied by a set of manpages.") ;; XXX: This package is basically unmaintained, but it provides a few ;; commands not yet provided by Inetutils, such as 'route', so we have to ;; live with it. - (package - (name "net-tools") - (version "1.60-0.90da8a0") - ;; This tarball from Debian is equivalent to a Git checkout of the ups= tream - ;; repo, , commit - ;; 90da8a01bd27a945bb85c7773e8174a6cb7037a1. - ;; Git depends on net-tools, transitively, so we fetch this tarball to= avoid - ;; a reference cycle. We should find a better workaround for this prob= lem so - ;; that we can use the latest upstream source. - (source (origin - (method url-fetch) - (uri (string-append "http://http.debian.net/debian/pool/main/= n/" - "net-tools/net-tools_1.60+git20161116.90d= a8a0" - ".orig.tar.gz")) - (sha256 - (base32 - "0ahrqhxrgqk0x785ghzlpcfgs7418cj1xcpbajxv46slf15mrhnk")))) - (home-page "http://net-tools.sourceforge.net/") - (build-system gnu-build-system) - (arguments - '(#:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1) - (srfi srfi-26)) - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (mkdir-p (string-append out "/bin")) - (mkdir-p (string-append out "/sbin")) - - ;; Pretend we have everything... - (system "yes | make config") - - ;; ... except for the things we don't have. - ;; HAVE_AFDECnet requires libdnet, which we don't have. - ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers - ;; that have been removed. - ;; XXX SELINUX and AFBLUETOOTH are removed for now, but we = should - ;; think about adding them later. - (substitute* '("config.make" "config.h") - (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[ = =3D]1.*$") - ""))))) - (add-after 'install 'remove-redundant-commands - (lambda* (#:key outputs #:allow-other-keys) - ;; Remove commands and man pages redundant with Inetutils. - (let* ((out (assoc-ref outputs "out")) - (dup (append-map (cut find-files out <>) - '("^hostname" - "^(yp|nis|dns)?domainname")))) - (for-each delete-file dup) - #t)))) - ;; Binaries that depend on libnet-tools.a don't declare that - ;; dependency, making it parallel-unsafe. - #:parallel-build? #f - - #:tests? #f ; no test suite - #:make-flags (let ((out (assoc-ref %outputs "out"))) - (list "CC=3Dgcc" - (string-append "BASEDIR=3D" out) - (string-append "INSTALLNLSDIR=3D" out "/share/= locale") - (string-append "mandir=3D/share/man"))))) - (native-inputs `(("gettext" ,gettext-minimal))) - (synopsis "Tools for controlling the network subsystem in Linux") - (description - "This package includes the important tools for controlling the network + (let ((commit "479bb4a7e11a4084e2935c0a576388f92469225b") + (revision "1")) + (package + (name "net-tools") + (version (string-append "1.60-" revision "." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.code.sf.net/p/net-tools/code") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "189mdjfbd7j7j0jysy34nqn5byy9g5f6ylip1sikk7kz08vjml4s")))) + (home-page "http://net-tools.sourceforge.net/") + (build-system gnu-build-system) + (arguments + '(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/bin")) + (mkdir-p (string-append out "/sbin")) + + ;; Pretend we have everything... + (system "yes | make config") + + ;; ... except for the things we don't have. + ;; HAVE_AFDECnet requires libdnet, which we don't have. + ;; HAVE_HWSTRIP and HAVE_HWTR require kernel headers + ;; that have been removed. + ;; XXX SELINUX and AFBLUETOOTH are removed for now, but w= e should + ;; think about adding them later. + (substitute* '("config.make" "config.h") + (("^.*HAVE_(AFDECnet|HWSTRIP|HWTR|SELINUX|AFBLUETOOTH)[= =3D]1.*$") + ""))))) + (add-after 'install 'remove-redundant-commands + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove commands and man pages redundant with Inetutils. + (let* ((out (assoc-ref outputs "out")) + (dup (append-map (cut find-files out <>) + '("^hostname" + "^(yp|nis|dns)?domainname")))) + (for-each delete-file dup) + #t)))) + ;; Binaries that depend on libnet-tools.a don't declare that + ;; dependency, making it parallel-unsafe. + #:parallel-build? #f + + #:tests? #f ; no test suite + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "CC=3Dgcc" + (string-append "BASEDIR=3D" out) + (string-append "INSTALLNLSDIR=3D" out "/shar= e/locale") + (string-append "mandir=3D/share/man"))))) + (native-inputs `(("gettext" ,gettext-minimal))) + (synopsis "Tools for controlling the network subsystem in Linux") + (description + "This package includes the important tools for controlling the netw= ork subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp= and route. Additionally, this package contains utilities relating to particul= ar network hardware types (plipconfig, slattach) and advanced aspects of IP configuration (iptunnel, ipmaddr).") - (license license:gpl2+))) + (license license:gpl2+)))) =20 (define-public net-tools-for-tests (hidden-package (package (inherit net-tools) (version "1.60") + ;; Git depends on net-tools-for-tests via GnuTLS, so we can't use git-= fetch + ;; here. We should find a better workaround for this problem so that = we can + ;; use the latest upstream source. (source (origin (method url-fetch) (uri (list (string-append --=20 2.13.3 --eJnRUKwClWJh1Khz-- --2JFBq9zoW8cOFH7v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll4v0EACgkQJkb6MLrK fwiPQxAA6+NTlBcGFOXq94wgEguN6QEAryLKCWWRicHfAou+cE6pIcFZ7/6avWma 8VG5GkvD0yVUtNou7jzkwRWtZwO6imGCfchoqc6arIlRlDKNi7wF79Vf0IuAfCMv 8afJVyoZCak1YRCUNR8++PIZnegbiLLfrKpXKyRRWZ0TvP0oA9HchVwkQiEDDUfP dvX2y6e4N0XIvzHCkuqrXursQriPQa7ykrQvbztMa0J5q1nLBS4JgphH5Sjuz03/ ZPMo204f08J1+EQytsPaJnfYTUtSCf6shu6qe8Z1zNWALoFERKeSKctoNU1K4yrd ky7aCirV8O+DS1nr5/sdjWQZ8ar1wCZ/hInfsL4dIeI1upy+qf/OAf7O29fOsncI wI0UpJ0u33kiBjtS1wQFR9XI4q6p75mwHa77RttN0HmckJQWruxADLpC8f/c1bsH c/AWPcr7LT367/rM4P1htpLC17Om6AYxXI218TonV/GPWYkMV3jc5UzoLHPhtat8 PmQI1AQrHnzhY6X0+D5zLmUeCyv3GDVMznhy8ooh65ODRSE9xx5/IvQmjPb65+dE wzkMKBJcPWVBrimLGpi0qpFwpJlvfkCQ5DsBoRodEJBoXvo05CR8Cs/yMiNIfQ0f iFUEPlH4KoSpnWJl+Q6Ch9ze2BuYbbVxbtESciQ8QYyIx7kICBw= =5GWH -----END PGP SIGNATURE----- --2JFBq9zoW8cOFH7v--