From 892fb00bcdb25cc543870844fb09956b3198aa5b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 5 Nov 2021 21:39:58 +0100 Subject: [PATCH] sys-process/lsof: Sync with gentoo It's from gentoo commit 38b155fa1bf907617067c98eb4ba3a5d0790eb1a. --- .../portage-stable/sys-process/lsof/Manifest | 14 +-- .../lsof/files/lsof-4.85-arg.c.patch | 30 ------ .../lsof/files/lsof-4.88-linux.dnode.c.patch | 21 ---- .../lsof/files/lsof-4.94-arm-sigbus-fix.patch | 63 +++++++++++ .../sys-process/lsof/lsof-4.87-r1.ebuild | 97 ----------------- .../sys-process/lsof/lsof-4.88-r1.ebuild | 102 ------------------ .../sys-process/lsof/lsof-4.89.ebuild | 102 ------------------ ...f-4.89-r1.ebuild => lsof-4.94.0-r1.ebuild} | 55 ++++++---- .../sys-process/lsof/metadata.xml | 5 +- 9 files changed, 102 insertions(+), 387 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.85-arg.c.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.94-arm-sigbus-fix.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.87-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.88-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89.ebuild rename sdk_container/src/third_party/portage-stable/sys-process/lsof/{lsof-4.89-r1.ebuild => lsof-4.94.0-r1.ebuild} (66%) diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/Manifest b/sdk_container/src/third_party/portage-stable/sys-process/lsof/Manifest index aad4da117f..dde851268b 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/Manifest @@ -1,13 +1 @@ -AUX lsof-4.85-arg.c.patch 703 SHA256 a517f97ae897dc1d1c7c4e1eeb2fe4a4dab646004c07457709f823e41e57bd43 SHA512 fa0b510e02647ae13515491240f7a2aa169c19f14a3a02ac9735a067ca509613a0aaf00b4f01e8f00a032a6320d15495d876fad3b4903c48df926ef5e8a397df WHIRLPOOL 80ee5f343120caa1ef104d6c0d542357eccf7e14981605cb8f5f82206e17a5f6d25675e3aeeb9c3cfdaa51e8c781aed8273f5e99dab115e0af926cfb0521353f -AUX lsof-4.85-cross.patch 1061 SHA256 3bd94ea0d47e01626c3c6e7bbf4b25245cb221d8700194f01e93e264903abd60 SHA512 9326a2708910a39ba3b81253c21149f8e4fa44b207e4c2a88f86c9322d2b50e6360760fcb13e00f644aba57ad207106c280db00ebc2d1f3d49405b54681548e8 WHIRLPOOL 900bb6f38c83405e9315894af570669d96d2bbcd6240dbf65a78462471ef505ad1d30ee578ef6689d6b4aae4cb2ab212ef7cea3259003a060f5c08d41556e5ab -AUX lsof-4.88-linux.dnode.c.patch 494 SHA256 8c824fe2ac4f4cb492a2d4539e8a921d50e337235c4f42650bade3728487b34b SHA512 253c0b3e3d50f805ffde21ba214e0a56fa554eb98fd126fd3edc4aa0401e24c2fbb72e30288fe8cc371a3f615f5365e6fc753e7dc2aa0a8367f132c7411b28f1 WHIRLPOOL 31aa05df4e7b3a1b0f9c8f37544a2c3d6be3d596a6ef844855cd3e99fb53291ded85e61690e91e274f5edcf805c73e7663723e8c43458d3a70e3abb6689fe2eb -DIST lsof_4.87.tar.bz2 773664 SHA256 dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c SHA512 5e811225dd65366e3ef49628d567864fadda1dbda2d66a5e473123e73c468f5a3a577ae4e1b701a55ac49c2a759dab5c413663121c260a2804fca10ece902766 WHIRLPOOL 4ef01b855dbd8418e1533ebb293c3faacfa38c7a3cd30436d0a8174a974b7cd0eebfb79b23c4c3f13b66a65813a6fbdf5aa483d3f8d2689325fe7d0f48bfb5eb -DIST lsof_4.88.tar.bz2 778563 SHA256 fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b SHA512 acf3901ac08bac5acaa123af835de03fcf86c1cb851a2cba5bb6d08c53dff62570e4129c18ffa241ae84a83d5e6fc5207fb12e43b5ff5a21a0c1967ca117848b WHIRLPOOL 74d85794e5f05920ac83b160b02e510442ebe3f390a8f30bbf514f31bb8ff74ad191f89bed5b3eee47033cc7d6fe01ba4d9d812050d7132e041899d96264076f -DIST lsof_4.89.tar.bz2 784560 SHA256 81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718 SHA512 cafb0209143c7863e5cebe7efc33a2520d36f9e26222350e4edfa18debbcfb5c81f42f71469e5913fb21f49a7562bbe761b72dfc8f297dadf75ac619cdcb318c WHIRLPOOL e269b5bff958461b0f522b9baa64efc64e04cb71a1fa3ca5b17564b9d180fa8984b74238d4769ff5e4d453bc76cb5d9c4652d080b7d26571326fab4b0bbaf4ac -EBUILD lsof-4.87-r1.ebuild 2769 SHA256 5f17b42cadbc3f46e33654f43250447a48c6672e4ed7b0fcfa639a68fbadfdfe SHA512 cc30bc336b5a2b64b08aaede816978b2a47b13023ae831244565f9b38748de7dc1e3fe49056f3de7722708844663483b9d66deea50be35e1ca4ff802ef4cf0af WHIRLPOOL 01b70b64d332ce60c8c7829f4e7445435a53fef9ae5e0082aad7ab3e60cf9abdfdb698c8aaff9d7b58e0bb448d336c1165ea1235d68ba343ba25625ed705d909 -EBUILD lsof-4.88-r1.ebuild 2953 SHA256 d4cd26c48a2a6de9f4819f5a246e1656da76bbffddfb576ff2b8725427a6a7a5 SHA512 b4e9f1061573455157446109c2de45bbe70df003a4e65a95fbfee464031055a894a897d675288995e97c9b4121d47d963861eeaf02884af69a53cf7562d84a2f WHIRLPOOL 275576cb7f4f791341295193e24d3aca4816b399efbab0b43b0e969863459caed03cfafca2af8416fedc60171f70580bda4594a668fd8d5d973017148b9bf816 -EBUILD lsof-4.89-r1.ebuild 3197 SHA256 b2f42d84ab401be7ddb03408c40a945184471f37a40e60a71e0868ee5730e0ad SHA512 7f3352c7be8eb08bd7c099221821bdeaeed5bb42f193573f6aa632f33b5aa7f35e776df20b6816ffc487bc9cbde8ef4c4d6cb4b7a9e4f81b64f3e90967874166 WHIRLPOOL d7ead5ecbd1ac6e100ee85e386373f719f211da5bf7a52a46cbe886dbc4d4a359ac3a087d3b4fecdfc123eb475b822f6e1df302844aebcd50ad0f5fb3b09284c -EBUILD lsof-4.89.ebuild 3000 SHA256 57e5b27a4d5980e128bdc6f03a1093e5a4eb5e802ba629ab17cd51d5e9c227dd SHA512 0907e164414b500623cb5de988b16370345789b4aa77010692691240e0dd5f364d5c5439cad5d9bd1fcf10a1ce10f57fdf7a3fd184f4048947ec10213c0c42f1 WHIRLPOOL 6c0289d010cda96237731bfd2ce26bf31ed5569be97fa680720a904f79650730108c4491d3a8a88861c1877854d5a528e88811ff4cc0e79cfc0c6be24e1fde44 -MISC ChangeLog 4051 SHA256 16f7c274c2e3ea0b505cfd19be491ed6fbb6996d5a09e161d94662cfd60ac62a SHA512 68911b6e5dbee7a6a6b76851b06879e37f8f7652fbcc7636bc8c05b94afec6d28350031256cc8b174ed85dc9c4e4d3fdd94f74b47cd3d7adb4bfa90cb684a383 WHIRLPOOL 8c520e36755344e97cac9467bf11573e854f671928ab6a7d17d7c533dd8cad524b1cddcad2ea431b90b3e2936ef4e38c6b16a412e06f467f8886d95fce2c7dbf -MISC ChangeLog-2015 18846 SHA256 a875bcf3981662398df5ec316a288ccf49ba98b6c17c1d6003c51e0417e5d04e SHA512 8cfbb8f725019d8ee29f9416a5b20e1317fb824984519d80aadca097881f736d4d4d926a1542347d3743988101bac50884a57ac7f38f2f6256732bdb5157797b WHIRLPOOL 3932c65a684c4bdb0a80d106fce6b4c0a2aac96fef5570b7682855a98823f61f0fe678027f317452b03e39fbe3b396b8900e1cf74bfe70d077fb803590c06cd6 -MISC metadata.xml 327 SHA256 be9246f94d3a616b0eed2cfe506c6673aafefb5d2bd85946ec462c2ff3f49494 SHA512 c8c0efc3b339063936d805d533cf3528e1a4e1a84829c0e0f993fd3268751f4d7d4713f45cc6fec2956101b611e6e344e0c0336eb8d1b769a47481d72088fb98 WHIRLPOOL fa94b6d626e8e3d55b5f90ed6a9dbcfdb806cadf43ebdf5086c3dcdf08138f75cf7c14442edd4c5825571a5264d1dc666d4e0c6e242a450f5c8d2424d22416c6 +DIST lsof-4.94.0.tar.gz 1340224 BLAKE2B b3d3c4707dac22c5431ac37c6a9f28ba5057b9a8dce65038934f1148209ef4615012ed887e263ec648679d0d95a06c78ed83a7d76cc8d97c05c013c563938793 SHA512 852b12e621e1dbf71e5f7fd848a200339ca278fbe8c39dcd33f745d1aea4e61552c0f30a3f6469ad9d4b86a9163e677f8c95298159ebd647357734225aa06c0c diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.85-arg.c.patch b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.85-arg.c.patch deleted file mode 100644 index 98838cd772..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.85-arg.c.patch +++ /dev/null @@ -1,30 +0,0 @@ -arg.c.patch Patches: lsof_4.85_src/arg.c - - Importance: major for all dialects supporting - the +|-e option (e.g., Linux) - - Function: this patch corrects a bug in the - accumulation of multiple +|-e - option values - -*** /tmp/T0iAaaeo Thu Oct 20 14:08:43 2011 ---- arg.c Thu Oct 20 14:03:49 2011 -*************** -*** 778,785 **** - ep->pathl = i; - ep->rdlnk = rdlnk; - ep->mp = (struct mounts *)NULL; -! if (!(ep->next = Efsysl)) -! Efsysl = ep; - return(0); - } - #endif /* defined(HASEOPT) */ ---- 778,785 ---- - ep->pathl = i; - ep->rdlnk = rdlnk; - ep->mp = (struct mounts *)NULL; -! ep->next = Efsysl; -! Efsysl = ep; - return(0); - } - #endif /* defined(HASEOPT) */ diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch deleted file mode 100644 index 28640a9e65..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch +++ /dev/null @@ -1,21 +0,0 @@ -ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/patches/4.88/linux.dnode.c.patch - -*** dnode.c ---- lsof_4.88_src/dialects/linux/dnode.c -*************** -*** 580,586 **** - Lf->inp_ty = 1; - - #if defined(HASEPTOPTS) -! if (Lf->ntype == N_FIFO) { - (void) enter_pinfo(); - Lf->sf |= SELPINFO; - } ---- 580,586 ---- - Lf->inp_ty = 1; - - #if defined(HASEPTOPTS) -! if ((Lf->ntype == N_FIFO) && FpipeE) { - (void) enter_pinfo(); - Lf->sf |= SELPINFO; - } diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.94-arm-sigbus-fix.patch b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.94-arm-sigbus-fix.patch new file mode 100644 index 0000000000..95bad20637 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.94-arm-sigbus-fix.patch @@ -0,0 +1,63 @@ +https://bugs.gentoo.org/797358 + +From 21cb1dad1243f4c0a427d893babab12e48b60f0e Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO +Date: Sun, 20 Jun 2021 21:40:55 +0900 +Subject: [PATCH] Adjust alignment of buffer passed to stat() + +Close #160. + +The original code passes char[] buffer to stat(). +This can be cause a SIGBUS. + +#160 reported an actual crash on armv7a + glibc-2.33 platform. +See also https://sourceware.org/bugzilla/show_bug.cgi?id=27993. + +The issue is reported by @10ne1. + +Signed-off-by: Masatake YAMATO +[Adrian: Backported to 4.94] +Signed-off-by: Adrian Ratiu +--- a/misc.c ++++ b/misc.c +@@ -293,7 +293,15 @@ doinchild(fn, fp, rbuf, rbln) + */ + + int r_al, r_rbln; +- char r_arg[MAXPATHLEN+1], r_rbuf[MAXPATHLEN+1]; ++ char r_arg[MAXPATHLEN+1]; ++ union { ++ char r_rbuf[MAXPATHLEN+1]; ++ /* ++ * This field is only for adjusting the alignment of r_rbuf that ++ * can be used as an argument for stat(). ++ */ ++ struct stat _; ++ } r; + int (*r_fn)(); + /* + * Close sufficient open file descriptors except Pipes[0] and +@@ -358,16 +366,16 @@ doinchild(fn, fp, rbuf, rbln) + || read(Pipes[0], r_arg, r_al) != r_al + || read(Pipes[0], (char *)&r_rbln, sizeof(r_rbln)) + != (int)sizeof(r_rbln) +- || r_rbln < 1 || r_rbln > (int)sizeof(r_rbuf)) ++ || r_rbln < 1 || r_rbln > (int)sizeof(r.r_rbuf)) + break; +- zeromem (r_rbuf, r_rbln); +- rv = r_fn(r_arg, r_rbuf, r_rbln); ++ zeromem (r.r_rbuf, r_rbln); ++ rv = r_fn(r_arg, r.r_rbuf, r_rbln); + en = errno; + if (write(Pipes[3], (char *)&rv, sizeof(rv)) + != sizeof(rv) + || write(Pipes[3], (char *)&en, sizeof(en)) + != sizeof(en) +- || write(Pipes[3], r_rbuf, r_rbln) != r_rbln) ++ || write(Pipes[3], r.r_rbuf, r_rbln) != r_rbln) + break; + } + (void) _exit(0); +-- +2.32.0 + diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.87-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.87-r1.ebuild deleted file mode 100644 index ab64ac2000..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.87-r1.ebuild +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="4" - -inherit eutils flag-o-matic toolchain-funcs - -MY_P=${P/-/_} -DESCRIPTION="Lists open files for running Unix processes" -HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" -SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2" - -LICENSE="lsof" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="examples ipv6 rpc selinux static" - -RDEPEND="rpc? ( net-libs/libtirpc ) - selinux? ( sys-libs/libselinux )" -DEPEND="${RDEPEND} - rpc? ( virtual/pkgconfig )" - -S=${WORKDIR}/${MY_P}/${MY_P}_src - -src_unpack() { - unpack ${A} - cd ${MY_P} - unpack ./${MY_P}_src.tar -} - -src_prepare() { - epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 - # convert `test -r header.h` into a compile test - sed -i -r \ - -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ - -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ - Configure || die -} - -target() { - case ${CHOST} in - *-darwin*) echo darwin ;; - *-freebsd*) echo freebsd ;; - *-solaris*) echo solaris ;; - *-aix*) echo aixgcc ;; - *) echo linux ;; - esac -} - -src_configure() { - use static && append-ldflags -static - - append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") - append-cppflags $(usex ipv6 -{D,U}HASIPv6) - - export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ - $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" - - # Set LSOF_INCLUDE to a dummy location so the script doesn't poke - # around in it and mix /usr/include paths with cross-compile/etc. - touch .neverInv - LINUX_HASSELINUX=$(usex selinux y n) \ - LSOF_INCLUDE=${T} \ - LSOF_CC=$(tc-getCC) \ - LSOF_AR="$(tc-getAR) rc" \ - LSOF_RANLIB=$(tc-getRANLIB) \ - LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ - ./Configure -n $(target) || die -} - -src_compile() { - emake DEBUG="" all -} - -src_install() { - dobin lsof - - if use examples ; then - insinto /usr/share/lsof/scripts - doins scripts/* - fi - - doman lsof.8 - dodoc 00* -} - -pkg_postinst() { - if [[ ${CHOST} == *-solaris* ]] ; then - einfo "Note: to use lsof on Solaris you need read permissions on" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" - elif [[ ${CHOST} == *-aix* ]] ; then - einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.88-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.88-r1.ebuild deleted file mode 100644 index f9b4997db8..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.88-r1.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="4" - -inherit eutils flag-o-matic toolchain-funcs - -MY_P=${P/-/_} -DESCRIPTION="Lists open files for running Unix processes" -HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" -SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2" - -LICENSE="lsof" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="examples ipv6 rpc selinux static" - -RDEPEND="rpc? ( net-libs/libtirpc ) - selinux? ( sys-libs/libselinux )" -DEPEND="${RDEPEND} - rpc? ( virtual/pkgconfig )" - -S=${WORKDIR}/${MY_P}/${MY_P}_src - -src_unpack() { - unpack ${A} - cd ${MY_P} - unpack ./${MY_P}_src.tar -} - -src_prepare() { - epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 - epatch "${FILESDIR}"/${P}-linux.dnode.c.patch - # fix POSIX compliance with `echo` - sed -i \ - -e 's:echo -n:printf:' \ - AFSConfig Configure Customize Inventory tests/CkTestDB || die - # convert `test -r header.h` into a compile test - sed -i -r \ - -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ - -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ - Configure || die -} - -target() { - case ${CHOST} in - *-darwin*) echo darwin ;; - *-freebsd*) echo freebsd ;; - *-solaris*) echo solaris ;; - *-aix*) echo aixgcc ;; - *) echo linux ;; - esac -} - -src_configure() { - use static && append-ldflags -static - - append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") - append-cppflags $(usex ipv6 -{D,U}HASIPv6) - - export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ - $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" - - # Set LSOF_INCLUDE to a dummy location so the script doesn't poke - # around in it and mix /usr/include paths with cross-compile/etc. - touch .neverInv - LINUX_HASSELINUX=$(usex selinux y n) \ - LSOF_INCLUDE=${T} \ - LSOF_CC=$(tc-getCC) \ - LSOF_AR="$(tc-getAR) rc" \ - LSOF_RANLIB=$(tc-getRANLIB) \ - LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ - ./Configure -n $(target) || die -} - -src_compile() { - emake DEBUG="" all -} - -src_install() { - dobin lsof - - if use examples ; then - insinto /usr/share/lsof/scripts - doins scripts/* - fi - - doman lsof.8 - dodoc 00* -} - -pkg_postinst() { - if [[ ${CHOST} == *-solaris* ]] ; then - einfo "Note: to use lsof on Solaris you need read permissions on" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" - elif [[ ${CHOST} == *-aix* ]] ; then - einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89.ebuild deleted file mode 100644 index e51ba581bf..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils flag-o-matic toolchain-funcs - -MY_P=${P/-/_} -DESCRIPTION="Lists open files for running Unix processes" -HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" -SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2 - http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2" - -LICENSE="lsof" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="examples ipv6 rpc selinux static" - -RDEPEND="rpc? ( net-libs/libtirpc ) - selinux? ( sys-libs/libselinux )" -DEPEND="${RDEPEND} - rpc? ( virtual/pkgconfig )" - -S=${WORKDIR}/${MY_P}/${MY_P}_src - -src_unpack() { - unpack ${A} - cd ${MY_P} || die - unpack ./${MY_P}_src.tar -} - -src_prepare() { - epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 - # fix POSIX compliance with `echo` - sed -i \ - -e 's:echo -n:printf:' \ - AFSConfig Configure Customize Inventory tests/CkTestDB || die - # convert `test -r header.h` into a compile test - sed -i -r \ - -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ - -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ - Configure || die -} - -target() { - case ${CHOST} in - *-darwin*) echo darwin ;; - *-freebsd*) echo freebsd ;; - *-solaris*) echo solaris ;; - *-aix*) echo aixgcc ;; - *) echo linux ;; - esac -} - -src_configure() { - use static && append-ldflags -static - - append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") - append-cppflags $(usex ipv6 -{D,U}HASIPv6) - - export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ - $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" - - # Set LSOF_INCLUDE to a dummy location so the script doesn't poke - # around in it and mix /usr/include paths with cross-compile/etc. - touch .neverInv - LINUX_HASSELINUX=$(usex selinux y n) \ - LSOF_INCLUDE=${T} \ - LSOF_CC=$(tc-getCC) \ - LSOF_AR="$(tc-getAR) rc" \ - LSOF_RANLIB=$(tc-getRANLIB) \ - LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ - ./Configure -n $(target) || die -} - -src_compile() { - emake DEBUG="" all -} - -src_install() { - dobin lsof - - if use examples ; then - insinto /usr/share/lsof/scripts - doins scripts/* - fi - - doman lsof.8 - dodoc 00* -} - -pkg_postinst() { - if [[ ${CHOST} == *-solaris* ]] ; then - einfo "Note: to use lsof on Solaris you need read permissions on" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" - elif [[ ${CHOST} == *-aix* ]] ; then - einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" - einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.94.0-r1.ebuild similarity index 66% rename from sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.94.0-r1.ebuild index f97df87299..f90987e767 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.89-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.94.0-r1.ebuild @@ -1,37 +1,38 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -inherit eutils flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs -MY_P=${P/-/_} +MY_P="${P/-/_}" DESCRIPTION="Lists open files for running Unix processes" -HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" -SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 - ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2 - http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2" +HOMEPAGE="https://github.com/lsof-org/lsof" +SRC_URI="https://github.com/lsof-org/lsof/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="lsof" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="examples ipv6 rpc selinux static" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples ipv6 rpc selinux" RDEPEND="rpc? ( net-libs/libtirpc ) selinux? ( sys-libs/libselinux )" -DEPEND="${RDEPEND} - rpc? ( virtual/pkgconfig )" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-apps/groff + rpc? ( virtual/pkgconfig ) +" -S=${WORKDIR}/${MY_P}/${MY_P}_src +# needs fixing first +RESTRICT="test" -src_unpack() { - unpack ${A} - cd ${MY_P} || die - unpack ./${MY_P}_src.tar -} +PATCHES=( + "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + "${FILESDIR}"/${PN}-4.94-arm-sigbus-fix.patch +) src_prepare() { - epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + default # fix POSIX compliance with `echo` sed -i \ -e 's:echo -n:printf:' \ @@ -44,6 +45,10 @@ src_prepare() { -e '/test -r/s:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:g' \ -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ Configure || die + + # "create" man-page (bug #689462) + # inspired by shipped "makeman" ksh script + soelim < Lsof.8 > lsof.8 || die } target() { @@ -57,10 +62,18 @@ target() { } src_configure() { - use static && append-ldflags -static - append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") append-cppflags $(usex ipv6 -{D,U}HASIPv6) + [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX + if [[ ${CHOST} == *-darwin* ]] ; then + # make sys/proc_info.h available in ${T} because of LSOF_INCLUDE + # dummy location -- Darwin needs this for a Configure check to + # succeed + if [[ -e /usr/include/sys/proc_info.h ]] ; then + mkdir -p "${T}"/sys || die + ( cd "${T}"/sys && ln -s /usr/include/sys/proc_info.h ) || die + fi + fi export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-process/lsof/metadata.xml index 4f913c0bca..5f1549b947 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/metadata.xml @@ -1,5 +1,5 @@ - + base-system@gentoo.org @@ -8,4 +8,7 @@ support looking up RPC service info + + cpe:/a:lsof_project:lsof +