aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/get_source_date_epoch.sh
Commit message (Collapse)AuthorAgeFilesLines
* build: get_source_date_epoch allow external reposPaul Spooren2020-08-311-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* build: Fix Shellcheck for get_source_date_epoch.shPaul Spooren2020-08-311-2/+5
| | | | | | | | If a `cd` to `TOPDIR` fails the script should quit. Also unify `try_mtime` function by storing it in a variable. Signed-off-by: Paul Spooren <mail@aparcar.org>
* scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallbackJo-Philipp Wich2017-02-021-2/+7
| | | | | | | | | | Add a fallback case to get_source_date_epoch.sh which reports the modification time of the script itself in case there is no SCM information available, e.g. when downloading .tar.gz or .zip tarballs produced by Github. Also fix the mercurial case while we're at it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* branding: add LEDE brandingJohn Crispin2016-03-241-7/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* scripts/get_source_date_epoch.sh: for SVN use a variant that is compatible ↵Felix Fietkau2016-02-011-1/+1
| | | | | | | | with older versions Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48593
* build: introduce SOURCE_DATE_EPOCH variableFelix Fietkau2016-01-311-0/+31
SOURCE_DATE_EPOCH is the date of the last modified file using git/svn as date source. See https://reproducible-builds.org/specs/source-date-epoch/ Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48584