131 Commits

Author SHA1 Message Date
Tianling Shen
81f9f50fa4
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-09-27 17:06:04 +08:00
Christian Marangi
f1b3958d02
scripts/download.pl: fix support for aria2c download tool on macos
Currently we use /dev/shm to place aria2c tmp file. This is not present
on macos. Use the openwrt tmp directory instead of the linux-only
/dev/shm to save compatibility with more os.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-26 20:50:10 +02:00
Christian Marangi
5df60f5c24
scripts/download.pl: fix mirrors regression for curl and wget
With the introduction of aria2c support, curl and wget no longer try to
download the file from mirrors. Fix this regression by emptying the
remaining mirrors list only when aria2c is used.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-26 20:50:09 +02:00
Christian Marangi
295e0ed7a9
scripts/download.pl: fix whitespace in mirror urls and drop for
Fix whitespace in mirror urls and replace for loop with join+map logic.

Fixes: d39123626931 ("download.pl: add aria2c support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-25 15:54:12 +02:00
Bradford Zhang
d391236269
download.pl: add aria2c support
Use aria2c download tool by default on package download if available in
the system.
aria2c permits to use multiple mirrors and may improve download speed on
special context where servers are hard to reach.

Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Bradford Zhang <zyc@zyc.name>
[ fix wrong var in the script and improve commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-25 14:56:45 +02:00
Tianling Shen
165b0899d4
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-09-16 15:32:20 +08:00
Petr Štetiar
50a48faa1b scripts/download.pl: fix downloads with wget
Several users of wget for downloads (curl is not available in the
system) have reported broken download functionality:

 wget --tries=5 --timeout=20 --output-document=-  https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.142.tar.xz
 http://: Invalid host name.

Thats all happening due to '' was passed as an argument, which got later
expanded to http://.

In the context of a list constructor '' is not nothing, it is an empty
string element.  So fix it by using () as it will yield "nothing" and
thus not introduce an empty string element.

Fixes: #10692
Fixes: 90c6e3aedf16 ("scripts: always check certificates")
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [shellwords() -> ()]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-13 09:14:09 +02:00
Petr Štetiar
c836ca84e8 scripts/download.pl: silence can't exec curl warning
When running build in verbose mode `make V=s` we can see a lot of
following warnings when curl is not available in the system:

 Can't exec "curl": No such file or directory at scripts/download.pl line 77.

So lets fix it by redirecting of the stderr to null hole.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-13 09:14:09 +02:00
Josh Roys
90c6e3aedf
scripts: always check certificates
Remove flags from wget and curl instructing them to ignore bad server
certificates. Although other mechanisms can protect against malicious
modifications of downloads, other vectors of attack may be available
to an adversary.

TLS certificate verification can be disabled by turning oof the
"Enable TLS certificate verification during package download" option
enabled by default in the "Global build settings" in "make menuconfig"

Signed-off-by: Josh Roys <roysjosh@gmail.com>
[ add additional info on how to disable this option ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-09-10 15:24:22 +02:00
Tianling Shen
9fbf1751ec
download.pl: remove broken mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-08-06 18:49:52 +08:00
Tianling Shen
a190804949
download.pl: add ImmortalWrt fallback
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-07-12 15:29:29 +08:00
Tianling Shen
02edeb1469
scripts/download.pl: drop broken mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-05-06 22:10:58 +08:00
Tianling Shen
0ea2f57158
scripts/download.pl: add CN mirrors for DEBIAN
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-04-13 03:34:03 +08:00
Tianling Shen
7807fb0119
scripts/download.pl: drop cqu mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-17 19:59:49 +08:00
Tianling Shen
4ca3aeca5b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-13 13:44:48 +08:00
Rui Salvaterra
6b822189b1 toolchain: binutils: add support for version 2.38
While at it, also fix the download.xs4all.nl and add ftp.gnu.org to the GNU
mirrors, as it seems to be updated faster.

Deleted (upstreamed):
600-Close_the_file_descriptor.patch [1]

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5a98fb7513b559e20dfebdbaa2a471afda3b4742

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-03-09 10:23:25 +00:00
Tianling Shen
5b8437bf43
Merge Official Source
Keep iptables for now.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-01-24 19:03:56 +08:00
Ansuel Smith
88204bfa82 treewide: drop use of which
Ubuntu started to flag which as deprecated and it
seems which is not really standard and may vary
across Distro.
Drop the use of which and use the standard 'command -v'
for this simple task.
Which is still present in the prereq if some package/script
still use which.
A utility script called command_all.sh is implemented that
will just mimic the output of which -a.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-01-17 09:14:26 +01:00
Tianling Shen
13c56d272d
scripts/download.pl: add new mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-30 20:14:11 +08:00
Tianling Shen
9401c4c042
scripts/download.pl: tweak default mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-29 13:24:32 +08:00
Tianling Shen
d26b4ff4de
scripts/download.pl: reorder self-hosted mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-27 03:09:47 +08:00
Tianling Shen
30da20e2c5
scripts/download.pl: add immortalwrt's mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-21 01:08:19 +08:00
SuLingGG
009c172171
scripts/download.pl: update openwrt.cc mirror url
[updated url]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-08-30 23:06:44 +08:00
Tianling Shen
7679fe4f88
download.pl: add some mirrors disabled by default
To avoid abuse, these mirrors will not be used until you enable them
manually.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit a3325e5051307bb92c2c3feaf44b0980421eb98c)
2021-07-15 22:38:30 +08:00
Tianling Shen
e821c29ca7
scripts/download: update mirror url
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-26 22:18:37 +08:00
Tianling Shen
bb56c18f7c
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-13 22:39:57 +08:00
Leonardo Mörlein
b993b68b6c build: introduce $(MKHASH)
Before this commit, it was assumed that mkhash is in the PATH. While
this was fine for the normal build workflow, this led to some issues if

    make TOPDIR="$(pwd)" -C "$pkgdir" compile

was called manually. In most of the cases, I just saw warnings like this:

    make: Entering directory '/home/.../package/gluon-status-page'
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    [...]

While these were only warnings and the package still compiled sucessfully,
I also observed that some package even fail to build because of this.

After applying this commit, the variable $(MKHASH) is introduced. This
variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the
correct path.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
2021-05-13 15:13:15 +02:00
Tianling Shen
dd5110d976
scripts/download.pl: only call our own mirror when failed to download
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 01:40:29 +08:00
Tianling Shen
cfab12e7cc
scripts/download.pl: add aliyun(cn) mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 01:40:02 +08:00
Tianling Shen
1e4c245042
scripts/download.pl: remove unavailable mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-17 00:13:51 +08:00
Tianling Shen
c0e262bb86
scripts/download.pl: update mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-13 21:35:34 +08:00
Tianling Shen
84874a2967
scripts/download.pl: re-order mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 22:18:34 +08:00
Tianling Shen
8f3bc0a046
scripts/download.pl: add self-hosted mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 21:32:40 +08:00
Tianling Shen
3c31b3fd88
Revert "treewide: add mirrors for GitHub Codeload"
This reverts commit 71ad441934421d629c896430aa3918d000864e75.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 17:00:43 +08:00
Tianling Shen
a4e38ad14c
Revert "treewide: add mirrors for GitHub Archives"
This reverts commit 237595c1eb7145b6a7a47ab3093de7b7d0e2fbff.
2021-03-23 17:00:18 +08:00
Tianling Shen
82388ff3ee
scripts/download.pl: add download mirrors hosted by SuLingGG
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 23:22:30 +08:00
Tianling Shen
46ce35d81c
download.pl: fix path to mirror 182.140.223.146
Closes: #327

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 17:11:06 +08:00
Tianling Shen
237595c1eb
treewide: add mirrors for GitHub Archives
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 15:04:16 +08:00
Tianling Shen
71ad441934
treewide: add mirrors for GitHub Codeload
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 14:29:36 +08:00
Tianling Shen
0094964b3e
scripts/download.pl: add global mirror for mainland China users
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 11:22:56 +08:00
Tianling Shen
12c4fd437d
treewide: adjust tencent mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-11 14:59:09 +08:00
AmadeusGhost
82816f57c4 Merge Official Source 2021-02-28 12:09:11 +08:00
David Bauer
9a9cf40dd9 download: add mirror alias for Debian
Add an alias for Debian packages and download them from the Debian
mirror redirector.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-26 20:41:00 +01:00
David Bauer
01c01d9861 download: use mirror redirector for GNOME downloads
Use the GNOME mirror redirector as the primary download source for GNOME
packages.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-26 20:41:00 +01:00
AmadeusGhost
d1ec0e2803 Merge Official Source 2021-02-23 12:05:05 +08:00
David Bauer
f04e007491 download: remove broken mirrors
These mirrors don't exist anymore. Remove them.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-22 00:57:04 +01:00
CN_SZTL
c7a5137a82
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-06 23:30:24 +08:00
Paul Spooren
8286f3a3d3 treewide: unify OpenWrt hosted source via @OPENWRT
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-05 12:00:24 -10:00
CN_SZTL
1db9bd9bcd
Merge Official Source
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-28 19:39:04 +08:00
Paul Spooren
7521aedff4 scripts: sources CDN as fallback in download.pl
In case the default sources for a package fail use the CDN rather than
our own mirror. In case the CDN fails, fallback to our mirror.

Also remove mirror1 which isn't available anymore.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-01-27 22:46:08 -10:00