[pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH
Allan McRae
allan at archlinux.org
Mon Apr 17 21:41:44 UTC 2017
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 file...")"
>>> - list_package_files | LANG=C bsdtar -cnzf .MTREE --format=mtree \
>>> + list_package_files | LANG=C bsdtar -cnf - --format=mtree \
>>> --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' \
>>> - --null --files-from - --exclude .MTREE
>>> + --null --files-from - --exclude .MTREE | gzip -c -f -n > .MTREE
>>> + touch -d @$SOURCE_DATE_EPOCH .MTREE
>>>
>>> msg2 "$(gettext "Compressing package...")"
>>> # TODO: Maybe this can be set globally for robustness
>>>
>>
>> These touch commands have had a -h added.
>
> touch -h and date %s are not POSIX, are they available everywhere we
> support?
>
touch -h is in BSDs. date +%s is mentioned in the FreeBSD man page, so
I assume it works.
A
More information about the pacman-dev
mailing list