diff mbox series

[bug#43101] Add version number in release ISO

Message ID 20200829154445.5512d99a@tachikoma.lepiller.eu
State Accepted
Headers show
Series [bug#43101] Add version number in release ISO | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Julien Lepiller Aug. 29, 2020, 1:44 p.m. UTC
Hi,

I've recently proposed a patch to libosinfo database, and they
suggested that we add the version number to the ISO label, so the tool
can differentiate and identify the ISOs. See
https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/202

The first patch adds the --label option to guix system, and it sets the
label for the boot partition.  The second patch simply uses it and adds
a --label option to the release target in the Makefile.

Comments

Ludovic Courtès Aug. 30, 2020, 1:47 p.m. UTC | #1
Hi,

Julien Lepiller <julien@lepiller.eu> skribis:

> I've recently proposed a patch to libosinfo database, and they
> suggested that we add the version number to the ISO label, so the tool
> can differentiate and identify the ISOs. See
> https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/202

Good idea.

>>From a6d4cb90825b9e45c0baeaeaa653c57a9100b21a Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sat, 29 Aug 2020 15:34:56 +0200
> Subject: [PATCH 1/2] guix: system: Add `--label' option.
>
> * guix/scripts/system.scm (%options): Add `--label'.

Please describe the other changes (to ‘system-derivation-for-action’,
etc.)

> +        (partitions (match (image-partitions base-image)
> +                      ((boot others ...)
> +                       (cons
> +                         ((@ (gnu image) partition)
> +                           (inherit boot)
> +                           (label (or label (partition-label boot))))

Please include (gnu image) and avoid ‘@’.

> +  (display (G_ "
> +      --label=LABEL      for 'disk-image', label disk image with LABEL"))

Make sure to add it to doc/guix.texi as well.

>>From cd47229d93b6dd0d7a793230e6a103a40034f6a7 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sat, 29 Aug 2020 15:36:40 +0200
> Subject: [PATCH 2/2] Makefile.am: Set iso label.
>
> * Makefile.am (release): Add version number in disk image label.

LGTM.

Thank you!  :-)

Ludo’.
Julien Lepiller Aug. 30, 2020, 2:35 p.m. UTC | #2
Le 30 août 2020 09:47:04 GMT-04:00, "Ludovic Courtès" <ludo@gnu.org> a écrit :
>Hi,
>
>Julien Lepiller <julien@lepiller.eu> skribis:
>
>> I've recently proposed a patch to libosinfo database, and they
>> suggested that we add the version number to the ISO label, so the
>tool
>> can differentiate and identify the ISOs. See
>> https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/202
>
>Good idea.
>
>>>From a6d4cb90825b9e45c0baeaeaa653c57a9100b21a Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Sat, 29 Aug 2020 15:34:56 +0200
>> Subject: [PATCH 1/2] guix: system: Add `--label' option.
>>
>> * guix/scripts/system.scm (%options): Add `--label'.
>
>Please describe the other changes (to ‘system-derivation-for-action’,
>etc.)
>
>> +        (partitions (match (image-partitions base-image)
>> +                      ((boot others ...)
>> +                       (cons
>> +                         ((@ (gnu image) partition)
>> +                           (inherit boot)
>> +                           (label (or label (partition-label
>boot))))
>
>Please include (gnu image) and avoid ‘@’.

(gnu image) is already imported, but conflicts with another module for partition, leading to a compilation error. What should I do?

>
>> +  (display (G_ "
>> +      --label=LABEL      for 'disk-image', label disk image with
>LABEL"))
>
>Make sure to add it to doc/guix.texi as well.
>
>>>From cd47229d93b6dd0d7a793230e6a103a40034f6a7 Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Sat, 29 Aug 2020 15:36:40 +0200
>> Subject: [PATCH 2/2] Makefile.am: Set iso label.
>>
>> * Makefile.am (release): Add version number in disk image label.
>
>LGTM.

I'll add the architecture in there too, as per discussion in the osinfo-db MR.

>
>Thank you!  :-)
>
>Ludo’.
Mathieu Othacehe Aug. 30, 2020, 3:05 p.m. UTC | #3
Hello Julien,

Thanks for this patch!

>>Please include (gnu image) and avoid ‘@’.
>
> (gnu image) is already imported, but conflicts with another module for partition, leading to a compilation error. What should I do?

You can maybe write something like:

--8<---------------cut here---------------start------------->8---
#:use-module ((srfi srfi-1) #:hide (partition))
--8<---------------cut here---------------end--------------->8---

> I'll add the architecture in there too, as per discussion in the osinfo-db MR.

Do you think it could be useful to add the same mechanism to ISO images
built by the CI? In that case, you could maybe use the same mechanism in
(gnu ci) and label the boot partition with %guix-version?

Thanks,

Mathieu
Julien Lepiller Aug. 30, 2020, 3:11 p.m. UTC | #4
Yes, it makes sense! I'll send a patch for that too. Thank you!

Le 30 août 2020 11:05:27 GMT-04:00, Mathieu Othacehe <othacehe@gnu.org> a écrit :
>
>Hello Julien,
>
>Thanks for this patch!
>
>>>Please include (gnu image) and avoid ‘@’.
>>
>> (gnu image) is already imported, but conflicts with another module
>for partition, leading to a compilation error. What should I do?
>
>You can maybe write something like:
>
>--8<---------------cut here---------------start------------->8---
>#:use-module ((srfi srfi-1) #:hide (partition))
>--8<---------------cut here---------------end--------------->8---
>
>> I'll add the architecture in there too, as per discussion in the
>osinfo-db MR.
>
>Do you think it could be useful to add the same mechanism to ISO images
>built by the CI? In that case, you could maybe use the same mechanism
>in
>(gnu ci) and label the boot partition with %guix-version?
>
>Thanks,
>
>Mathieu
diff mbox series

Patch

From cd47229d93b6dd0d7a793230e6a103a40034f6a7 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 29 Aug 2020 15:36:40 +0200
Subject: [PATCH 2/2] Makefile.am: Set iso label.

* Makefile.am (release): Add version number in disk image label.
---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index 9c38c2f83c..7a658d157b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -838,6 +838,7 @@  release: dist-with-updated-version
 	  image=`$(top_builddir)/pre-inst-env						\
 	    guix system disk-image							\
 	    --file-system-type=iso9660							\
+	    --label="GUIX_IMAGE_$(VERSION)"						\
             --system=$$system --fallback						\
 	    gnu/system/install.scm` ;							\
 	  if [ ! -f "$$image" ] ; then							\
-- 
2.28.0