public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
Date: Tue, 19 Jun 2018 06:06:55 +0000 (UTC)	[thread overview]
Message-ID: <1529388401.aff3934b17388d503099592e1d9c9eae106fe886.vapier@gentoo> (raw)

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
+}


             reply	other threads:[~2018-06-19  6:07 UTC|newest]

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

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=1529388401.aff3934b17388d503099592e1d9c9eae106fe886.vapier@gentoo \
    --to=vapier@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