sys-process/lsof: Sync with Gentoo

It's from Gentoo commit df317cda2e580cafb8b1667644186b3a22ea305b.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
Flatcar Buildbot 2025-07-21 07:18:34 +00:00 committed by Mathieu Tortuyaux
parent 55dbfc42e8
commit b74da34b96
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
6 changed files with 3 additions and 192 deletions

View File

@ -1,4 +1,2 @@
DIST lsof-4.98.0.tar.gz 734232 BLAKE2B 2f4ba4d179e8061e5bcff7dda4a0981616530bd5577fc73904e2699e6e982efee9e4270d3f2d3c68751d73cb98bfed0fd49d4c6bd967d15b4e06dcb72494d024 SHA512 6fde12497ce9cbba698be624b45e8392d551626c3e46b50ec23e661b322438ef7162dbac0d06829d56f074c7d934fa1ca98aa50ee1487125c93bebfe8eb2a2e8
DIST lsof-4.99.0.tar.gz 1127302 BLAKE2B 257f84e01b9530ab3a6c637c13c8e84c2562fa3ecd9048f93e2816bbed36ffd529311bc1424a41cde72383642decbd6f44e680bfdd2594bbae5908b07c466165 SHA512 6fe3039f1167fb3023a7f358dda2b4ea6eace1e50a97d0168af494217581eef73cc1742f544d2fb9f85ded8370c86e63d48104da899396de7b3007997a201825
DIST lsof-4.99.3.tar.gz 1131470 BLAKE2B f2f298d8fe3f03b192984a31bd6b368e08c3ae5b8776625df413b94a0db59258e8aadb8ab4b94b9a3a54803fab463c1b920b524ee0ff512c8cda4b88e89b4c50 SHA512 83f62f62fa273becfdded4e553d398bafebf0186c7f8ac86a800dabf63ef0614c3c546b6dcd6d13f30c97ab33088a82e1e6b66cc8ed61f700c54487cab19d009
DIST lsof-4.99.4.tar.gz 1128285 BLAKE2B aa8e062f782f3e94688e725f963cc4a907abd49e1b78813ea3639afc284efb0946efd7f14f918f8792e253fb7bfceb6c3d258b84660d2af015a218d7cba16eb7 SHA512 5b04e2d8f26e6f76bcdb3e1282fbe71bb1b9379c76ffd88b05731920d5175595b0d4dbfd41a7ace1bfb4d21fcc7ebc641372af76c24ccb01bc3f5d7149ea4fa3 DIST lsof-4.99.4.tar.gz 1128285 BLAKE2B aa8e062f782f3e94688e725f963cc4a907abd49e1b78813ea3639afc284efb0946efd7f14f918f8792e253fb7bfceb6c3d258b84660d2af015a218d7cba16eb7 SHA512 5b04e2d8f26e6f76bcdb3e1282fbe71bb1b9379c76ffd88b05731920d5175595b0d4dbfd41a7ace1bfb4d21fcc7ebc641372af76c24ccb01bc3f5d7149ea4fa3
DIST lsof-4.99.5.tar.gz 1139280 BLAKE2B 2f11990956b64b5777721f669b231e8f2a520f4535cd3d6023a3d8563c65c83598a4b52c887a2c1c742d12b2f92f724a33873bf460a5fb52255d1622436b1d44 SHA512 1584804fd98f6d416dd1b334832a306abb8e557185523ba255032c3e33fdc472ce4912c50ef70a0ed5e33194ebc4d4853ed7a9baa40c327223614de209c60f13

View File

