mbox series

[bug#65755,0/3] Mark some packages as not supported on the hurd.

Message ID 87v8codg2o.fsf@cbaines.net
Headers show
Series Mark some packages as not supported on the hurd. | expand

Message

Christopher Baines Sept. 5, 2023, 11:17 a.m. UTC
Mark some packages as not supported on the hurd.

Christopher Baines (3):
  gnu: musl-cross: Remove i586-gnu from supported-systems.
  gnu: linux-libre-headers: Remove i586-gnu from supported-systems.
  gnu: skalibs: Remove i586-gnu from %supported-systems.

 gnu/packages/heads.scm   | 1 +
 gnu/packages/linux.scm   | 1 +
 gnu/packages/skarnet.scm | 1 +
 3 files changed, 3 insertions(+)


base-commit: e7b6cd86ef856b52817428227f9c3d3297312262

Comments

Ludovic Courtès Sept. 12, 2023, 7:21 a.m. UTC | #1
Hi,

Christopher Baines <mail@cbaines.net> skribis:

>   gnu: musl-cross: Remove i586-gnu from supported-systems.
>   gnu: linux-libre-headers: Remove i586-gnu from supported-systems.
>   gnu: skalibs: Remove i586-gnu from %supported-systems.

LGTM!

Ludo’.
Christopher Baines Sept. 12, 2023, 7:46 a.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>>   gnu: musl-cross: Remove i586-gnu from supported-systems.
>>   gnu: linux-libre-headers: Remove i586-gnu from supported-systems.
>>   gnu: skalibs: Remove i586-gnu from %supported-systems.
>
> LGTM!

Great, I've pushed this to master as
53f510dad6cc1b55b4abdbbfd55e507a9463a80f.

Thanks,

Chris
Janneke Nieuwenhuizen Sept. 15, 2023, 6:32 p.m. UTC | #3
Hi,

Marius found that building the updated "guix" package on the
just-rebased hurd-team branch failed.

It turns out that the packages.scm test on master fails notably:
package-transitive-supported-systems, implicit inputs

--8<---------------cut here---------------start------------->8---
test-name: package-transitive-supported-systems, implicit inputs
location: /home/janneke/src/guix/master/tests/packages.scm:496
source:
+ (test-equal
+   "package-transitive-supported-systems, implicit inputs"
+   %supported-systems
+   (let ((p (dummy-package
+              "foo"
+              (build-system gnu-build-system)
+              (supported-systems
+                `("does-not-exist" "foobar" ,@%supported-systems)))))
+     (parameterize
+       ((%current-system "armhf-linux"))
+       (package-transitive-supported-systems p))))
expected-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "i586-gnu" "powerpc-linux")
actual-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "powerpc-linux")
result: FAIL
--8<---------------cut here---------------end--------------->8---

The culprit is this commit

    0e08ad7f19d5b29a4883468552b5d213a7bdb66e
    gnu: linux-libre-headers: Remove i586-gnu from supported-systems.

Greetings,
Janneke
Christopher Baines Sept. 15, 2023, 6:56 p.m. UTC | #4
Janneke Nieuwenhuizen <janneke@gnu.org> writes:

> Marius found that building the updated "guix" package on the
> just-rebased hurd-team branch failed.
>
> It turns out that the packages.scm test on master fails notably:
> package-transitive-supported-systems, implicit inputs
>
> test-name: package-transitive-supported-systems, implicit inputs
> location: /home/janneke/src/guix/master/tests/packages.scm:496
> source:
> + (test-equal
> +   "package-transitive-supported-systems, implicit inputs"
> +   %supported-systems
> +   (let ((p (dummy-package
> +              "foo"
> +              (build-system gnu-build-system)
> +              (supported-systems
> +                `("does-not-exist" "foobar" ,@%supported-systems)))))
> +     (parameterize
> +       ((%current-system "armhf-linux"))
> +       (package-transitive-supported-systems p))))
> expected-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "i586-gnu" "powerpc-linux")
> actual-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "powerpc-linux")
> result: FAIL

I would say interesting, but I've struggled with the supported system
stuff for years. The data service does use
package-transitive-supported-systems, but in a very weird way. To check
if a package supports a system, you call
package-transitive-supported-systems with the package and system (as the
second optional argument), then check if that system is present in the
returned list.

This is to say that in my uninformed opinion, the presence of the system
which you pass to package-transitive-supported-systems in the returned
list seems to mean something, but I wouldn't be able to say anything
else about the returned value.

I don't think there's anything wrong with adjusting the expectation to
have the test pass, but to me the longer term thing to do is look at
changing the code around supported systems.

On not breaking tests when making changes though, I don't generally run
make check unless I'm changing code in guix/ but it would be nice to
start QA doing that for every patch series. We should also probably try
to avoid tests that break when making changes to packages.
Ludovic Courtès Sept. 15, 2023, 7:43 p.m. UTC | #5
Christopher Baines <mail@cbaines.net> skribis:

> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>
>> Marius found that building the updated "guix" package on the
>> just-rebased hurd-team branch failed.
>>
>> It turns out that the packages.scm test on master fails notably:
>> package-transitive-supported-systems, implicit inputs
>>
>> test-name: package-transitive-supported-systems, implicit inputs
>> location: /home/janneke/src/guix/master/tests/packages.scm:496
>> source:
>> + (test-equal
>> +   "package-transitive-supported-systems, implicit inputs"
>> +   %supported-systems
>> +   (let ((p (dummy-package
>> +              "foo"
>> +              (build-system gnu-build-system)
>> +              (supported-systems
>> +                `("does-not-exist" "foobar" ,@%supported-systems)))))
>> +     (parameterize
>> +       ((%current-system "armhf-linux"))
>> +       (package-transitive-supported-systems p))))
>> expected-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "i586-gnu" "powerpc-linux")
>> actual-value: ("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux" "riscv64-linux" "i686-linux" "armhf-linux" "powerpc-linux")
>> result: FAIL

[...]

> I don't think there's anything wrong with adjusting the expectation to
> have the test pass, but to me the longer term thing to do is look at
> changing the code around supported systems.

Agreed, we need to change the expected result to:

  (filter target-linux? %supported-systems)

This is expected given that ‘%current-system’ is set to *-linux.

> On not breaking tests when making changes though, I don't generally run
> make check unless I'm changing code in guix/ but it would be nice to
> start QA doing that for every patch series.

Yes!

> We should also probably try to avoid tests that break when making
> changes to packages.

We try to avoid it but there are a few cases where we test real packages
that we hope rarely change.

Thanks,
Ludo’.
Janneke Nieuwenhuizen Sept. 15, 2023, 8:06 p.m. UTC | #6
Ludovic Courtès writes:

Hi,

> Christopher Baines <mail@cbaines.net> skribis:
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> writes:
>>
>>> Marius found that building the updated "guix" package on the
>>> just-rebased hurd-team branch failed.
[..]

>> I don't think there's anything wrong with adjusting the expectation to
>> have the test pass, but to me the longer term thing to do is look at
>> changing the code around supported systems.
>
> Agreed, we need to change the expected result to:
>
>   (filter target-linux? %supported-systems)
>
> This is expected given that ‘%current-system’ is set to *-linux.

That makes sense (and fixes it :)

Pushed to master as edca2863bcb52388fe454e14136264a4f7490273

Thanks!
Janneke