Browse Source

xinetd: Import from oldpackages, add myself as maintainer

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Jonathan McCrohan 10 years ago
parent
commit
5b0c015de8

+ 63
- 0
net/xinetd/Makefile View File

@@ -0,0 +1,63 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=xinetd
11
+PKG_VERSION:=2.3.15
12
+PKG_RELEASE:=2
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.xinetd.org
16
+PKG_MD5SUM:=77358478fd58efa6366accae99b8b04c
17
+
18
+PKG_INSTALL:=1
19
+
20
+include $(INCLUDE_DIR)/package.mk
21
+
22
+define Package/xinetd
23
+  SECTION:=net
24
+  CATEGORY:=Network
25
+  TITLE:=A powerful and secure super-server
26
+  URL:=http://www.xinetd.org/
27
+  MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
28
+endef
29
+
30
+define Package/xinetd/description
31
+	xinetd has access control mechanisms, extensive logging capabilities,
32
+	the ability to make services available based on time, can place limits
33
+	on the number of servers that can be started, and has deployable
34
+	defence mechanisms to protect against port scanners, among other
35
+	things.
36
+endef
37
+
38
+define Package/xinetd/conffiles
39
+/etc/xinetd.conf
40
+endef
41
+
42
+TARGET_CFLAGS += -DNO_RPC
43
+
44
+CONFIGURE_ARGS += \
45
+	--without-libwrap \
46
+	--with-loadavg
47
+
48
+CONFIGURE_VARS += \
49
+	ac_cv_header_rpc_pmap_clnt_h=no \
50
+	ac_cv_header_rpc_rpc_h=no \
51
+	ac_cv_header_rpc_rpcent_h=no
52
+
53
+define Package/xinetd/install
54
+	$(INSTALL_DIR) $(1)/usr/sbin
55
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(1)/usr/sbin/
56
+	$(INSTALL_DIR) $(1)/etc
57
+	$(INSTALL_DATA) ./files/xinetd.conf $(1)/etc/xinetd.conf
58
+	$(INSTALL_DIR) $(1)/etc/xinetd.d
59
+	$(INSTALL_DIR) $(1)/etc/init.d
60
+	$(INSTALL_BIN) ./files/xinetd.init $(1)/etc/init.d/xinetd
61
+endef
62
+
63
+$(eval $(call BuildPackage,xinetd))

+ 6
- 0
net/xinetd/files/xinetd.conf View File

@@ -0,0 +1,6 @@
1
+defaults
2
+{
3
+
4
+}
5
+
6
+includedir /etc/xinetd.d

+ 15
- 0
net/xinetd/files/xinetd.init View File

@@ -0,0 +1,15 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2006-2011 OpenWrt.org
3
+
4
+START=50
5
+
6
+SERVICE_USE_PID=1
7
+
8
+start() {
9
+	service_start /usr/sbin/xinetd -pidfile /var/run/xinetd.pid
10
+}
11
+
12
+stop() {
13
+	service_stop /usr/sbin/xinetd
14
+}
15
+

+ 66
- 0
net/xinetd/patches/001-ar.patch View File

