Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:34, Andrew Gregory wrote: > On 04/17/17 at 08:41pm, Allan McRae wrote: >> This patch introduces the SOURCE_DATE_EPOCH environmental variable. All >> files >> in a package are adjusted to have their modification dates set to the value >> of SOURCE_DATE_EPOCH, which defaults to "date

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:37, Andrew Gregory wrote: > On 04/17/17 at 10:04pm, Allan McRae wrote: >> On 17/04/17 20:41, Allan McRae wrote: >>> + # ensure all elements of the package have the same mtime >>> + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; >>> + >>> msg2 "$(gettext "Generating .MTREE fi

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:37, Andrew Gregory wrote: > On 04/17/17 at 10:04pm, Allan McRae wrote: >> On 17/04/17 20:41, Allan McRae wrote: >>> + # ensure all elements of the package have the same mtime >>> + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; >>> + >>> msg2 "$(gettext "Generating .MTREE fi

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Levente Polyak
On 04/17/2017 08:42 PM, Andrew Gregory wrote: > I have no problem with making makepkg's own output more controllable > (e.g. allowing builddate to be set rather than using the current > time). But, a lot of the time, reproducing an identical package is > going to require a very precise environmen

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Andrew Gregory
On 04/17/17 at 03:53pm, Levente Polyak wrote: > On 04/17/2017 03:34 PM, Andrew Gregory wrote: > > On 04/17/17 at 08:41pm, Allan McRae wrote: > >> This patch introduces the SOURCE_DATE_EPOCH environmental variable. All > >> files > >> in a package are adjusted to have their modification dates set

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Levente Polyak
On 04/17/2017 03:34 PM, Andrew Gregory wrote: > On 04/17/17 at 08:41pm, Allan McRae wrote: >> This patch introduces the SOURCE_DATE_EPOCH environmental variable. All >> files >> in a package are adjusted to have their modification dates set to the value >> of SOURCE_DATE_EPOCH, which defaults to

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Andrew Gregory
On 04/17/17 at 10:04pm, Allan McRae wrote: > On 17/04/17 20:41, Allan McRae wrote: > > + # ensure all elements of the package have the same mtime > > + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; > > + > > msg2 "$(gettext "Generating .MTREE file...")" > > - list_package_files | LANG=C

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Andrew Gregory
On 04/17/17 at 08:41pm, Allan McRae wrote: > This patch introduces the SOURCE_DATE_EPOCH environmental variable. All files > in a package are adjusted to have their modification dates set to the value > of SOURCE_DATE_EPOCH, which defaults to "date +%s". > > Setting this variable allows a package

Re: [pacman-dev] [PATCH 4/4] [RFC] makepkg: unify times for generated files in srcdir before packaging

2017-04-17 Thread Dave Reisner
On Mon, Apr 17, 2017 at 10:03:03PM +1000, Allan McRae wrote: > From: Levente Polyak > > Signed-off-by: Allan McRae > --- > > [Allan] I'm told his is useful for some python packages that generate pyo/pyc > files during package... I am undecided about its suitability for inclusion > in makepkg y

Re: [pacman-dev] [PATCH 3/4] makepkg: unify source file times for improved build reproducibility

2017-04-17 Thread Dave Reisner
On Mon, Apr 17, 2017 at 10:03:02PM +1000, Allan McRae wrote: > From: Levente Polyak > > Signed-off-by: Allan McRae > --- > scripts/makepkg.sh.in | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in > index 7692ade5..df4d6a06 100644 > --- a/s

Re: [pacman-dev] [PATCH 1/4] makepkg: extract parts of the write_pkginfo for use elsewhere

2017-04-17 Thread Dave Reisner
On Mon, Apr 17, 2017 at 10:03:00PM +1000, Allan McRae wrote: > From: Levente Polyak > > Signed-off-by: Allan McRae > --- Sorry, a lot of these comments are irrelevant to the actual patch, but I couldn't help pointing them out... > scripts/makepkg.sh.in | 42 ++-

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 20:41, Allan McRae wrote: > + # ensure all elements of the package have the same mtime > + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; > + > msg2 "$(gettext "Generating .MTREE file...")" > - list_package_files | LANG=C bsdtar -cnzf .MTREE --format=mtree \ > + l

[pacman-dev] [PATCH 4/4] [RFC] makepkg: unify times for generated files in srcdir before packaging

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- [Allan] I'm told his is useful for some python packages that generate pyo/pyc files during package... I am undecided about its suitability for inclusion in makepkg yet. scripts/makepkg.sh.in | 2 ++ 1 file changed, 2 insertions(+) diff --g

[pacman-dev] [PATCH 3/4] makepkg: unify source file times for improved build reproducibility

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7692ade5..df4d6a06 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -475,6 +475,9 @@ run_prepare(

[pacman-dev] [PATCH 2/4] makepkg: add more information to .BUILDINFO

2017-04-17 Thread Allan McRae
From: Levente Polyak The .BUILDINFO file should retain all the information needed to reproducibly build a package. Add some extra information to the file and also provide a version number to keep track of future changes. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 8 ++-- 1 fil

[pacman-dev] [PATCH 1/4] makepkg: extract parts of the write_pkginfo for use elsewhere

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 42a76004..d61c7fff 100644 --- a/scripts/makepkg.sh.in ++

[pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
This patch introduces the SOURCE_DATE_EPOCH environmental variable. All files in a package are adjusted to have their modification dates set to the value of SOURCE_DATE_EPOCH, which defaults to "date +%s". Setting this variable allows a package that is built twice in the same environment to be (p

[pacman-dev] [PATCH] makepkg: remove build date from .PKGINFO header

2017-04-17 Thread Allan McRae
This information is duplicated (in less friendly format) in the "builddate" entry and removing it improves reproducible packaging. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 43c7e328.

Re: [pacman-dev] [PATCH] be_sync: error out if a db cannot be parsed

2017-04-17 Thread Allan McRae
On 17/04/17 13:28, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > > See FS#49342 for an example of how to break a database in a way that was > previously silently ignored. The linked github issue includes a copy of an > actual broken db. > Looks like the ideal solution requires

[pacman-dev] [PATCH 1/2] makepkg: do not create symlinks in build directory

2017-04-17 Thread Allan McRae
Setting PKGDEST and friends enables us to keep all built packages in a single location. Symlinking these files into the build directory creates unnecessary clutter and requires clean-up in multiple places when removing old version. Signed-off-by: Allan McRae --- Does anyone use these symlinks?

[pacman-dev] [PATCH 2/2] makepkg: create signature files outside of fakeroot

2017-04-17 Thread Allan McRae
With recent version of gpg, signing within fakeroot works on the first invocation, but fails on later runs. Sign all packages outside of fakeroot to avoid this issue. Fixes FS#49946. Signed-off-by: Allan McRae --- .../libmakepkg/integrity/generate_signature.sh.in | 34 --