* [PATCH] dpkg-raw: use date of the most recent file instead of "now"
@ 2019-02-27 9:03 Cedric Hombourger
2019-02-27 10:00 ` Henning Schild
0 siblings, 1 reply; 6+ messages in thread
From: Cedric Hombourger @ 2019-02-27 9:03 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The changelog generated by Isar would use the current date/time
causing each build to be different. Use the date/time of the
most recent file to achieve reproducible builds (assuming files
contained in the payload have the same contents and timestamps).
In the event where the dpkg-raw package is not shipping any
files, Isar will default to the current date/time.
Disposition: Submit upstream
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/debianize.bbclass | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 510aebd..90edcdc 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -6,7 +6,12 @@
CHANGELOG_V ?= "${PV}"
deb_add_changelog() {
- date=$( LANG=C date -R )
+ timestamp=$(find ${D}/ -type f -printf "%T@ %p\n"|grep -v ${D}/debian/|sort -n|awk '{print $1 }'|tail -n 1)
+ if [ -n "${timestamp}" ]; then
+ date=$(LANG=C date -R -d @${timestamp})
+ else
+ date=$(LANG=C date -R)
+ fi
cat <<EOF > ${S}/debian/changelog
${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dpkg-raw: use date of the most recent file instead of "now"
2019-02-27 9:03 [PATCH] dpkg-raw: use date of the most recent file instead of "now" Cedric Hombourger
@ 2019-02-27 10:00 ` Henning Schild
2019-03-09 20:26 ` [PATCH v2] debianize: " Cedric Hombourger
0 siblings, 1 reply; 6+ messages in thread
From: Henning Schild @ 2019-02-27 10:00 UTC (permalink / raw)
To: Cedric Hombourger; +Cc: isar-users
On Wed, 27 Feb 2019 10:03:01 +0100
Cedric Hombourger <Cedric_Hombourger@mentor.com> wrote:
> The changelog generated by Isar would use the current date/time
> causing each build to be different. Use the date/time of the
> most recent file to achieve reproducible builds (assuming files
> contained in the payload have the same contents and timestamps).
> In the event where the dpkg-raw package is not shipping any
> files, Isar will default to the current date/time.
Good point!
> Disposition: Submit upstream
That should probably not be here.
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/debianize.bbclass | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/debianize.bbclass
> b/meta/classes/debianize.bbclass index 510aebd..90edcdc 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -6,7 +6,12 @@
> CHANGELOG_V ?= "${PV}"
>
> deb_add_changelog() {
> - date=$( LANG=C date -R )
> + timestamp=$(find ${D}/ -type f -printf "%T@ %p\n"|grep -v
> ${D}/debian/|sort -n|awk '{print $1 }'|tail -n 1)
Maybe we can clean that up a bit. i.e.
find ... -not -path "${D}/debian/*"
now we can probably adjust the format string to just be the timestamp
and get rid of the awk.
Henning
> + if [ -n "${timestamp}" ]; then
> + date=$(LANG=C date -R -d @${timestamp})
> + else
> + date=$(LANG=C date -R)
> + fi
> cat <<EOF > ${S}/debian/changelog
> ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] debianize: use date of the most recent file instead of "now"
2019-02-27 10:00 ` Henning Schild
@ 2019-03-09 20:26 ` Cedric Hombourger
2019-03-12 5:26 ` Jan Kiszka
2019-03-15 4:49 ` Maxim Yu. Osipov
0 siblings, 2 replies; 6+ messages in thread
From: Cedric Hombourger @ 2019-03-09 20:26 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger
The changelog generated by Isar would use the current date/time
causing each build to be different. Use the date/time of the
most recent file to achieve reproducible builds (assuming files
contained in the payload have the same contents and timestamps).
In the event where the package is not shipping any files, Isar
will default to the current date/time.
Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
meta/classes/debianize.bbclass | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 510aebd..ad3a98e 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -6,7 +6,12 @@
CHANGELOG_V ?= "${PV}"
deb_add_changelog() {
- date=$( LANG=C date -R )
+ timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
+ if [ -n "${timestamp}" ]; then
+ date=$(LANG=C date -R -d @${timestamp})
+ else
+ date=$(LANG=C date -R)
+ fi
cat <<EOF > ${S}/debian/changelog
${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
--
2.11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] debianize: use date of the most recent file instead of "now"
2019-03-09 20:26 ` [PATCH v2] debianize: " Cedric Hombourger
@ 2019-03-12 5:26 ` Jan Kiszka
2019-03-12 7:40 ` cedric_hombourger
2019-03-15 4:49 ` Maxim Yu. Osipov
1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2019-03-12 5:26 UTC (permalink / raw)
To: Cedric Hombourger, isar-users, Henning Schild
On 09.03.19 21:26, Cedric Hombourger wrote:
> The changelog generated by Isar would use the current date/time
> causing each build to be different. Use the date/time of the
> most recent file to achieve reproducible builds (assuming files
> contained in the payload have the same contents and timestamps).
> In the event where the package is not shipping any files, Isar
> will default to the current date/time.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/debianize.bbclass | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index 510aebd..ad3a98e 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -6,7 +6,12 @@
> CHANGELOG_V ?= "${PV}"
>
> deb_add_changelog() {
> - date=$( LANG=C date -R )
> + timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
> + if [ -n "${timestamp}" ]; then
> + date=$(LANG=C date -R -d @${timestamp})
> + else
> + date=$(LANG=C date -R)
> + fi
> cat <<EOF > ${S}/debian/changelog
> ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
>
>
Patch looks good.
In fact, I received a similar remark regarding the changelog we embedded into
custom u-boots, and the same should apply to kernel modules as well. Maybe we
should switch those recipes to changelog generation via debianize to benefit
from this here.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] debianize: use date of the most recent file instead of "now"
2019-03-09 20:26 ` [PATCH v2] debianize: " Cedric Hombourger
2019-03-12 5:26 ` Jan Kiszka
@ 2019-03-15 4:49 ` Maxim Yu. Osipov
1 sibling, 0 replies; 6+ messages in thread
From: Maxim Yu. Osipov @ 2019-03-15 4:49 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
On 3/9/19 9:26 PM, Cedric Hombourger wrote:
> The changelog generated by Isar would use the current date/time
> causing each build to be different. Use the date/time of the
> most recent file to achieve reproducible builds (assuming files
> contained in the payload have the same contents and timestamps).
> In the event where the package is not shipping any files, Isar
> will default to the current date/time.
Applied to the 'next',
Thanks,
Maxim.
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
> meta/classes/debianize.bbclass | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
> index 510aebd..ad3a98e 100644
> --- a/meta/classes/debianize.bbclass
> +++ b/meta/classes/debianize.bbclass
> @@ -6,7 +6,12 @@
> CHANGELOG_V ?= "${PV}"
>
> deb_add_changelog() {
> - date=$( LANG=C date -R )
> + timestamp=$(find ${S}/ -type f -not -path "${S}/debian/*" -printf "%T@\n"|sort -n -r|head -n 1)
> + if [ -n "${timestamp}" ]; then
> + date=$(LANG=C date -R -d @${timestamp})
> + else
> + date=$(LANG=C date -R)
> + fi
> cat <<EOF > ${S}/debian/changelog
> ${PN} (${CHANGELOG_V}) UNRELEASED; urgency=low
>
>
--
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-15 4:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 9:03 [PATCH] dpkg-raw: use date of the most recent file instead of "now" Cedric Hombourger
2019-02-27 10:00 ` Henning Schild
2019-03-09 20:26 ` [PATCH v2] debianize: " Cedric Hombourger
2019-03-12 5:26 ` Jan Kiszka
2019-03-12 7:40 ` cedric_hombourger
2019-03-15 4:49 ` Maxim Yu. Osipov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox