From 5680ba2ca5c00f924905dc9c56a61cfde3532e8f Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 4 Oct 2022 11:51:06 +0100 Subject: lsof: upgrade 4.95.0 -> 4.96.3 (From OE-Core rev: 4eeb2f21155e43af165fa286702f9eb2ebab4343) Signed-off-by: Ross Burton Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- .../lsof/files/lsof-remove-host-information.patch | 75 ------------------- .../lsof/files/remove-host-information.patch | 87 ++++++++++++++++++++++ meta/recipes-extended/lsof/lsof_4.95.0.bb | 46 ------------ meta/recipes-extended/lsof/lsof_4.96.3.bb | 39 ++++++++++ 4 files changed, 126 insertions(+), 121 deletions(-) delete mode 100644 meta/recipes-extended/lsof/files/lsof-remove-host-information.patch create mode 100644 meta/recipes-extended/lsof/files/remove-host-information.patch delete mode 100644 meta/recipes-extended/lsof/lsof_4.95.0.bb create mode 100644 meta/recipes-extended/lsof/lsof_4.96.3.bb diff --git a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch deleted file mode 100644 index 08f083cf83..0000000000 --- a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 4233b5ac1629c225a7a80f33efc0eff527a95851 Mon Sep 17 00:00:00 2001 -From: Li Wang -Date: Wed, 30 Aug 2017 15:05:16 +0800 -Subject: [PATCH] Remove host information from version.h - -make lsof not include host information - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Li Wang - ---- - dialects/linux/Makefile | 48 +++++++---------------------------------- - 1 file changed, 8 insertions(+), 40 deletions(-) - -diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile -index 46c83c2..50f03cc 100644 ---- a/dialects/linux/Makefile -+++ b/dialects/linux/Makefile -@@ -84,47 +84,15 @@ version.h: FRC - @echo Constructing version.h - @rm -f version.h - @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_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h -+ @echo '#define LSOF_CC ""' >> version.h -+ @echo '#define LSOF_CCV ""' >> 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; \ -- else \ -- if [ "${LSOF_HOST}" = "none" ]; then \ -- echo '#define LSOF_HOST ""' >> version.h; \ -- else \ -- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \ -- fi \ -- fi -- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h -- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \ -- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \ -- else \ -- if [ "${LSOF_LOGNAME}" = "none" ]; then \ -- echo '#define LSOF_LOGNAME ""' >> version.h; \ -- else \ -- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \ -- fi; \ -- fi -- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \ -- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \ -- else \ -- if [ "${LSOF_SYSINFO}" = "none" ]; then \ -- echo '#define LSOF_SYSINFO ""' >> version.h; \ -- else \ -- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \ -- fi \ -- fi -- @if [ "X${LSOF_USER}" = "X" ]; then \ -- echo '#define LSOF_USER "${USER}"' >> version.h; \ -- else \ -- if [ "${LSOF_USER}" = "none" ]; then \ -- echo '#define LSOF_USER ""' >> version.h; \ -- else \ -- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \ -- fi \ -- fi -+ @echo '#define LSOF_HOST ""' >> version.h; -+ @echo '#define LSOF_LDFLAGS ""' >> version.h -+ @echo '#define LSOF_LOGNAME ""' >> version.h; -+ @echo '#define LSOF_SYSINFO ""' >> version.h; -+ @echo '#define LSOF_USER ""' >> version.h; - @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h - - FRC: diff --git a/meta/recipes-extended/lsof/files/remove-host-information.patch b/meta/recipes-extended/lsof/files/remove-host-information.patch new file mode 100644 index 0000000000..fb90366ffa --- /dev/null +++ b/meta/recipes-extended/lsof/files/remove-host-information.patch @@ -0,0 +1,87 @@ +lsof doesn't embed the username or hostname in the build if SOURCE_DATE_EPOCH is +defined, but this still embeds build paths. Delete all of the host details to +ensure that no host information is leaked into the binary. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile +index 176a4c2..ef5a633 100644 +--- a/dialects/linux/Makefile ++++ b/dialects/linux/Makefile +@@ -83,64 +83,17 @@ ${LIB}: FRC + version.h: FRC + @echo Constructing version.h + @rm -f version.h +- @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_CCFLAGS "'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h +- @echo '#define LSOF_CINFO "${CINFO}"' >> version.h +- @if [ "X${LSOF_HOST}" = "X" ]; then \ +- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \ +- echo '#define LSOF_HOST "'`uname -n`'"' >> version.h; \ +- else \ +- echo '#define LSOF_HOST ""' >> version.h; \ +- fi \ +- else \ +- if [ "${LSOF_HOST}" = "none" ]; then \ +- echo '#define LSOF_HOST ""' >> version.h; \ +- else \ +- echo '#define LSOF_HOST "${LSOF_HOST}"' >> version.h; \ +- fi \ +- fi +- @echo '#define LSOF_LDFLAGS "${CFGL}"' >> version.h +- @if [ "X${LSOF_LOGNAME}" = "X" ]; then \ +- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \ +- echo '#define LSOF_LOGNAME "${LOGNAME}"' >> version.h; \ +- else \ +- echo '#define LSOF_LOGNAME ""' >> version.h; \ +- fi \ +- else \ +- if [ "${LSOF_LOGNAME}" = "none" ]; then \ +- echo '#define LSOF_LOGNAME ""' >> version.h; \ +- else \ +- echo '#define LSOF_LOGNAME "${LSOF_LOGNAME}"' >> version.h; \ +- fi; \ +- fi +- @if [ "X${LSOF_SYSINFO}" = "X" ]; then \ +- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \ +- echo '#define LSOF_SYSINFO "'`uname -a`'"' >> version.h; \ +- else \ +- echo '#define LSOF_SYSINFO ""' >> version.h; \ +- fi \ +- else \ +- if [ "${LSOF_SYSINFO}" = "none" ]; then \ +- echo '#define LSOF_SYSINFO ""' >> version.h; \ +- else \ +- echo '#define LSOF_SYSINFO "${LSOF_SYSINFO}"' >> version.h; \ +- fi \ +- fi +- @if [ "X${LSOF_USER}" = "X" ]; then \ +- if [ "X${SOURCE_DATE_EPOCH}" = "X" ]; then \ +- echo '#define LSOF_USER "${USER}"' >> version.h; \ +- else \ +- echo '#define LSOF_USER ""' >> version.h; \ +- fi \ +- else \ +- if [ "${LSOF_USER}" = "none" ]; then \ +- echo '#define LSOF_USER ""' >> version.h; \ +- else \ +- echo '#define LSOF_USER "${LSOF_USER}"' >> version.h; \ +- fi \ +- fi ++ ++ @echo '#define LSOF_BLDCMT ""' > version.h; ++ @echo '#define LSOF_CC ""' >> version.h ++ @echo '#define LSOF_CCV ""' >> version.h ++ @echo '#define LSOF_CCFLAGS ""' >> version.h ++ @echo '#define LSOF_CINFO ""' >> version.h ++ @echo '#define LSOF_HOST ""' >> version.h ++ @echo '#define LSOF_LDFLAGS ""' >> version.h ++ @echo '#define LSOF_LOGNAME ""' >> version.h ++ @echo '#define LSOF_SYSINFO ""' >> version.h ++ @echo '#define LSOF_USER ""' >> version.h + @sed '/VN/s/.ds VN \(.*\)/#define LSOF_VERSION "\1"/' < version >> version.h + + FRC: diff --git a/meta/recipes-extended/lsof/lsof_4.95.0.bb b/meta/recipes-extended/lsof/lsof_4.95.0.bb deleted file mode 100644 index f380de0b6b..0000000000 --- a/meta/recipes-extended/lsof/lsof_4.95.0.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "LiSt Open Files tool" -DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ -Its name stands for LiSt Open Files, and it does just that." -HOMEPAGE = "http://people.freebsd.org/~abe/" -SECTION = "devel" -LICENSE = "Spencer-94" -LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" - -# Upstream lsof releases are hosted on an ftp server which times out download -# attempts from hosts for which it can not perform a DNS reverse-lookup (See: -# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be -# the most commonly used alternative. - -SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \ - file://lsof-remove-host-information.patch \ - " - -SRCREV = "67d8c828e7bdc01ba93f8ff79765dd424da0c9d7" - -S = "${WORKDIR}/git" - -export LSOF_INCLUDE = "${STAGING_INCDIR}" - -do_configure () { - export LSOF_AR="${AR} cr" - export LSOF_RANLIB="${RANLIB}" - if [ "x${GLIBCVERSION}" != "x" ]; then - LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` - LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" - export LINUX_CLIB - fi - yes | ./Configure linux -} - -export I = "${STAGING_INCDIR}" -export L = "${STAGING_INCDIR}" - -do_compile () { - oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' -} - -do_install () { - install -d ${D}${sbindir} ${D}${mandir}/man8 - install -m 0755 lsof ${D}${sbindir}/lsof - install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8 -} diff --git a/meta/recipes-extended/lsof/lsof_4.96.3.bb b/meta/recipes-extended/lsof/lsof_4.96.3.bb new file mode 100644 index 0000000000..c32fcd5583 --- /dev/null +++ b/meta/recipes-extended/lsof/lsof_4.96.3.bb @@ -0,0 +1,39 @@ +SUMMARY = "LiSt Open Files tool" +DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \ +Its name stands for LiSt Open Files, and it does just that." +HOMEPAGE = "http://people.freebsd.org/~abe/" +SECTION = "devel" +LICENSE = "Spencer-94" +LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a" + +SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \ + file://remove-host-information.patch" +SRCREV = "eec10fac8f57544e26ff00bf41a2dc09c56049bf" + +S = "${WORKDIR}/git" + +export LSOF_INCLUDE = "${STAGING_INCDIR}" + +do_configure () { + export LSOF_AR="${AR} cr" + export LSOF_RANLIB="${RANLIB}" + if [ "x${GLIBCVERSION}" != "x" ]; then + LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'` + LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}" + export LINUX_CLIB + fi + yes | ./Configure linux +} + +export I = "${STAGING_INCDIR}" +export L = "${STAGING_INCDIR}" + +do_compile () { + oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}' +} + +do_install () { + install -d ${D}${sbindir} ${D}${mandir}/man8 + install -m 0755 lsof ${D}${sbindir}/lsof + install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8 +} -- cgit v1.2.3-54-g00ecf