summaryrefslogtreecommitdiff
path: root/utils/lsof
diff options
context:
space:
mode:
authorMaxim Storchak <m.storchak@gmail.com>2017-12-15 15:33:03 +0200
committerMaxim Storchak <m.storchak@gmail.com>2017-12-15 15:33:15 +0200
commit137ace7522e7600b23ce873f391d5a62fa4e0507 (patch)
tree6c91ae77f0cc0571cb9119eb532b3bf9df52c19e /utils/lsof
parent343006bea93384ee3645d25e335bbaf2b635284f (diff)
lsof: reproducible build
- clear build host and user info - clear compiler flags - set date to SOURCE_DATE_EPOCH Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Diffstat (limited to 'utils/lsof')
-rw-r--r--utils/lsof/Makefile6
-rw-r--r--utils/lsof/patches/005-reproducable-build.patch24
2 files changed, 29 insertions, 1 deletions
diff --git a/utils/lsof/Makefile b/utils/lsof/Makefile
index d8d5d2762..65df6f3dd 100644
--- a/utils/lsof/Makefile
+++ b/utils/lsof/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lsof
PKG_VERSION:=4.89
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof
@@ -57,6 +57,10 @@ define Build/Configure
endef
define Build/Compile
+ LSOF_HOST="none" \
+ LSOF_LOGNAME="none" \
+ LSOF_SYSINFO="none" \
+ LSOF_USER="none" \
$(MAKE) -C $(PKG_BUILD_DIR)
endef
diff --git a/utils/lsof/patches/005-reproducable-build.patch b/utils/lsof/patches/005-reproducable-build.patch
new file mode 100644
index 000000000..1e4ab1549
--- /dev/null
+++ b/utils/lsof/patches/005-reproducable-build.patch
@@ -0,0 +1,24 @@
+diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile
+index 2bea108..ed8382e 100644
+--- a/dialects/linux/Makefile
++++ b/dialects/linux/Makefile
+@@ -78,8 +78,8 @@ version.h: FRC
+ @echo '#define LSOF_BLDCMT "${LSOF_BLDCMT}"' > version.h;
+ @echo '#define LSOF_CC "${CC}"' >> version.h
+ @echo '#define LSOF_CCV "${CCV}"' >> version.h
+- @echo '#define LSOF_CCDATE "'`date`'"' >> version.h
+- @echo '#define LSOF_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
++ @echo '#define LSOF_CCDATE "'`date -d @${SOURCE_DATE_EPOCH}`'"' >> version.h
++ @echo '#define LSOF_CCFLAGS ""' >> version.h
+ @echo '#define LSOF_CINFO "${CINFO}"' >> version.h
+ @if [ "X${LSOF_HOST}" = "X" ]; then \
+ echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \
+@@ -90,7 +90,7 @@ version.h: FRC
+ echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \
+ fi \
+ fi
+- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h
++ @echo '#define LSOF_LDFLAGS ""' >> version.h
+ @if [ "X${LSOF_LOGNAME}" = "X" ]; then \
+ echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \
+ else \