public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
@ 2015-11-03 15:08 Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2015-11-03 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     426002bfe2789fb6213fba832c8bfee634d68d02
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  3 15:02:36 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Nov  3 15:08:07 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=426002bf

sys-apps/xinetd: add fix from Fedora for CVE-2013-4342 #488158

 sys-apps/xinetd/files/xinetd-2.3.15-creds.patch | 17 ++++++++
 sys-apps/xinetd/xinetd-2.3.15-r2.ebuild         | 55 +++++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
new file mode 100644
index 0000000..39df3ca
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/488158
+
+taken from Fedora
+
+Patch by Thomas Swan <thomas.swan@gmail.com>
+
+--- a/xinetd/builtins.c
++++ b/xinetd/builtins.c
+@@ -695,7 +695,7 @@ static void tcpmux_handler( const struct server *serp )
+    if( SC_IS_INTERNAL( scp ) ) {
+       SC_INTERNAL(scp, nserp);
+    } else {
+-      exec_server(nserp);
++      child_process(nserp);
+    }
+ }
+ 

diff --git a/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
new file mode 100644
index 0000000..edd9a74
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+	rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+	perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+	virtual/pkgconfig"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+	epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+	epatch "${FILESDIR}"/${PN}-2.3.14-config.patch
+	epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+	find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+	if ! use rpc ; then
+		append-cppflags -DNO_RPC
+		export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+	fi
+	tc-export AR PKG_CONFIG
+	LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+	econf \
+		$(use_with tcpd libwrap) \
+		--with-loadavg
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install install-contrib
+	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+	newconfd "${FILESDIR}"/xinetd.confd xinetd
+	systemd_dounit "${FILESDIR}/${PN}.service"
+
+	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+	dodoc AUDIT INSTALL README TODO CHANGELOG
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
@ 2015-12-23 20:44 Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2015-12-23 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     b87c18c6676bdd262e676eacbc65352e5404bb07
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 20:43:18 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec 23 20:44:44 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b87c18c6

sys-apps/xinetd: default to clearing active env

It's rare that we want the active shell environment to be passed down
to xinetd services, so default to clearing things.  If a service wants
an env var to be set, they can do so explicitly.

 sys-apps/xinetd/files/xinetd-2.3.15-config.patch | 22 ++++++++++
 sys-apps/xinetd/xinetd-2.3.15-r3.ebuild          | 55 ++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-config.patch b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
new file mode 100644
index 0000000..b362a97
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15-config.patch
@@ -0,0 +1,22 @@
+set up some secure defaults:
+ - services can only be accessed from localhost
+ - sanitize the runtime environment (so root's shell vars don't bleed through)
+
+--- contrib/xinetd.conf
++++ contrib/xinetd.conf
+@@ -22,5 +22,5 @@
+ #
+ #	no_access	=
+-#	only_from	=
++	only_from	= localhost
+ #	max_load	= 0
+ 	cps		= 50 10
+@@ -35,7 +35,7 @@ defaults
+ 
+ # setup environmental attributes
+ #
+-#	passenv		=
++	passenv		=
+ 	groups		= yes
+ 	umask		= 002
+ 

diff --git a/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
new file mode 100644
index 0000000..7e46776
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="http://www.xinetd.org/ https://github.com/xinetd-org/xinetd"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="perl rpc tcpd"
+
+DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+	rpc? ( net-libs/libtirpc:= )"
+RDEPEND="${DEPEND}
+	perl? ( dev-lang/perl )"
+DEPEND="${DEPEND}
+	virtual/pkgconfig"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
+	epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
+	epatch "${FILESDIR}"/${PN}-2.3.15-config.patch
+	epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
+	find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
+}
+
+src_configure() {
+	if ! use rpc ; then
+		append-cppflags -DNO_RPC
+		export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
+	fi
+	tc-export AR PKG_CONFIG
+	LIBS=$(${PKG_CONFIG} --libs libtirpc) \
+	econf \
+		$(use_with tcpd libwrap) \
+		--with-loadavg
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install install-contrib
+	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+	newconfd "${FILESDIR}"/xinetd.confd xinetd
+	systemd_dounit "${FILESDIR}/${PN}.service"
+
+	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+	dodoc AUDIT INSTALL README TODO CHANGELOG
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
@ 2018-06-19  6:06 Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2018-06-19  6:06 UTC (permalink / raw
  To: gentoo-commits

commit:     aff3934b17388d503099592e1d9c9eae106fe886
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 19 06:05:17 2018 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jun 19 06:06:41 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aff3934b

sys-apps/xinetd: restore USE=rpc support #651838

Closes: https://bugs.gentoo.org/651838

 sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch | 50 ++++++++++++++++++
 .../files/xinetd-2.3.15.3-rpc-configure.patch      | 57 ++++++++++++++++++++
 sys-apps/xinetd/xinetd-2.3.15.3-r1.ebuild          | 60 ++++++++++++++++++++++
 3 files changed, 167 insertions(+)

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch b/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch
new file mode 100644
index 00000000000..3bd995a0892
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch
@@ -0,0 +1,50 @@
+https://github.com/openSUSE/xinetd/pull/8
+
+From 4278495b1858b5b1ce94d72bd619eb79aab8ca04 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Jun 2018 18:49:38 -0400
+Subject: [PATCH] fix no-rpc builds
+
+The code base already has support for -DNO_RPC, so fix the breakage
+introduced by commit 56520dcc88c35113877c8f4f52bd98ad95b44653.
+---
+ src/confparse.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/confparse.c b/src/confparse.c
+index 5b149dd03808..7965cc405f24 100644
+--- a/src/confparse.c
++++ b/src/confparse.c
+@@ -13,10 +13,12 @@
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifndef NO_RPC
+ #include <rpc/rpc.h>
+ #ifdef HAVE_RPCENT_H
+ #include <rpc/rpcent.h>
+ #endif
++#endif
+ #include <netdb.h>
+ 
+ #include "str.h"
+@@ -730,7 +732,7 @@ static status_e check_entry( struct service_config *scp,
+ 	   }
+    }
+ 
+-/* #ifndef NO_RPC */
++#ifndef NO_RPC
+    if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
+    {
+       struct rpcent *rep = (struct rpcent *)getrpcbyname( SC_NAME(scp) ) ;
+@@ -743,6 +745,7 @@ static status_e check_entry( struct service_config *scp,
+       SC_RPCDATA( scp )->rd_program_number = rep->r_number ;
+    }
+    else
++#endif
+    {
+        if ( !SC_IS_UNLISTED( scp ) ) 
+        { 
+-- 
+2.16.1
+

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch b/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch
new file mode 100644
index 00000000000..682dece1b2b
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch
@@ -0,0 +1,57 @@
+From 928d69309592704892d124b1f8de9111164c3793 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Jun 2018 22:11:21 -0400
+Subject: [PATCH] configure: add a --without-rpc flag
+
+The build already supports NO_RPC to disable all RPC logic.  Turn it
+into a proper configure flag so people don't have to hack it up.
+---
+ configure.ac | 25 ++++++++++++++++++++-----
+ 1 file changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8d0b562ddaac..75ae7fb472dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,11 +37,6 @@ AC_CHECK_LIB([m], [log10], [
+ 	AC_MSG_ERROR([Unable to find working libm.so])
+ ])
+ AC_SUBST([LIBM_LIBS])
+-PKG_CHECK_MODULES([TIRPC],[libtirpc], [
+-	AC_DEFINE([HAVE_RPCENT_H], [1], [Have <rpc/rpcent.h>.])
+-], [
+-	AC_MSG_WARN([Libtirpc not found, will not use <rpc/rpcent.h>])
+-])
+ 
+ # ======================================
+ # Check for various headers and settings
+@@ -112,6 +107,26 @@ AS_IF([test x"$with_labeled_networking" != "xno"], [
+     ])
+ ])
+ 
++AC_ARG_WITH([rpc],
++    [AS_HELP_STRING([--without-rpc], [Do not include RPC support])],
++    [with_rpc="$withval"],
++    [with_rpc="auto"]
++)
++AS_IF([test x"$with_rpc" != "xno"], [
++    PKG_CHECK_MODULES([TIRPC],[libtirpc], [
++        AC_DEFINE([HAVE_RPCENT_H], [1], [Have <rpc/rpcent.h>.])
++    ], [
++        AS_IF([test x"$with_rpc" = "xyes"], [
++            AC_MSG_ERROR([RPC support requested but not found])
++        ])
++        with_rpc="no"
++        AC_MSG_WARN([Libtirpc not found, will not use <rpc/rpcent.h>])
++    ])
++])
++AS_IF([test x"$with_rpc" = "xno"], [
++    AC_DEFINE([NO_RPC], [1], [Omit RPC support.])
++])
++
+ # =========
+ # Hardening
+ # =========
+-- 
+2.16.1
+

diff --git a/sys-apps/xinetd/xinetd-2.3.15.3-r1.ebuild b/sys-apps/xinetd/xinetd-2.3.15.3-r1.ebuild
new file mode 100644
index 00000000000..080798648ff
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15.3-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit flag-o-matic systemd toolchain-funcs autotools
+
+DESCRIPTION="powerful replacement for inetd"
+HOMEPAGE="https://github.com/xinetd-org/xinetd https://github.com/openSUSE/xinetd"
+SRC_URI="https://github.com/openSUSE/xinetd/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="perl rpc selinux tcpd"
+
+DEPEND="
+	rpc? ( net-libs/libtirpc:= )
+	selinux? ( sys-libs/libselinux )
+	tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+"
+RDEPEND="
+	${DEPEND}
+	perl? ( dev-lang/perl )
+"
+DEPEND="
+	${DEPEND}
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-no-rpc.patch #651838
+	"${FILESDIR}"/${P}-rpc-configure.patch #651838
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_with tcpd libwrap) \
+		$(use_with selinux labeled-networking) \
+		$(use_with rpc) \
+		--with-loadavg
+}
+
+src_install() {
+	default
+
+	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+	newconfd "${FILESDIR}"/xinetd.confd xinetd
+	systemd_dounit "${FILESDIR}/${PN}.service"
+
+	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+	dodoc README.md CHANGELOG
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
@ 2021-05-14 22:54 David Seifert
  0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2021-05-14 22:54 UTC (permalink / raw
  To: gentoo-commits

commit:     72ad30d536ae2adbc6f0fe246423b9b14e3d57c0
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri May 14 22:53:59 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri May 14 22:53:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72ad30d5

sys-apps/xinetd: drop 2.3.15.3, 2.3.15.3-r2

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-apps/xinetd/Manifest                           |  1 -
 sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch | 50 -----------------
 .../files/xinetd-2.3.15.3-rpc-configure.patch      | 57 -------------------
 sys-apps/xinetd/files/xinetd.service               | 10 ----
 sys-apps/xinetd/xinetd-2.3.15.3-r2.ebuild          | 64 ----------------------
 sys-apps/xinetd/xinetd-2.3.15.3.ebuild             | 48 ----------------
 6 files changed, 230 deletions(-)

diff --git a/sys-apps/xinetd/Manifest b/sys-apps/xinetd/Manifest
index 1e3b440acf0..9299a6953ad 100644
--- a/sys-apps/xinetd/Manifest
+++ b/sys-apps/xinetd/Manifest
@@ -1,2 +1 @@
-DIST xinetd-2.3.15.3.tar.xz 383204 BLAKE2B dada7e1efb8c70d9b47efbb33de54e643e195fc043a2fe8b1b61a1d9e597a5a10feda8d6692e665af1f1690870e619098a9a2367df3a73f7821a91777532f1fa SHA512 3a744d5ce66da46743eec28d5b95a44709b1828187078984e59d7220ac325abce1198927e9156f343a4e16a9dc63e8846f1dcb0facbf05ea44c73aecbe7e504f
 DIST xinetd-2.3.15.4.tar.xz 384504 BLAKE2B e6981d7143c5e39d45a6274d003467f372b1e97637112c66a3fd3a1cb47fe948228d72c914cca5b2db1d65a626b83ff36f10768d343579aa48353d20e2541f4d SHA512 1d9bbf5f60b299746adf3e57a669bf1a554b50066563b65cdb7584f00dcab2d3d331df705eefb56b51c52a16b5ed6b109cd832c27df87c7f262bb304e17ddc0e

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch b/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch
deleted file mode 100644
index 3bd995a0892..00000000000
--- a/sys-apps/xinetd/files/xinetd-2.3.15.3-no-rpc.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://github.com/openSUSE/xinetd/pull/8
-
-From 4278495b1858b5b1ce94d72bd619eb79aab8ca04 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 18 Jun 2018 18:49:38 -0400
-Subject: [PATCH] fix no-rpc builds
-
-The code base already has support for -DNO_RPC, so fix the breakage
-introduced by commit 56520dcc88c35113877c8f4f52bd98ad95b44653.
----
- src/confparse.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/confparse.c b/src/confparse.c
-index 5b149dd03808..7965cc405f24 100644
---- a/src/confparse.c
-+++ b/src/confparse.c
-@@ -13,10 +13,12 @@
- #include <stdlib.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#ifndef NO_RPC
- #include <rpc/rpc.h>
- #ifdef HAVE_RPCENT_H
- #include <rpc/rpcent.h>
- #endif
-+#endif
- #include <netdb.h>
- 
- #include "str.h"
-@@ -730,7 +732,7 @@ static status_e check_entry( struct service_config *scp,
- 	   }
-    }
- 
--/* #ifndef NO_RPC */
-+#ifndef NO_RPC
-    if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
-    {
-       struct rpcent *rep = (struct rpcent *)getrpcbyname( SC_NAME(scp) ) ;
-@@ -743,6 +745,7 @@ static status_e check_entry( struct service_config *scp,
-       SC_RPCDATA( scp )->rd_program_number = rep->r_number ;
-    }
-    else
-+#endif
-    {
-        if ( !SC_IS_UNLISTED( scp ) ) 
-        { 
--- 
-2.16.1
-

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch b/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch
deleted file mode 100644
index 682dece1b2b..00000000000
--- a/sys-apps/xinetd/files/xinetd-2.3.15.3-rpc-configure.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 928d69309592704892d124b1f8de9111164c3793 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Mon, 18 Jun 2018 22:11:21 -0400
-Subject: [PATCH] configure: add a --without-rpc flag
-
-The build already supports NO_RPC to disable all RPC logic.  Turn it
-into a proper configure flag so people don't have to hack it up.
----
- configure.ac | 25 ++++++++++++++++++++-----
- 1 file changed, 20 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8d0b562ddaac..75ae7fb472dc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -37,11 +37,6 @@ AC_CHECK_LIB([m], [log10], [
- 	AC_MSG_ERROR([Unable to find working libm.so])
- ])
- AC_SUBST([LIBM_LIBS])
--PKG_CHECK_MODULES([TIRPC],[libtirpc], [
--	AC_DEFINE([HAVE_RPCENT_H], [1], [Have <rpc/rpcent.h>.])
--], [
--	AC_MSG_WARN([Libtirpc not found, will not use <rpc/rpcent.h>])
--])
- 
- # ======================================
- # Check for various headers and settings
-@@ -112,6 +107,26 @@ AS_IF([test x"$with_labeled_networking" != "xno"], [
-     ])
- ])
- 
-+AC_ARG_WITH([rpc],
-+    [AS_HELP_STRING([--without-rpc], [Do not include RPC support])],
-+    [with_rpc="$withval"],
-+    [with_rpc="auto"]
-+)
-+AS_IF([test x"$with_rpc" != "xno"], [
-+    PKG_CHECK_MODULES([TIRPC],[libtirpc], [
-+        AC_DEFINE([HAVE_RPCENT_H], [1], [Have <rpc/rpcent.h>.])
-+    ], [
-+        AS_IF([test x"$with_rpc" = "xyes"], [
-+            AC_MSG_ERROR([RPC support requested but not found])
-+        ])
-+        with_rpc="no"
-+        AC_MSG_WARN([Libtirpc not found, will not use <rpc/rpcent.h>])
-+    ])
-+])
-+AS_IF([test x"$with_rpc" = "xno"], [
-+    AC_DEFINE([NO_RPC], [1], [Omit RPC support.])
-+])
-+
- # =========
- # Hardening
- # =========
--- 
-2.16.1
-

diff --git a/sys-apps/xinetd/files/xinetd.service b/sys-apps/xinetd/files/xinetd.service
deleted file mode 100644
index c6f6271fd97..00000000000
--- a/sys-apps/xinetd/files/xinetd.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=A secure replacement for inetd
-After=network.target
-
-[Service]
-ExecStart=/usr/sbin/xinetd -dontfork
-ExecReload=/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target

diff --git a/sys-apps/xinetd/xinetd-2.3.15.3-r2.ebuild b/sys-apps/xinetd/xinetd-2.3.15.3-r2.ebuild
deleted file mode 100644
index d5c268f31bb..00000000000
--- a/sys-apps/xinetd/xinetd-2.3.15.3-r2.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit flag-o-matic systemd toolchain-funcs autotools
-
-DESCRIPTION="powerful replacement for inetd"
-HOMEPAGE="https://github.com/xinetd-org/xinetd https://github.com/openSUSE/xinetd"
-SRC_URI="https://github.com/openSUSE/xinetd/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="perl rpc selinux tcpd"
-
-DEPEND="
-	rpc? ( net-libs/libtirpc:= )
-	selinux? ( sys-libs/libselinux )
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
-"
-RDEPEND="
-	${DEPEND}
-	perl? ( dev-lang/perl )
-"
-DEPEND="
-	${DEPEND}
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-no-rpc.patch #651838
-	"${FILESDIR}"/${P}-rpc-configure.patch #651838
-)
-
-src_prepare() {
-	default
-	eautoreconf
-
-	sed -i \
-		-e 's:/usr/bin/kill:/bin/kill:' \
-		"contrib/${PN}.service" || die
-}
-
-src_configure() {
-	econf \
-		$(use_with tcpd libwrap) \
-		$(use_with selinux labeled-networking) \
-		$(use_with rpc) \
-		--with-loadavg
-}
-
-src_install() {
-	default
-
-	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
-
-	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
-	newconfd "${FILESDIR}"/xinetd.confd xinetd
-	systemd_dounit "contrib/${PN}.service"
-
-	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
-	dodoc README.md CHANGELOG
-}

diff --git a/sys-apps/xinetd/xinetd-2.3.15.3.ebuild b/sys-apps/xinetd/xinetd-2.3.15.3.ebuild
deleted file mode 100644
index 7a903b612a3..00000000000
--- a/sys-apps/xinetd/xinetd-2.3.15.3.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic systemd toolchain-funcs
-
-DESCRIPTION="powerful replacement for inetd"
-HOMEPAGE="https://github.com/openSUSE/xinetd"
-SRC_URI="https://github.com/openSUSE/xinetd/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
-IUSE="perl selinux tcpd"
-
-DEPEND="
-	selinux? ( sys-libs/libselinux )
-	net-libs/libtirpc:=
-	tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
-"
-RDEPEND="
-	${DEPEND}
-	perl? ( dev-lang/perl )
-"
-DEPEND="
-	${DEPEND}
-	virtual/pkgconfig
-"
-
-src_configure() {
-	econf \
-		$(use_with tcpd libwrap) \
-		$(use_with selinux labeled-networking) \
-		--with-loadavg
-}
-
-src_install() {
-	default
-
-	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
-
-	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
-	newconfd "${FILESDIR}"/xinetd.confd xinetd
-	systemd_dounit "${FILESDIR}/${PN}.service"
-
-	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
-	dodoc README.md CHANGELOG
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
@ 2022-09-10 13:30 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-09-10 13:30 UTC (permalink / raw
  To: gentoo-commits

commit:     33bd8437e8964991053c4ec1897ec015f84d577d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 10 13:06:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 10 13:29:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33bd8437

sys-apps/xinetd: fix build on musl & implicit function decls

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch | 43 +++++++++++++++
 ...rect-drop-deprecated-sys-signal.h-include.patch | 24 +++++++++
 sys-apps/xinetd/xinetd-2.3.15.4-r1.ebuild          | 62 ++++++++++++++++++++++
 3 files changed, 129 insertions(+)

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch b/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch
new file mode 100644
index 000000000000..d2be93f08607
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch
@@ -0,0 +1,43 @@
+https://github.com/openSUSE/xinetd/pull/42
+
+From 0539bd4450020c83c6b72eec1004e3ce3f64554b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Sep 2022 13:59:20 +0100
+Subject: [PATCH 1/2] configure.ac: use AC_USE_SYSTEM_EXTENSIONS
+
+We use fcvt and gcvt, both of which are extensions
+guarded by GNU_SOURCE. Use AC_USE_SYSTEM_EXTENSIONS
+to ensure they're always available.
+
+Fixes a build failure on musl with Clang 15:
+```
+src/sio/sprint.c:176:15: error: call to undeclared function 'fcvt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+                p = (char *)fcvt( num, precision, &decimal_point, is_negative ) ;
+src/sio/sprint.c:178:15: error: call to undeclared function 'ecvt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+                p = (char *)ecvt( num, precision+1, &decimal_point, is_negative ) ;
+```
+
+And drop a single #define _GNU_SOURCE from signals.c, as it's
+preferable to have it consistently defined across the codebase
+where possible. We have autotools, so let's use it.
+--- a/configure.ac
++++ b/configure.ac
+@@ -38,6 +38,8 @@ AC_CHECK_LIB([m], [log10], [
+ ])
+ AC_SUBST([LIBM_LIBS])
+ 
++AC_USE_SYSTEM_EXTENSIONS
++
+ # ======================================
+ # Check for various headers and settings
+ # ======================================
+--- a/src/signals.c
++++ b/src/signals.c
+@@ -7,7 +7,6 @@
+ 
+ 
+ #include "config.h"
+-#define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <signal.h>

diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch b/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch
new file mode 100644
index 000000000000..f53a11eba650
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch
@@ -0,0 +1,24 @@
+https://github.com/openSUSE/xinetd/pull/42
+
+From 953a37c570a42743358cfc64e00e990813db1e09 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Sep 2022 14:01:00 +0100
+Subject: [PATCH 2/2] redirect: drop deprecated <sys/signal.h> include
+
+Fix warning when building on musl:
+```
+In file included from src/redirect.c:23:
+/usr/include/sys/signal.h:1:2: warning: redirecting incorrect #include <sys/signal.h> to <signal.h> [-W#warnings]
+```
+
+We already include <signal.h>.
+--- a/src/redirect.c
++++ b/src/redirect.c
+@@ -20,7 +20,6 @@
+ #include <unistd.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
+-#include <sys/signal.h>
+ 
+ #include "redirect.h"
+ #include "service.h"

diff --git a/sys-apps/xinetd/xinetd-2.3.15.4-r1.ebuild b/sys-apps/xinetd/xinetd-2.3.15.4-r1.ebuild
new file mode 100644
index 000000000000..1f81038eb7bc
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.15.4-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="Powerful replacement for inetd"
+HOMEPAGE="https://github.com/xinetd-org/xinetd https://github.com/openSUSE/xinetd"
+SRC_URI="https://github.com/openSUSE/xinetd/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="perl rpc selinux tcpd"
+
+DEPEND="
+	rpc? ( net-libs/libtirpc:= )
+	selinux? ( sys-libs/libselinux )
+	tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
+"
+RDEPEND="
+	${DEPEND}
+	perl? ( dev-lang/perl )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch
+	"${FILESDIR}"/${PN}-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i \
+		-e 's:/usr/bin/kill:/bin/kill:' \
+		"contrib/${PN}.service" || die
+
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_with tcpd libwrap) \
+		$(use_with selinux labeled-networking) \
+		$(use_with rpc) \
+		--with-loadavg
+}
+
+src_install() {
+	default
+
+	use perl || rm -f "${ED}"/usr/sbin/xconv.pl
+
+	newinitd "${FILESDIR}"/xinetd.rc6 xinetd
+	newconfd "${FILESDIR}"/xinetd.confd xinetd
+	systemd_dounit "contrib/${PN}.service"
+
+	newdoc contrib/xinetd.conf xinetd.conf.dist.sample
+	dodoc README.md CHANGELOG
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-10 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19  6:06 [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2022-09-10 13:30 Sam James
2021-05-14 22:54 David Seifert
2015-12-23 20:44 Mike Frysinger
2015-11-03 15:08 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox