GNU bug report logs - #43881
[PATCH 0/2] Deduplicate package sets

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Fri, 9 Oct 2020 13:41:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43881 in the body.
You can then email your comments to 43881 AT debbugs.gnu.org in the normal way.

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#43881; Package guix-patches. (Fri, 09 Oct 2020 13:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 09 Oct 2020 13:41:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 0/2] Deduplicate package sets
Date: Fri,  9 Oct 2020 16:39:17 +0300
I noticed that the installer has nano, zile and nvi, but %base-packages
has nano and zile. I also saw that the installer also pulls in
%base-packages and I figured it was a good time to do something about
it.

I moved nvi from the installer to %base-packages-interactive.
I created %base-packages-disk-utils to work with
disks/partitions/file-systems.

Of the packages I removed from the installer which weren't already part
of %base-packages:
wpa-supplicant-minimal: wpa-supplicant already provided by the
wpa-supplicant-service-type.
openssh: Already provided by the openssh-service-type.

I figure it's worth asking: should we be using wpa-supplicant-minimal
and openssh-sans-x for their services in the installer? Actually,
looking at the openssh-service-type I don't see it documented in the
manual a field to use a different openssh package.

Efraim Flashner (2):
  system: Add %base-packages-disk-utils.
  install: Deduplicate packages with %base-package sets.

 gnu/system.scm         | 38 +++++++++++++++++++++++++++++---------
 gnu/system/install.scm | 37 ++++++++++---------------------------
 2 files changed, 39 insertions(+), 36 deletions(-)

-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Fri, 09 Oct 2020 13:44:01 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 43881 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 1/2] system: Add %base-packages-disk-utils.
Date: Fri,  9 Oct 2020 16:42:52 +0300
* gnu/system.scm (%base-packages-disk-utils): New variable.
---
 gnu/system.scm | 36 +++++++++++++++++++++++++++---------
 1 file changed, 27 insertions(+), 9 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 3f4a0065d0..b10e94b95b 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2020 Florian Pelz <pelzflorian <at> pelzflorian.de>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jannek <at> gnu.org>
+;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,24 +39,27 @@
   #:use-module ((guix utils) #:select (substitute-keyword-arguments))
   #:use-module (guix i18n)
   #:use-module (guix diagnostics)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages disk)
+  #:use-module (gnu packages file-systems)
+  #:use-module (gnu packages firmware)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages admin)
   #:use-module (gnu packages hurd)
-  #:use-module (gnu packages linux)
-  #:use-module (gnu packages pciutils)
-  #:use-module (gnu packages package-management)
   #:use-module (gnu packages less)
-  #:use-module (gnu packages zile)
-  #:use-module (gnu packages nano)
-  #:use-module (gnu packages gawk)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages nano)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages pciutils)
   #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages firmware)
+  #:use-module (gnu packages zile)
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services base)
@@ -159,6 +163,7 @@
             %base-packages-interactive
             %base-packages-linux
             %base-packages-networking
+            %base-packages-disk-utils
             %base-packages-utils
             %base-firmware
             %default-kernel-arguments))
@@ -726,6 +731,19 @@ of PROVENANCE-SERVICE-TYPE to its services."
         ;; many people are familiar with, so keep it around.
         iw wireless-tools))
 
+(define %base-packages-disk-utils
+  ;; A well-rounded set of packages for interacting with disks, partitions
+  ;; and filesystems.
+  (list parted gptfdisk ddrescue
+        ;; We used to provide fdisk from GNU fdisk, but as of version 2.0.0a
+        ;; it pulls Guile 1.8, which takes unreasonable space; furthermore
+        ;; util-linux's fdisk is already available, in %base-packages-linux.
+        cryptsetup mdadm
+        dosfstools
+        btrfs-progs
+        f2fs-tools
+        jfsutils))
+
 (define %base-packages
   ;; Default set of packages globally visible.  It should include anything
   ;; required for basic administrator tasks.
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Fri, 09 Oct 2020 13:46:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 43881 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH 2/2] install: Deduplicate packages with %base-package sets.
Date: Fri,  9 Oct 2020 16:42:53 +0300
* gnu/system.scm (%base-packages-interactive): Add nvi.
* gnu/system/install.scm (installation-os)[packages]: Remove parted,
gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
f2fs-tools, jfstools, openssh, wireless-tools, iw,
wpa-supplicant-minimal, iproute, bash-completion, nvi. Replace glibc
with the canonical-package of glibc. Add %base-packages-disk-utils.

remove wpa-supplicant-minimal
replace glibc with canonical-pacakge glibc
---
 gnu/system.scm         |  2 ++
 gnu/system/install.scm | 37 ++++++++++---------------------------
 2 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index b10e94b95b..3bc89e0a31 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -56,6 +56,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
   #:use-module (gnu packages nano)
+  #:use-module (gnu packages nvi)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages pciutils)
   #:use-module (gnu packages texinfo)
