Specify the modification time (mtime) of the files to match
SOURCE_DATE_EPOCH rather than the current time when creating packages.
PR: 294002
Differential D56070
pkgbase: Timestamp files with SOURCE_DATE_EPOCH Authored by jlduran on Wed, Mar 25, 2:16 AM. Tags None Referenced Files
Details Specify the modification time (mtime) of the files to match PR: 294002 In preparation for NanoBSD + pkgbase. NanoBSD images have its base % pkg info -R -x FreeBSD-\* | grep mtime: | sort -u
mtime: <SOURCE_DATE_EPOCH>
Diff Detail
Event TimelineComment Actions
Can you spell out a little more clearly in the commit message why pkg's automatic SOURCE_DATE_EPOCH usage isn't sufficient here, please? By all accounts it seems like this should be a nop, so I guess it's that SOURCE_DATE_EPOCH isn't exported into pkg's environment in these targets? Comment Actions (I think you can probably make an argument for .export SOURCE_DATE_EPOCH and a lot of these SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) assignments can probably disappear, but maybe that's a discussion for another day) Comment Actions Yes, I tried to do exactly that in the bug report. But, I'll do that in the commit message as well. Thank you. Comment Actions i have a strong preference for using SOURCE_DATE_EPOCH here, if possible: it will avoid conflicting with some other pkgbase work i'm doing, and more generally seems like a cleaner solution as anything that needs that can easily consume it; this is information that should be generally available to the build system. Comment Actions fwiw, i think this is fine to land before D56087 as long as you're only doing something like .export SOURCE_DATE_EPOCH in Makefile.inc1. that should be picked up automatically by the <bsd.pkg.mk> build. edit: this is partly why i suggested using .export instead of editing the pkg commands. Comment Actions Yes, that was the first thing I tried. For some reason I do not yet understand, it does not work (I even thought it was an issue with pkg-create(8) itself, after further testing, pkg-create(8) is working fine). I'll investigate further over the weekend. Feel free to commandeer this revision if you know how to fix it so that it uses the SOURCE_DATE_EPOCH from the env. |