1006 Commits

Author SHA1 Message Date
Tianling Shen
cec31d8c48
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-09-27 17:07:22 +08:00
Petr Štetiar
c07c565ea6 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>
(cherry picked from commit 50a48faa1b8424e6b4b436b7118fffa2cba14b18)
2022-09-21 11:52:40 +02:00
Petr Štetiar
f14d7cef7c 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>
(cherry picked from commit c836ca84e8f641e10a8349a8f9b7432b33d6cec1)
2022-09-21 11:52:40 +02:00
Josh Roys
f0bca34f16 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>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [backport]
(cherry picked from commit 90c6e3aedf167b0ae1baf376e7800a631681e69a)
2022-09-21 11:52:40 +02:00
Petr Štetiar
45a486bf93 scripts: xxdi.pl: add xxd -i compat mode
So it can serve as a standalone drop in replacement for xxd utility used
currently mostly in U-Boot packages with `xxd -i` mode which outputs C
include file style, with aim for byte to byte identical output, so the
eventual difference in the generated output is easily spottable.

Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [perl-fu]
(cherry picked from commit 06e01e817ec6643a35beb9e6946689e9cc7d020a)
2022-09-21 11:52:40 +02:00
Jo-Philipp Wich
70124b8579 scripts: xxdi.pl: remove File::Slurp dependency
In order to make it more portable.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 8b278a76d90e3724815a5fde32be59f7796be1d8)
2022-09-21 11:52:40 +02:00
Petr Štetiar
4e221757c4 scripts: add xxdi.pl
xxdi.pl is a Perl script that implements vim's 'xxd -i' mode so that
packages do not have to use all of vim just to get this functionality.

References: #10555
Source: 97a6bd5cee/xxdi.pl
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 2117d04a3aaad3394c0afec799d9c43f8a09c2cf)
2022-09-21 11:52:40 +02:00
Tianling Shen
a08efaa103
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-08-30 10:39:29 +08:00
Paul Spooren
d445df84c5 feeds: use git-src-full to allow Git versioning
Both $(AUTORELEASE) and $(PKG_SRC_VERSION) (from luci.git) use the Git
log to determine releases and package timestamps.

Feeds are shallow cloned by default, resulting in an incomplete Git log
and therefore different local package versions than offered upstream.

This commits sets the default feeds to use `src-git-full` to solve that.

Add fixes from "2b1d92f: scripts/feeds: silence git warning by selecting
pull style" to `src-git-full`

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 7fae1e5677e9bb4979c8d4ac99be4de6955b13d0)
2022-08-28 08:16:24 +02:00
Tianling Shen
f150238b1d
download.pl: add ImmortalWrt fallback
Fixes: 759

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit a19080494926ad523e636d7e075717b69e2f3e47)
2022-08-17 20:42:31 +08:00
Tianling Shen
117cd892e7
download.pl: remove broken mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 9fbf1751eced799a4320fed8095b78fbde2d5116)
2022-08-06 18:50:11 +08:00
Tianling Shen
009fbb76d2
scripts/download.pl: drop broken mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 02edeb14690c14bd7021b4be2270286bb4bb9108)
2022-05-06 22:11:22 +08:00
Tianling Shen
e80786fa7e
scripts/download.pl: drop cqu mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 7807fb01194e29936cdac7cb84790624c3f4cc81)
2022-03-17 20:00:08 +08:00
Tianling Shen
2c16ee6a6d
include/version: use ImmortalWrt's release repo
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-03-14 21:45:05 +08:00
Tianling Shen
af4829a642
scripts/download.pl: add new mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 13c56d272d4218a706c986ef37de5be020aeafd6)
2021-11-30 20:43:52 +08:00
Tianling Shen
af64623418
scripts/download.pl: tweak default mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-29 13:24:39 +08:00
Tianling Shen
b3d3ea94b1
scripts/download.pl: reorder self-hosted mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit d26b4ff4de28af014b55a1040d5dd7fe01c026fb)
2021-11-29 00:44:47 +08:00
Tianling Shen
1480f5c9c4
scripts/download.pl: add immortalwrt's mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 30da20e2c5f4f29c3e6e6898775c9451b1c2f71e)
2021-11-23 02:08:23 +08:00
SuLingGG
67e8f2075e
scripts/download.pl: update openwrt.cc mirror url
[updated url]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 009c17217107834cdf5ccc336e791ef0b33eada1)
2021-08-30 23:07:08 +08:00
Tianling Shen
5ef4b8e1de
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:10 +08:00
Tianling Shen
e8492b9f83
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-22 15:25:54 +08:00
Paul Spooren
2e157714a8 build,json: fix generation with empty profiles
If the image generation doesn't add any profiles to the output the
*profile merge* will fail. To avoid that set an empty profile as
fallback.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit fd0d9909bf50f114d5e7f7cedf53e542de878a2c)
2021-06-21 09:43:21 -10:00
Moritz Warning
8add3e139c build: preserve profiles.json between builds
Keep other profiles.json content if the data belongs to the current
build version.

Also useful for the ImageBuilder, which builds for a single model each
time. Without this commit the profiles.json would only contain the
latest build profile information.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[improve commit message]
Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit a463b96241fbc2d142982387eaed9989e201ac7a)
2021-06-21 09:43:21 -10:00
Tianling Shen
37f3ec2632
scripts/download: update mirror url
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-26 22:18:23 +08:00
Tianling Shen
929818e613
scripts/download.pl: only call our own mirror when failed to download
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 01:39:17 +08:00
Tianling Shen
244109d01b
scripts/download.pl: add aliyun(cn) mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-19 01:38:54 +08:00
Tianling Shen
a058fd9880
scripts/download.pl: remove unavailable mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-17 00:13:23 +08:00
Tianling Shen
b0f006510e
scripts/download.pl: update mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-13 21:35:09 +08:00
Tianling Shen
9312dbaafe
scripts/download.pl: re-order mirrors
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 22:17:32 +08:00
Tianling Shen
42f947d355
scripts/download.pl: correct branch name of self-hosted mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 21:32:06 +08:00
Tianling Shen
ae2a20dbf1
scripts/download.pl: add self-hosted mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 21:31:30 +08:00
Tianling Shen
56729f89c5
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-26 18:39:12 +08:00
Paul Spooren
22149da1f4 build,json: backport default_packages fixes
Remove duplicate packages by running in `target/linux/` rather than
`target/linux/<target>/<subtarget>` and sort packages alphabetically.

Squash commit of:
7880a64848 build,json: 3rd fixup of default_packages
b36068d35d build,json: fixup fixup of arch_packages
1bf2b3fe90 build,json: fixup missing arch_packages

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-25 23:15:42 -10:00
Paul Spooren
fdc0342704 build,json: fix duplicates in default_packages
Calling without the DUMP=1 argument causes the target specific Makefile
to be "included" again which adds the target specific packages twice,
once on the actual run and once included from `include/target.mk`.

This led to duplicate package entries, causing confusion in downstream
projects using the generated JSON files.

While at it, apply `black` style to Python script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 7f4c2b1a4f9216218dced64794318f2197565c85)
2021-03-23 12:47:18 -10:00
Tianling Shen
9fa524a1b3
Revert "treewide: add mirrors for GitHub Codeload"
This reverts commit a8d2e30339d30d9dbcac16a0605fbc58bc5ff3ca.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 16:59:39 +08:00
Tianling Shen
b168db44e5
Revert "treewide: add mirrors for GitHub Archives"
This reverts commit c49d9634b52cb068b3f81958de1dfe03b56eade0.
2021-03-23 16:58:40 +08:00
Tianling Shen
4aee3088ea
scripts/download.pl: add download mirrors hosted by SuLingGG
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 23:22:23 +08:00
Tianling Shen
1e0e462e2b
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:02 +08:00
Tianling Shen
c49d9634b5
treewide: add mirrors for GitHub Archives
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 15:05:02 +08:00
Tianling Shen
a8d2e30339
treewide: add mirrors for GitHub Codeload
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 14:28:52 +08:00
Tianling Shen
2273d49ade
scripts/download.pl: add global mirror for mainland China users
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 11:22:52 +08:00
Tianling Shen
cd48c34584
treewide: adjust tencent mirror
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-11 14:58:34 +08:00
Tianling Shen
0d4a1f1dbd
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-01 20:05:47 +08:00
David Bauer
f647d9e6bb download: remove broken mirrors
These mirrors don't exist anymore. Remove them.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f04e0074915f03249cdebb460d4dc92875091c63)
2021-02-24 20:24:09 +01:00
Tianling Shen
4253af6372
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2021-02-24 20:19:20 +08:00
Baptiste Jonglez
cb5c93f12a scripts: getver.sh: fix version based on stable branch
When building from a local branch based off the "openwrt-21.02" branch,
version computation is wrong, because the number of local commits is
computed against master.  As a result, it wrongly counts *all* commits
since the beginning of the openwrt-21.02 branch as local commits.

The fix is to compare to the openwrt-21.02 branch instead, which gives the
expected result.

A similar change had been applied to the openwrt-19.07 branch:
891022918d55 ("scripts: getver.sh: fix version based on stable branch")

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-02-21 18:42:38 +01:00
AmadeusGhost
b3c118d5c4 Merge Official Source 2021-02-16 12:05:16 +08:00
Felix Fietkau
075fa4cd9a Mostly revert "build: add support for fixing up library soname"
This reverts commit b12288fa69b171f7c9405518c9bed3581a06f7ce.
The patchelf approach is too fragile, and the only users of this have been
converted to make patching unnecessary
Leave the abi_version_str variable in place in rules.mk

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 18:47:21 +01:00
AmadeusGhost
0b234c70ec Merge Official Source 2021-02-15 12:05:10 +08:00
Felix Fietkau
c921650382 build: drop ABI version from metadata
Preparation for supporting dynamic ABI versions that depend on the runtime
configuration. Read the suffix from the staging dir pkginfo version files.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:52 +01:00