Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
Le mardi 25 août 2015 à 12:20 +0200, Andreas Bießmann a écrit : > On 08/25/2015 11:55 AM, Vagrant Cascadian wrote: > > On 2015-08-25, Andreas Bießmann wrote: > >> On 07/28/2015 05:00 PM, Tom Rini wrote: > >>> On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: > In order to achieve reproducible builds in U-Boot, timestamps that are > defined > at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH > environment > variable allows setting a fixed value for those timestamps. > > Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of > targets can be > built reproducibly. This is the case for e.g. sunxi devices. > > However, some other devices might need some more tweaks, especially > regarding > the image generation tools. > > Signed-off-by: Paul Kocialkowski > >>> > >>> Applied to u-boot/master, thanks! > >> > >> This commit breaks build on non GNU hosts (like OS X and persumably > >> other *BSD hosts). Before, those hosts where supported, so for me this > >> has to be fixed for 2015.10 > >> > >> We need a) some mechanism to search for the GNU date variant or b) some > >> wrapper to provide the correct output on those host machines. > >> > >> I vote for a), it is acceptable to have the GNU date available but we > >> should error on 'no GNU date available'. Furthermore we need to have the > >> date command exchangeable by e.g. gdate, gnudate, ... maybe with full path. > > > > There was a proposed patch which only uses the GNU date extensions if > > SOURCE_DATE_EPOCH environment variable is set, would this sufficiently > > address your concerns, at least for the short term? > > > > Message-Id: <1438337042-30762-1-git-send-email-judge.pack...@gmail.com> > > http://lists.denx.de/pipermail/u-boot/2015-August/221429.html > > thanks for the pointer, normal builds work with that change. I think we should get that patch merged so that it doesn't affect regular builds on non-GNU hosts. It is also relevant for the purpose it serves initially, too. -- Paul Kocialkowski, Replicant developer Replicant is a fully free Android distribution running on several devices, a free software mobile operating system putting the emphasis on freedom and privacy/security. Website: http://www.replicant.us/ Blog: http://blog.replicant.us/ Wiki/tracker/forums: http://redmine.replicant.us/ signature.asc Description: This is a digitally signed message part ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On 08/25/2015 11:55 AM, Vagrant Cascadian wrote: > On 2015-08-25, Andreas Bießmann wrote: >> On 07/28/2015 05:00 PM, Tom Rini wrote: >>> On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: In order to achieve reproducible builds in U-Boot, timestamps that are defined at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment variable allows setting a fixed value for those timestamps. Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be built reproducibly. This is the case for e.g. sunxi devices. However, some other devices might need some more tweaks, especially regarding the image generation tools. Signed-off-by: Paul Kocialkowski >>> >>> Applied to u-boot/master, thanks! >> >> This commit breaks build on non GNU hosts (like OS X and persumably >> other *BSD hosts). Before, those hosts where supported, so for me this >> has to be fixed for 2015.10 >> >> We need a) some mechanism to search for the GNU date variant or b) some >> wrapper to provide the correct output on those host machines. >> >> I vote for a), it is acceptable to have the GNU date available but we >> should error on 'no GNU date available'. Furthermore we need to have the >> date command exchangeable by e.g. gdate, gnudate, ... maybe with full path. > > There was a proposed patch which only uses the GNU date extensions if > SOURCE_DATE_EPOCH environment variable is set, would this sufficiently > address your concerns, at least for the short term? > > Message-Id: <1438337042-30762-1-git-send-email-judge.pack...@gmail.com> > http://lists.denx.de/pipermail/u-boot/2015-August/221429.html thanks for the pointer, normal builds work with that change. Andreas ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On Thu, Jul 30, 2015 at 11:54 PM, Bin Meng wrote: > This commit breaks the following commit: > > commit f3f431a712729a1af94d01bd1bfde17a252ff02c > Author: Chris Packham > Date: Sun May 10 21:02:09 2015 +1200 > > Makefile: Add U_BOOT_TZ and include in version > > Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to > include the timezone in the version output. > > Acked-by: Simon Glass > Signed-off-by: Chris Packham > > Before this commit I have: > U-Boot 2015.07-00345-g9c57487 (Jul 31 2015 - 10:49:31 +0800) > > After this commit I have: > U-Boot 2015.07-00346-gf3f431a (Jul 31 2015 - 02:50:54 +) > > As you see: the timezone information is missing, and U-Boot's > timestamp is now GMT+0 (the correct one should be GMT+8) > > Is this intended behavior? Or if not, please fix it. I notice the same behavior here and I agree it would be nice to fix this. Thanks ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On 2015-08-25, Andreas Bießmann wrote: > On 07/28/2015 05:00 PM, Tom Rini wrote: >> On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: >>> In order to achieve reproducible builds in U-Boot, timestamps that are >>> defined >>> at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH >>> environment >>> variable allows setting a fixed value for those timestamps. >>> >>> Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets >>> can be >>> built reproducibly. This is the case for e.g. sunxi devices. >>> >>> However, some other devices might need some more tweaks, especially >>> regarding >>> the image generation tools. >>> >>> Signed-off-by: Paul Kocialkowski >> >> Applied to u-boot/master, thanks! > > This commit breaks build on non GNU hosts (like OS X and persumably > other *BSD hosts). Before, those hosts where supported, so for me this > has to be fixed for 2015.10 > > We need a) some mechanism to search for the GNU date variant or b) some > wrapper to provide the correct output on those host machines. > > I vote for a), it is acceptable to have the GNU date available but we > should error on 'no GNU date available'. Furthermore we need to have the > date command exchangeable by e.g. gdate, gnudate, ... maybe with full path. There was a proposed patch which only uses the GNU date extensions if SOURCE_DATE_EPOCH environment variable is set, would this sufficiently address your concerns, at least for the short term? Message-Id: <1438337042-30762-1-git-send-email-judge.pack...@gmail.com> http://lists.denx.de/pipermail/u-boot/2015-August/221429.html live well, vagrant signature.asc Description: PGP signature ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On 07/28/2015 05:00 PM, Tom Rini wrote: > On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: > >> In order to achieve reproducible builds in U-Boot, timestamps that are >> defined >> at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH >> environment >> variable allows setting a fixed value for those timestamps. >> >> Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets >> can be >> built reproducibly. This is the case for e.g. sunxi devices. >> >> However, some other devices might need some more tweaks, especially regarding >> the image generation tools. >> >> Signed-off-by: Paul Kocialkowski > > Applied to u-boot/master, thanks! This commit breaks build on non GNU hosts (like OS X and persumably other *BSD hosts). Before, those hosts where supported, so for me this has to be fixed for 2015.10 We need a) some mechanism to search for the GNU date variant or b) some wrapper to provide the correct output on those host machines. I vote for a), it is acceptable to have the GNU date available but we should error on 'no GNU date available'. Furthermore we need to have the date command exchangeable by e.g. gdate, gnudate, ... maybe with full path. Andreas ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On 31/07/15 07:25, Chris Packham wrote: > The problem is that date -u implies UTC. So + is right if you do > want the time to be displayed in UTC (for me living at +12/+13 UTC > makes my head hurt because all the dates are yesterday). > One of the main problems with human-readable date/time is that it implies a calendar, with all its exceptions like leap years, changing DST, etc. Many RFCs, and the POSIX date functions, are highly flawed and conflate calendars with absolute time, e.g. don't specify they mean the Gregorian calendar, and don't specify what to do with dates before when the Gregorian calendar was introduced. If you want to be precise about these things (so as to not cause problems in the future), then you need to specify all of that when dealing with human-readable dates. This is why for now, the Reproducible Builds timestamps proposal only defines SOURCE_DATE_EPOCH. We might extend it later, though. > The intent of f3f431a7 was to reflect the timezone that the build > machine was set to. Dropping the -u would probably be sufficient but > perhaps it would be better to make whole lot conditional on > SOURCE_DATE_EPOCH being set. Something like this (untested, apologies > gmail web interface) > > ifneq ($(SOURCE_DATE_EPOCH),) > define filechk_timestamp.h >(SOURCE_DATE="$(SOURCE_DATE_EPOCH)"; \ >LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b > %d %C%y"'; \ >LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ >LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"' ) > endef > else > define filechk_timestamp.h >(LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ >LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ >LC_ALL=C date +'#define U_BOOT_TZ "%z"') > endef > endif > Yes, it is best to force the TZ as UTC for now, if SOURCE_DATE_EPOCH is set. At some point later, we might add SOURCE_DATE_TZOFFSET, or other formats that include a timezone offset, or something. (That would match Git's internal timestamp format, which is "$epochts $tzoffset", and can be translated unambiguously into ISO8601 and RFC2822 formats). For now though, we decided to keep things simple. But please say so, if you think that is something you (or others who use timestamps in build systems) would really want. BTW, you need to do "@$${SOURCE_DATE_EPOCH}" when giving timestamps to date(1): $ date -d @143833 +%s 143833 $ date -d 143833 +%s date: invalid date ‘143833’ 1 X -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
On Fri, Jul 31, 2015 at 2:54 PM, Bin Meng wrote: > Hi, > > On Tue, Jul 28, 2015 at 11:00 PM, Tom Rini wrote: >> On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: >> >>> In order to achieve reproducible builds in U-Boot, timestamps that are >>> defined >>> at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH >>> environment >>> variable allows setting a fixed value for those timestamps. >>> >>> Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets >>> can be >>> built reproducibly. This is the case for e.g. sunxi devices. >>> >>> However, some other devices might need some more tweaks, especially >>> regarding >>> the image generation tools. >>> >>> Signed-off-by: Paul Kocialkowski >> >> Applied to u-boot/master, thanks! >> >> -- > > This commit breaks the following commit: > > commit f3f431a712729a1af94d01bd1bfde17a252ff02c > Author: Chris Packham > Date: Sun May 10 21:02:09 2015 +1200 > > Makefile: Add U_BOOT_TZ and include in version > > Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to > include the timezone in the version output. > > Acked-by: Simon Glass > Signed-off-by: Chris Packham > > Before this commit I have: > U-Boot 2015.07-00345-g9c57487 (Jul 31 2015 - 10:49:31 +0800) > > After this commit I have: > U-Boot 2015.07-00346-gf3f431a (Jul 31 2015 - 02:50:54 +) > > As you see: the timezone information is missing, and U-Boot's > timestamp is now GMT+0 (the correct one should be GMT+8) > > Is this intended behavior? Or if not, please fix it. > > Regards, > Bin The problem is that date -u implies UTC. So + is right if you do want the time to be displayed in UTC (for me living at +12/+13 UTC makes my head hurt because all the dates are yesterday). The intent of f3f431a7 was to reflect the timezone that the build machine was set to. Dropping the -u would probably be sufficient but perhaps it would be better to make whole lot conditional on SOURCE_DATE_EPOCH being set. Something like this (untested, apologies gmail web interface) ifneq ($(SOURCE_DATE_EPOCH),) define filechk_timestamp.h (SOURCE_DATE="$(SOURCE_DATE_EPOCH)"; \ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \ LC_ALL=C date -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"' ) endef else define filechk_timestamp.h (LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \ LC_ALL=C date +'#define U_BOOT_TZ "%z"') endef endif ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
Re: [Reproducible-builds] [U-Boot] [U-Boot, v2] Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
Hi, On Tue, Jul 28, 2015 at 11:00 PM, Tom Rini wrote: > On Sun, Jul 26, 2015 at 06:48:15PM +0200, Paul Kocialkowski wrote: > >> In order to achieve reproducible builds in U-Boot, timestamps that are >> defined >> at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH >> environment >> variable allows setting a fixed value for those timestamps. >> >> Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets >> can be >> built reproducibly. This is the case for e.g. sunxi devices. >> >> However, some other devices might need some more tweaks, especially regarding >> the image generation tools. >> >> Signed-off-by: Paul Kocialkowski > > Applied to u-boot/master, thanks! > > -- This commit breaks the following commit: commit f3f431a712729a1af94d01bd1bfde17a252ff02c Author: Chris Packham Date: Sun May 10 21:02:09 2015 +1200 Makefile: Add U_BOOT_TZ and include in version Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to include the timezone in the version output. Acked-by: Simon Glass Signed-off-by: Chris Packham Before this commit I have: U-Boot 2015.07-00345-g9c57487 (Jul 31 2015 - 10:49:31 +0800) After this commit I have: U-Boot 2015.07-00346-gf3f431a (Jul 31 2015 - 02:50:54 +) As you see: the timezone information is missing, and U-Boot's timestamp is now GMT+0 (the correct one should be GMT+8) Is this intended behavior? Or if not, please fix it. Regards, Bin ___ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds