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

Dave Reisner d at falconindy.com
Mon Apr 17 12:35:39 UTC 2017


On Mon, Apr 17, 2017 at 10:03:03PM +1000, Allan McRae wrote:
> From: Levente Polyak <anthraxx at archlinux.org>
> 
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> 
> [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 --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index df4d6a06..84b83e7d 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -493,6 +493,8 @@ run_package() {
>  		pkgfunc="package_$1"
>  	fi
>  
> +	# unify source times before package for reproducibility
> +	find "$srcdir" -exec touch -h -d "@${SOURCE_DATE_EPOCH}" {} \;

Same as 3/4 -- prefer {} +.

If we accept this patch, the commit message should include an
explanation as to why this is useful.

>  	run_function_safe "$pkgfunc"
>  }
>  
> -- 
> 2.12.0


More information about the pacman-dev mailing list