* bug#58697: [bug] guix refresh nftables crashes
@ 2022-10-22 1:55 kiasoc5 via Bug reports for GNU Guix
2022-10-22 9:56 ` Maxime Devos
0 siblings, 1 reply; 4+ messages in thread
From: kiasoc5 via Bug reports for GNU Guix @ 2022-10-22 1:55 UTC (permalink / raw)
To: 58697
% guix refresh nftables
```
Backtrace:
13 (primitive-load "/home/kiasoc5/.config/guix/current/…")
In guix/ui.scm:
2263:7 12 (run-guix . _)
2226:10 11 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
1752:10 9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
656:37 8 (thunk)
2165:25 7 (run-with-store #<store-connection 256.99 6cf50eb53e60> …)
In guix/scripts/refresh.scm:
567:14 6 (_ _)
In srfi/srfi-1.scm:
634:9 5 (for-each #<procedure 6cf50ec23ba0 at guix/scripts/ref…> …)
In guix/scripts/refresh.scm:
367:10 4 (check-for-package-update #<package nftables@1.0.5 gnu…> …)
In srfi/srfi-1.scm:
858:15 3 (any1 #<procedure 6cf50ec23b40 at guix/upstream.scm:28…> …)
In guix/gnu-maintenance.scm:
834:10 2 (_ _ . _)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure getaddrinfo: Servname not supported for ai_socktype
```
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#58697: [bug] guix refresh nftables crashes
2022-10-22 1:55 bug#58697: [bug] guix refresh nftables crashes kiasoc5 via Bug reports for GNU Guix
@ 2022-10-22 9:56 ` Maxime Devos
2022-10-24 8:44 ` 宋文武 via Bug reports for GNU Guix
0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2022-10-22 9:56 UTC (permalink / raw)
To: kiasoc5, 58697
[-- Attachment #1.1.1: Type: text/plain, Size: 320 bytes --]
On 22-10-2022 03:55, kiasoc5 via Bug reports for GNU Guix wrote:
> % guix refresh nftables
> [...]
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure getaddrinfo: Servname not supported for ai_socktype
> ```
I can reproduce this locally and don't know the cause.
Greetings,
Maxime
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#58697: [bug] guix refresh nftables crashes
2022-10-22 9:56 ` Maxime Devos
@ 2022-10-24 8:44 ` 宋文武 via Bug reports for GNU Guix
2023-09-12 3:40 ` Maxim Cournoyer
0 siblings, 1 reply; 4+ messages in thread
From: 宋文武 via Bug reports for GNU Guix @ 2022-10-24 8:44 UTC (permalink / raw)
To: Maxime Devos; +Cc: kiasoc5, 58697
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
Maxime Devos <maximedevos@telenet.be> writes:
> On 22-10-2022 03:55, kiasoc5 via Bug reports for GNU Guix wrote:
>> % guix refresh nftables
>> [...]
>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> In procedure getaddrinfo: Servname not supported for ai_socktype
>> ```
>
> I can reproduce this locally and don't know the cause.
>
It happens when the origin have both 'mirror://' and 'http://' urls,
current the html updater check for any url match 'http' or 'https', but
when updating it will just pick the first url, so when the first is
'mirror://' this error will come.
This patch should fix it:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-maintenance-Don-t-try-html-updater-on-mirror-url.patch --]
[-- Type: text/x-patch, Size: 1552 bytes --]
From e9dfdc3a2031c25043cc8b6f4b08656d05024c16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
Date: Mon, 24 Oct 2022 16:35:18 +0800
Subject: [PATCH] gnu-maintenance: Don't try html updater on 'mirror://' urls.
This fixes <https://issues.guix.gnu.org/58697>.
* guix/gnu-maintenance.scm (latest-html-updatable-release): Use the first http
or https url for updating.
---
guix/gnu-maintenance.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 10a6ec05f1..4cd501e492 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -806,10 +806,16 @@ (define http-url?
(define (latest-html-updatable-release package)
"Return the latest release of PACKAGE. Do that by crawling the HTML page of
the directory containing its source tarball."
+ (define (http-url? url)
+ (match (string->uri url)
+ (#f #f)
+ (uri (let ((scheme (uri-scheme uri)))
+ (memq scheme '(http https))))))
(let* ((uri (string->uri
(match (origin-uri (package-source package))
((? string? url) url)
- ((url _ ...) url))))
+ ;; We need filter out possibly 'mirror://' urls.
+ ((? list? urls) (first (filter http-url? urls))))))
(custom (assoc-ref (package-properties package)
'release-monitoring-url))
(base (or custom
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#58697: [bug] guix refresh nftables crashes
2022-10-24 8:44 ` 宋文武 via Bug reports for GNU Guix
@ 2023-09-12 3:40 ` Maxim Cournoyer
0 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2023-09-12 3:40 UTC (permalink / raw)
To: 宋文武; +Cc: kiasoc5, 58697-done, Maxime Devos
Hi,
宋文武 <iyzsong@envs.net> writes:
> Maxime Devos <maximedevos@telenet.be> writes:
>
>> On 22-10-2022 03:55, kiasoc5 via Bug reports for GNU Guix wrote:
>>> % guix refresh nftables
>>> [...]
>>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>>> In procedure getaddrinfo: Servname not supported for ai_socktype
>>> ```
>>
>> I can reproduce this locally and don't know the cause.
>>
>
> It happens when the origin have both 'mirror://' and 'http://' urls,
> current the html updater check for any url match 'http' or 'https', but
> when updating it will just pick the first url, so when the first is
> 'mirror://' this error will come.
I ended up with honoring the first element of the URI, since support for
mirror:// URIs in (guix gnu-maintenance) was added recently (see commit
bdaef69556f68595e5ec0db1710bf8ad208abe20, "gnu-maintenance: Allow mirror
URLs to fallback to the generic HTML updater.").
The fix is pushed with commit 2a7f031ca9. Let me know if anything is
still causing problems!
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-12 3:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-22 1:55 bug#58697: [bug] guix refresh nftables crashes kiasoc5 via Bug reports for GNU Guix
2022-10-22 9:56 ` Maxime Devos
2022-10-24 8:44 ` 宋文武 via Bug reports for GNU Guix
2023-09-12 3:40 ` Maxim Cournoyer
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).