From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4F28D138E3F for ; Fri, 21 Feb 2014 21:01:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22CD8E0EE4; Fri, 21 Feb 2014 21:01:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4D98FE0EE1 for ; Fri, 21 Feb 2014 21:01:35 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1E1E0335E31 for ; Fri, 21 Feb 2014 21:01:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id CCDFF18874 for ; Fri, 21 Feb 2014 21:01:32 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1393014238.f28c91a01b2104286a53b239db475081e44856e5.blueness@gentoo> Subject: [gentoo-commits] proj/hardened-dev:musl commit in: sys-process/lsof/, sys-process/lsof/files/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-process/lsof/files/lsof-4.85-arg.c.patch sys-process/lsof/files/lsof-4.85-cross.patch sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch sys-process/lsof/lsof-4.85-r99.ebuild sys-process/lsof/metadata.xml X-VCS-Directories: sys-process/lsof/ sys-process/lsof/files/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: f28c91a01b2104286a53b239db475081e44856e5 X-VCS-Branch: musl Date: Fri, 21 Feb 2014 21:01:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f5118c8f-6a66-4562-bb33-23bdefcb02e2 X-Archives-Hash: eba7219b79209d43bfa8a1a147636ba4 commit: f28c91a01b2104286a53b239db475081e44856e5 Author: layman localhost> AuthorDate: Fri Feb 21 20:23:58 2014 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Feb 21 20:23:58 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=f28c91a0 sys-process/lsof: add missing include Package-Manager: portage-2.2.7 RepoMan-Options: --force --- sys-process/lsof/files/lsof-4.85-arg.c.patch | 30 ++++++++ sys-process/lsof/files/lsof-4.85-cross.patch | 33 +++++++++ .../lsof-4.85-fix-missing-netinet_tcp_h.patch | 11 +++ sys-process/lsof/lsof-4.85-r99.ebuild | 81 ++++++++++++++++++++++ sys-process/lsof/metadata.xml | 8 +++ 5 files changed, 163 insertions(+) diff --git a/sys-process/lsof/files/lsof-4.85-arg.c.patch b/sys-process/lsof/files/lsof-4.85-arg.c.patch new file mode 100644 index 0000000..98838cd --- /dev/null +++ b/sys-process/lsof/files/lsof-4.85-arg.c.patch @@ -0,0 +1,30 @@ +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/sys-process/lsof/files/lsof-4.85-cross.patch b/sys-process/lsof/files/lsof-4.85-cross.patch new file mode 100644 index 0000000..186c6d8 --- /dev/null +++ b/sys-process/lsof/files/lsof-4.85-cross.patch @@ -0,0 +1,33 @@ +let the preprocessor work its magic rather than executing the code + +https://bugs.gentoo.org/432120 + +--- a/Configure ++++ b/Configure +@@ -2730,20 +2730,17 @@ LOCKF_OWNER4 + rm -f ${LSOF_TMPC}.* + cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1 + #include +-main() { ++#undef XXX + #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +-printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__); ++XXX: __GLIBC__ * 100 + __GLIBC_MINOR__ + #elif defined(__GLIBC__) +-printf("-DGLIBCV=%d00\n",__GLIBC__); +-#else +-printf("\n"); ++XXX: __GLIBC__ * 100 + #endif +-return(0); } + .LSOF_END_HERE_DOC1 +- $LINUX_CONF_CC ${LSOF_TMPC}.c -I$LSOF_INCLUDE -o ${LSOF_TMPC}.x > /dev/null 2>&1 ++ $LINUX_CONF_CC ${LSOF_TMPC}.c -E -I$LSOF_INCLUDE 2>/dev/null | sed -n '/^XXX:/s|.*:||p' > ${LSOF_TMPC}.x +- if test -x ${LSOF_TMPC}.x # { ++ if test -s ${LSOF_TMPC}.x # { + then +- LINUX_CLIB=`${LSOF_TMPC}.x` ++ LINUX_CLIB="-DGLIBCV=$(( `cat ${LSOF_TMPC}.x` ))" + LSOF_TMP=$? + else + LINUX_CLIB="" diff --git a/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch b/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch new file mode 100644 index 0000000..919c7ae --- /dev/null +++ b/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch @@ -0,0 +1,11 @@ +diff -Naur lsof_4.85.orig/lsof_4.85_src/lsof.h lsof_4.85/lsof_4.85_src/lsof.h +--- lsof_4.85.orig/lsof_4.85_src/lsof.h 2011-09-07 19:14:10.000000000 +0000 ++++ lsof_4.85/lsof_4.85_src/lsof.h 2014-02-21 19:31:43.322452780 +0000 +@@ -53,6 +53,7 @@ + #include + # endif /* defined(HASSETLOCALE) */ + ++#include + #include + #include + #include diff --git a/sys-process/lsof/lsof-4.85-r99.ebuild b/sys-process/lsof/lsof-4.85-r99.ebuild new file mode 100644 index 0000000..4fdb585 --- /dev/null +++ b/sys-process/lsof/lsof-4.85-r99.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.12 2014/01/20 06:40:56 vapier Exp $ + +EAPI="2" + +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://vic.cc.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 + ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/${MY_P}.tar.bz2" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="amd64 arm x86" +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}"/${P}-fix-missing-netinet_tcp_h.patch #for musl + epatch "${FILESDIR}"/${P}-arg.c.patch #388555 + 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() { usex kernel_FreeBSD freebsd linux ; } +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 || die +} + +src_install() { + dobin lsof || die + + if use examples ; then + insinto /usr/share/lsof/scripts + doins scripts/* || die + fi + + doman lsof.8 || die + dodoc 00* +} diff --git a/sys-process/lsof/metadata.xml b/sys-process/lsof/metadata.xml new file mode 100644 index 0000000..49fb858 --- /dev/null +++ b/sys-process/lsof/metadata.xml @@ -0,0 +1,8 @@ + + + +base-system + + support looking up RPC service info + +