* [Drbd-dev] [PATCH] drbd: Allow to override build date
@ 2017-07-18 8:35 Bernhard M. Wiedemann
2017-07-18 9:13 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Bernhard M. Wiedemann
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-18 8:35 UTC (permalink / raw)
To: drbd-dev
and to not record build user, hostname if requested
in order to allow for reproducible builds.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
drbd/Kbuild | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drbd/Kbuild b/drbd/Kbuild
index 2d1b4d0..f355496 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y))
echo >&2 "Your DRBD source tree is broken. Unpack again."; \
exit 1; \
fi ; \
- echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
+ if [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
+ buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
+ else \
+ buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
+ fi ; \
+ echo -e "\t\t\" $buildinfo\";\n}"; \
mv -f $@.new $@
--
2.12.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Drbd-dev] [PATCH] drbd: Allow to override build date (v2)
2017-07-18 8:35 [Drbd-dev] [PATCH] drbd: Allow to override build date Bernhard M. Wiedemann
@ 2017-07-18 9:13 ` Bernhard M. Wiedemann
2017-07-18 12:35 ` Roland Kammerer
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-18 9:13 UTC (permalink / raw)
To: drbd-dev
and to not record build user and hostname if requested
in order to allow for reproducible builds.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
drbd/Kbuild | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drbd/Kbuild b/drbd/Kbuild
index 2d1b4d0..9898e93 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y))
echo >&2 "Your DRBD source tree is broken. Unpack again."; \
exit 1; \
fi ; \
- echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
+ if [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
+ buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
+ else \
+ buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
+ fi ; \
+ echo -e "\t\t\" $$buildinfo\";\n}"; \
mv -f $@.new $@
--
2.12.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Drbd-dev] [PATCH] drbd: Allow to override build date (v2)
2017-07-18 9:13 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Bernhard M. Wiedemann
@ 2017-07-18 12:35 ` Roland Kammerer
2017-07-18 12:47 ` Bernhard M. Wiedemann
0 siblings, 1 reply; 9+ messages in thread
From: Roland Kammerer @ 2017-07-18 12:35 UTC (permalink / raw)
To: drbd-dev
On Tue, Jul 18, 2017 at 11:13:50AM +0200, Bernhard M. Wiedemann wrote:
> and to not record build user and hostname if requested
> in order to allow for reproducible builds.
> See https://reproducible-builds.org/ for why this is good
> and https://reproducible-builds.org/specs/source-date-epoch/
> for the definition of this variable.
> ---
> drbd/Kbuild | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drbd/Kbuild b/drbd/Kbuild
> index 2d1b4d0..9898e93 100644
> --- a/drbd/Kbuild
> +++ b/drbd/Kbuild
> @@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y))
> echo >&2 "Your DRBD source tree is broken. Unpack again."; \
> exit 1; \
> fi ; \
> - echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
> + if [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
> + buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
> + else \
> + buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
> + fi ; \
> + echo -e "\t\t\" $$buildinfo\";\n}"; \
> mv -f $@.new $@
> --
> 2.12.3
No. What if setting SOURCE_DATE_EPOCH becomes the default in the future?
Maybe it already is for some of the distributions we as LINBIT build
packages for. Sorry for being the spoilsport here, but as it stands I
only see the potential of breaking the way we want it .
Regards, rck
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Drbd-dev] [PATCH] drbd: Allow to override build date (v2)
2017-07-18 12:35 ` Roland Kammerer
@ 2017-07-18 12:47 ` Bernhard M. Wiedemann
2017-07-18 12:48 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v3) Bernhard M. Wiedemann
2017-07-18 14:45 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Roland Kammerer
0 siblings, 2 replies; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-18 12:47 UTC (permalink / raw)
To: drbd-dev
> No. What if setting SOURCE_DATE_EPOCH becomes the default in the future?
> Maybe it already is for some of the distributions we as LINBIT build
> packages for. Sorry for being the spoilsport here, but as it stands I
> only see the potential of breaking the way we want it .
It already _is_ the default for openSUSE Tumbleweed (aka Factory)... but
then the preferred way of finding out which version it is, is using
version numbers and/or git hashes.
Once you can create the same binaries anywhere and anytime, it does not
matter anymore where and when they were created.
If you are that reliant/insistent on this date, we could add another
[ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] ||
that is only explicity set in our .spec file(s) (drbd-utils has the same
issue).
Ciao
Bernhard M.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Drbd-dev] [PATCH] drbd: Allow to override build date (v3)
2017-07-18 12:47 ` Bernhard M. Wiedemann
@ 2017-07-18 12:48 ` Bernhard M. Wiedemann
2017-07-23 15:57 ` [Drbd-dev] [PATCH] drbd-utils: Allow to override build date Bernhard M. Wiedemann
2017-07-18 14:45 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Roland Kammerer
1 sibling, 1 reply; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-18 12:48 UTC (permalink / raw)
To: drbd-dev
and to not record build user and hostname if requested
in order to allow for reproducible builds.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
drbd/Kbuild | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drbd/Kbuild b/drbd/Kbuild
index 2d1b4d0..80b8099 100644
--- a/drbd/Kbuild
+++ b/drbd/Kbuild
@@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y))
echo >&2 "Your DRBD source tree is broken. Unpack again."; \
exit 1; \
fi ; \
- echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
+ if [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] || [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
+ buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
+ else \
+ buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
+ fi ; \
+ echo -e "\t\t\" $$buildinfo\";\n}"; \
mv -f $@.new $@
--
2.12.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Drbd-dev] [PATCH] drbd: Allow to override build date (v2)
2017-07-18 12:47 ` Bernhard M. Wiedemann
2017-07-18 12:48 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v3) Bernhard M. Wiedemann
@ 2017-07-18 14:45 ` Roland Kammerer
2017-07-18 14:59 ` Bernhard M. Wiedemann
1 sibling, 1 reply; 9+ messages in thread
From: Roland Kammerer @ 2017-07-18 14:45 UTC (permalink / raw)
To: drbd-dev
On Tue, Jul 18, 2017 at 02:47:54PM +0200, Bernhard M. Wiedemann wrote:
>
> > No. What if setting SOURCE_DATE_EPOCH becomes the default in the future?
> > Maybe it already is for some of the distributions we as LINBIT build
> > packages for. Sorry for being the spoilsport here, but as it stands I
> > only see the potential of breaking the way we want it .
>
> It already _is_ the default for openSUSE Tumbleweed (aka Factory)...
See, then it was good not taking it as it was, as it would have changed
the behavior from what *we intentionally* want to what *you* want.
> If you are that reliant/insistent on this date, we could add another
I'm insistent on one simple thing: Don't break our existing code/builds
with something you want.
> [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] ||
Looks good, merged your v3 patch.
Thanks, rck
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Drbd-dev] [PATCH] drbd: Allow to override build date (v2)
2017-07-18 14:45 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Roland Kammerer
@ 2017-07-18 14:59 ` Bernhard M. Wiedemann
0 siblings, 0 replies; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-18 14:59 UTC (permalink / raw)
To: drbd-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2017-07-18 14:45, Roland Kammerer wrote:
> I'm insistent on one simple thing: Don't break our existing
> code/builds with something you want.
I was just proposing these changes (the first one even with an
explicit 'RFC' (Request For Comment) tag), because I did not know what
you want.
> Looks good, merged your v3 patch.
Thank you
Bernhard M.
-----BEGIN PGP SIGNATURE-----
iHEEARECADEWIQRk4KvQEtfG32NHprVJNgs7HfuhZAUCWW4iKxMcYndpZWRlbWFu
bkBzdXNlLmRlAAoJEEk2Czsd+6FkFhMAoItA1atgijyLyu8T2XwgfIl1CVC7AJ4u
RlRSukcP80AYxRpgpeKG1s54sg==
=AWDI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Drbd-dev] [PATCH] drbd-utils: Allow to override build date
2017-07-18 12:48 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v3) Bernhard M. Wiedemann
@ 2017-07-23 15:57 ` Bernhard M. Wiedemann
2017-07-24 5:16 ` Roland Kammerer
0 siblings, 1 reply; 9+ messages in thread
From: Bernhard M. Wiedemann @ 2017-07-23 15:57 UTC (permalink / raw)
To: drbd-dev; +Cc: Bernhard M. Wiedemann
and to not record build user and hostname if requested
in order to allow for reproducible builds.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
---
user/shared/Makefile.in | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/user/shared/Makefile.in b/user/shared/Makefile.in
index cce7c1bc..596bcf81 100644
--- a/user/shared/Makefile.in
+++ b/user/shared/Makefile.in
@@ -84,7 +84,12 @@ drbd_buildtag.c:
else \
grep return $@ ; \
fi ; \
- echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
+ if [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] || [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
+ buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
+ else \
+ buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
+ fi ; \
+ echo -e "\t\t\" $$buildinfo\";\n}"; \
mv -f $@.new $@
drbdmeta_scanner.c: drbdmeta_scanner.fl drbdmeta_parser.h
--
2.12.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Drbd-dev] [PATCH] drbd-utils: Allow to override build date
2017-07-23 15:57 ` [Drbd-dev] [PATCH] drbd-utils: Allow to override build date Bernhard M. Wiedemann
@ 2017-07-24 5:16 ` Roland Kammerer
0 siblings, 0 replies; 9+ messages in thread
From: Roland Kammerer @ 2017-07-24 5:16 UTC (permalink / raw)
To: drbd-dev
On Sun, Jul 23, 2017 at 05:57:51PM +0200, Bernhard M. Wiedemann wrote:
> and to not record build user and hostname if requested
> in order to allow for reproducible builds.
> See https://reproducible-builds.org/ for why this is good
> and https://reproducible-builds.org/specs/source-date-epoch/
> for the definition of this variable.
> ---
> user/shared/Makefile.in | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/user/shared/Makefile.in b/user/shared/Makefile.in
> index cce7c1bc..596bcf81 100644
> --- a/user/shared/Makefile.in
> +++ b/user/shared/Makefile.in
> @@ -84,7 +84,12 @@ drbd_buildtag.c:
> else \
> grep return $@ ; \
> fi ; \
> - echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \
> + if [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] || [ -z "${SOURCE_DATE_EPOCH}" ] ; then \
> + buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \
> + else \
> + buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \
> + fi ; \
> + echo -e "\t\t\" $$buildinfo\";\n}"; \
> mv -f $@.new $@
>
Hi Bernhard,
recently, but only visible internally so far, that changed and I split
out parts into a drbd_buildtag.h. Therefore, that patch did not apply
anymore, but I committed an equivalent version with you as author.
Regards, rck
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-07-24 5:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 8:35 [Drbd-dev] [PATCH] drbd: Allow to override build date Bernhard M. Wiedemann
2017-07-18 9:13 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Bernhard M. Wiedemann
2017-07-18 12:35 ` Roland Kammerer
2017-07-18 12:47 ` Bernhard M. Wiedemann
2017-07-18 12:48 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v3) Bernhard M. Wiedemann
2017-07-23 15:57 ` [Drbd-dev] [PATCH] drbd-utils: Allow to override build date Bernhard M. Wiedemann
2017-07-24 5:16 ` Roland Kammerer
2017-07-18 14:45 ` [Drbd-dev] [PATCH] drbd: Allow to override build date (v2) Roland Kammerer
2017-07-18 14:59 ` Bernhard M. Wiedemann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox