]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
jquery: fix reproducible build issue for PREMIRRORS downloads
authorHongxu Jia <hongxu.jia@windriver.com>
Fri, 21 Nov 2025 05:39:54 +0000 (13:39 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Jan 2026 14:21:52 +0000 (14:21 +0000)
The sources of jquery are pure text files:
...
SRC_URI = "\
    https://code.jquery.com/${BP}.js;name=js;subdir=${BP} \
    https://code.jquery.com/${BP}.min.js;name=min;subdir=${BP} \
    https://code.jquery.com/${BP}.min.map;name=map;subdir=${BP} \
    "
...

When use git repo to save them and clone locally as PREMIRRORS for
bitbake. In this case, mtime of these files will be current time
when checking out. For this recipe, source_date_epoch will get by
function get_source_date_epoch_from_youngest_file, mtime of the
source files are not stable, so cause the generated package not
reproducible.

Due to the mtime of source files in upstream is always 1991-10-18,
even for the new version
$ wget https://code.jquery.com/jquery-3.0.0.js
$ ls --full-time jquery-3.0.0.js
-rw-r--r-- 1 hjia users 263268 1991-10-18 20:00:00.000000000 +0800 jquery-3.0.0.js

$ wget https://code.jquery.com/jquery-3.7.1.js
$ ls --full-time jquery-3.7.1.js
-rw-r--r-- 1 hjia users 285314 1991-10-18 20:00:00.000000000 +0800 jquery-3.7.1.js

Then explicitly set above timestamp to SOURCE_DATE_EPOCH

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/jquery/jquery_3.7.1.bb

index 33147b493c517a64e3bc47871d7083cbbf0bca22..0de92e041e023f9bc89577e530d50c2eb932ea70 100644 (file)
@@ -13,6 +13,9 @@ SRC_URI = "\
     https://code.jquery.com/${BP}.min.map;name=map;subdir=${BP} \
     "
 
+# Explicitly set to 1991-10-18 20:00:00.000000000
+SOURCE_DATE_EPOCH = "687787200"
+
 SRC_URI[js.sha256sum] = "78a85aca2f0b110c29e0d2b137e09f0a1fb7a8e554b499f740d6744dc8962cfe"
 SRC_URI[min.sha256sum] = "fc9a93dd241f6b045cbff0481cf4e1901becd0e12fb45166a8f17f95823f0b1a"
 SRC_URI[map.sha256sum] = "5e7d6d9c28b7f21006535e8875eb47e9667852a14c4624eed301c6cea19ae62b"