* [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? @ 2021-07-21 13:02 Mircea Ciocan 2021-07-21 13:36 ` Alexander Dahl 2021-07-21 15:35 ` Christian Melki 0 siblings, 2 replies; 5+ messages in thread From: Mircea Ciocan @ 2021-07-21 13:02 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 799 bytes --] Hello everybody, I have a rather strange question: In one of my programs, to differentiate during testing in between different compilation of the same program, I'm using a poor's man serialization based on the __DATE__ and __TIME__ macros (or whatever they are nowadays). Unfortunately I've always get a constant value: "Mar 1 2021-00:00:00" when I compile it with PTXDist and OSELAS toolchain and I was wondering where it comes from (this happens with the last three versions of the OSELAS toolchain)? This is for aarch64, the same program compiled with Ubuntu distribution gcc gives expected results. Could somebody shad some light why is that and eventually on how to disable this really undesired behavior ? Thanks and best regards, Mircea [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4266 bytes --] [-- Attachment #2: Type: text/plain, Size: 181 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? 2021-07-21 13:02 [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? Mircea Ciocan @ 2021-07-21 13:36 ` Alexander Dahl 2021-07-21 14:08 ` Mircea Ciocan 2021-07-21 15:35 ` Christian Melki 1 sibling, 1 reply; 5+ messages in thread From: Alexander Dahl @ 2021-07-21 13:36 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 1508 bytes --] Hello Mircea, On Wed, Jul 21, 2021 at 03:02:36PM +0200, Mircea Ciocan wrote: > Hello everybody, > > I have a rather strange question: > > In one of my programs, to differentiate during testing in between different > compilation of the same program, I'm using a poor's man serialization based > on the __DATE__ and __TIME__ macros (or whatever they are nowadays). I usually use some Git based version information from `git describe --dirty` … > Unfortunately I've always get a constant value: "Mar 1 2021-00:00:00" when > I compile it with PTXDist and OSELAS toolchain and I was wondering where it > comes from (this happens with the last three versions of the OSELAS > toolchain)? This is for aarch64, the same program compiled with Ubuntu > distribution gcc gives expected results. > > Could somebody shad some light why is that and eventually on how to disable > this really undesired behavior ? The reason is so called reproducible builds: https://reproducible-builds.org/ You can change behaviour in your BSP through the REPRODUCIBLE_TIMESTAMP_* variables. Access it from the menu through "Project Name & Version" ---> "SOURCE_DATE_EPOCH timestamps source" Greets Alex -- /"\ ASCII RIBBON | »With the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.« / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 181 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? 2021-07-21 13:36 ` Alexander Dahl @ 2021-07-21 14:08 ` Mircea Ciocan 2021-07-21 17:35 ` Alexander Dahl 0 siblings, 1 reply; 5+ messages in thread From: Mircea Ciocan @ 2021-07-21 14:08 UTC (permalink / raw) To: ptxdist On 21.07.21 15:36, Alexander Dahl wrote: > Hello Mircea, > > On Wed, Jul 21, 2021 at 03:02:36PM +0200, Mircea Ciocan wrote: >> Hello everybody, >> >> I have a rather strange question: >> >> In one of my programs, to differentiate during testing in between different >> compilation of the same program, I'm using a poor's man serialization based >> on the __DATE__ and __TIME__ macros (or whatever they are nowadays). > I usually use some Git based version information from > `git describe --dirty` … > >> Unfortunately I've always get a constant value: "Mar 1 2021-00:00:00" when >> I compile it with PTXDist and OSELAS toolchain and I was wondering where it >> comes from (this happens with the last three versions of the OSELAS >> toolchain)? This is for aarch64, the same program compiled with Ubuntu >> distribution gcc gives expected results. >> >> Could somebody shad some light why is that and eventually on how to disable >> this really undesired behavior ? > The reason is so called reproducible builds: > > https://reproducible-builds.org/ > > You can change behaviour in your BSP through the > REPRODUCIBLE_TIMESTAMP_* variables. Access it from the menu through > "Project Name & Version" ---> "SOURCE_DATE_EPOCH timestamps source" > > Greets > Alex > Thanks a lot Alex, I was starting to tear what little hair I have left, of course it had to be some google sponsored useless garbage :-(, oh well, at least is disable-able ;-). Best way is to run: ./ptxdist setup -> "Developer Options" -> "disable reproducible builds" and get rid of it, the following gem is from the "feature" help, I think it describes it nicely why is junk: "This can be confusing during development. E.g. The Linux kernel build timestamp never changes and cannot be used to ensure that the correct kernel image is used. Enable this option to get a new timestamp for every PTXdist call." Cheers, Mircea <https://www.ppc-ag.de/datenschutz/> _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? 2021-07-21 14:08 ` Mircea Ciocan @ 2021-07-21 17:35 ` Alexander Dahl 0 siblings, 0 replies; 5+ messages in thread From: Alexander Dahl @ 2021-07-21 17:35 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 1995 bytes --] Hello Mircea, On Wed, Jul 21, 2021 at 04:08:30PM +0200, Mircea Ciocan wrote: > > On 21.07.21 15:36, Alexander Dahl wrote: > > The reason is so called reproducible builds: > > > > https://reproducible-builds.org/ > > > > You can change behaviour in your BSP through the > > REPRODUCIBLE_TIMESTAMP_* variables. Access it from the menu through > > "Project Name & Version" ---> "SOURCE_DATE_EPOCH timestamps source" > > > > Greets > > Alex > > > Thanks a lot Alex, > > I was starting to tear what little hair I have left, of course it had to be > some google sponsored useless garbage :-(, oh well, at least is disable-able > ;-). Maybe you judged only after a quick glance? I would not call it useless. See https://wiki.debian.org/ReproducibleBuilds/About on motivation for it for example. As a user concerned about integrity of the software I'm running, this approach is desirable. As a developer eventually shipping firmware built by a ptxdist based BSP, I'm also interested in reproducible build artefacts. You might not need it for your usecases, other people would disagree, thus calling it garbage … well … I would not do that. > Best way is to run: > > ./ptxdist setup -> "Developer Options" -> "disable reproducible builds" > > and get rid of it, the following gem is from the "feature" help, I think it > describes it nicely why is junk: > > "This can be confusing during development. E.g. The Linux kernel build > timestamp never changes and cannot be used to ensure that the correct kernel > image is used. Enable this option to get a new timestamp for every PTXdist > call." Junk, garbage, see above. With kind greetings Alex -- /"\ ASCII RIBBON | »With the first link, the chain is forged. The first \ / CAMPAIGN | speech censured, the first thought forbidden, the X AGAINST | first freedom denied, chains us all irrevocably.« / \ HTML MAIL | (Jean-Luc Picard, quoting Judge Aaron Satie) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 181 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? 2021-07-21 13:02 [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? Mircea Ciocan 2021-07-21 13:36 ` Alexander Dahl @ 2021-07-21 15:35 ` Christian Melki 1 sibling, 0 replies; 5+ messages in thread From: Christian Melki @ 2021-07-21 15:35 UTC (permalink / raw) To: ptxdist, Mircea Ciocan On 7/21/21 3:02 PM, Mircea Ciocan wrote: > Hello everybody, > > I have a rather strange question: > > In one of my programs, to differentiate during testing in between > different compilation of the same program, I'm using a poor's man > serialization based on the __DATE__ and __TIME__ macros (or whatever > they are nowadays). > Which program? > Unfortunately I've always get a constant value: "Mar 1 2021-00:00:00" > when I compile it with PTXDist and OSELAS toolchain and I was wondering > where it comes from (this happens with the last three versions of the > OSELAS toolchain)? This is for aarch64, the same program compiled with > Ubuntu distribution gcc gives expected results. > I have the same issue with U-boot 2021.07 atleast, but I find it hard to believe that ptxdist is behind all this. Usually it involves some complex timestamp generation depending on a bucketload of things in some makefile. Maybe look there? Could be that ptxdist is missing some environment variable or something? > Could somebody shad some light why is that and eventually on how to > disable this really undesired behavior ? > > Thanks and best regards, > > Mircea > > > > > > > > > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-21 17:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-21 13:02 [ptxdist] Why are the __DATE__ and __TIME__ fixed in the OSELAS Toolchain or PTXDist ? Mircea Ciocan 2021-07-21 13:36 ` Alexander Dahl 2021-07-21 14:08 ` Mircea Ciocan 2021-07-21 17:35 ` Alexander Dahl 2021-07-21 15:35 ` Christian Melki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox