Hi folks
So I'm trying to have the build system download the tarball for my package from my github repo. The package is not yet included in the OpenWrt repository.
I managed to have it actually fetch the tarball, however I'm not sure it's doing this correctly because it spits out some errors.
Here is the relevant portion of the Makefile:
PKG_NAME:=geoip-shell
PKG_VERSION:=0.5
PKG_RELEASE:=r1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=antonk <email_redacted>
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7e3f8efc4197cf72d11102bb6ade9b9225595ded
PKG_SOURCE_URL:=https://github.com/friendly-bits/geoip-shell-openwrt.git
PKG_MIRROR_HASH:=46386d4d08a331799ffe873d1519c4fded664b93bf69f2d59f0876adf771af83
Here is the relevant portion of the output for the command make -j1 V=s "package/geoip-shell/download"
:
mkdir -p /home/antonk/openwrt/dl
SHELL= flock /home/antonk/openwrt/tmp/.geoip-shell-0.5.tar.xz.flock -c ' /home/antonk/openwrt/scripts/download.pl "/home/antonk/openwrt/dl" "geoip-shell-0.5.tar.xz" "46386d4d08a331799ffe873d1519c4fded664b93bf69f2d59f0876adf771af83" "" || ( /home/antonk/openwrt/scripts/dl_github_archive.py --dl-dir="/home/antonk/openwrt/dl" --url="https://github.com/friendly-bits/geoip-shell-openwrt.git" --version="7e3f8efc4197cf72d11102bb6ade9b9225595ded" --subdir="geoip-shell-0.5" --source="geoip-shell-0.5.tar.xz" --hash="46386d4d08a331799ffe873d1519c4fded664b93bf69f2d59f0876adf771af83" || ( echo "Checking out files from the git repository..."; mkdir -p /home/antonk/openwrt/tmp/dl && cd /home/antonk/openwrt/tmp/dl && rm -rf geoip-shell-0.5 && [ \! -d geoip-shell-0.5 ] && git clone https://github.com/friendly-bits/geoip-shell-openwrt.git geoip-shell-0.5 && (cd geoip-shell-0.5 && git checkout 7e3f8efc4197cf72d11102bb6ade9b9225595ded && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd geoip-shell-0.5 && git log -1 --format='\''@%ct'\''` && rm -rf geoip-shell-0.5/.git && tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c geoip-shell-0.5 | xz -zc -7e > /home/antonk/openwrt/tmp/dl/geoip-shell-0.5.tar.xz && mv /home/antonk/openwrt/tmp/dl/geoip-shell-0.5.tar.xz /home/antonk/openwrt/dl/ && rm -rf geoip-shell-0.5; ); ) '
+ curl -f --connect-timeout 20 --retry 5 --location https://sources.cdn.openwrt.org/geoip-shell-0.5.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 146 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
Download failed.
+ curl -f --connect-timeout 20 --retry 5 --location https://sources.openwrt.org/geoip-shell-0.5.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 146 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
Download failed.
+ curl -f --connect-timeout 20 --retry 5 --location https://mirror2.openwrt.org/sources/geoip-shell-0.5.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 153 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
Download failed.
No more mirrors to try - giving up.
geoip-shell-0.5.tar.xz: Download from https://github.com/friendly-bits/geoip-shell-openwrt.git failed
geoip-shell-0.5.tar.xz: Cannot fetch commit ts:
/repos/friendly-bits/geoip-shell-openwrt/git/commits/7e3f8efc4197cf72d11102bb6ade9b9225595ded: HTTP Error 404: Not Found
/repos/friendly-bits/geoip-shell-openwrt/commits/7e3f8efc4197cf72d11102bb6ade9b9225595ded: HTTP Error 404: Not Found
Checking out files from the git repository...
Cloning into 'geoip-shell-0.5'...
.....
Then it proceeds to correctly clone the repo and eventually the download completes successfully.
So for some reason, it tries to fetch from OpenWrt servers (where my package is not yet stored), then says that download from my github failed, and only then clones the repo. Is this normal and expected or did I do something wrong?