@ -1,15 +0,0 @@
https://bugs.gentoo.org/919253
https://github.com/lsof-org/lsof/issues/305
Ignore HIP or CUDA versions in clang, when checking for compiler version
--- a/configure.ac
+++ b/configure.ac
@@ -410,7 +410,7 @@ AC_CONFIG_FILES([Makefile])
# Pass build configurations to version.h.in
AC_SUBST(cc, $CC)
-AC_SUBST(ccv, $($CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'))
+AC_SUBST(ccv, $($CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p;q'))
AC_SUBST(ccflags, $CFLAGS)
AC_SUBST(ldflags, "$LDFLAGS$LIBS")
# Reproducible build

View File

@ -1,28 +0,0 @@
https://bugs.gentoo.org/910547
https://github.com/lsof-org/lsof/commit/437824cf35daf5a505bed5b619bef95af090ecc4
From 437824cf35daf5a505bed5b619bef95af090ecc4 Mon Sep 17 00:00:00 2001
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
Date: Wed, 19 Jul 2023 15:23:13 +0200
Subject: [PATCH] src/util.c add proper includes (#294)
* src/util.c add proper includes
Fixes #293 for lsof-org/lsof
Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
---------
Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
Co-authored-by: Jiajie Chen <c@jia.je>
--- a/util.c
+++ b/util.c
@@ -35,6 +35,7 @@
* 4. This notice may not be removed or altered.
*/
+#include "lsof.h"
#if defined(HAS_STRFTIME)
#include <time.h>

View File

@ -1,66 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic
MY_P="${P/-/_}"
DESCRIPTION="Lists open files for running Unix processes"
HOMEPAGE="https://github.com/lsof-org/lsof"
SRC_URI="https://github.com/lsof-org/lsof/releases/download/${PV}/${P}.tar.gz"
LICENSE="lsof"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="rpc selinux"
RDEPEND="
rpc? ( net-libs/libtirpc )
selinux? ( sys-libs/libselinux )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-apps/groff
rpc? ( virtual/pkgconfig )
"
# Needs fixing first for sandbox
RESTRICT="test"
PATCHES=(
"${FILESDIR}"/${P}-fix-common-include-strftime.patch
"${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch
)
# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3
# https://github.com/lsof-org/lsof/pull/306
src_prepare() {
default
eautoreconf
}
src_configure() {
# TODO: drop after 4.98.0: https://github.com/lsof-org/lsof/commit/4fbe0b78f63ce115f25cf7a49756745e3bf47fea
export ac_cv_header_selinux_selinux_h=$(usex selinux)
# TODO: drop after 4.98.0: https://github.com/lsof-org/lsof/commit/22d9cedfca4672601f35f7683907373cd5124121
[[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX
local myeconfargs=(
$(use_with rpc libtirpc)
)
econf "${myeconfargs[@]}"
}
src_compile() {
emake DEBUG="" all
}
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"
fi
}

View File

@ -1,65 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
MY_P="${P/-/_}"
DESCRIPTION="Lists open files for running Unix processes"
HOMEPAGE="https://github.com/lsof-org/lsof"
SRC_URI="https://github.com/lsof-org/lsof/releases/download/${PV}/${P}.tar.gz"
LICENSE="lsof"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="rpc selinux"
RDEPEND="
rpc? ( net-libs/libtirpc )
selinux? ( sys-libs/libselinux )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-apps/groff
rpc? ( virtual/pkgconfig )
"
# Needs fixing first for sandbox
RESTRICT="test"
PATCHES=(
"${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch
)
# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3
# https://github.com/lsof-org/lsof/pull/306
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with rpc libtirpc)
$(use_with selinux)
)
econf "${myeconfargs[@]}"
}
src_compile() {
emake DEBUG="" all
}
src_install() {
default
find "${ED}" -name '*.la' -delete || die
}
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"
fi
}

View File

@ -1,10 +1,8 @@
# Copyright 1999-2024 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
inherit autotools
MY_P="${P/-/_}" MY_P="${P/-/_}"
DESCRIPTION="Lists open files for running Unix processes" DESCRIPTION="Lists open files for running Unix processes"
HOMEPAGE="https://github.com/lsof-org/lsof" HOMEPAGE="https://github.com/lsof-org/lsof"
@ -12,7 +10,7 @@ SRC_URI="https://github.com/lsof-org/lsof/releases/download/${PV}/${P}.tar.gz"
LICENSE="lsof" LICENSE="lsof"
SLOT="0" SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="rpc selinux" IUSE="rpc selinux"
RDEPEND=" RDEPEND="
@ -28,17 +26,6 @@ BDEPEND="
# Needs fixing first for sandbox # Needs fixing first for sandbox
RESTRICT="test" RESTRICT="test"
PATCHES=(
"${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch
)
# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3
# https://github.com/lsof-org/lsof/pull/306
src_prepare() {
default
eautoreconf
}
src_configure() { src_configure() {
local myeconfargs=( local myeconfargs=(
$(use_with rpc libtirpc) $(use_with rpc libtirpc)