Skip to content

Commit 4729359

Browse files
committed
build: switch to github.com repos
AI scrapers are hammering git.openwrt.org to overload, which occasionally lets our builds fail.
1 parent a8e4abf commit 4729359

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build/build.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ srcmirror="https://sources.openwrt.org;https://firmware.berlin.freifunk.net/sour
6060
# srcmirror="http://192.168.1.1/sources.openwrt.org;http://192.168.1.1/firmware.berlin.freifunk.net/sources"
6161

6262
# Mirror URL for Git repositories in feeds.conf
63-
gitmirror="https://git.openwrt.org"
63+
# gitmirror="https://git.openwrt.org"
64+
gitmirror=github
6465
# gitmirror="file:///mnt/mirror/git.openwrt.org"
6566
# gitmirror="http://192.168.1.1/git.openwrt.org"
6667

@@ -95,7 +96,13 @@ unbuf="stdbuf --output=0 --error=0"
9596
ln -sfT "$(pwd)/packages" ./tmp/feed/packages
9697
ln -sfT "$(pwd)/luci" ./tmp/feed/luci
9798
cp "$sdkdir/feeds.conf.default" "$sdkdir/feeds.conf"
98-
if [ "$gitmirror" != "https://git.openwrt.org" ]; then
99+
if [ "$gitmirror" == "github" ]; then
100+
sed -i "s|https://git.openwrt.org/openwrt/openwrt.git|https://github.com/openwrt/openwrt.git|g" "$sdkdir/feeds.conf"
101+
sed -i "s|https://git.openwrt.org/feed/packages.git|https://github.com/openwrt/packages.git|g" "$sdkdir/feeds.conf"
102+
sed -i "s|https://git.openwrt.org/project/luci.git|https://github.com/openwrt/luci.git|g" "$sdkdir/feeds.conf"
103+
sed -i "s|https://git.openwrt.org/feed/routing.git|https://github.com/openwrt/routing.git|g" "$sdkdir/feeds.conf"
104+
sed -i "s|https://git.openwrt.org/feed/telephony.git|https://github.com/openwrt/telephony.git|g" "$sdkdir/feeds.conf"
105+
elif [ "$gitmirror" != "https://git.openwrt.org" ]; then
99106
sed -i "s|https://git.openwrt.org/openwrt|$gitmirror|g" "$sdkdir/feeds.conf"
100107
sed -i "s|https://git.openwrt.org/feed|$gitmirror|g" "$sdkdir/feeds.conf"
101108
sed -i "s|https://git.openwrt.org/project|$gitmirror|g" "$sdkdir/feeds.conf"

0 commit comments

Comments
 (0)