diff mbox series

[bug#41541,6/8] system: examples: Add bare-hurd.tmpl.

Message ID 877dwk4g1m.fsf@gnu.org
State Accepted
Headers show
Series None | expand

Checks

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

Commit Message

Janneke Nieuwenhuizen June 6, 2020, 10:58 a.m. UTC
Mathieu Othacehe writes:

Hello Mathieu, Ludo!

>>     ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
>>         gnu/system/examples/bare-hurd.tmpl
>
> Not related to your serie, but I would really like the "image" catalog I
> proposed to help here. Most people struggle to get the difference
> between --system and --target. Plus, those cross-compilation targets are
> not really documented.
>
> I think if one could write:
>
> guix system image gnu/system/images/bare-hurd.scm
>
> or so, it would help. But this needs some more discussions.

Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
after merging the "image" catalog feature and then rewrite this message?

Exactly when we merge wip-hurd-vm does not matter all that much to me,
it's much more important/interesting to agree when we're happy with it.

>> -  #:use-module ((guix utils) #:select (source-properties->location))
>> +  #:use-module ((guix utils) #:select (source-properties->location
>> +                                       %current-target-system))
>
> You're not using it right?

Ah, no (not since the grub work moved).

>> +    ;; (kernel-loadable-modules '())
>
> Remove it.

Ok, I was already unsure about keeping...

>> +    ;; (label (operating-system-default-label this-operating-system))
>
> Same for this one and the other commented lines below.

...these all.  They were pretty helpful for me to get it to work,
initially.  This will see more changes as Hurd support improves!

Hmm, oops: the guix-system.sh test fails.  Added this

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?

Greetings, Janneke

Comments

Mathieu Othacehe June 6, 2020, 4:49 p.m. UTC | #1
Hey,

>
> Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
> after merging the "image" catalog feature and then rewrite this message?

No, I have no clear objective for the catalog in mind, and as your serie
is almost ready, let's merge it first!

>  # Verify that the examples can be built.
>  for example in gnu/system/examples/*.tmpl; do
> -    guix system -n disk-image "$example"
> +    if echo "$example" | grep hurd; then
> +        target="--target=i586-pc-gnu"
> +    else
> +        target=
> +    fi
> +    guix system -n disk-image $target "$example"
>  done
>  
>  # Verify that the disk image types can be built.
>
> to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?

It's somehow linked to the catalog subject. I think we should get rid of
this "examples" folder and provide something encapsulating the
system/target, the image and the operating-system, but I'm not sure how.

For now, I don't think that there's much better that the hack you're
proposing.

Thanks,

Mathieu
Janneke Nieuwenhuizen June 6, 2020, 10:44 p.m. UTC | #2
Mathieu Othacehe writes:

Hello Mathieu,

>> Yes, I agree.  Do you propose to hold back merging wip-hurd-vm until
>> after merging the "image" catalog feature and then rewrite this message?
>
> No, I have no clear objective for the catalog in mind, and as your serie
> is almost ready, let's merge it first!

Good; let's look at the last bits tomorrow.  I think wip-hurd-vm should
be ready to merge (except of course the top "DRAFT" commit).

>>  # Verify that the examples can be built.
>>  for example in gnu/system/examples/*.tmpl; do
>> -    guix system -n disk-image "$example"
>> +    if echo "$example" | grep hurd; then
>> +        target="--target=i586-pc-gnu"
>> +    else
>> +        target=
>> +    fi
>> +    guix system -n disk-image $target "$example"
>>  done
>>  
>>  # Verify that the disk image types can be built.
>>
>> to "fix" that.  It feals a bit heavy, ugly and specific.  Ideas?
>
> It's somehow linked to the catalog subject. I think we should get rid of
> this "examples" folder and provide something encapsulating the
> system/target, the image and the operating-system, but I'm not sure how.
>
> For now, I don't think that there's much better that the hack you're
> proposing.

Ok, all great then for now.  Thank, Janneke
diff mbox series

Patch

diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 3a831cba1d..0e22686a34 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -307,7 +307,12 @@  guix system search anonym network | grep "^name: tor"
 
 # Verify that the examples can be built.
 for example in gnu/system/examples/*.tmpl; do
-    guix system -n disk-image "$example"
+    if echo "$example" | grep hurd; then
+        target="--target=i586-pc-gnu"
+    else
+        target=
+    fi
+    guix system -n disk-image $target "$example"
 done
 
 # Verify that the disk image types can be built.