[LEDE-DEV] [PATCH] scripts/download.pl: fail loudly if provided hash is unsupported

Stijn Tintel stijn at linux-ipv6.be
Sun Sep 24 13:59:26 PDT 2017


On 24-09-17 23:57, Baptiste Jonglez wrote:
> Hi,
>
> On 24-09-17, Stijn Tintel wrote:
>> On 03-09-17 15:01, Baptiste Jonglez wrote:
>>> Note: if some users of scripts/download.pl knowingly provide an empty hash
>>> because they don't need checksum verification, this change will break
>>> them.  This does not seem to be the case currently, but if this feature is
>>> ever needed, an option should be added to download.pl instead of relying
>>> on the hash being empty.
>> Unfortunately this change breaks the make/foo/download feature,
> Can you elaborate on this?  It seems to work fine here:
>
>     $ make package/dnsmasq/download V=s
>     make[1]: Entering directory '/lede/tmp/lede-project'
>     make[2]: Entering directory '/lede/tmp/lede-project/package/network/services/dnsmasq'
>     mkdir -p /lede/tmp/lede-project/dl
>     SHELL= flock /lede/tmp/lede-project/tmp/.dnsmasq-2.77.tar.xz.flock -c '	/lede/tmp/lede-project/scripts/download.pl "/lede/tmp/lede-project/dl" "dnsmasq-2.77.tar.xz" "6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a" "" "http://thekelleys.org.uk/dnsmasq/"    '
>     + curl -f --connect-timeout 20 --retry 5 --location --insecure http://thekelleys.org.uk/dnsmasq/dnsmasq-2.77.tar.xz
>       % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                      Dload  Upload   Total   Spent    Left  Speed
>     100  475k  100  475k    0     0   237k      0  0:00:02  0:00:02 --:--:--  232k
>     make[2]: Leaving directory '/lede/tmp/lede-project/package/network/services/dnsmasq'
>     make[1]: Leaving directory '/lede/tmp/lede-project'
My bad. When we update a package, we bump the version in the Makefile
and remove the current hash, then run "make package/foo/dowload; make
package/foo/check FIXUP=1". This downloads the tarbal for the new
version, and FIXUP writes its hash to the Makefile. This is what's
broken since the change.

Stijn




More information about the Lede-dev mailing list