[PATCH 0/2] Deduplicate package sets

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Ludovic Courtès
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 9 Oct 2020 15:39
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20201009133917.26124-1-efraim@flashner.co.il
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
E
E
Efraim Flashner wrote on 9 Oct 2020 15:42
[PATCH 1/2] system: Add %base-packages-disk-utils.
(address . 43881@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20201009134253.26375-1-efraim@flashner.co.il
* gnu/system.scm (%base-packages-disk-utils): New variable.
---
gnu/system.scm | 36 +++++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)

Toggle diff (79 lines)
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@pelzflorian.de>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <jannek@gnu.org>
+;;; Copyright © 2020 Efraim Flashner <efraim@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
E
E
Efraim Flashner wrote on 9 Oct 2020 15:42
[PATCH 2/2] install: Deduplicate packages with %base-package sets.
(address . 43881@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20201009134253.26375-2-efraim@flashner.co.il
* 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(-)

Toggle diff (90 lines)
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@fastmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2020 Efraim Flashner <efraim@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
L
L
Ludovic Courtès wrote on 14 Oct 2020 11:17
Re: [bug#43881] [PATCH 1/2] system: Add %base-packages-disk-utils.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 43881@debbugs.gnu.org)
87lfg9f9pn.fsf@gnu.org
Hi!

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

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


[...]

Toggle quote (35 lines)
> #: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!

Toggle quote (7 lines)
> @@ -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’.
L
L
Ludovic Courtès wrote on 14 Oct 2020 11:19
Re: [bug#43881] [PATCH 2/2] install: Deduplicate packages with %base-package sets.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 43881@debbugs.gnu.org)
87ft6hf9me.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (10 lines)
> * 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’.
E
E
Efraim Flashner wrote on 14 Oct 2020 11:21
Re: [bug#43881] [PATCH 1/2] system: Add %base-packages-disk-utils.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 43881@debbugs.gnu.org)
20201014092133.GB16635@E5400
On Wed, Oct 14, 2020 at 11:17:08AM +0200, Ludovic Courtès wrote:
Toggle quote (46 lines)
> Hi!
>
> Efraim Flashner <efraim@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.

Toggle quote (13 lines)
> > @@ -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

Toggle quote (3 lines)
> Thanks,
> Ludo’.

--
Efraim Flashner <efraim@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+GwxoACgkQQarn3Mo9
g1GNQw/8Ce0YM/Z98WFaHdocFayfsOwEsCUVZGoWXJ4EZmlONk9HHm9GHXgHmOcE
SqTYRcxMPffyBml2XyWcqZriuViKD6DS2WaLslDUUhZOxPFlQPxcYZnomai6Zl9Y
6T+gIDEmw7awkiYRe8r+0xzevjCZBsNX8bqB6+zt7pT4fmSDh+x4MOzbWjwtEk65
bdE6aAzTtlWI7f2Rpl9wcYI/dkMJ41mrGPn7hJm4Jd5nlHUpobB+qXA7tzPuZfv5
jwbXeNPDB0wzp1KaYpBWnIyyTmC2VktdBRGkVGPTm/uuk1JB8CKGLCVKvyhoG/PV
vDtnZI9bfJuC6Ymo8ZwrpD99RVqA5KH5mv6vg+kVDupxU8Xn4S7hEofDmwEiif+j
/1iZMVyaKGXzjbTywc5ZPhyotFx46keFFNSvoycQSRj05G31cYqmp8zLLQSZHU9s
1trWWAX+4pard7lcjQCgZjJ1P3wJJ8BUEqkThyu4aFkkFc3BvGorckjDOk7fOQGk
NCppVqBJiuStyvL4m3aWHYlxyIKl+dmvRVhp5pNUi0ql6gixICZAq4pdwOgCQgiJ
sXX0QgIhHi5Gw/pGquA3YLLqirxSuSQWLntye2a1deUPq/xBWAomvlPy279+Wkgp
IEP0Lnq+vgNAWTYHOIYSo0fwDqIE/GYs9WUmC4Lf3V4Jq2A62eQ=
=sZid
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 14 Oct 2020 11:24
Re: [bug#43881] [PATCH 2/2] install: Deduplicate packages with %base-package sets.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 43881@debbugs.gnu.org)
20201014092444.GC16635@E5400
On Wed, Oct 14, 2020 at 11:19:05AM +0200, Ludovic Courtès wrote:
Toggle quote (14 lines)
> Efraim Flashner <efraim@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.

Toggle quote (3 lines)
> 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.

Toggle quote (4 lines)
> Apart from that, if that leaves the package set unchanged, LGTM!
>
> Ludo’.

Thanks for the review.

--
Efraim Flashner <efraim@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+Gw9wACgkQQarn3Mo9
g1Gx7xAAiQD4Cpri1d1WE0d6z4eMrBmFUIkLz12EipOlGsBCi/ZJj72SNB1yomzA
rUxqMktwXLlLsqSDL7XkP4HkkYYeRlBEuzIhiCD7pEq+Z4hy0EoIBCA5CTCi0cox
loicW20AL7ZnCQOgbOlgp/tsybdsKVtj9pHxllauGGK8DriC/PD07dLafP2nNw7C
bF28ahyjThBCvQYVx6qX/jJQ3MGg1slhBLRXcmJYzXAqstE/MLXj6LoN7VaGJwEV
NlF89MoVdNJesFKL/y4sH4mwfRXf1gIVZ0RyC1S3Wx9utmZl/IZ4RqEWNUG6B4ZE
oHURZKpmwnrqNWL5lVPx+9nOH14idCy480aptQFAwhecNjRpaPxN/5CFcwQR1MtT
UiXYAYg4eupMqFh/EClWyfGX7sz0pHQ/R6Jb8a7+Z1M8g9zV1jtgC7z7YzvlbQM2
iaweyouxHFz96J2jEH6eKPEAt/j5jmj6Qp+UA8JTA64HCPoGjRz+tgxf7VqX4uqJ
aZrGPVNo68+Jwqr6Xkt+XYTdW4M6PXBClRFrvpLCJLsZwXil4+5WtW0SEB4R4kTG
pDf73+TaDKzV/iuCnyUJ17bTu8ms4zpLHVDAohuyyjevvmTJWA7s9bxgdjYDEHyj
rAuHvWUmoTaBK4jvAEml9Ncj47GY0FlGxk7CfJStWK8QevyicbY=
=hP3l
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 15 Oct 2020 09:55
Re: [PATCH 1/2] system: Add %base-packages-disk-utils.
(address . 43881-done@debbugs.gnu.org)
20201015075551.GE1237@E5400
Patches pushed!


--
Efraim Flashner <efraim@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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+IAIYACgkQQarn3Mo9
g1F/ZRAAw0GOAN4rDuFClAzKaUyYK2vj787wLrCMtSIB3NYpp43HBaJT3pG4IfeS
kyT0YcgGl86Fa9nTPrluRyLSH+r5WUGLG89/S4ZLR7yiYGaC1k3/T+Loon98BqUB
ibvNN8HZ6gG1fwfXsRbd3IY0SZvyYf6S4HiU5TIywQb81N0a/B2fo1QxI+c3T9Ga
Zl8pGklMgiqCFNensA8Q3x0cq6VfZsiNAho8xBAkbtpLesLEK6ICLuG9pT0aWDee
tYKHJ0+pe12GZNeWWA3+ADcrRmFhQdxpwT5Dcbn1YoDD4xKWgKZuylzqklod2pyi
3HpIvkexKRchy48l/C34hZMUDENbLoD7XtwIdQUqPjHK8mknOT7FWOomKjMxfvPf
YdghJjMJwkWMKd159jT9mRGMUJcagXXp0xyRl9RvpX0tZU+w8i6bmKey/Osbd5Sc
4X119BEriI79cl+Uag9fMTFL8X74s9vDgoIBLNwMFmgrXRykPvhJweo9hUxLo8mO
zdzXKsZo+pA5yBjBE5E9c665H9vvm9eVcl0rvojU4eYjINHtmpCCE34hyBTHA9yL
9SanEapA2G0viLq+teu+hEyIif0/Rd3bYL1KgaJkzaZsUx/1fUFBcHEdIh/Ettjz
rdyZBgXLiz7Xjj3CfAnp+uSH9YEi8wPYmq7RqBfIV1v1xnzGfmU=
=WBgR
-----END PGP SIGNATURE-----


Closed
?