Commit Graph

10 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Jo-Philipp Wich d157a76c67 script: ipkg-build: honour $SOURCE_DATE_EPOCH
When the SOURCE_DATE_EPOCH environment variable is set, use it to
override the timestamps of .ipk archive contents.

This ensures that .ipk archives built in environments without SCM
metadata (mainly the SDK) are reproducible between different runs.

Ref: https://github.com/openwrt/packages/issues/6954
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Yousong Zhou 9e58c20ec9 scripts/ipkg-build: quash error messages when conffiles.resolved is empty
When Package/xx/conffiles only contains directories that are empty at
package time, conffiles.resolved will be missing and the following
error messages will appear in the build log.

	/home/yousong/git-repo/openwrt/openwrt/scripts/ipkg-build -c -o 0 -g 0 /home/yousong/git-repo/openwrt/openwrt/build_dir/target-mips_24kc_musl/linux-malta_be/openvswitch-2.10.0/ipkg-mips_24kc/openvswitch-common /home/yousong/git-repo/openwrt/openwrt/bin/packages/mips_24kc/packages
	mv: cannot stat 'CONTROL/conffiles.resolved': No such file or directory
	chmod: cannot access 'CONTROL/conffiles': No such file or directory

It will not break the ipkg-build process.  The change is merely cosmetic
to not cause confusion when reading logs

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
6 years ago
Jo-Philipp Wich 3a3424981c scripts: ipkg-build: do not require git or svn
Move the "which svn" and "which git" calls next to the timestamp commands
using those tools to not prematurely fail on systems where svn or git are
not present.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Syrone Wong e8bc0834e7 scripts/ipkg-build: fix deprecated GZIP environment variable warning
According to gzip 1.7 release note:

The GZIP environment variable is now obsolescent; gzip now warns if
it is used, and rejects attempts to use dangerous options or operands.
You can use an alias or script instead.

Fix this warning by using pipe instead

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Felix Fietkau 1a2fd4f869 ipkg-build: add ogargs to outer tar/ipk
prevent name:uid leaks of build system

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46863
9 years ago
Felix Fietkau 4baec2468a include/image.mk: make tar reproducible
several packages reported different file order between builds
make binutils, kmod-sched reproducible

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46859
9 years ago
Felix Fietkau 7f359e52ce scripts/ipkg-build: fix a build regression introduced in r46360 (fixes #20082)
go to the $TOPDIR directory before trying to extract a git/svn timestamp

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46383
9 years ago
John Crispin 3846bb9ac9 ipkg-build: use deterministic timestamps in ipk tarballs
As a follow-up to r46026, this commit sets the modification
times of files inside the tarballs to deterministic values.
It uses the date of the last git or svn commit and falls
back to the old behavior if those are not available.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46360
9 years ago
Felix Fietkau 949d7e30e4 ipkg-build: suppress timestamps in gzip headers
When creating control.tar.gz, data.tar.gz and $package.ipk
tar compresses them with default gzip options.
This includes build timestamps in their gzip headers.
By setting the GZIP env variable to -n, gzip no longer embeds
them, which is a step towards reproducibility.

See also [1] for more detailed motivations.

[1]: https://wiki.debian.org/ReproducibleBuilds/About

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46026
9 years ago
Felix Fietkau 55c5d10ca9 tools: replace ipkg-utils with a reduced ipkg-build variant in scripts/
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45129
9 years ago