@@ -713,6 +714,7 @@ of PROVENANCE-SERVICE-TYPE to its services."
 (define %base-packages-interactive
   ;; Default set of common interactive packages.
   (list less zile nano
+        nvi
         man-db
         info-reader                     ;the standalone Info reader (no Perl)
         bash-completion
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index be5a678cec..0af9e2993d 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Florian Pelz <pelzflorian <at> pelzflorian.de>
+;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,18 +42,13 @@
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bootloaders)
   #:use-module (gnu packages certs)
-  #:use-module (gnu packages file-systems)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages ssh)
-  #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages package-management)
-  #:use-module (gnu packages disk)
   #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages nvi)
   #:use-module (gnu packages xorg)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-26)
@@ -490,27 +486,14 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
      ;; Explicitly allow for empty passwords.
      (base-pam-services #:allow-empty-passwords? #t))
 
-    (packages (cons* glibc ;for 'tzselect' & co.
-                     parted gptfdisk ddrescue
-                     fontconfig
-                     font-dejavu font-gnu-unifont
-                     grub                  ;mostly so xrefs to its manual work
-                     cryptsetup
-                     mdadm
-                     dosfstools         ;mkfs.fat, for the UEFI boot partition
-                     btrfs-progs
-                     f2fs-tools
-                     jfsutils
-                     openssh    ;we already have sshd, having ssh/scp can help
-                     wireless-tools iw wpa-supplicant-minimal iproute
-                     ;; XXX: We used to have GNU fdisk here, but as of version
-                     ;; 2.0.0a, that pulls Guile 1.8, which takes unreasonable
-                     ;; space; furthermore util-linux's fdisk is already
-                     ;; available here, so we keep that.
-                     bash-completion
-                     nvi                          ;:wq!
-                     nss-certs ; To access HTTPS, use git, etc.
-                     %base-packages))))
+    (packages (append
+                (list (canonical-package glibc) ; for 'tzselect' & co.
+                      fontconfig
+                      font-dejavu font-gnu-unifont
+                      grub          ; mostly so xrefs to its manual work
+                      nss-certs)    ; To access HTTPS, use git, etc.
+                %base-packages-disk-utils
+                %base-packages))))
 
 (define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
                          (triplet "arm-linux-gnueabihf"))
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Wed, 14 Oct 2020 09:18:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 43881 <at> debbugs.gnu.org
Subject: Re: [bug#43881] [PATCH 1/2] system: Add %base-packages-disk-utils.
Date: Wed, 14 Oct 2020 11:17:08 +0200
Hi!

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> * gnu/system.scm (%base-packages-disk-utils): New variable.


[...]

>    #:use-module (guix diagnostics)
> +  #:use-module (gnu packages admin)
>    #:use-module (gnu packages base)
>    #:use-module (gnu packages bash)
> +  #:use-module (gnu packages compression)
>    #:use-module (gnu packages cross-base)
> +  #:use-module (gnu packages cryptsetup)
> +  #:use-module (gnu packages disk)
> +  #:use-module (gnu packages file-systems)
> +  #:use-module (gnu packages firmware)
> +  #:use-module (gnu packages gawk)
>    #:use-module (gnu packages guile)
>    #:use-module (gnu packages guile-xyz)
> -  #:use-module (gnu packages admin)
>    #:use-module (gnu packages hurd)
> -  #:use-module (gnu packages linux)
> -  #:use-module (gnu packages pciutils)
> -  #:use-module (gnu packages package-management)
>    #:use-module (gnu packages less)
> -  #:use-module (gnu packages zile)
> -  #:use-module (gnu packages nano)
> -  #:use-module (gnu packages gawk)
> +  #:use-module (gnu packages linux)
>    #:use-module (gnu packages man)
> +  #:use-module (gnu packages nano)
> +  #:use-module (gnu packages package-management)
> +  #:use-module (gnu packages pciutils)
>    #:use-module (gnu packages texinfo)
> -  #:use-module (gnu packages compression)
> -  #:use-module (gnu packages firmware)
> +  #:use-module (gnu packages zile)
>    #:use-module (gnu services)
>    #:use-module (gnu services shepherd)
>    #:use-module (gnu services base)

Does it pull new modules or just reorder them?  If the latter, fine with me!

> @@ -159,6 +163,7 @@
>              %base-packages-interactive
>              %base-packages-linux
>              %base-packages-networking
> +            %base-packages-disk-utils
>              %base-packages-utils

Now there’s a precedent but I think we should have written “utilities”
for consistency with the rest of the code base.

Maybe you can do that here and then we can deprecate
‘%base-packages-utils’ in favor of ‘%base-package-utilities’.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Wed, 14 Oct 2020 09:20:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 43881 <at> debbugs.gnu.org
Subject: Re: [bug#43881] [PATCH 2/2] install: Deduplicate packages with
 %base-package sets.
Date: Wed, 14 Oct 2020 11:19:05 +0200
Efraim Flashner <efraim <at> flashner.co.il> skribis:

> * gnu/system.scm (%base-packages-interactive): Add nvi.
> * gnu/system/install.scm (installation-os)[packages]: Remove parted,
> gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
> f2fs-tools, jfstools, openssh, wireless-tools, iw,
> wpa-supplicant-minimal, iproute, bash-completion, nvi. Replace glibc
> with the canonical-package of glibc. Add %base-packages-disk-utils.
>
> remove wpa-supplicant-minimal
> replace glibc with canonical-pacakge glibc

These two lines are a leftover?

I think we want to keep ‘wpa-supplicant-minimal’ and keep ‘glibc’, not
the canonical-package variant (it would prevent cross-compilation).

Apart from that, if that leaves the package set unchanged, LGTM!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Wed, 14 Oct 2020 09:23:01 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43881 <at> debbugs.gnu.org
Subject: Re: [bug#43881] [PATCH 1/2] system: Add %base-packages-disk-utils.
Date: Wed, 14 Oct 2020 12:21:33 +0300
[Message part 1 (text/plain, inline)]
On Wed, Oct 14, 2020 at 11:17:08AM +0200, Ludovic Courtès wrote:
> Hi!
> 
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 
> > * gnu/system.scm (%base-packages-disk-utils): New variable.
> 
> 
> [...]
> 
> >    #:use-module (guix diagnostics)
> > +  #:use-module (gnu packages admin)
> >    #:use-module (gnu packages base)
> >    #:use-module (gnu packages bash)
> > +  #:use-module (gnu packages compression)
> >    #:use-module (gnu packages cross-base)
> > +  #:use-module (gnu packages cryptsetup)
> > +  #:use-module (gnu packages disk)
> > +  #:use-module (gnu packages file-systems)
> > +  #:use-module (gnu packages firmware)
> > +  #:use-module (gnu packages gawk)
> >    #:use-module (gnu packages guile)
> >    #:use-module (gnu packages guile-xyz)
> > -  #:use-module (gnu packages admin)
> >    #:use-module (gnu packages hurd)
> > -  #:use-module (gnu packages linux)
> > -  #:use-module (gnu packages pciutils)
> > -  #:use-module (gnu packages package-management)
> >    #:use-module (gnu packages less)
> > -  #:use-module (gnu packages zile)
> > -  #:use-module (gnu packages nano)
> > -  #:use-module (gnu packages gawk)
> > +  #:use-module (gnu packages linux)
> >    #:use-module (gnu packages man)
> > +  #:use-module (gnu packages nano)
> > +  #:use-module (gnu packages package-management)
> > +  #:use-module (gnu packages pciutils)
> >    #:use-module (gnu packages texinfo)
> > -  #:use-module (gnu packages compression)
> > -  #:use-module (gnu packages firmware)
> > +  #:use-module (gnu packages zile)
> >    #:use-module (gnu services)
> >    #:use-module (gnu services shepherd)
> >    #:use-module (gnu services base)
> 
> Does it pull new modules or just reorder them?  If the latter, fine with me!

It reorders them and adds cryptsetup, disk and file-systems.

> > @@ -159,6 +163,7 @@
> >              %base-packages-interactive
> >              %base-packages-linux
> >              %base-packages-networking
> > +            %base-packages-disk-utils
> >              %base-packages-utils
> 
> Now there’s a precedent but I think we should have written “utilities”
> for consistency with the rest of the code base.
> 
> Maybe you can do that here and then we can deprecate
> ‘%base-packages-utils’ in favor of ‘%base-package-utilities’.

+1 for utilities over utils

> Thanks,
> Ludo’.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#43881; Package guix-patches. (Wed, 14 Oct 2020 09:26:01 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43881 <at> debbugs.gnu.org
Subject: Re: [bug#43881] [PATCH 2/2] install: Deduplicate packages with
 %base-package sets.
Date: Wed, 14 Oct 2020 12:24:44 +0300
[Message part 1 (text/plain, inline)]
On Wed, Oct 14, 2020 at 11:19:05AM +0200, Ludovic Courtès wrote:
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 
> > * gnu/system.scm (%base-packages-interactive): Add nvi.
> > * gnu/system/install.scm (installation-os)[packages]: Remove parted,
> > gptfdisk, ddrescue, cryptsetup, mdadm, dosfstools, btrfs-progs,
> > f2fs-tools, jfstools, openssh, wireless-tools, iw,
> > wpa-supplicant-minimal, iproute, bash-completion, nvi. Replace glibc
> > with the canonical-package of glibc. Add %base-packages-disk-utils.
> >
> > remove wpa-supplicant-minimal
> > replace glibc with canonical-pacakge glibc
> 
> These two lines are a leftover?

Looks like they're a leftover from squashing two commits. Especially
looking at my typo for package.

> I think we want to keep ‘wpa-supplicant-minimal’ and keep ‘glibc’, not
> the canonical-package variant (it would prevent cross-compilation).

We should already have wpa-supplicant available from the
wpa-supplicant-service-type. Understood about the canonical-package bit.

> Apart from that, if that leaves the package set unchanged, LGTM!
> 
> Ludo’.

Thanks for the review.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 15 Oct 2020 07:57:02 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Thu, 15 Oct 2020 07:57:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 43881-done <at> debbugs.gnu.org
Subject: Re: [PATCH 1/2] system: Add %base-packages-disk-utils.
Date: Thu, 15 Oct 2020 10:55:51 +0300
[Message part 1 (text/plain, inline)]
Patches pushed!


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 12 Nov 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 223 days ago.

Previous Next


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