summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch100
-rw-r--r--meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch86
-rw-r--r--meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch79
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch34
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch112
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd.conf11
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb47
-rw-r--r--meta/recipes-extended/xinetd/xinetd_2.3.15.bb75
8 files changed, 47 insertions, 497 deletions
diff --git a/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch b/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
deleted file mode 100644
index 3c1b2f6f0e..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
+++ /dev/null
@@ -1,100 +0,0 @@
1From e8b0ffc7ea04cc71dba97a38e1a134aaf2285c2d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 30 Dec 2015 07:14:50 +0000
4Subject: [PATCH] configure: Use HAVE_SYS_RESOURCE_H to guard sys/resource.h
5 inclusion
6
7HAVE_RLIM_T check will not let sys/resource.h to be checked and
8rlim_t is defined in sys/resource.h so the check would fail.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 aclocal.m4 | 2 +-
15 configure | 14 +++++++-------
16 2 files changed, 8 insertions(+), 8 deletions(-)
17
18diff --git a/aclocal.m4 b/aclocal.m4
19index 6e6f32c..70e7076 100644
20--- a/aclocal.m4
21+++ b/aclocal.m4
22@@ -11,7 +11,7 @@ AC_CACHE_VAL(xinetd_cv_type_$1,
23 #if HAVE_NETDB_H
24 #include <netdb.h>
25 #endif
26-#if HAVE_RLIM_T
27+#if HAVE_SYS_RESOURCE_H
28 #include <sys/resource.h>
29 #endif
30 #if HAVE_STDINT_H
31diff --git a/configure b/configure
32index b507d38..bec56ea 100755
33--- a/configure
34+++ b/configure
35@@ -7640,7 +7640,7 @@ cat >>conftest.$ac_ext <<_ACEOF
36 #if HAVE_NETDB_H
37 #include <netdb.h>
38 #endif
39-#if HAVE_RLIM_T
40+#if HAVE_SYS_RESOURCE_H
41 #include <sys/resource.h>
42 #endif
43 #if HAVE_STDINT_H
44@@ -7686,7 +7686,7 @@ cat >>conftest.$ac_ext <<_ACEOF
45 #if HAVE_NETDB_H
46 #include <netdb.h>
47 #endif
48-#if HAVE_RLIM_T
49+#if HAVE_SYS_RESOURCE_H
50 #include <sys/resource.h>
51 #endif
52 #if HAVE_STDINT_H
53@@ -7732,7 +7732,7 @@ cat >>conftest.$ac_ext <<_ACEOF
54 #if HAVE_NETDB_H
55 #include <netdb.h>
56 #endif
57-#if HAVE_RLIM_T
58+#if HAVE_SYS_RESOURCE_H
59 #include <sys/resource.h>
60 #endif
61 #if HAVE_STDINT_H
62@@ -7778,7 +7778,7 @@ cat >>conftest.$ac_ext <<_ACEOF
63 #if HAVE_NETDB_H
64 #include <netdb.h>
65 #endif
66-#if HAVE_RLIM_T
67+#if HAVE_SYS_RESOURCE_H
68 #include <sys/resource.h>
69 #endif
70 #if HAVE_STDINT_H
71@@ -7824,7 +7824,7 @@ cat >>conftest.$ac_ext <<_ACEOF
72 #if HAVE_NETDB_H
73 #include <netdb.h>
74 #endif
75-#if HAVE_RLIM_T
76+#if HAVE_SYS_RESOURCE_H
77 #include <sys/resource.h>
78 #endif
79 #if HAVE_STDINT_H
80@@ -7870,7 +7870,7 @@ cat >>conftest.$ac_ext <<_ACEOF
81 #if HAVE_NETDB_H
82 #include <netdb.h>
83 #endif
84-#if HAVE_RLIM_T
85+#if HAVE_SYS_RESOURCE_H
86 #include <sys/resource.h>
87 #endif
88 #if HAVE_STDINT_H
89@@ -7916,7 +7916,7 @@ cat >>conftest.$ac_ext <<_ACEOF
90 #if HAVE_NETDB_H
91 #include <netdb.h>
92 #endif
93-#if HAVE_RLIM_T
94+#if HAVE_SYS_RESOURCE_H
95 #include <sys/resource.h>
96 #endif
97 #if HAVE_STDINT_H
98--
992.6.4
100
diff --git a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
deleted file mode 100644
index cd6e6c1078..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001
4From: Pierre Habouzit <madcoder@debian.org>
5Date: Wed, 28 Nov 2007 10:13:08 +0100
6Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists.
7
8 This way, if a service is enabled in /etc/xinetd* _and_ in
9/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes
10precedence.
11
12Signed-off-by: Pierre Habouzit <madcoder@debian.org>
13---
14 xinetd/inet.c | 22 +++++++++++++++++++---
15 1 files changed, 19 insertions(+), 3 deletions(-)
16
17diff --git a/xinetd/inet.c b/xinetd/inet.c
18index 1cb2ba2..8caab45 100644
19--- a/xinetd/inet.c
20+++ b/xinetd/inet.c
21@@ -23,6 +23,8 @@
22 #include "parsesup.h"
23 #include "nvlists.h"
24
25+static psi_h iter ;
26+
27 static int get_next_inet_entry( int fd, pset_h sconfs,
28 struct service_config *defaults);
29
30@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp )
31 struct service_config *default_config = CNF_DEFAULTS( confp );
32
33 line_count = 0;
34+ iter = psi_create (sconfs);
35
36 for( ;; )
37 {
38 if (get_next_inet_entry(fd, sconfs, default_config) == -2)
39 break;
40 }
41+
42+ psi_destroy(iter);
43 }
44
45 static int get_next_inet_entry( int fd, pset_h sconfs,
46@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
47 char *p;
48 str_h strp;
49 char *line = next_line(fd);
50- struct service_config *scp;
51+ struct service_config *scp, *tmp;
52 unsigned u, i;
53 const char *func = "get_next_inet_entry";
54 char *name = NULL, *rpcvers = NULL, *rpcproto = NULL;
55@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
56 SC_SPECIFY( scp, A_SOCKET_TYPE );
57 SC_SPECIFY( scp, A_WAIT );
58
59- if( ! pset_add(sconfs, scp) )
60+ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){
61+ if (EQ(SC_ID(scp), SC_ID(tmp))) {
62+ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp));
63+ sc_free(scp);
64+ scp = NULL;
65+ break;
66+ }
67+ }
68+
69+ if( scp && ! pset_add(sconfs, scp) )
70 {
71 out_of_memory( func );
72 pset_destroy(args);
73@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
74 }
75
76 pset_destroy(args);
77- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
78+ if (scp) {
79+ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
80+ }
81 return 0;
82 }
83
84--
851.5.3.6.2040.g15e6
86
diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
deleted file mode 100644
index 8e59cdcaae..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001
4From: Pierre Habouzit <madcoder@debian.org>
5Date: Mon, 26 Nov 2007 16:02:04 +0100
6Subject: [PATCH] Various fixes from the previous maintainer.
7
8---
9 xinetd/child.c | 20 +++++++++++++++++---
10 xinetd/service.c | 8 ++++----
11 2 files changed, 21 insertions(+), 7 deletions(-)
12
13diff --git a/xinetd/child.c b/xinetd/child.c
14index 89ee54c..48e9615 100644
15--- a/xinetd/child.c
16+++ b/xinetd/child.c
17@@ -284,6 +284,7 @@ void child_process( struct server *serp )
18 connection_s *cp = SERVER_CONNECTION( serp ) ;
19 struct service_config *scp = SVC_CONF( sp ) ;
20 const char *func = "child_process" ;
21+ int fd, null_fd;
22
23 signal_default_state();
24
25@@ -296,9 +297,22 @@ void child_process( struct server *serp )
26 signals_pending[0] = -1;
27 signals_pending[1] = -1;
28
29- Sclose(0);
30- Sclose(1);
31- Sclose(2);
32+ if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 )
33+ {
34+ msg( LOG_ERR, func, "open('/dev/null') failed: %m") ;
35+ _exit( 1 ) ;
36+ }
37+
38+ for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ )
39+ {
40+ if ( fd != null_fd && dup2( null_fd, fd ) == -1 )
41+ {
42+ msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ;
43+ _exit( 1 ) ;
44+ }
45+ }
46+ if ( null_fd > MAX_PASS_FD )
47+ (void) Sclose( null_fd ) ;
48
49
50 #ifdef DEBUG_SERVER
51diff --git a/xinetd/service.c b/xinetd/service.c
52index 3d68d78..0132d6c 100644
53--- a/xinetd/service.c
54+++ b/xinetd/service.c
55@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp,
56 return FAILED;
57
58 if ( last == NULL ) {
59- last = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
60- SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last;
61+ SVC_LAST_DGRAM_ADDR(sp) = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
62+ last = SAIN( SVC_LAST_DGRAM_ADDR(sp) );
63 }
64
65 (void) time( &current_time ) ;
66@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp,
67 return FAILED;
68
69 if( last == NULL ) {
70- last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
71- SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last;
72+ SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
73+ last = SAIN6(SVC_LAST_DGRAM_ADDR(sp));
74 }
75
76 (void) time( &current_time ) ;
77--
781.5.3.6.2040.g15e6
79
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
deleted file mode 100644
index 852a43f2de..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1xinetd: CVE-2013-4342
2
3xinetd does not enforce the user and group configuration directives
4for TCPMUX services, which causes these services to be run as root
5and makes it easier for remote attackers to gain privileges by
6leveraging another vulnerability in a service.
7http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342
8
9the patch come from:
10https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
11
12CVE: CVE-2013-4342
13Signed-off-by: Li Wang <li.wang@windriver.com>
14Upstream-Status: Backport
15---
16 xinetd/builtins.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/xinetd/builtins.c b/xinetd/builtins.c
20index 3b85579..34a5bac 100644
21--- a/xinetd/builtins.c
22+++ b/xinetd/builtins.c
23@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp )
24 if( SC_IS_INTERNAL( scp ) ) {
25 SC_INTERNAL(scp, nserp);
26 } else {
27- exec_server(nserp);
28+ child_process(nserp);
29 }
30 }
31
32--
331.7.9.5
34
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
deleted file mode 100644
index 2365ca123b..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1Upstream-Status: Pending [from other distro Debian]
2
3From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001
4From: David Madore <david@pleiades.stars>
5Date: Mon, 24 Mar 2008 12:45:36 +0100
6Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode
7
8xinetd does not bind to IPv6 addresses (and does not seem to have an
9option to do so) when used in -inetd_compat mode. As current inetd's
10are IPv6-aware, this is a problem: this means xinetd cannot be used as
11a drop-in inetd replacement.
12
13The attached patch is a suggestion: it adds a -inetd_ipv6 global
14option that, if used, causes inetd-compatibility lines to have an
15implicit "IPv6" option. Perhaps this is not the best solution, but
16there should definitely be a way to get inetd.conf to be read in
17IPv6-aware mode.
18---
19 xinetd/confparse.c | 1 +
20 xinetd/inet.c | 17 +++++++++++++++++
21 xinetd/options.c | 3 +++
22 xinetd/xinetd.man | 6 ++++++
23 4 files changed, 27 insertions(+), 0 deletions(-)
24
25diff --git a/xinetd/confparse.c b/xinetd/confparse.c
26index db9f431..d7b0bcc 100644
27--- a/xinetd/confparse.c
28+++ b/xinetd/confparse.c
29@@ -40,6 +40,7 @@
30 #include "inet.h"
31 #include "main.h"
32
33+extern int inetd_ipv6;
34 extern int inetd_compat;
35
36 /*
37diff --git a/xinetd/inet.c b/xinetd/inet.c
38index 8caab45..2e617ae 100644
39--- a/xinetd/inet.c
40+++ b/xinetd/inet.c
41@@ -25,6 +25,8 @@
42
43 static psi_h iter ;
44
45+extern int inetd_ipv6;
46+
47 static int get_next_inet_entry( int fd, pset_h sconfs,
48 struct service_config *defaults);
49
50@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
51 }
52 SC_SERVER_ARGV(scp)[u] = p;
53 }
54+
55+ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */
56+ if ( inetd_ipv6 )
57+ {
58+ nvp = nv_find_value( service_flags, "IPv6" );
59+ if ( nvp == NULL )
60+ {
61+ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ;
62+ pset_destroy(args);
63+ sc_free(scp);
64+ return -1;
65+ }
66+ M_SET(SC_XFLAGS(scp), nvp->value);
67+ }
68+
69 /* Set the reuse flag, as this is the default for inetd */
70 nvp = nv_find_value( service_flags, "REUSE" );
71 if ( nvp == NULL )
72diff --git a/xinetd/options.c b/xinetd/options.c
73index b058b6a..dc2f3a0 100644
74--- a/xinetd/options.c
75+++ b/xinetd/options.c
76@@ -30,6 +30,7 @@ int logprocs_option ;
77 unsigned logprocs_option_arg ;
78 int stayalive_option=0;
79 char *program_name ;
80+int inetd_ipv6 = 0 ;
81 int inetd_compat = 0 ;
82 int dont_fork = 0;
83
84@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] )
85 fprintf(stderr, "\n");
86 exit(0);
87 }
88+ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 )
89+ inetd_ipv6 = 1;
90 else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 )
91 inetd_compat = 1;
92 }
93diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man
94index c76c3c6..c9dd803 100644
95--- a/xinetd/xinetd.man
96+++ b/xinetd/xinetd.man
97@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the
98 standard xinetd config files. /etc/inetd.conf is read after the
99 standard xinetd config files.
100 .TP
101+.BI \-inetd_ipv6
102+This option causes xinetd to bind to IPv6 (AF_INET6) addresses for
103+inetd compatibility lines (see previous option). This only affects
104+how /etc/inetd.conf is interpreted and thus only has any effect if
105+the \-inetd_compat option is also used.
106+.TP
107 .BI \-cc " interval"
108 This option instructs
109 .B xinetd
110--
1111.5.5.rc0.127.gb4337
112
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
deleted file mode 100644
index 9e6ea2577e..0000000000
--- a/meta/recipes-extended/xinetd/xinetd/xinetd.conf
+++ /dev/null
@@ -1,11 +0,0 @@
1# Simple configuration file for xinetd
2#
3# Some defaults, and include /etc/xinetd.d/
4
5defaults
6{
7
8
9}
10
11includedir /etc/xinetd.d
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb
new file mode 100644
index 0000000000..4f0f9531a1
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb
@@ -0,0 +1,47 @@
1SUMMARY = "Socket-based service activation daemon"
2HOMEPAGE = "https://github.com/xinetd-org/xinetd"
3
4# xinetd is a BSD-like license
5# Apple and Gentoo say BSD here.
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=55c5fdf02cfcca3fc9621b6f2ceae10f"
8
9UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
10
11SRC_URI = "git://github.com/openSUSE/xinetd.git;protocol=https \
12 file://xinetd.init \
13 file://xinetd.default \
14 file://xinetd.service \
15 "
16
17SRCREV = "6a4af7786630ce48747d9687e2f18f45ea6684c4"
18
19S = "${WORKDIR}/git"
20
21inherit autotools update-rc.d systemd pkgconfig
22
23SYSTEMD_SERVICE_${PN} = "xinetd.service"
24
25INITSCRIPT_NAME = "xinetd"
26INITSCRIPT_PARAMS = "defaults"
27
28PACKAGECONFIG ??= "tcp-wrappers"
29PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
30
31CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
32
33do_install_append() {
34 install -d "${D}${sysconfdir}/init.d"
35 install -d "${D}${sysconfdir}/default"
36 install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
37 install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
38
39 # Install systemd unit files
40 install -d ${D}${systemd_unitdir}/system
41 install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
42 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
43 -e 's,@SBINDIR@,${sbindir},g' \
44 ${D}${systemd_unitdir}/system/xinetd.service
45}
46
47RDEPENDS_${PN} += "perl"
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
deleted file mode 100644
index 8f8f846bfb..0000000000
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ /dev/null
@@ -1,75 +0,0 @@
1SUMMARY = "Socket-based service activation daemon"
2HOMEPAGE = "https://github.com/xinetd-org/xinetd"
3
4# xinetd is a BSD-like license
5# Apple and Gentoo say BSD here.
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
8
9DEPENDS += "libtirpc"
10PR = "r2"
11
12UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
13
14SRC_URI = "git://github.com/openSUSE/xinetd.git;protocol=https \
15 file://xinetd.init \
16 file://xinetd.conf \
17 file://xinetd.default \
18 file://Various-fixes-from-the-previous-maintainer.patch \
19 file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
20 file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
21 file://xinetd-CVE-2013-4342.patch \
22 file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
23 file://xinetd.service \
24 "
25
26SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
27
28S = "${WORKDIR}/git"
29
30inherit autotools update-rc.d systemd
31
32SYSTEMD_SERVICE_${PN} = "xinetd.service"
33
34INITSCRIPT_NAME = "xinetd"
35INITSCRIPT_PARAMS = "defaults"
36
37EXTRA_OECONF="--disable-nls"
38
39PACKAGECONFIG ??= "tcp-wrappers"
40PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
41
42CFLAGS += "-I${STAGING_INCDIR}/tirpc"
43LDFLAGS += "-ltirpc"
44
45do_configure() {
46 # Looks like configure.in is broken, so we are skipping
47 # rebuilding configure and are just using the shipped one
48 ( cd ${S}; gnu-configize --force )
49 oe_runconf
50}
51
52do_install() {
53 # Same here, the Makefile does some really stupid things,
54 # but since we only want two files why not override
55 # do_install from autotools and doing it ourselfs?
56 install -d "${D}${sbindir}"
57 install -d "${D}${sysconfdir}/init.d"
58 install -d "${D}${sysconfdir}/xinetd.d"
59 install -d "${D}${sysconfdir}/default"
60 install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}"
61 install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
62 install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
63 install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
64 install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
65 install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
66
67 # Install systemd unit files
68 install -d ${D}${systemd_unitdir}/system
69 install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
70 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
71 -e 's,@SBINDIR@,${sbindir},g' \
72 ${D}${systemd_unitdir}/system/xinetd.service
73}
74
75CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"