Parcourir la source

package/daq: workaround for upstream changing the archive

Upstream has changed the archive for the 2.0.7 release since we bumped
in c1f820bd88a5 (package/daq: bump version to 2.0.7). Comparing the old
archive as it is on s.b.o. with the one currently available on upstream,
gives a few deltas, mostly;
  - (C) years changed in comments
  - version string changed from 2.0.6 to 2.0.7
  - changes (that look legit) to autostuff
  - a file dropped (Visual Studio related)

Of course, that means the hashes changed, and no longer match what we
have.

Downloading the file manually and letting wget set the timestamp on it,
reveals the archive is dated 2022-06-08T13:51:59. So, for more than two
years now, we've been relying on the archive we cached on s.b.o.

So, we can't just change the hashes to the new ones, nor can we replace
the archive on s.b.o.

Instead, we use the same trick as was used in c617ebbc977d
(package/python-*: fix hashes for cargo-vendored python packages): we
use the actual, real URL with a query parameter as the _SITE, and we set
_SOURCE to a different name so as not to conflict with the previous
archive.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Yann E. MORIN il y a 1 an
Parent
commit
9e00cceb60
2 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 2 2
      package/daq/daq.hash
  2. 5 1
      package/daq/daq.mk

+ 2 - 2
package/daq/daq.hash

@@ -1,7 +1,7 @@
 # From https://www.snort.org/downloads/snort/md5s
-md5  ea796f001d1b00302e4e69e337ab2460  daq-2.0.7.tar.gz
+md5  60e5ddcafb985fac7374884d28f299d1  daq-2.0.7-modified.tar.gz
 # Locally computed:
-sha256  bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e  daq-2.0.7.tar.gz
+sha256  d1f6709bc5dbddee3fdf170cdc1e49fb926e2031d4869ecf367a8c47efc87279  daq-2.0.7-modified.tar.gz
 
 # Hash for license files:
 sha256  07f28289c09fd9eb5a6ff7bc710ff40363601b1bbc6f3637d8ed412150e90819  COPYING

+ 5 - 1
package/daq/daq.mk

@@ -5,7 +5,11 @@
 ################################################################################
 
 DAQ_VERSION = 2.0.7
-DAQ_SITE = https://www.snort.org/downloads/snort
+# Upstream re-published a modified archive for the same 2.0.7 version, so change
+# its name locally, to avoid conflict with older BR versions which had a hash
+# for the previous archive.
+DAQ_SOURCE = daq-2.0.7-modified.tar.gz
+DAQ_SITE = https://www.snort.org/downloads/snort/daq-$(DAQ_VERSION).tar.gz?buildroot-path=filename
 DAQ_LICENSE = GPL-2.0
 DAQ_LICENSE_FILES = COPYING
 DAQ_INSTALL_STAGING = YES