@@ -0,0 +1,66 @@
1
+--- a/libs/src/misc/Makefile.in
2
++++ b/libs/src/misc/Makefile.in
3
+@@ -62,7 +62,7 @@ libopt: clean
4
+ 
5
+ 
6
+ $(LIBNAME): $(OBJECTS)
7
+-	ar r $@ $?
8
++	$(AR) r $@ $?
9
+ 	$(RANLIB) $@
10
+ 
11
+ install: $(LIBNAME)
12
+--- a/libs/src/portable/Makefile.in
13
++++ b/libs/src/portable/Makefile.in
14
+@@ -57,7 +57,7 @@ libopt: clean
15
+ 
16
+ 
17
+ $(LIBNAME): $(OBJECTS)
18
+-	ar r $@ $?
19
++	$(AR) r $@ $?
20
+ 	$(RANLIB) $@
21
+ 
22
+ install: $(LIBNAME)
23
+--- a/libs/src/pset/Makefile.in
24
++++ b/libs/src/pset/Makefile.in
25
+@@ -53,7 +53,7 @@ libopt: clean
26
+ 	mv $(LIBNAME) $(LIBDIR)/optimized
27
+ 
28
+ $(LIBNAME): $(OBJECTS)
29
+-	ar r $@ $?
30
++	$(AR) r $@ $?
31
+ 	$(RANLIB) $@
32
+ 
33
+ install: $(LIBNAME)
34
+--- a/libs/src/sio/Makefile.in
35
++++ b/libs/src/sio/Makefile.in
36
+@@ -52,7 +52,7 @@ libopt: clean
37
+ 	$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
38
+ 
39
+ $(LIBNAME): $(OBJECTS)
40
+-	ar r $@ $?
41
++	$(AR) r $@ $?
42
+ 	$(RANLIB) $@
43
+ 
44
+ install: $(LIBNAME)
45
+--- a/libs/src/str/Makefile.in
46
++++ b/libs/src/str/Makefile.in
47
+@@ -63,7 +63,7 @@ libopt: clean
48
+ 	$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O
49
+ 
50
+ $(LIBNAME): $(OBJECTS)
51
+-	ar r $@ $?
52
++	$(AR) r $@ $?
53
+ 	$(RANLIB) $@
54
+ 
55
+ LINT_IGNORE=possible pointer alignment|RCSid unused
56
+--- a/libs/src/xlog/Makefile.in
57
++++ b/libs/src/xlog/Makefile.in
58
+@@ -58,7 +58,7 @@ libopt: clean
59
+ 	$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
60
+ 
61
+ $(LIBNAME): $(OBJECTS)
62
+-	ar r $@ $?
63
++	$(AR) r $@ $?
64
+ 	$(RANLIB) $@
65
+ 
66
+ install: $(LIBNAME)

+ 27
- 0
net/xinetd/patches/002-destdir.patch View File

@@ -0,0 +1,27 @@
1
+--- a/Makefile.in
2
++++ b/Makefile.in
3
+@@ -75,15 +75,15 @@ dlibxlog: dlibsio dlibstr
4
+ 
5
+ install: build
6
+ 	for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \
7
+-	   test -d $$i || mkdir -p $$i ; done
8
+-	$(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR)
9
+-	$(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR)
10
+-	$(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR)
11
+-	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5
12
+-	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8
13
+-	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8
14
+-	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8
15
+-	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8
16
++	   test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done
17
++	$(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR)
18
++	$(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR)
19
++	$(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR)
20
++	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5
21
++	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8
22
++	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8
23
++	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8
24
++	$(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8
25
+ 	@echo "You must put your xinetd.conf in /etc/xinetd.conf"
26
+ 	@echo "There is a sample config file in xinetd/sample.conf and you can"
27
+ 	@echo "use xconv.pl to convert your old inetd.conf file to an xinetd format"

+ 19
- 0
net/xinetd/patches/003-rpc_fix.patch View File

@@ -0,0 +1,19 @@
1
+--- a/xinetd/confparse.c
2
++++ b/xinetd/confparse.c
3
+@@ -745,7 +745,7 @@ static status_e check_entry( struct serv
4
+ 	   }
5
+    }
6
+ 
7
+-/* #ifndef NO_RPC */
8
++#ifndef NO_RPC
9
+ #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H)
10
+    if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
11
+    {
12
+@@ -759,6 +759,7 @@ static status_e check_entry( struct serv
13
+       SC_RPCDATA( scp )->rd_program_number = rep->r_number ;
14
+    }
15
+    else
16
++#endif
17
+ #endif   /* ! NO_RPC */
18
+    {
19
+        if ( !SC_IS_UNLISTED( scp ) )