Initial Commit
- initial default booting image
This commit is contained in:
42
package/lzop/0001-allow-overriding-modification-time.patch
Normal file
42
package/lzop/0001-allow-overriding-modification-time.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
|
||||
This patch allows to set the mtime of the lzop archive to
|
||||
$SOURCE_DATE_EPOCH, required for reproducible build. It was submitted to
|
||||
pengutronix by florian Bäuerle in october 2018.
|
||||
|
||||
https://git.pengutronix.de/cgit/ptxdist/tree/patches/lzop-1.04/0002-allow-overriding-modification-time.patch
|
||||
|
||||
Signed-off-by: Casey Reeves <casey@xogium.me>
|
||||
---
|
||||
src/lzop.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lzop.c b/src/lzop.c
|
||||
index a540ad9c4d33..c2f877d16f92 100644
|
||||
--- a/src/lzop.c
|
||||
+++ b/src/lzop.c
|
||||
@@ -712,6 +712,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));
|
||||
|
||||
@@ -748,7 +749,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 > 0)
|
||||
+ 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 > 0)
|
||||
{
|
||||
h->mtime_low = (lzo_uint32) (fip->st.st_mtime);
|
||||
h->mtime_high = (lzo_uint32) ((fip->st.st_mtime >> 16) >> 16);
|
||||
9
package/lzop/Config.in
Normal file
9
package/lzop/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_LZOP
|
||||
bool "lzop"
|
||||
select BR2_PACKAGE_LZO
|
||||
help
|
||||
lzop is a file compressor which is very similar to gzip.
|
||||
lzop uses the LZO data compression library for compression
|
||||
services.
|
||||
|
||||
http://www.lzop.org/
|
||||
4
package/lzop/lzop.hash
Normal file
4
package/lzop/lzop.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# From http://www.lzop.org
|
||||
sha256 7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41 lzop-1.04.tar.gz
|
||||
# Locally calculated
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
30
package/lzop/lzop.mk
Normal file
30
package/lzop/lzop.mk
Normal file
@@ -0,0 +1,30 @@
|
||||
################################################################################
|
||||
#
|
||||
# lzop
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LZOP_VERSION = 1.04
|
||||
LZOP_SITE = http://www.lzop.org/download
|
||||
LZOP_LICENSE = GPL-2.0+
|
||||
LZOP_LICENSE_FILES = COPYING
|
||||
LZOP_DEPENDENCIES = lzo
|
||||
HOST_LZOP_DEPENDENCIES = host-lzo
|
||||
|
||||
# lzop uses libtool 2.4.2.418, which is right between 2.4.2 and
|
||||
# 2.4.4. While our patch for 2.4 is also supposed to work up to and
|
||||
# including 2.4.2.x, it does not work for libtool 2.4.2.418, which
|
||||
# requires the patch for 2.4.4. So we disable the libtool patching
|
||||
# from autotools-package and do our own.
|
||||
LZOP_LIBTOOL_PATCH = NO
|
||||
|
||||
define LZOP_LIBTOOL_FIXUP
|
||||
patch -i support/libtool/buildroot-libtool-v2.4.4.patch $(@D)/autoconf/ltmain.sh
|
||||
endef
|
||||
LZOP_POST_PATCH_HOOKS += LZOP_LIBTOOL_FIXUP
|
||||
HOST_LZOP_POST_PATCH_HOOKS += LZOP_LIBTOOL_FIXUP
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
|
||||
LZOP = $(HOST_DIR)/bin/lzop
|
||||
Reference in New Issue
Block a user