tn3399_openwrt/scripts
Paul Spooren a83b2af47f build: get_source_date_epoch allow external repos
The SOURCE_DATE_EPOCH variable is used to make builds reproducible even
if rebuild at different times. Instead of using the current timestamp,
the time of the last source change is used.

Created packages are `touch`ed with a specific timestamp so resulting
packages have the same checksums.

The `get_source_date_epoch.sh` script tries multiple ways (file, git,
hg) to determine the correct timestamp.

Until now the script would only consider the $TOPDIR instead of package
specific changes. Resulting in packages with same versions but different
timestamps, as $TOPDIR (openwrt.git) received changes not affecting
package versions. This results in warning/erros in `opkg` as the package
versions stay the same but checksums changed.

This commit adds an optional argument to get the `SOURCE_DATE_EPOCH` of
a specific path (e.g. package SOURCE) rather than the $TOPDIR. As a
consequence this allows granular but still reproducible timestamps.

As packages might be distributed over multiple repositories the check
for `.git/` becomes unfeasible. Instead tell `git` and `hg` to change
their working directories and automatically traverse the repo folder.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:18:06 +01:00
..
config build: mconf readme update 2020-07-07 19:47:24 +02:00
flashing scripts/flashing/flash.sh: remove trailing whitespaces 2020-05-24 14:44:00 +02:00
arm-magic.sh scripts/arm-magic.sh: switch to /bin/sh 2020-01-02 23:59:20 +01:00
brcmImage.pl merge: targets: update image generation and targets 2017-12-08 19:41:18 +01:00
bundle-libraries.sh scripts: bundle-libraries: fix logic flaw 2018-08-29 14:19:43 +02:00
cfe-bin-header.py scripts: cfe-bin-header: fix shebang 2020-05-19 08:05:22 +02:00
cfe-partition-tag.py scripts: add CFE Partition Tags support 2020-05-21 19:11:24 +02:00
cfe-wfi-tag.py scripts: cfe-wfi-tag: fix shebang 2020-05-19 08:06:29 +02:00
checkpatch.pl scripts/checkpatch.pl: fix README.md file name after rename 2020-08-02 15:51:39 +02:00
clang-gcc-wrapper build: fix build on Mac OS X 10.9 2013-10-28 15:15:09 +00:00
clean-package.sh build: Fix directory symlinks not removed when cleaning STAGING_DIR 2020-03-01 21:35:59 +01:00
cleanfile build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
cleanpatch build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
combined-ext-image.sh combined-ext-image.sh: generate image in temp dir 2018-01-13 07:58:46 +01:00
combined-image.sh scripts: make all scripts executable 2017-07-14 04:09:16 +02:00
config.guess scripts: update config.guess and config.sub 2018-11-01 17:16:52 +01:00
config.rpath add config.rpath and link it in autotools.mk if missing, some packages might need it, especially users of lib-link.m4 or iconv.m4 2011-02-27 15:39:27 +00:00
config.sub scripts: update config.guess and config.sub 2018-11-01 17:16:52 +01:00
deptest.sh scripts: avoid hard-coded paths in scripts 2016-04-28 16:43:28 +02:00
diffconfig.sh scripts/diffconfig.sh: fix output if TARGET_PER_DEVICE_ROOTFS is set 2016-10-06 22:00:10 +02:00
dl_cleanup.py dl_cleanup: Fix linux blacklist 2015-10-07 10:51:18 +00:00
dl_github_archive.py scripts/dl_github_archive.py: fix python3 str, bytes confusion 2019-11-04 11:11:19 +00:00
download.pl Revert "scripts/download: add sources CDN as first mirror" 2020-08-24 15:55:14 +02:00
dump-target-info.pl scripts: Add Buildbot dump-target-info.pl script 2020-08-04 09:28:39 +02:00
env scripts/env: Fix 56f813674a scripts/env: use command -v instead of which 2020-07-12 13:29:28 +01:00
ext-toolchain.sh scripts: Probe external toolchains for libthread-db 2017-05-11 13:43:01 -07:00
feeds scripts/feeds: fix accepting "-" in feed type string 2019-09-15 19:54:03 +02:00
fixup-makefile.pl fixup-makefile.pl: fixup when PKG_SOURCE is defined elsewhere 2018-07-05 01:30:57 +08:00
functions.sh images: fix boot failures on NAND with small sub pages 2019-09-14 11:43:19 +02:00
gen_image_generic.sh scripts/gen_image_generic.sh: fix more shellcheck warnings 2020-07-11 14:42:32 +02:00
gen-dependencies.sh scripts/gen-dependencies.sh: use /bin/sh 2020-01-01 17:01:02 +01:00
get_source_date_epoch.sh build: get_source_date_epoch allow external repos 2020-08-31 11:18:06 +01:00
getver.sh scripts/getver.sh: append short git hash based on upstream commit 2017-02-01 17:48:45 +01:00
ipkg-build build: ipkg-build use fakeroot with PKG_FILE_MODES 2020-08-31 11:13:12 +01:00
ipkg-make-index.sh scripts: ipkg-make-index.sh: dereference symbolic links 2019-01-31 12:35:29 +01:00
ipkg-remove scripts: ipkg-remove: handle existing .ipk files without SourceName field 2019-01-21 16:35:40 +01:00
json_add_image_info.py build: store default/device packages in JSON 2020-06-30 23:21:10 +01:00
json_overview_image_info.py build,json: fix compatibility with Python 3.5 2020-07-13 22:45:04 +02:00
kconfig.pl treewide: replace nbd@openwrt.org with nbd@nbd.name 2016-06-07 08:58:42 +02:00
linksys-image.sh build: add a script for generating Linksys factory images 2019-01-26 21:43:07 +01:00
make-ipkg-dir.sh branding: add LEDE branding 2016-03-24 22:40:13 +01:00
md5sum improve support for building on mac os x by improving detection of missing components 2009-01-25 19:00:43 +00:00
metadata.pm build: add option to mark devices as BROKEN 2020-07-30 21:49:07 +02:00
mkhash.c build: add a small standalone utility for calculating md5/sha256 hash 2017-01-05 11:09:12 +01:00
mkits-qsdk-ipq-image.sh build: add helpers for generating QSDK sysupgrade compatible images 2019-02-25 17:36:16 +01:00
mkits.sh scripts/mkits.sh: fix use of printf 2020-07-11 18:46:53 +02:00
om-fwupgradecfg-gen.sh ar71xx: Skip more hashed blocks for OM2P(-HS) 64k variant 2018-09-10 10:01:58 +02:00
package-metadata.pl metadata: handle ABI version rebuild tracking for transient dependencies 2019-06-21 12:03:43 +02:00
pad_image scripts: avoid hard-coded paths in scripts 2016-04-28 16:43:28 +02:00
patch-kernel.sh scripts/patch-kernel.sh: remove -E flag to preserve empty files touched by patches 2015-08-25 07:46:32 +00:00
patch-specs.sh toolchain: Add GCC 9.1.0 release 2019-06-16 16:40:08 +02:00
portable_date.sh scripts: fix GNU data invocation 2016-02-01 10:43:27 +00:00
qemustart scripts: fixup qemustart for new x86 image names 2020-03-21 10:36:00 +00:00
redboot-script.pl scripts: avoid hard-coded paths in scripts 2016-04-28 16:43:28 +02:00
relink-lib.sh base-files: relink uclibc and libgcc libraries to remove leftovers of the statically linked initial libgcc saves a few kb and gets rid of unused not exported functions as well should also improve the reliability of mklibs 2011-03-01 05:40:38 +00:00
remote-gdb Fix handling of BUILD_SUFFIX in remote-gdb script 2019-09-01 18:38:05 +02:00
rstrip.sh scripts: rstrip.sh: allow rpath with sole $ORIGIN token 2018-12-19 15:36:05 +01:00
sercomm-crypto.py scripts: support Sercomm crypto 2020-06-02 08:37:54 +02:00
sercomm-partition-tag.py scripts: support Sercomm partition tags 2020-06-02 08:33:11 +02:00
sercomm-payload.py scripts: support Sercomm load tags 2020-06-02 13:06:42 +02:00
sign_images.sh build: add script to sign packages 2019-10-21 14:07:08 +02:00
slugimage.pl scripts: Replace obsolete POSIX tmpnam in slugimage.pl with File::Temp function 2018-06-05 10:07:42 -04:00
srecimage.pl treewide: replace jow@openwrt.org with jo@mein.io 2016-06-07 11:42:52 +02:00
strip-kmod.sh scripts/strip-kmod.sh: harmonize leading whitespaces 2019-12-31 11:41:07 +01:00
symlink-tree.sh scripts/symlink-tree.sh: use /bin/sh 2019-12-31 11:43:15 +01:00
sysupgrade-tar.sh images: fix boot failures on NAND with small sub pages 2019-09-14 11:43:19 +02:00
target-metadata.pl build: add option to mark devices as BROKEN 2020-07-30 21:49:07 +02:00
time.pl scripts: time.pl: Don't print the time on stderr 2019-07-03 07:45:00 +02:00
timestamp.pl fix timestamp checks for build system paths which have '.svn' in their directory name 2010-04-14 22:21:15 +00:00
ubinize-image.sh ubinize-image: set image sequence from SOURCE_DATE_EPOCH 2019-11-03 04:20:21 +01:00