* Package definition - argument, fix for wrong file format before unpack
@ 2022-05-21 18:16 白い熊
2022-05-21 20:29 ` raingloom
0 siblings, 1 reply; 5+ messages in thread
From: 白い熊 @ 2022-05-21 18:16 UTC (permalink / raw)
To: help-guix
Hello everyone:
I'm trying to build some old apps - one of them is an emacs package only
available now via the archive.org Wayback machine.
The problem is though that the download is an xxxx.tar.gz file in name -
in fact it is really only a tar archive. So guix build fails with wrong
file format error. Concretely - it is this file:
https://web.archive.org/web/20110104020844/http://taiyaki.org/elisp/mell/src/mell-1.0.0.tar.gz
I think I should add some "(arguments" lines in the package recipe -
replacing the unpack phase? However not sure exactly how - am searching
but haven't found any examples fixing for such a problem.
Could someone advise me - how to specify the file should be unpacked as
really just a tar archive so that the build can then proceed?
Many thanks.
--
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊
ShiroiKuma
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Package definition - argument, fix for wrong file format before unpack
2022-05-21 18:16 Package definition - argument, fix for wrong file format before unpack 白い熊
@ 2022-05-21 20:29 ` raingloom
2022-05-21 21:55 ` 白い熊
0 siblings, 1 reply; 5+ messages in thread
From: raingloom @ 2022-05-21 20:29 UTC (permalink / raw)
To: 白い熊; +Cc: help-guix
On Sat, 21 May 2022 20:16:06 +0200
白い熊 <help-guix_gnu.org@sumou.com> wrote:
> Hello everyone:
>
> I'm trying to build some old apps - one of them is an emacs package
> only available now via the archive.org Wayback machine.
>
> The problem is though that the download is an xxxx.tar.gz file in
> name - in fact it is really only a tar archive. So guix build fails
> with wrong file format error. Concretely - it is this file:
> https://web.archive.org/web/20110104020844/http://taiyaki.org/elisp/mell/src/mell-1.0.0.tar.gz
>
> I think I should add some "(arguments" lines in the package recipe -
> replacing the unpack phase? However not sure exactly how - am
> searching but haven't found any examples fixing for such a problem.
>
> Could someone advise me - how to specify the file should be unpacked
> as really just a tar archive so that the build can then proceed?
>
> Many thanks.
>
If I remember correctly, the source should get passed as part of the
inputs alist? Try this:
`(replace 'unpack (lambda args (display args)))`
And look at what arguments it gets passed. The store path of the
tarball should be right there.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Package definition - argument, fix for wrong file format before unpack
2022-05-21 20:29 ` raingloom
@ 2022-05-21 21:55 ` 白い熊
2022-05-21 22:15 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 5+ messages in thread
From: 白い熊 @ 2022-05-21 21:55 UTC (permalink / raw)
To: raingloom; +Cc: help-guix
On 2022-05-21 10:29 pm, raingloom wrote:
>
> If I remember correctly, the source should get passed as part of the
> inputs alist? Try this:
> `(replace 'unpack (lambda args (display args)))`
> And look at what arguments it gets passed. The store path of the
> tarball should be right there.
It does indeed give it:
(#:source /gnu/store/db0094xgx1z63i7naqs687l94ww5dbi7-mell-1.0.0.tar.gz
#:system x86_64-linux #:build x86_64-unknown-linux-gnu #:outputs ((out .
/gnu/store/5fgwxb1gq4gc9nmhigdllpy77xn2hxw2-emacs-mell-1.0.0)) #:inputs
((source .
/gnu/store/db0094xgx1z63i7naqs687l94ww5dbi7-mell-1.0.0.tar.gz) (tar .
/gnu/store/g2ajyl8xk9aarxrgjbng2hkj3qm2v0z2-tar-1.34) (gzip .
/gnu/store/iixwcv3k49ks1rf34pjgfzmzyhhgwng3-gzip-1.10) (bzip2 .
/gnu/store/s3hl12jxz9ybs7nsy7kq7ybzz7qnzmsg-bzip2-1.0.8) (xz .
/gnu/store/c8isj4jq6knv0icfgr43di6q3nvdzkx7-xz-5.2.5) (file .
/gnu/store/4ic6244i3ca4b4rxc2wnrgllsidyishv-file-5.39) (diffutils .
/gnu/store/ahmmvw21p11ik80lg1f953y7fd8bqkjm-diffutils-3.8) (patch .
/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6) (findutils .
/gnu/store/39rsx3nl4c31952jybbjb8d6idr5hx7r-findutils-4.8.0) (gawk .
/gnu/store/690qz3fg334dpwn3pn6k59n4wc943p2b-gawk-5.1.0) (sed .
/gnu/store/wxgv6i8g0p24q5gcyzd0yr07s8kn9680-sed-4.8) (grep .
/gnu/store/xjwp2hsd9256icjjybfrmznppjicywf6-grep-3.6) (coreutils .
/gnu/store/d251rfgc9nm2clzffzhgiipdvfvzkvwi-coreutils-8.32) (make .
/gnu/store/55cbpsi18mahg131nmiya6km5b4mscfa-make-4.3) (bash .
/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8)
(ld-wrapper . /gnu/store/s2pg5k98fl2g2szg9dykxyd9zl3xihv9-ld-wrapper-0)
(binutils . /gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37)
(gcc . /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0) (libc .
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33) (libc:static .
/gnu/store/4jdghmc65q7i7ib89zmvq66l0ghf7jc4-glibc-2.33-static) (locales
. /gnu/store/fnr1z6xsan0437r0yg48d0y8k32kqxby-glibc-utf8-locales-2.33)
(kernel-headers .
/gnu/store/6mjww4iz4xdan74d5bbjfh7il8rngfkk-linux-libre-headers-5.10.35))
#:search-paths ((BASH_LOADABLES_PATH (lib/bash) : directory #f)
(C_INCLUDE_PATH (include) : directory #f) (CPLUS_INCLUDE_PATH
(include/c++ include) : directory #f) (LIBRARY_PATH (lib lib64) :
directory #f) (GUIX_LOCPATH (lib/locale) : directory #f)) #:phases
((set-SOURCE-DATE-EPOCH . #<procedure set-SOURCE-DATE-EPOCH _>)
(set-paths . #<procedure set-paths (#:key target inputs native-inputs
search-paths native-search-paths)>) (install-locale . #<procedure
install-locale (#:key locale locale-category)>) (unpack . #<procedure
7ffff403ae00 at ice-9/eval.scm:383:13 rest>) (bootstrap . #<procedure
bootstrap (#:key bootstrap-scripts)>) (patch-usr-bin-file . #<procedure
patch-usr-bin-file (#:key native-inputs inputs patch-/usr/bin/file?)>)
(patch-source-shebangs . #<procedure patch-source-shebangs (#:key
source)>) (configure . #<procedure configure (#:key build target
native-inputs inputs outputs configure-flags out-of-source?)>)
(patch-generated-file-shebangs . #<procedure
patch-generated-file-shebangs rest>) (build . #<procedure build (#:key
make-flags parallel-build?)>) (check . #<procedure check (#:key target
make-flags tests? test-target parallel-tests? test-suite-log-regexp)>)
(install . #<procedure install (#:key make-flags)>) (patch-shebangs .
#<procedure patch-shebangs (#:key inputs outputs patch-shebangs?)>)
(strip . #<procedure strip (#:key target outputs strip-binaries?
strip-command objcopy-command strip-flags strip-directories)>)
(validate-runpath . #<procedure validate-runpath (#:key
validate-runpath? elf-directories outputs)>)
(validate-documentation-location . #<procedure
validate-documentation-location (#:key outputs)>) (delete-info-dir-file
. #<procedure delete-info-dir-file (#:key outputs)>)
(patch-dot-desktop-files . #<procedure patch-dot-desktop-files (#:key
outputs inputs)>) (make-dynamic-linker-cache . #<procedure
make-dynamic-linker-cache (#:key outputs make-dynamic-linker-cache?)>)
(install-license-files . #<procedure install-license-files (#:key
outputs license-file-regexp out-of-source?)>) (reset-gzip-timestamps .
#<procedure reset-gzip-timestamps (#:key outputs)>)
(compress-documentation . #<procedure compress-documentation (#:key
outputs compress-documentation? documentation-compressor
documentation-compressor-flags compressed-documentation-extension)>))
#:locale en_US.utf8 #:bootstrap-scripts (bootstrap bootstrap.sh
autogen.sh) #:configure-flags () #:make-flags () #:out-of-source? #f
#:tests? #t #:test-target check #:parallel-build? #t #:parallel-tests?
#t #:patch-shebangs? #t #:license-file-regexp
^(COPYING.*|LICEN[CS]E.*|[Ll]icen[cs]e.*|Copy[Rr]ight(\.(txt|md))?)$
#:strip-binaries? #t #:validate-runpath? #t #:make-dynamic-linker-cache?
#t #:license-file-regexp
^(COPYING.*|LICEN[CS]E.*|[Ll]icen[cs]e.*|Copy[Rr]ight(\.(txt|md))?)$
#:strip-flags (--strip-unneeded --enable-deterministic-archives)
#:strip-directories (lib lib64 libexec bin sbin))
However seeing it how should I change the unpack now - to extract only
via tar, however from the tar.gz file which isn't a gz really?
--
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊
ShiroiKuma
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Package definition - argument, fix for wrong file format before unpack
2022-05-21 21:55 ` 白い熊
@ 2022-05-21 22:15 ` Tobias Geerinckx-Rice
2022-05-21 22:31 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-05-21 22:15 UTC (permalink / raw)
To: 白い熊; +Cc: raingloom, help-guix
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
白い熊,
白い熊 写道:
> However seeing it how should I change the unpack now - to
> extract only
> via tar, however from the tar.gz file which isn't a gz really?
Guix does invoke only ‘tar’, but it's tar that chokes on the
misleading file extension and throws the error you see.
The easiest way to convince tar of its errant ways is to set the
correct extension in the store:
(source
(origin
(method url-fetch)
(uri "https://…/mell-1.0.0.tar.gz")
;; Despite the above extension, this is actually an
uncompressed tar file.
(file-name (string-append name "-" version "tar"))
(sha256 …)))
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Package definition - argument, fix for wrong file format before unpack
2022-05-21 22:15 ` Tobias Geerinckx-Rice
@ 2022-05-21 22:31 ` Tobias Geerinckx-Rice
0 siblings, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-05-21 22:31 UTC (permalink / raw)
To: 白い熊; +Cc: raingloom, help-guix
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
Tobias Geerinckx-Rice 写道:
> "-" version "tar"))
".tar", of course.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-21 22:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-21 18:16 Package definition - argument, fix for wrong file format before unpack 白い熊
2022-05-21 20:29 ` raingloom
2022-05-21 21:55 ` 白い熊
2022-05-21 22:15 ` Tobias Geerinckx-Rice
2022-05-21 22:31 ` Tobias Geerinckx-Rice
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).