From: Vincent Legoll <vincent.legoll@gmail.com>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: native or not
Date: Tue, 31 Mar 2020 00:07:03 +0200 [thread overview]
Message-ID: <CAEwRq=oFhZmZ4VK1_Fxk4TtrNZ8hpdqLdjf=MC9ztX++62JCnw@mail.gmail.com> (raw)
In-Reply-To: <CAEwRq=pj9jLAwQOP90X44dFvUjw4o-CuA=asF26AkKvecoyWOA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3413 bytes --]
Here is a set of patches, for starting discussion...
I only build-tested them natively on/for x86_64 (and
cross built for aarch64 for the sudo one)
On Mon, Mar 30, 2020 at 11:25 PM Vincent Legoll
<vincent.legoll@gmail.com> wrote:
>
> Hello Mathieu,
>
> On Mon, Mar 30, 2020 at 8:57 AM Mathieu Othacehe <m.othacehe@gmail.com> wrote:
> > > Are those changes useful to do on their own ?
> >
> > Well yes it may reduce the closure size of the package (run `guix size
> > sudo`) to get it.
>
> I'm not seeing any size difference, but groff is not in the output:
>
> on master, groff in inputs:
>
> $ ./pre-inst-env guix size sudo
> store item total self
> /gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29
> 37.4 35.8 36.9%
> /gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib
> 70.0 32.6 33.7%
> /gnu/store/9kzrrccpzl6i1sfwb0drb00gi2gwk0x0-coreutils-8.31
> 90.0 16.5 17.0%
> /gnu/store/vsvba1ilj2zj536pvsil6r0mf5rnjj45-sudo-1.8.31p1
> 96.9 3.5 3.6%
> /gnu/store/dvs3acxwfnwgc7yma6h3y937ri2li47y-gmp-6.1.2
> 72.6 2.6 2.7%
> /gnu/store/vkj5rdiavl87m21d9i0k69rfw79p13gj-linux-pam-1.3.1
> 73.2 2.1 2.2%
> /gnu/store/cp72ncw4prnsga65n3pzll07hpsg524f-bash-static-5.0.7
> 1.6 1.6 1.7%
> /gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7
> 38.4 1.0 1.1%
> /gnu/store/nffbgghxyvrj29lcgxs5fpmi3sx9zzql-acl-2.2.53
> 70.7 0.5 0.5%
> /gnu/store/in1738m2zvhgpz78n2yqa972sdzc42ss-attr-2.4.48
> 70.3 0.3 0.3%
> /gnu/store/qx7p7hiq90mi7r78hcr9cyskccy2j4bg-zlib-1.2.11
> 70.2 0.2 0.2%
> /gnu/store/waw5ci4lazbf2a1x9v6gw1v274nk0gny-libcap-2.27
> 70.2 0.2 0.2%
> total: 96.9 MiB
>
> on a branch with groff in native-inputs:
>
> $ ./pre-inst-env guix size sudo
> store item total self
> /gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29
> 37.4 35.8 36.9%
> /gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib
> 70.0 32.6 33.7%
> /gnu/store/9kzrrccpzl6i1sfwb0drb00gi2gwk0x0-coreutils-8.31
> 90.0 16.5 17.0%
> /gnu/store/l320ig872ny66d1yi6v7n4zb93iz50dx-sudo-1.8.31p1
> 96.9 3.5 3.6%
> /gnu/store/dvs3acxwfnwgc7yma6h3y937ri2li47y-gmp-6.1.2
> 72.6 2.6 2.7%
> /gnu/store/vkj5rdiavl87m21d9i0k69rfw79p13gj-linux-pam-1.3.1
> 73.2 2.1 2.2%
> /gnu/store/cp72ncw4prnsga65n3pzll07hpsg524f-bash-static-5.0.7
> 1.6 1.6 1.7%
> /gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7
> 38.4 1.0 1.1%
> /gnu/store/nffbgghxyvrj29lcgxs5fpmi3sx9zzql-acl-2.2.53
> 70.7 0.5 0.5%
> /gnu/store/in1738m2zvhgpz78n2yqa972sdzc42ss-attr-2.4.48
> 70.3 0.3 0.3%
> /gnu/store/qx7p7hiq90mi7r78hcr9cyskccy2j4bg-zlib-1.2.11
> 70.2 0.2 0.2%
> /gnu/store/waw5ci4lazbf2a1x9v6gw1v274nk0gny-libcap-2.27
> 70.2 0.2 0.2%
> total: 96.9 MiB
>
> > It can also fix cross-compilation. Because when cross-compiling, if
> > groff needs to be run at build-time, it needs to be for the native
> > architecture and not the target one.
> >
> > You can check it by running `guix build --target=aarch64-linux-gnu sudo`
> > for instance.
>
> That fails on master (libpaper) whereas with the patch it works,
> so I guess the patch is useful on that front.
>
> The patch for sudo will be in the following emails.
>
> Is there anything else to check / test ?
>
> --
> Vincent Legoll
--
Vincent Legoll
[-- Attachment #2: 0001-gnu-privoxy-Make-some-inputs-native.patch --]
[-- Type: text/x-patch, Size: 1003 bytes --]
From a782816fe096e786673c03dca3b2866e62933fff Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Mon, 30 Mar 2020 22:21:08 +0200
Subject: [PATCH 1/4] gnu: privoxy: Make some inputs native.
* gnu/packages/tor.scm (privoxy)[native-inputs]: New field.
[inputs]: Move autoconf & automake to native-inputs.
---
gnu/packages/tor.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index 61e52ba22c..841158871e 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -141,8 +141,9 @@ rejects UDP traffic from the application you're using.")
(inputs
`(("w3m" ,w3m)
("pcre" ,pcre)
- ("zlib" ,zlib)
- ("autoconf" ,autoconf)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
("automake" ,automake)))
(home-page "https://www.privoxy.org")
(synopsis "Web proxy with advanced filtering capabilities for enhancing privacy")
--
2.25.2
[-- Attachment #3: 0004-gnu-procenv-Make-some-inputs-native-make-multiline.patch --]
[-- Type: text/x-patch, Size: 1414 bytes --]
From 3887538d37256424d5654da5fce4c94c924a4e67 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Mon, 30 Mar 2020 22:42:28 +0200
Subject: [PATCH 4/4] gnu: procenv: Make some inputs native & make multiline.
* gnu/packages/linux.scm (procenv)[native-inputs]: New field.
[inputs]: Move groff to native-inputs, move each remaining item on its own line.
---
gnu/packages/linux.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a45847cbe5..945c15d972 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5867,9 +5867,11 @@ the MTP device as a file system.")
(base32 "1javw97yw0qvjmj14js8vw6nsfyf2xc0kfiyq5f2hsp0553w2cdq"))))
(build-system gnu-build-system)
(arguments `(#:configure-flags '("--disable-silent-rules")))
- (native-inputs `(("pkg-config" ,pkg-config)))
- (inputs `(("expat" ,expat) ("libcap" ,libcap) ("check" ,check)
- ("groff" ,groff) ; for tests
+ (native-inputs `(("groff" ,groff) ; for tests
+ ("pkg-config" ,pkg-config)))
+ (inputs `(("check" ,check)
+ ("expat" ,expat)
+ ("libcap" ,libcap)
("libselinux" ,libselinux)))
(synopsis "Utility to show process environment")
(description "Procenv is a command-line tool that displays as much detail about
--
2.25.2
[-- Attachment #4: 0003-gnu-nftables-Make-some-inputs-native.patch --]
[-- Type: text/x-patch, Size: 1363 bytes --]
From 60e400cc78a6f2caf991800a13622906b6e6dabb Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Mon, 30 Mar 2020 22:38:44 +0200
Subject: [PATCH 3/4] gnu: nftables: Make some inputs native.
* gnu/packages/linux.scm (procenv)[native-inputs]: New field.
[inputs]: Move bison & flex to native-inputs.
---
gnu/packages/linux.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 701df764cd..a45847cbe5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5647,13 +5647,13 @@ used by nftables.")
(build-system gnu-build-system)
(arguments `(#:configure-flags
'("--disable-man-doc"))) ; FIXME: Needs docbook2x.
- (inputs `(("bison" ,bison)
- ("flex" ,flex)
- ("gmp" ,gmp)
+ (inputs `(("gmp" ,gmp)
("libmnl" ,libmnl)
("libnftnl" ,libnftnl)
("readline" ,readline)))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ (native-inputs `(("pkg-config" ,pkg-config)
+ ("bison" ,bison)
+ ("flex" ,flex)))
(home-page "https://www.nftables.org")
(synopsis "Userspace utility for Linux packet filtering")
(description "nftables is the project that aims to replace the existing
--
2.25.2
[-- Attachment #5: 0002-gnu-sudo-Make-some-inputs-native.patch --]
[-- Type: text/x-patch, Size: 1040 bytes --]
From bd2f9cac9229bb31cc64f5d647b6ef8085f46db4 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Mon, 30 Mar 2020 22:28:55 +0200
Subject: [PATCH 2/4] gnu: sudo: Make some inputs native.
* gnu/packages/admin.scm (sudo)[native-inputs]: New field.
[inputs]: Move groff to native-inputs.
---
gnu/packages/admin.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 2f661f5e81..457dc1e3dc 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1268,9 +1268,10 @@ system administrator.")
;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
;; the chroot's /etc/passwd doesn't have it. Turn off the tests.
#:tests? #f))
+ (native-inputs
+ `(("groff" ,groff)))
(inputs
- `(("groff" ,groff)
- ("linux-pam" ,linux-pam)
+ `(("linux-pam" ,linux-pam)
("zlib" ,zlib)
("coreutils" ,coreutils)))
(home-page "https://www.sudo.ws/")
--
2.25.2
next prev parent reply other threads:[~2020-03-30 22:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 23:11 native or not Vincent Legoll
2020-03-30 6:57 ` Mathieu Othacehe
2020-03-30 21:25 ` Vincent Legoll
2020-03-30 22:07 ` Vincent Legoll [this message]
2020-03-31 7:45 ` Mathieu Othacehe
2020-03-31 8:02 ` Vincent Legoll
2020-03-31 9:17 ` Vincent Legoll
2020-03-31 17:54 ` Christopher Baines
2020-03-31 7:27 ` Mathieu Othacehe
2020-03-31 9:44 ` Tobias Geerinckx-Rice
2020-03-31 9:51 ` Vincent Legoll
2020-03-31 13:25 ` Marius Bakke
2020-03-31 22:01 ` Vincent Legoll
2020-03-31 22:04 ` [PATCH 1/6] gnu: cgit: Make some inputs native Vincent Legoll
2020-03-31 22:04 ` [PATCH 2/6] gnu: darktable: " Vincent Legoll
2020-04-01 13:58 ` Mathieu Othacehe
2020-04-01 14:15 ` Tobias Geerinckx-Rice
2020-03-31 22:04 ` [PATCH 3/6] gnu: graphviz: " Vincent Legoll
2020-03-31 22:04 ` [PATCH 4/6] gnu: iwd: " Vincent Legoll
2020-03-31 22:04 ` [PATCH 5/6] gnu: mailutils: " Vincent Legoll
2020-04-01 14:03 ` Mathieu Othacehe
2020-03-31 22:04 ` [PATCH 6/6] gnu: nethack: " Vincent Legoll
2020-04-01 14:06 ` Mathieu Othacehe
2020-03-31 23:07 ` [PATCH 1/6] gnu: cgit: " Tobias Geerinckx-Rice
2020-04-01 13:52 ` Mathieu Othacehe
2020-04-01 14:13 ` Tobias Geerinckx-Rice
2020-04-01 14:20 ` Mathieu Othacehe
2020-04-01 17:59 ` Vincent Legoll
2020-04-01 19:23 ` native or not Tobias Geerinckx-Rice
2020-04-01 21:28 ` Vincent Legoll
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='CAEwRq=oFhZmZ4VK1_Fxk4TtrNZ8hpdqLdjf=MC9ztX++62JCnw@mail.gmail.com' \
--to=vincent.legoll@gmail.com \
--cc=guix-devel@gnu.org \
--cc=m.othacehe@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this 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).