public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/lsof/files/, sys-process/lsof/
Date: Wed, 19 Jul 2023 22:45:36 +0000 (UTC)	[thread overview]
Message-ID: <1689806548.1e505057e5ec18ae8b98d22d9cf1955ce0a46fad.sam@gentoo> (raw)

commit:     1e505057e5ec18ae8b98d22d9cf1955ce0a46fad
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 22:42:28 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 22:42:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e505057

sys-process/lsof: backport strftime fix

Closes: https://bugs.gentoo.org/910547
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../lsof-4.98.0-fix-common-include-strftime.patch  | 28 +++++++++++
 sys-process/lsof/lsof-4.98.0-r1.ebuild             | 58 ++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/sys-process/lsof/files/lsof-4.98.0-fix-common-include-strftime.patch b/sys-process/lsof/files/lsof-4.98.0-fix-common-include-strftime.patch
new file mode 100644
index 000000000000..4b22dbfb8a02
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.98.0-fix-common-include-strftime.patch
@@ -0,0 +1,28 @@
+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>

diff --git a/sys-process/lsof/lsof-4.98.0-r1.ebuild b/sys-process/lsof/lsof-4.98.0-r1.ebuild
new file mode 100644
index 000000000000..aef7b5fff4a8
--- /dev/null
+++ b/sys-process/lsof/lsof-4.98.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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 ~ia64 ~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
+)
+
+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
+}


             reply	other threads:[~2023-07-19 22:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 22:45 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-06-10 10:25 [gentoo-commits] repo/gentoo:master commit in: sys-process/lsof/files/, sys-process/lsof/ Sam James
2022-09-12 18:04 Sam James
2022-06-21  9:41 David Seifert
2022-04-28  1:34 Sam James
2021-06-21 13:27 Sam James
2020-07-03  6:13 Lars Wendler
2018-02-16 10:33 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1689806548.1e505057e5ec18ae8b98d22d9cf1955ce0a46fad.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox