GNU bug report logs -
#66633
backtrace for origin url-fetch with file:///
Previous Next
To reply to this bug, email your comments to 66633 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#66633
; Package
guix
.
(Thu, 19 Oct 2023 09:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Simon Tournier <zimon.toutoune <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
Your message did not contain a Subject field. They are recommended and
useful because the title of a $gBug is determined using this field.
Please remember to include a Subject field in your messages in future.
(Thu, 19 Oct 2023 09:50:02 GMT) Full text and rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
Trying to answer to this message [1], I notice something unexpected for
me. I read from the manual:
--8<---------------cut here---------------start------------->8---
-- Procedure: url-fetch url hash-algo hash [name] [#:executable? #f]
Return a fixed-output derivation that fetches data from URL (a
string, or a list of strings denoting alternate URLs), which is
expected to have hash HASH of type HASH-ALGO (a symbol). By
default, the file name is the base name of URL; optionally, NAME
can specify a different file name. When EXECUTABLE? is true, make
the downloaded file executable.
When one of the URL starts with ‘mirror://’, then its host part is
interpreted as the name of a mirror scheme, taken from
‘%mirror-file’.
Alternatively, when URL starts with ‘file://’, return the
corresponding file name in the store.
--8<---------------cut here---------------end--------------->8---
Therefore, I do:
--8<---------------cut here---------------start------------->8---
(define-module (pkg)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages pdf)
#:use-module (gnu packages gnome))
(define-public zathura-custom
(package
(inherit zathura)
(name "zathura-custom")
(version "4.0")
(source
(origin
(method url-fetch)
(uri
;"https://pwmt.org/projects/zathura/download/zathura-0.5.2.tar.xz"
"file:///tmp/zathura-custom/zathura-mine.tar.xz"
)
(sha256
(base32
"0000000000000000000000000000000000000000000000000000"))))))
--8<---------------cut here---------------end--------------->8---
And then:
--8<---------------cut here---------------start------------->8---
$ guix build -L /tmp/zathura-custom zathura-custom -S -d
Backtrace:
12 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
2323:7 11 (run-guix . _)
2286:10 10 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/status.scm:
839:4 8 (call-with-status-report _ _)
In ice-9/boot-9.scm:
1752:10 7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
659:37 6 (thunk)
1298:8 5 (call-with-build-handler #<procedure 7f31d1cb85d0 at guix/ui.scm:1219:2 (continue store things mode)> _)
In guix/scripts/build.scm:
797:43 4 (_)
In srfi/srfi-1.scm:
586:17 3 (map1 ("/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"))
In guix/derivations.scm:
136:0 2 (%derivation-file-name-procedure "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz")
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 struct-vtable: Wrong type argument in position 1 (expecting struct): "/gnu/store/mkx0xbh68sihhqxdwbjcdi1njdqra7cq-zathura-mine.tar.xz"
--8<---------------cut here---------------end--------------->8---
Note:
$ guix hash /tmp/zathura-custom/zathura-mine.tar.xz
15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6
$ guix download https://pwmt.org/projects/zathura/download/zathura-0.5.2.tar.xz
Starting download of /tmp/guix-file.d3GzTC
[...]
15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6
Cheers,
simon
1: [TIL] guix doesn't check hash when uri starts with file:///
Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
Wed, 20 Sep 2023 19:18:57 +0000
id:CAGxMbPbuP1HOFU1UwfV0AojP+7z62Q2wv_FGUYY6kvkK4XytiQ <at> mail.gmail.com
https://lists.gnu.org/archive/html/help-guix/2023-09
https://yhetil.org/guix/CAGxMbPbuP1HOFU1UwfV0AojP+7z62Q2wv_FGUYY6kvkK4XytiQ <at> mail.gmail.com
Changed bug title to 'backtrace for origin url-fetch with file:///' from '(no subject)'
Request was from
Simon Tournier <zimon.toutoune <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Oct 2023 09:56:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.