* bug#41546: Shepherd network activation failures on armhf
@ 2020-05-26 20:02 Jesse Dowell
2020-05-29 16:35 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Jesse Dowell @ 2020-05-26 20:02 UTC (permalink / raw)
To: 41546
[-- Attachment #1: Type: text/plain, Size: 2135 bytes --]
Hello,
I recently experienced a problem with the latest master branch code on an
armhf device. I was able to track down and fix the issue but it required
changes to guix/build/syscalls.scm.
My system previously booted correctly but after a recent 'guix pull' and
'guix system reconfigure' my device would fail to activate all networking
related services on boot including loopback.
The error message on failure in the terminal when trying to 'herd start
networking' was unhelpful but manual management of the network interfaces
could be completed successfully so it seemed to be an issue specific to the
way Shepherd was activating the loopback interface.
I was able to track my issue down to recently introduced code in
guix/build/syscalls.scm related to the GNU Hurd.
The following patch fixes the problem for me. The core of the issue is that
the new Hurd related checks use string-suffix? rather than string-contains
like the code elsewhere in the module.
Whan string-suffix? is used it doesn't match my system %host-type which is
"arm-unknown-linux-gnueabihf" and the xxxx-socket-address!/hurd branch is
taken rather than xxxx-socket-address!/linux.
I don't know if this is only a problem on my unsupported device. I'm
running guix system on a Raspberry Pi 4b.
Here's the patch that fixes the issue for me.
-------------------------
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 8070c5546f..6be322d68f 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -1404,7 +1404,7 @@ bytevector BV at INDEX."
(error "unsupported socket address" sockaddr)))))
(define write-socket-address!
- (if (string-suffix? "linux-gnu" %host-type)
+ (if (string-contains %host-type "linux-gnu")
write-socket-address!/linux
write-socket-address!/hurd))
@@ -1436,7 +1436,7 @@ bytevector BV at INDEX."
(vector family)))))
(define read-socket-address
- (if (string-suffix? "linux-gnu" %host-type)
+ (if (string-contains %host-type "linux-gnu")
read-socket-address/linux
read-socket-address/hurd))
---------------------------
Best Regards,
Jesse
[-- Attachment #2: Type: text/html, Size: 2640 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#41546: Shepherd network activation failures on armhf
2020-05-26 20:02 bug#41546: Shepherd network activation failures on armhf Jesse Dowell
@ 2020-05-29 16:35 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-05-29 16:35 UTC (permalink / raw)
To: Jesse Dowell; +Cc: 41546-done
Hi Jesse,
Jesse Dowell <jesse.dowell@gmail.com> skribis:
> I was able to track my issue down to recently introduced code in
> guix/build/syscalls.scm related to the GNU Hurd.
>
> The following patch fixes the problem for me. The core of the issue is that
> the new Hurd related checks use string-suffix? rather than string-contains
> like the code elsewhere in the module.
>
> Whan string-suffix? is used it doesn't match my system %host-type which is
> "arm-unknown-linux-gnueabihf" and the xxxx-socket-address!/hurd branch is
> taken rather than xxxx-socket-address!/linux.
Indeed, great investigation work!
> I don't know if this is only a problem on my unsupported device. I'm
> running guix system on a Raspberry Pi 4b.
>
> Here's the patch that fixes the issue for me.
> -------------------------
> diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
> index 8070c5546f..6be322d68f 100644
> --- a/guix/build/syscalls.scm
> +++ b/guix/build/syscalls.scm
> @@ -1404,7 +1404,7 @@ bytevector BV at INDEX."
> (error "unsupported socket address" sockaddr)))))
>
> (define write-socket-address!
> - (if (string-suffix? "linux-gnu" %host-type)
> + (if (string-contains %host-type "linux-gnu")
> write-socket-address!/linux
> write-socket-address!/hurd))
>
> @@ -1436,7 +1436,7 @@ bytevector BV at INDEX."
> (vector family)))))
>
> (define read-socket-address
> - (if (string-suffix? "linux-gnu" %host-type)
> + (if (string-contains %host-type "linux-gnu")
> read-socket-address/linux
> read-socket-address/hurd))
I pushed it as b56cbe8974c328a6c7bc28906478ef1b191ada4c on your behalf.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-29 16:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 20:02 bug#41546: Shepherd network activation failures on armhf Jesse Dowell
2020-05-29 16:35 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).