* Newbie: How to download mirror: links with wget?
@ 2023-09-01 6:33 Rodrigo Morales
2023-09-01 6:45 ` (
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rodrigo Morales @ 2023-09-01 6:33 UTC (permalink / raw)
To: help-guix
I suspect there's a bug with the =tracker= package, so I want to
investigate. To proceed, I decided to download the source of the
package (relevant part of the package =tracker= is shown below).
#+BEGIN_SRC elisp
(define-public tracker
(package
(name "tracker")
(version "3.4.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/tracker/"
(version-major+minor version) "/"
"tracker-" version ".tar.xz"))
(sha256
(base32
#+END_SRC
As you can see above, the url of =source= starts with =mirror=. I
thought that I could download such URL with =wget=. However, it seems
that =wget= cannot do that.
#+HEADER: :prologue "exec 2>&1"
#+HEADER: :epilogue ":"
#+begin_src sh
wget "mirror://gnome/sources/tracker/3.4.2/tracker-3.4.2.tar.xz"
echo $?
#+end_src
#+RESULTS:
#+begin_example
mirror://gnome/sources/tracker/3.4.2/tracker-3.4.2.tar.xz: Unsupported scheme.
1
#+end_example
My question is: How can I download the source of that package using
the same URL that is shown in the package definition (I want to make
sure that I'm downloading the same file that is used by the Guix
package definition).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: How to download mirror: links with wget?
2023-09-01 6:33 Newbie: How to download mirror: links with wget? Rodrigo Morales
@ 2023-09-01 6:45 ` (
2023-09-01 6:53 ` (
2023-09-01 7:06 ` Wojtek Kosior via
2 siblings, 0 replies; 4+ messages in thread
From: ( @ 2023-09-01 6:45 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
Hi,
Rodrigo Morales <moralesrodrigo1100@gmail.com> writes:
> #+begin_example
> mirror://gnome/sources/tracker/3.4.2/tracker-3.4.2.tar.xz: Unsupported scheme.
> 1
> #+end_example
`mirror://` is not a real URL schema; it's used by Guix as a substitute
for writing out the various mirror URLs of large projects like GNOME.
Here's the definition of Gnome's mirror URLs:
--- guix/download.scm
(define %mirrors
;; Mirror lists used when `mirror://' URLs are passed.
(let* (…)
`(…
(gnome
"https://download.gnome.org/"
"http://ftp.gnome.org/pub/GNOME/")
…)))
---
So the correct URL would be one of these two; by the way, I think that
`mirror://` URL might be wrong, as the `tracker` directories only
contain `3.4`, not `3.4.2`:
https://download.gnome.org/sources/tracker/3.4/tracker-3.4.2.tar.xz
http://ftp.gnome.org/pub/GNOME/sources/tracker/3.4/tracker-3.4.2.tar.xz
Both of these work when passed to `guix download`.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: How to download mirror: links with wget?
2023-09-01 6:33 Newbie: How to download mirror: links with wget? Rodrigo Morales
2023-09-01 6:45 ` (
@ 2023-09-01 6:53 ` (
2023-09-01 7:06 ` Wojtek Kosior via
2 siblings, 0 replies; 4+ messages in thread
From: ( @ 2023-09-01 6:53 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
Rodrigo Morales <moralesrodrigo1100@gmail.com> writes:
> #+begin_src sh
> wget "mirror://gnome/sources/tracker/3.4.2/tracker-3.4.2.tar.xz"
Addendum: Yes, this URL is wrong. The code only takes the major and
minor versions for the first version part; hence `tracker/3.4`, not
`tracker/3.4.2`.
-- (
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Newbie: How to download mirror: links with wget?
2023-09-01 6:33 Newbie: How to download mirror: links with wget? Rodrigo Morales
2023-09-01 6:45 ` (
2023-09-01 6:53 ` (
@ 2023-09-01 7:06 ` Wojtek Kosior via
2 siblings, 0 replies; 4+ messages in thread
From: Wojtek Kosior via @ 2023-09-01 7:06 UTC (permalink / raw)
To: Rodrigo Morales; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
> My question is: How can I download the source of that package using
> the same URL that is shown in the package definition (I want to make
> sure that I'm downloading the same file that is used by the Guix
> package definition).
Not sure about wget but you can do that with
guix download 'mirror://gnome/sources/tracker/3.4/tracker-3.4.2.tar.xz'
It will put the tarball in the store and print its path and its hash.
Also, note that you had a mistake in the URL you were trying. It was
mirror://gnome/sources/tracker/3.4.2/tracker-3.4.2.tar.xz
while it should've been
mirror://gnome/sources/tracker/3.4/tracker-3.4.2.tar.xz
with minor version omitted in one place.
Best,
Wojtek
-- (sig_start)
website: https://koszko.org/koszko.html
fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A
follow me on Fediverse: https://friendica.me/profile/koszko/profile
♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)
On Fri, 1 Sep 2023 06:33:41 +0000 Rodrigo Morales <moralesrodrigo1100@gmail.com> wrote:
> My question is: How can I download the source of that package using
> the same URL that is shown in the package definition (I want to make
> sure that I'm downloading the same file that is used by the Guix
> package definition).
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-01 7:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 6:33 Newbie: How to download mirror: links with wget? Rodrigo Morales
2023-09-01 6:45 ` (
2023-09-01 6:53 ` (
2023-09-01 7:06 ` Wojtek Kosior via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.