mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Baeuerle, Florian" <Florian.Baeuerle@allegion.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] [PATCH 3/4] lzop: add patch that allows overriding mtime
Date: Fri, 26 Oct 2018 13:46:58 +0000	[thread overview]
Message-ID: <20181026134644.22900-4-florian.baeuerle@allegion.com> (raw)
In-Reply-To: <20181026134644.22900-1-florian.baeuerle@allegion.com>

Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com>
---
 ...1-allow-overriding-modification-time.patch | 39 +++++++++++++++++++
 patches/lzop-1.03/series                      |  3 +-
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 patches/lzop-1.03/0001-allow-overriding-modification-time.patch

diff --git a/patches/lzop-1.03/0001-allow-overriding-modification-time.patch b/patches/lzop-1.03/0001-allow-overriding-modification-time.patch
new file mode 100644
index 000000000..0bc35aaef
--- /dev/null
+++ b/patches/lzop-1.03/0001-allow-overriding-modification-time.patch
@@ -0,0 +1,39 @@
+From af0c84c088c4c1f4a91d6404d4fb02e94f2d1779 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Florian=20B=C3=A4uerle?= <florian.baeuerle@allegion.com>
+Date: Thu, 25 Oct 2018 17:26:30 +0200
+Subject: [PATCH] allow overriding modification time
+
+---
+ src/lzop.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/lzop.c b/src/lzop.c
+index 4cd1bb7..e3dba51 100644
+--- a/src/lzop.c
++++ b/src/lzop.c
+@@ -706,6 +706,7 @@ void init_compress_header(header_t *h, const file_t *fip, const file_t *fop)
+     assert(opt_method > 0);
+     assert(opt_level > 0);
+     assert(fip->st.st_mode == 0 || S_ISREG(fip->st.st_mode));
++    const char *source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ 
+     memset(h,0,sizeof(header_t));
+ 
+@@ -742,7 +743,13 @@ void init_compress_header(header_t *h, const file_t *fip, const file_t *fop)
+ 
+     h->mode = fix_mode_for_header(fip->st.st_mode);
+ 
+-    if (fip->st.st_mtime)
++    if (source_date_epoch)
++    {
++        time_t mtime = strtoul(source_date_epoch, NULL, 0);
++        h->mtime_low  = (lzo_uint32) (mtime);
++        h->mtime_high = (lzo_uint32) ((mtime >> 16) >> 16);
++    }
++    else if (fip->st.st_mtime)
+     {
+         h->mtime_low = (lzo_uint32) (fip->st.st_mtime);
+         h->mtime_high = (lzo_uint32) (fip->st.st_mtime >> 16 >> 16);
+-- 
+1.8.3.1
+
diff --git a/patches/lzop-1.03/series b/patches/lzop-1.03/series
index ec5e32346..272ffc22f 100644
--- a/patches/lzop-1.03/series
+++ b/patches/lzop-1.03/series
@@ -1,3 +1,2 @@
-# generated by git-ptx-patches
 0001-make-block-size-configureable.patch
-# 81ee93089124310f55464ef8b543428c  - git-ptx-patches magic
+0001-allow-overriding-modification-time.patch
-- 
2.19.0

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2018-10-26 13:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 14:19 [ptxdist] [PATCH 1/3] host-faketime: new package Baeuerle, Florian
2018-10-11 14:19 ` [ptxdist] [PATCH 2/3] barebox: add option for building barebox reproducibly Baeuerle, Florian
2018-10-12  7:59   ` Baeuerle, Florian
2018-10-12 12:01   ` Michael Olbrich
2018-10-12 12:21     ` Baeuerle, Florian
2018-10-24  8:19       ` Michael Olbrich
2018-10-26 13:46         ` [ptxdist] [PATCH 0/2] Barebox reproducible build + ptxdist setup configuration Baeuerle, Florian
2018-10-26 13:46           ` [ptxdist] [PATCH 1/4] config/setup: make reproducible builds configurable Baeuerle, Florian
2018-10-26 13:46           ` [ptxdist] [PATCH 2/4] barebox: depend on HOST_LZOP Baeuerle, Florian
2018-10-26 13:46           ` Baeuerle, Florian [this message]
2018-10-26 13:46           ` [ptxdist] [PATCH 4/4] barebox: add support for reproducible build Baeuerle, Florian
2018-10-12 12:28     ` [ptxdist] [PATCH 2/3] barebox: add option for building barebox reproducibly Baeuerle, Florian
2018-10-16  8:59       ` Michael Olbrich
2018-10-16 11:06         ` Baeuerle, Florian
2018-10-16 12:51           ` Michael Olbrich
2018-10-16 14:11             ` Baeuerle, Florian
2018-10-16 19:06               ` Michael Olbrich
2018-10-16 10:09   ` Michael Olbrich
2018-10-16 10:57     ` Baeuerle, Florian
2018-10-16 12:38       ` Michael Olbrich
2018-10-16 14:27         ` Baeuerle, Florian
2018-10-16 19:20           ` Michael Olbrich
2018-10-16 17:15       ` Alexander Dahl
2018-10-16 19:13         ` Michael Olbrich
2018-10-11 14:19 ` [ptxdist] [PATCH 3/3] barebox_mlo: add option for building barebox_mlo reproducibly Baeuerle, Florian
2018-10-11 14:43 ` [ptxdist] [PATCH 1/3] host-faketime: new package Roland Hieber
2018-10-11 21:30   ` Jon Ringle
2018-10-16  7:33     ` Baeuerle, Florian
2018-10-16  8:47       ` Michael Olbrich
2018-10-12  7:47   ` Baeuerle, Florian
2018-10-16  8:51     ` Michael Olbrich
2018-10-16 11:34       ` Alexander Dahl
2018-10-16 12:30         ` Michael Olbrich
2018-10-16  8:53 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181026134644.22900-4-florian.baeuerle@allegion.com \
    --to=florian.baeuerle@allegion.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox