net-tools patch has no effect?

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 25 Jul 2017 00:02
(address . bug-guix@gnu.org)
20170724220201.GA6136@jasmine.lan
While looking into an update of the Debian patch that we apply to
net-tools, I noticed that the patch is not being applied meaningfully.

After the 'patch' phase, there is an empty file called 'the-patch' in
the root of the source tree, but otherwise there are no changes to the
unpacked tarball.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll2blkACgkQJkb6MLrK
fwhI5xAA2BicAVxTWwQ3mK6LxYn98WlFYX9RSFQbbUVbVy7w/Do35Wk7G3wBjP1t
KAA4UDTdjROQ8pM4ZPgauMf1gzIFaJbsaXqeXpJTW6f5sm7oTapR+CzG6b78RKXu
POlZgqlHh8L4PjS4zrp2K7KvGrZD1QuCSe/Jltq7x/8Lv3HaBE2cS84dmDfdUgRy
nD5YGdlnHHTXjHVonmNllsqDbckWqgcKshMkddsS2rrie3ViluRRXHHwpFwaLIEE
9wpB6woyopmMdhyvDbRVIrlRPxzt/P+jek+xQOIvo67d4QM6BdQYCXhR3jBdaJPG
0Pefk7KlH2sqDabVPj4IgH2dQWEbJbIes1exuizwnH+mONZt2pzCFEabtLAsOtvi
2ZbXxhZTbtvqoMXUD/T+OWzJXasPejpvi66F0poQlQ2AxzH9rM7HrrRwo+xxF8YY
Tt5GskAEykyskYDhHD0kUTjwtE+3QQAoH3owvEY9QmMSP5IO4dtq/OqYvNFiZvuG
Shp5+vLGK0Npl9GfmcfAH7f2cVLnwKOHcUdLSEPWGfN3SD78Eoowpa20QqsOWERR
LpROkA7rEIAdLlgfC524yxqIyep6ibEYkfJNbI8Tw3KqELAEe6kgOo18PtsVzZIE
detUrLxGP0GjQMB7CG1QFbJZQfs9HxScfmyN6CkgsY9TAFxZMHI=
=wMYW
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 06:12
(address . 27811@debbugs.gnu.org)
20170725041225.GA31642@jasmine.lan
The problem is that, in the patch phase, the patch file is referred to
as 'patch', but the package for the `patch` program is what that
variable resolves to:

(let ((patch.gz (assoc-ref inputs "patch")))

After fixing that by renaming the variable for the patch file to
something unique, the build fails like this:

------
gcc -D_GNU_SOURCE -O2 -Wall -g -I. -idirafter ./include/ -Ilib -c -o ipmaddr.o ipmaddr.c
ipmaddr.c: In function ‘multiaddr_modify’:
ipmaddr.c:351:25: warning: pointer targets in passing argument 2 of ‘parse_lla’ differ in signedness [-Wpointer-sign]
if (parse_lla(*argv, ifr.ifr_hwaddr.sa_data) < 0)
^
ipmaddr.c:78:12: note: expected ‘unsigned char *’ but argument is of type ‘char *’
static int parse_lla(char *str, unsigned char *addr)
^
gcc -Llib -o ipmaddr ipmaddr.o -lnet-tools
gcc -D_GNU_SOURCE -O2 -Wall -g -I. -idirafter ./include/ -Ilib -c -o mii-tool.o mii-tool.c
mii-tool.c: In function ‘main’:
mii-tool.c:432:29: error: too few arguments to function ‘parse_media’
case 'A': nway_advertise = parse_media(optarg); break;
^
mii-tool.c:163:12: note: declared here
static int parse_media(char *arg, unsigned *bmcr2)
^
mii-tool.c:433:26: error: too few arguments to function ‘parse_media’
case 'F': fixed_speed = parse_media(optarg); break;
^
mii-tool.c:163:12: note: declared here
static int parse_media(char *arg, unsigned *bmcr2)
^
mii-tool.c:456:2: warning: implicit declaration of function ‘version’ [-Wimplicit-function-declaration]
version();
^
mii-tool.c: At top level:
mii-tool.c:32:13: warning: ‘Version’ defined but not used [-Wunused-variable]
static char Version[] = "$Id: mii-tool.c,v 1.9 2006/09/27 20:59:18 ecki Exp $\n(Author: David Hinds based on Donald Becker's mii-diag)";
^
make: *** [<builtin>: mii-tool.o] Error 1
phase `build' failed after 7.5 seconds
------

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.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll2xSYACgkQJkb6MLrK
fwi2wQ//SZ1JxoI+jzblv8C7N3mvREvep6SyawqNg8PY2K46EXl9kA6mqOW2oGAq
wHOOJAFob7IA96+oWJhnNyM7X6k8zCK+mTxoNXozpIxtZVl7wx+Gx9C6FUukG8Mn
uUSWBFHwymF8AAwmu8w3N91GXPl6EbySfSOJBtDasVzUMEVgzwNNpWmeZmjJiiZC
FHWWliIAnLKh56J4McuDOQKqw4ombzj+LUZODGxYvbKzOoQIvvSPVNiILn1wBaSL
PKVP67q84M54TNHocVLjYTLPenEI1ObkIfXe3DnfHAOjFGfEREuOTOcx8ilolSmt
dASk3qGljQwCnCcezzo7SXzW25sbYNJBLDRcxVePyOM2nmT5JcNE73Cnv0YhIlmh
6eHz76L9TEAHXx94w0PAiViZ4tFtT8De6zLGFOGIGyhnIIX3u/WKGUDMbpAvGAqx
2y9gTmCIo473ysUQISE1CPmSoMlw0TeGxX1972VP/Nqx/G3PAkU/tjI4NBOFL7ZE
PgZdHwdSIpWNP/99+myPFrCeqXi3/kblCEsrqksxI3k4MncwErd+BCAr/oXIZYqB
ywQ6ISZwgXM2489u5CswU+U3OZpO4PaklF5s3fK4WqLmpA5JNQR10EmcOQRGCDLG
IYykzk77r8mcPfsQewNzyDwqe41IlUVmDiScg8dBpzSmenqN4Ys=
=uy9D
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 06:59
(address . 27811@debbugs.gnu.org)
20170725045947.GA531@jasmine.lan
On Tue, Jul 25, 2017 at 12:12:25AM -0400, Leo Famulari wrote:
Toggle quote (5 lines)
> 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:

Toggle diff (35 lines)
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")
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll20EAACgkQJkb6MLrK
fwjW/A//ZE22iCDRyuvgiSv5VXaE800ltQFLCX3etduGpDNl1CRqsmZq6lNSnWuD
bScsuX1FZlgm2A9bPD+9bTK98w4zE0f0mVnVpQhBn1heBwSgRrDQ6dPM0PXMSV51
aXhqaGP050ENFhSYmn7goEPl9LEKU8N7wifbZM90j6KGayU1a5kcCkB7nCD0qWgY
2kif/kGBDiCoqAhDOD9FfYo2KDfBAh/mQUft46X2rs+nD1ZbP4uuj+MkZ9aGQFfj
3ODiSzl++yE6bQaxteJwNI5LIi6eqSZZOpWwQnDbZE0mIBbk4FmUAW9aQPGQj+ii
YPH5nYdNkcys7fLX0FtmXSOaGO0Q3iH+TzNubK2rbCQ3H8Z8xNtV0bWXcF2k4FKH
ag+2ywK0vS1QgKoFrRteXdqc9v4MHBBxYyFpVEZgFqvy0+DNGj9L3ftdbzY+dIAu
mUeS5kBreXqlaMZk/65iPhxVpGnMg8mJ+sk34S4FGAOqkn+F2Gfj8w8aZiO5yr/v
+AiVEURmvCaoauOHeHQQLditxqADCmv5cPn8EPwfjgguD0ELWpWL8qPNJxpBJwLW
ywmhHUQOdl+SQbd4nFhfsWrfglOLmK06LMZ0h6HCLaf5Xchyd5fdpMtLCB2KapIV
xYKlOeZnplbdsqCuLwoazH1kgSt+FyzkL1oF0A3CzHlFyGPRiDo=
=6dFD
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 25 Jul 2017 10:27
Re: bug#27811: net-tools patch has no effect?
(name . Leo Famulari)(address . leo@famulari.name)(address . 27811@debbugs.gnu.org)
87shhkncq3.fsf@gnu.org
Hi Leo,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (14 lines)
> 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:

Good catch, this LGTM. I wonder how this went unnoticed for so long!

As for the actual update, the intent is to add a second ‘net-tools’
variant, right?

Thanks for looking into this!

Ludo’.
L
L
Leo Famulari wrote on 25 Jul 2017 18:10
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170725161019.GA1443@jasmine.lan
On Tue, Jul 25, 2017 at 10:27:00AM +0200, Ludovic Courtès wrote:
Toggle quote (5 lines)
> > This patch will try to apply the patch and handle the exit codes of
> > gunzip and patch correctly:
>
> Good catch, this LGTM. I wonder how this went unnoticed for so long!

By handling the exit codes properly, the build fails ;) But I'm working
on that today.

Toggle quote (3 lines)
> As for the actual update, the intent is to add a second ‘net-tools’
> variant, right?

Right. I want to be able to update net-tools without rebuilding
everything. So, GnuTLS will use a special variant of net-tools for its
test suite, and the built GnuTLS will not keep any references to
net-tools after it is built.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll3bWsACgkQJkb6MLrK
fwhQwhAAo+zNCy8g/g27bAgjoWvqEKIttX99oPncOZi9UvXQCcIJwvF2qRM2dJBf
JgGO+0oVe3DJ175OJgXyotllQfilR1W27ehtJB+a70VQ+6cZ+ZbtZ5Ja1JnYTLUf
XsSvnU4wYk+zcrle6f+nLEpnO4fDgbhNkPy6LSnosY6aOdQm4ROhEc8nTkjAx282
7Era/3JLV79M6bPr0XXtlkEHhsA/46Hm20dFIfuFKKGNiewyWPZltefZZ/NTzMks
l2lhIsF4jkyvnEiulR2JVdf4HQWW860lT+W/+Rp6Nx3hCdsfZXaY+D9s10TXHuU7
zW8MOo8yvCf//XKGOE8C8ZbRvVypu8pIALVrUXFs9g2xU+u9ff/Vdwj7C4dBmplV
Leb2ozfbS1NSL2oeHpYkpfIEuYzcOJNTd8oTA7aWmj2DCOyPLnhExykvR+ybYoHF
/eO1DYoaWnjdcJkpks7YdbKY3eWfoswXORjbXaQVGeTKJxhc/7gYJYg170yotckj
uJ+/KnKG0xJ5+ggkJxOAUPsFFZsTzx+SDZUe+M8BoJyKCiBKaRWH0PFymgol05Yb
Pxi/jSM13k5u+Vg/mCvUfHd2gp7I3zB1PolVmkt66aFK7VDFI9QfJKhklUXTiZCY
IZ4JnPJ0HxOavySY7MIFbigL48sSj+AVhHiYS+MOBmoXf9eVcCU=
=canH
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 19:53
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170725175324.GA29286@jasmine.lan
On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote:
Toggle quote (4 lines)
> I've attached patches to fix this. First, a patch to create an otherwise
> equivalent package variant and to use it in GnuTLS, and a second patch
> to actually update the public net-tools variable.

I forgot to mention that I've tested these changes by rebuilding, on
x86_64-linux, every package that refers directly to net-tools, and by
reconfiguring my GuixSD system to test the effect of the new net-tools
on wicd. Wicd is still working.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll3hZQACgkQJkb6MLrK
fwh6qRAAs45bA4pzkF+iZvh9ruZqmHKR3B8/x8zrutyOfocN2wa4ho0oGgbQrOuX
qKeRoTMJ5lBuAhR4blZxfD9IULmz82xBcgCZUSk6teP5nKVQci9Z+Ba0oICs9B09
8yI0EdEjvNaXzDk5uOQ2lhh9f6/81u0CwsdSWg4ynM4eisV5VuJhI8w8XaOudMoJ
xWA0YZvy6xCYjRL2AU39hfa8XixULd/ODcgGVPt4m3eOWbkr00J9x4MmE2SIRVvB
NxNvGZhvF1U2KFLq/N4B8msaQ8rsXLRIF7TxuWfmwgCsh86xaHcqDFoOoAKfJYDH
YPwBfRI+lwZrjc3Pz5oLZRym14D1lwmeHW7SQkTx+rhWRjCDaQ6QQS4dZI8johru
7joCdL91o/UMYHwqMZdIwOqfhxM+pJLrXDLgx7Bw2H8126YrRH1+gaDFOkqGNlU5
hZlCSJaG8lYBMRMqigayJtcvdSyGnrataBYi2VbQX+NPy4bnXB+gBCi9O0kq6d7Y
yiJbGV+JD19cMVaJSHL/u5UM6Xxk8g2p73B/r2cJHddxurXppSFebfHVPjJXHqEd
oEVYGPlW8M0XXXR7daSH/DY6G14RAHcxrrjA4pmeWBqDhJ/mwatUpfBsbmQ0L+J8
tekgOnsdT4lttX2H9qqGVjtBCoxNW4NzPjYS27tsTgXeorw7RRU=
=GIpc
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 19:52
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170725175202.GA27528@jasmine.lan
I've attached patches to fix this. First, a patch to create an otherwise
equivalent package variant and to use it in GnuTLS, and a second patch
to actually update the public net-tools variable.

Is this the right way to create the test-only package variant for now?
From 5c738ab1ec5543981c9d5e512ee94d469bcca12b Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Tue, 25 Jul 2017 00:19:56 -0400
Subject: [PATCH 1/2] gnu: net-tools: Add a test-only variant and use it for
GnuTLS.

* gnu/packages/linux.scm (net-tools-for-tests): Add net-tools variant
for the GnuTLS test suite, et cetera.
(net-tools): Inherit from net-tools-for-tests.
* gnu/packages/tls.scm (gnutls)[native-inputs]: Use net-tools-for-tests
instead of net-tools.
---
gnu/packages/linux.scm | 5 ++++-
gnu/packages/tls.scm | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 456909a94..4f9fa6d25 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1187,7 +1187,7 @@ consists of several tools, of which the most important are @command{ip} and
messages and are accompanied by a set of manpages.")
(license license:gpl2+)))
-(define-public net-tools
+(define net-tools-for-tests
;; 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.
@@ -1288,6 +1288,9 @@ network hardware types (plipconfig, slattach) and advanced aspects of IP
configuration (iptunnel, ipmaddr).")
(license license:gpl2+)))
+(define-public net-tools
+ (package (inherit net-tools-for-tests)))
+
(define-public libcap
(package
(name "libcap")
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 0a81633aa..740f5a42e 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -140,6 +140,8 @@ coordinating the use of PKCS#11 by different components or libraries
living in the same process.")
(license license:bsd-3)))
+;; TODO Add net-tools to #:disallowed-references when we can afford to rebuild
+;; GnuTLS.
(define-public gnutls
(package
(name "gnutls")
@@ -194,7 +196,7 @@ living in the same process.")
"debug"
"doc")) ;4.1 MiB of man pages
(native-inputs
- `(("net-tools" ,net-tools)
+ `(("net-tools" ,(@@ (gnu packages linux) net-tools-for-tests))
("pkg-config" ,pkg-config)
("which" ,which)))
(inputs
--
2.13.3
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll3hUIACgkQJkb6MLrK
fwhtbRAAw6q6yiEwlBgZuvqomwMUxXrehPrWW8BM5LA080jebZEq2aTKI9/kRA71
kxwROrPGUKQuoiWlYMtj6Mf+auBH8imbYi6AOoXWcv/IlUjwWiBK33q0JZQV3UH/
wucAdStxJowin5bbh37fbIypOru1Sxiqwo+vfDN5LtxIYesSz3bhvU13THn4cOhi
rRwYls4LN8AqkPItd7jtu5hx/uwwSZEV9T++qNYypZMHuo2eqe6nIyt0XQkmPmKB
dDLvfaZ39EbnyMPzM50RqIkTxtjVVMSD6y1UeJdZCe4IjeP2mo4HsOSRKecbjp7j
H1Me+so4qn926TTGQz42tDKlOsdHR17674npIvAuu3geM9yEsNF+WcdyxZLob1H+
zvWUQEjqyjEKhvdhTGaD0otu9dKkeGmtfJgdJicUNPLgTeQFICZ4xJUelED8rRJg
VydSFqEqWYm3iVmxyepQ1c1XYErZ8+7qsZDaUSI7MV2Uvik/3LvCxAj3ONjrDfXR
QafeHcJcHhKWSOrdCvQ26BcHkwrXBNVddQIDfFccAirXYi2rmKEYuDT1xwbVdnf9
glBZc7AXovsVgtGQzafREUKsZAt16Nad8RgXZ+4NOvfIscvi2u90FalSuN5hatcH
n1lG2eC+epMVsCyV2iRLxVAPYM1Qypm38lfj2zTj9zd1eZzb5Eg=
=++BJ
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 20:03
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170725180335.GA8448@jasmine.lan
On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote:
Toggle quote (2 lines)
> Is this the right way to create the test-only package variant for now?

I was reminded of the hidden-package procedure. I'll try rewriting this
change using it.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll3h/cACgkQJkb6MLrK
fwj/bhAAuHZqem84xLIG6j0x4kCwO3lJ8BrGhwxk6JVtMZ4NFOMPEVVcKmqxmXcE
t5G1R+yn0pUABpRlv9MzWps6WcuRMMLXy6nZHVnoKqjZJ+hhTfPSKx/QAPLIsIQg
A7OReb6v0QzwDD4jLyr296V/ZqM46jCIN/bbS9AOKIFefNWx4vGAprmgJsQK2xhu
eJrTILPr3EMTWJUvRieK1tLQjdsH1gbZzgoX+8dCnpJMr5p5pjcFeZs4uQ1eNKfs
Zxk9mvVJuzVj2hjGxyDSD1Xs1VRAuHR6QZQ73r55MdTEK+9c0kJ81hqxWu3pDytD
h203YQPdGHzbCmFY9go9jCo9LTiJ7U9UOUqxXerc5qbnYyFtMGJUDG/5WGNdaFeb
Vo1CaUu9RseDqHT8QB1ujDl8WIqY5kw8mZiupUTj2/WWGMcZY+P8A611p6C1pWFG
afR+/SxPQv5VrL7S/F+WunBrrEtzmlYIwYjbTuL3NpjrmfAFQzaOLfLx0qsHpTIE
mgYKGRAQauhhXWwR5lDv/88/Kmu1rMXKm0Mgm8KF83WXFalOUdWchJ19HqND487g
J210Q9fFB7p6OK+nnM41ipaLf2k/Wwgk8HMPR6oqvhKv4GcAfbUvqP81rjUdpqPf
0O2IusxWGyX2JGLw7YxL53psTDemnRh1REDZ4aBnO6k+WD/FVW8=
=cYNV
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 25 Jul 2017 20:08
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170725180808.GA12389@jasmine.lan
On Tue, Jul 25, 2017 at 02:03:35PM -0400, Leo Famulari wrote:
Toggle quote (6 lines)
> On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote:
> > Is this the right way to create the test-only package variant for now?
>
> I was reminded of the hidden-package procedure. I'll try rewriting this
> change using it.

I think the order of package inheritance between net-tools and
net-tools-for-tests is the opposite of what's needed for hidden-package.
I'll add a note about using hidden-package in the next core-updates
cycle.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll3iQgACgkQJkb6MLrK
fwiujw/8DipsiaQFTDqgVOTbo6z9HeEUfSRwcvD5OfOg9j2saCLaiG4kYHrGbR0w
rKqim2LH7J9sJ998+BrNpxryxN5V51BX0zbzUcOlz40G4tepaIRubpEZ9MqJ0btB
LwcWmUx1xztbfrMbCDZSG5AWmww0Qb4P8yqSrEaI6nxCTqeE9OFp4Q5WPbjwKrRh
hrDbDGV4EBYTFN1kNxZ7ogaVn4qBtZY2K88aHTYV3b+Gu3NTte6TWZTd51JqYHBP
pqIC0Fob6faI7b9oaTbkShAqsFpqKWfCztvsD8S32elyjOcD1N3ptuXytDcat/jP
ggA1jsmwnb+BAI+6bngJihd44gOMRJK/2rrvSUelDwzNlwYByecV7JCgwjSuZ0KD
N1DXPN0BI3FnBltpME62ElktRAOvMwgRDAO+R2bqWHA5ttr5GGLPirlJl5NiOwV8
mbcCJfoEotghLR7bwl3cws2eF7mUe1Ie/C3kIitbBNiU8KCD5WhTJlAdFROThmdq
SXdpobjslpYWt4NpXEXOrP6537xb1ko4SPI31FnB8n/tomoJRGHJaYTxoAt9qiPD
Sj3C08PMnjn+6hQSxsRV8pBY3Ns2uYiwEGcOupbP9aYNmtDCVCU/Y9+IUBhGZXZx
1Elpn7VDsnQiaiBILlX2wOOakuA5mXQ1idiqL0sh4KuWBNzmD3w=
=wvKg
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 25 Jul 2017 23:30
(name . Leo Famulari)(address . leo@famulari.name)(address . 27811@debbugs.gnu.org)
87fudkb3w5.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (12 lines)
> On Tue, Jul 25, 2017 at 02:03:35PM -0400, Leo Famulari wrote:
>> On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote:
>> > Is this the right way to create the test-only package variant for now?
>>
>> I was reminded of the hidden-package procedure. I'll try rewriting this
>> change using it.
>
> I think the order of package inheritance between net-tools and
> net-tools-for-tests is the opposite of what's needed for hidden-package.
> I'll add a note about using hidden-package in the next core-updates
> cycle.

‘hidden-package’ simply adds a ‘properties’ field; you could do that “by
hand” and make the property list of ‘net-tools’ empty.

Ludo’.
L
L
Ludovic Courtès wrote on 25 Jul 2017 23:33
(name . Leo Famulari)(address . leo@famulari.name)(address . 27811@debbugs.gnu.org)
878tjcb3sb.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (27 lines)
> From 5c738ab1ec5543981c9d5e512ee94d469bcca12b Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Tue, 25 Jul 2017 00:19:56 -0400
> Subject: [PATCH 1/2] gnu: net-tools: Add a test-only variant and use it for
> GnuTLS.
>
> * gnu/packages/linux.scm (net-tools-for-tests): Add net-tools variant
> for the GnuTLS test suite, et cetera.
> (net-tools): Inherit from net-tools-for-tests.
> * gnu/packages/tls.scm (gnutls)[native-inputs]: Use net-tools-for-tests
> instead of net-tools.
> ---
> gnu/packages/linux.scm | 5 ++++-
> gnu/packages/tls.scm | 4 +++-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 456909a94..4f9fa6d25 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -1187,7 +1187,7 @@ consists of several tools, of which the most important are @command{ip} and
> messages and are accompanied by a set of manpages.")
> (license license:gpl2+)))
>
> -(define-public net-tools
> +(define net-tools-for-tests

Use ‘define-public’ here, and perhaps add a comment explaining the intent.

Toggle quote (10 lines)
> ;; 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.
> @@ -1288,6 +1288,9 @@ network hardware types (plipconfig, slattach) and advanced aspects of IP
> configuration (iptunnel, ipmaddr).")
> (license license:gpl2+)))
>
> +(define-public net-tools
> + (package (inherit net-tools-for-tests)))

I would tend to do it the other way around, and simply start with:

(define-public net-tools-for-tests
net-tools)

and change that whenever we need it.

Toggle quote (12 lines)
> +;; TODO Add net-tools to #:disallowed-references when we can afford to rebuild
> +;; GnuTLS.
> (define-public gnutls
> (package
> (name "gnutls")
> @@ -194,7 +196,7 @@ living in the same process.")
> "debug"
> "doc")) ;4.1 MiB of man pages
> (native-inputs
> - `(("net-tools" ,net-tools)
> + `(("net-tools" ,(@@ (gnu packages linux) net-tools-for-tests))

Remove the “@@” once ‘net-tools-for-tests’ is public.

OK with these changes, thank you!

Ludo’.
L
L
Leo Famulari wrote on 26 Jul 2017 18:08
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170726160837.GA6239@jasmine.lan
On Tue, Jul 25, 2017 at 11:33:08PM +0200, Ludovic Courtès wrote:
Toggle quote (15 lines)
> Leo Famulari <leo@famulari.name> skribis:
> > From 5c738ab1ec5543981c9d5e512ee94d469bcca12b Mon Sep 17 00:00:00 2001
> > From: Leo Famulari <leo@famulari.name>
> > Date: Tue, 25 Jul 2017 00:19:56 -0400
> > Subject: [PATCH 1/2] gnu: net-tools: Add a test-only variant and use it for
> > GnuTLS.
> >
> > * gnu/packages/linux.scm (net-tools-for-tests): Add net-tools variant
> > for the GnuTLS test suite, et cetera.
> > (net-tools): Inherit from net-tools-for-tests.
> > * gnu/packages/tls.scm (gnutls)[native-inputs]: Use net-tools-for-tests
> > instead of net-tools.
>
> OK with these changes, thank you!

Ah, that's much better! Pushed as
f96dbf6b70364518072c63037d3fca105dfe6497.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll4voUACgkQJkb6MLrK
fwhQGBAArF74OKT/Vx2E65D26T6JR66bkT4xOMNliMI4RaqeVnDrh8COZXvp9cc9
Ghxfl/vk7zRZ1VV2EmmortS/y60OCKvgs6nTgfV5bTdzXwpmKEiDz3gCyEHtuzru
8PftYyjuUmWDy87SDPkzW0a0NruiQRPZ1Pg2ay2AMp2ZPw6CbPWpDfDLRLo/tJxK
H3rWsKbLTPP7DsnEWJe70OkDrFbcKdX9okoDhBergixGre+sf4Y3L4zSBKxDLvEC
eMwt+3DV0P53eHBbCf19Btcxv3iLKgDrJnB/BoBWLe8Y44rRotXApVauRtNneVvr
qxNG6dR6T42FCPyLiNcg9sIoOkddUMMKEscRErRBlfiuC7bnBfnJSuVQstp48KRJ
GQJ/gxCh7GrWGBg3nFCXwewmW+iCgGNpOdrWdAth5ozg0MY6QT9muP0aLTV2Ovev
B/9TiRnrYejW+nX8Sa5iTUWZZt1NYYqZ+0pPfFq22/GR1E3mTCNMnrRboLtMsT77
6SvwRM97bIPJC66CbyY+AsT+KLPF6r09BkrczjJfyQ1B0rCmjO642Z66/Bh9tO5A
17t0nAWqLIyymAB5vNkslrmAiENiBvAZWBWBAig5fZRVRQMDy0nNAHlBdfqTC0Tb
5mSQlxApx0DiX2zPDCKjRG4/Q4uaQQ2ZmZFpEhLVMBIpSiFvvf8=
=M+gu
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 26 Jul 2017 18:11
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811@debbugs.gnu.org)
20170726161146.GB6239@jasmine.lan
On Tue, Jul 25, 2017 at 01:52:02PM -0400, Leo Famulari wrote:
Toggle quote (12 lines)
> From f57732d79ac265917f154da5791ff203c82c9733 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Tue, 25 Jul 2017 01:46:38 -0400
> Subject: [PATCH 2/2] gnu: net-tools: Update to 1.60-0.90da8a0.
>
> Fixes <https://bugs.gnu.org/27811>.
>
> * 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.
-----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-----


L
L
Ludovic Courtès wrote on 26 Jul 2017 23:04
(name . Leo Famulari)(address . leo@famulari.name)(address . 27811@debbugs.gnu.org)
87a83q7vux.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (33 lines)
> 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 <leo@famulari.name>
>> Date: Tue, 25 Jul 2017 01:46:38 -0400
>> Subject: [PATCH 2/2] gnu: net-tools: Update to 1.60-0.90da8a0.
>>
>> Fixes <https://bugs.gnu.org/27811>.
>>
>> * 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.
>
> From 6cd4159e355b9414b0678608e74fa53b8e173834 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> 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 <https://bugs.gnu.org/27811>.
>
> * 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.

LGTM. Using ‘git-fetch’ sounds preferable, so better squash both
patches.

Thank you!

Ludo’.
L
L
Leo Famulari wrote on 27 Jul 2017 19:41
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 27811-done@debbugs.gnu.org)
20170727174158.GA16440@jasmine.lan
On Wed, Jul 26, 2017 at 11:04:54PM +0200, Ludovic Courtès wrote:
Toggle quote (38 lines)
> > 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 <leo@famulari.name>
> >> Date: Tue, 25 Jul 2017 01:46:38 -0400
> >> Subject: [PATCH 2/2] gnu: net-tools: Update to 1.60-0.90da8a0.
> >>
> >> Fixes <https://bugs.gnu.org/27811>.
> >>
> >> * 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.
> >
> > From 6cd4159e355b9414b0678608e74fa53b8e173834 Mon Sep 17 00:00:00 2001
> > From: Leo Famulari <leo@famulari.name>
> > 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 <https://bugs.gnu.org/27811>.
> >
> > * 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.
>
> LGTM. Using ‘git-fetch’ sounds preferable, so better squash both
> patches.
>
> Thank you!

Pushed as 6d31c175b2e7b062ce71648595c7af2e1381a036.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAll6JeUACgkQJkb6MLrK
fwhkqQ//avqomhfdYvIN/AlFgve3mPleSBkqykRkawMOdrzfQdTD0ybCQuiQ4V0H
y8+ByYoM8Q0MYeYsVDFP1qsLOITuwwMHgftKP8cWmDu6gs8dF7TudU4GgNSpdUfN
efwbDi7ojCL8FY9dESCGPCBCga/Mz3PPDrRvNayMYcYOTF2c6GsTParOEGkyvL0J
+4PdApXlXYffy6Qa41b7K1wLx0DcswrCqK/FGLCJj1p6if2ozphgIRi3OU0C4DfB
WibNkB0LpNbHIQcGqpDfxoWqd1rg7tDprThQtfEaifxsDXe2y6Augc8YSnIfXTJh
p89l/I6M/tp5nELlemonG8eaARKpL+WwYk9o+iXC9rziAmmWq3uLtwtWl32Y/xua
O04Pt14dLKWqZlnpc//oIx/OiCNs3PKMH3wwKb/+B3c4xL3D2/0rCSjk9BDsZQXb
AjVyphtAn0cVvkOcQpNegXhKwiWHHJ6BAfHtV/sgv3Ld2dGrr3z0cOC7jfRy7/nh
sJ3Uau/cCnlNS5HTlpB1bye5T54ZidfFrHxd39flsv9IwwUg7AzYliyVdZ7kuFO4
bTH5DQ4o3YYwiHrrqp49wyt9NzRcrIs05h6HCmgkiLidqgHZEaWunH8qem8ADyat
7w5Sa2VRc25VHftfe9YDor9zcnR1JHD29yxHxj2p/l3KLoj/VhQ=
=4ML6
-----END PGP SIGNATURE-----


Closed
?