From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Zhangjin Wu <falcon@tinylab.org>
Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/mpfr: Fix GNU Mirror Path
Date: Sun, 10 Dec 2023 12:17:46 +0100 [thread overview]
Message-ID: <ZXWeWoawTYeyYbOx@landeda> (raw)
In-Reply-To: <20231210013653.28449-1-falcon@tinylab.org>
Zhangjin Wu, All,
On 2023-12-10 09:36 +0800, Zhangjin Wu spake thusly:
> > On 2023-12-10 00:21 +0800, Zhangjin Wu spake thusly:
> > > Replacing http://www.mpfr.org with BR2_GNU_MIRROR variable
[--SNIP--]
> > What is the rationale for switching over to the GNU mirror rather than
> > use the official upstream location?
> I have found that the downloading of mpfr from its official site is very
> slow in our region, sometimes, costs several hours and even fails at
> last. But the downloading from one of its local GNU mirror sites is fast
> and deterministic.
> And I have checked that the latest version of mpfr has been stored in
> the GNU mirror site too:
> http://ftpmirror.gnu.org/mpfr-4.2.1.tar.xz
$ wget http://ftpmirror.gnu.org/mpfr-4.2.1.tar.xz
HTTP request sent, awaiting response... 404 Not Found
2023-12-10 11:54:02 ERROR 404: Not Found.
(it's missing the /mpfr/ directory component in the path ;-) ).
> So, it should be reasonable and safe for us to do such switch ;-)
The thing is, we can't really switch away from the official site, just
because it is slow for some people, as the alternative might be the
other way around for others: for me, the GNU mirror is ~8 times slower
than the official MPFR site: 8.80MBps vs 1.06MBps (mpfr is small, so
that's not much consequential, but that's on principle).
So, I think you would have a few (complementary) options:
- keep a local cache of your download directory: if BR2_DL_DIR is set
in the environment, then Buildroot will use that directory to look
for, and store, downloaded archives. That directory is never removed
by Buildroot (unless it is the default value of $(TOPDIR)/dl);
- similar to the above, populate a directory on a machine in your
local network, serve that directory with an HTTP(S) server, and
point BR2_PRIMARY_SITE to that location;
- change BR2_WGET to include one of the wget timeout options (see the
wget manual for the details): --timeout=seconds --dns-timeout=seconds
--connect-timeout=seconds --read-timeout=seconds. In your case, maybe
--read-timeout with a small-ish number of seconds would be enough to
trigger a failed download, and Buildroot will fallback to
downloading from BR2_BACKUP_SITE.
I know that the above might not be entirely satisfactory, but we really
prefer to get the sources from the official location, unless there is a
very strong reason not to. In this case, I don't think it is
appropriate, especially since Buildroot has mechanisms in place to cope
with such situations already.
Regards,
Yann E. MORIN.
> Regards,
> Zhangjin Wu
>
> > Regards,
> > Yann E. MORIN.
> >
> > > Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
> > > ---
> > > package/mpfr/mpfr.mk | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk
> > > index 8d12c7502b..a5e26404d1 100644
> > > --- a/package/mpfr/mpfr.mk
> > > +++ b/package/mpfr/mpfr.mk
> > > @@ -5,7 +5,7 @@
> > > ################################################################################
> > >
> > > MPFR_VERSION = 4.1.1
> > > -MPFR_SITE = http://www.mpfr.org/mpfr-$(MPFR_VERSION)
> > > +MPFR_SITE = $(BR2_GNU_MIRROR)/mpfr
> > > MPFR_SOURCE = mpfr-$(MPFR_VERSION).tar.xz
> > > MPFR_LICENSE = LGPL-3.0+
> > > MPFR_LICENSE_FILES = COPYING.LESSER
> > > --
> > > 2.34.1
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot@buildroot.org
> > > https://lists.buildroot.org/mailman/listinfo/buildroot
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> > | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> > '------------------------------^-------^------------------^--------------------'
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-12-10 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-09 16:21 [Buildroot] [PATCH 1/1] package/mpfr: Fix GNU Mirror Path Zhangjin Wu
2023-12-09 18:22 ` Yann E. MORIN
2023-12-10 1:36 ` Zhangjin Wu
2023-12-10 11:17 ` Yann E. MORIN [this message]
2023-12-11 8:51 ` Zhangjin Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXWeWoawTYeyYbOx@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=falcon@tinylab.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox