Compare commits
	
		
			4 Commits
		
	
	
		
			f7304a7e7d
			...
			134aa1c690
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 134aa1c690 | |||
| 25a3b593d6 | |||
| b476b598f9 | |||
| 9d6cf98057 | 
@@ -1 +0,0 @@
 | 
			
		||||
DIST tftp-hpa-5.2.tar.xz 89564 BLAKE2B 45917ca3d710f8a4b584dbe1e9a912e06fd181e4ffcfd8fba13008f08dbbce0fe339b61fb6f97236b8012e755025d05700214e365adac81dfce42b0edd636e80 SHA512 a5198e923a6e58281f749dc77b3f3ed8579e56b6f0fd6a17482cc88bdc8d34b6702c7c709717885b9b937ecae459d9a832328a49a2e3536dc7432cdb39d2a394
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
# /etc/init.d/in.tftpd
 | 
			
		||||
 | 
			
		||||
# Path to server files from
 | 
			
		||||
# Depending on your application you may have to change this.
 | 
			
		||||
# This is commented out to force you to look at the file!
 | 
			
		||||
#INTFTPD_PATH="/var/tftp/"
 | 
			
		||||
#INTFTPD_PATH="/tftpboot/"
 | 
			
		||||
#INTFTPD_PATH="/tftproot/"
 | 
			
		||||
 | 
			
		||||
# For more options, see in.tftpd(8)
 | 
			
		||||
# -R 4096:32767 solves problems with ARC firmware, and obsoletes
 | 
			
		||||
# the /proc/sys/net/ipv4/ip_local_port_range hack.
 | 
			
		||||
# -s causes $INTFTPD_PATH to be the root of the TFTP tree.
 | 
			
		||||
# -l is passed by the init script in addition to these options.
 | 
			
		||||
INTFTPD_OPTS="-R 4096:32767 -s ${INTFTPD_PATH}"
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
#!/sbin/openrc-run
 | 
			
		||||
# Copyright 1999-2005 Gentoo Foundation
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
depend() {
 | 
			
		||||
	need net
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start() {
 | 
			
		||||
	ebegin "Starting tftpd"
 | 
			
		||||
	/usr/sbin/in.tftpd -l ${INTFTPD_OPTS}
 | 
			
		||||
	eend $?
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop() {
 | 
			
		||||
	ebegin "Stopping tftpd"
 | 
			
		||||
	start-stop-daemon --stop --exec /usr/sbin/in.tftpd
 | 
			
		||||
	eend $?
 | 
			
		||||
}
 | 
			
		||||
@@ -1,91 +0,0 @@
 | 
			
		||||
--- tftp-hpa-5.1/tftpd/tftpd.c.orig	2009-12-26 13:17:35.000000000 +0300
 | 
			
		||||
+++ tftp-hpa-5.1/tftpd/tftpd.c	2009-12-26 13:19:01.000000000 +0300
 | 
			
		||||
@@ -46,6 +46,7 @@
 | 
			
		||||
 #include <pwd.h>
 | 
			
		||||
 #include <limits.h>
 | 
			
		||||
 #include <syslog.h>
 | 
			
		||||
+#include <dirent.h>
 | 
			
		||||
 
 | 
			
		||||
 #include "common/tftpsubs.h"
 | 
			
		||||
 #include "recvfrom.h"
 | 
			
		||||
@@ -975,6 +976,8 @@
 | 
			
		||||
 static int validate_access(char *, int, const struct formats *, const char **);
 | 
			
		||||
 static void tftp_sendfile(const struct formats *, struct tftphdr *, int);
 | 
			
		||||
 static void tftp_recvfile(const struct formats *, struct tftphdr *, int);
 | 
			
		||||
+int lookup_entry(const char *comp, char *dest);
 | 
			
		||||
+void lookup_file(char *filename);
 | 
			
		||||
 
 | 
			
		||||
 struct formats {
 | 
			
		||||
     const char *f_mode;
 | 
			
		||||
@@ -1353,6 +1356,62 @@
 | 
			
		||||
 }
 | 
			
		||||
 #endif
 | 
			
		||||
 
 | 
			
		||||
+int lookup_entry(const char *comp, char *dest)
 | 
			
		||||
+{
 | 
			
		||||
+  DIR *dirp;
 | 
			
		||||
+  struct dirent *dptr;
 | 
			
		||||
+  dirp = opendir(dest[0] ? dest : ".");
 | 
			
		||||
+  if (!dirp) return 0;
 | 
			
		||||
+  while ((dptr = readdir(dirp)))
 | 
			
		||||
+  {
 | 
			
		||||
+    if (!strcasecmp(dptr->d_name, comp))
 | 
			
		||||
+    {
 | 
			
		||||
+      if (dest[0]) strcat(dest, "/");
 | 
			
		||||
+      strcat(dest, dptr->d_name);
 | 
			
		||||
+      closedir(dirp);
 | 
			
		||||
+      return 1;
 | 
			
		||||
+    }
 | 
			
		||||
+  }
 | 
			
		||||
+  closedir(dirp);
 | 
			
		||||
+  return 0;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+
 | 
			
		||||
+void lookup_file(char *filename)
 | 
			
		||||
+{
 | 
			
		||||
+  int found = 0;
 | 
			
		||||
+  int len = 0;
 | 
			
		||||
+  char dest[1024];
 | 
			
		||||
+  char comp[1024];
 | 
			
		||||
+  char *check = filename;
 | 
			
		||||
+  char *seek = NULL;
 | 
			
		||||
+
 | 
			
		||||
+  dest[0] = 0;
 | 
			
		||||
+  check++;
 | 
			
		||||
+  while (*check)
 | 
			
		||||
+  {
 | 
			
		||||
+    seek = strchr(check, '\\');
 | 
			
		||||
+    if (!seek)
 | 
			
		||||
+    {
 | 
			
		||||
+      if ((*check) && (lookup_entry(check, dest)))
 | 
			
		||||
+        found = 1;
 | 
			
		||||
+      break;
 | 
			
		||||
+    }
 | 
			
		||||
+    len = seek - check;
 | 
			
		||||
+    memcpy(comp, check, len);
 | 
			
		||||
+    comp[len]=0;
 | 
			
		||||
+    if (!lookup_entry(comp, dest))
 | 
			
		||||
+      break;
 | 
			
		||||
+    check += len + 1;
 | 
			
		||||
+  }
 | 
			
		||||
+
 | 
			
		||||
+  if (found)
 | 
			
		||||
+  {
 | 
			
		||||
+    filename[0] = 0;
 | 
			
		||||
+    strcat(filename, dest);
 | 
			
		||||
+  }
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
 static FILE *file;
 | 
			
		||||
 /*
 | 
			
		||||
  * Validate file access.  Since we
 | 
			
		||||
@@ -1378,6 +1437,8 @@
 | 
			
		||||
     tsize_ok = 0;
 | 
			
		||||
     *errmsg = NULL;
 | 
			
		||||
 
 | 
			
		||||
+  if (*filename == '\\') lookup_file(filename);
 | 
			
		||||
+
 | 
			
		||||
     if (!secure) {
 | 
			
		||||
         if (*filename != '/') {
 | 
			
		||||
             *errmsg = "Only absolute filenames allowed";
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
From 7afd5aa65fdabaa4583f6e1a84936eb9bdd33c65 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Sergei Trofimovich <slyfox@gentoo.org>
 | 
			
		||||
Date: Tue, 21 Jan 2020 23:10:46 +0000
 | 
			
		||||
Subject: [PATCH] tftp-hpa: fix build failure against gcc-10
 | 
			
		||||
 | 
			
		||||
On gcc-10 (and gcc-9 -fno-common) build fails as:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu tftp.o main.o ../common/libcommon.a -lreadline -liberty   -o tftp
 | 
			
		||||
ld: main.o:(.bss+0x40):
 | 
			
		||||
  multiple definition of `toplevel'; tftp.o:(.bss+0x100): first defined here
 | 
			
		||||
collect2: error: ld returned 1 exit status
 | 
			
		||||
make[1]: *** [Makefile:12: tftp] Error 1
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
gcc-10 will change the default from -fcommon to fno-common:
 | 
			
		||||
https://gcc.gnu.org/PR85678.
 | 
			
		||||
 | 
			
		||||
The error also happens if CFLAGS=-fno-common passed explicitly.
 | 
			
		||||
 | 
			
		||||
Bug: https://bugs.gentoo.org/705834
 | 
			
		||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
 | 
			
		||||
---
 | 
			
		||||
 tftp/tftp.c | 2 +-
 | 
			
		||||
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/tftp/tftp.c b/tftp/tftp.c
 | 
			
		||||
index d15da22..d067f96 100644
 | 
			
		||||
--- a/tftp/tftp.c
 | 
			
		||||
+++ b/tftp/tftp.c
 | 
			
		||||
@@ -48,7 +48,7 @@ extern int maxtimeout;
 | 
			
		||||
 #define PKTSIZE    SEGSIZE+4
 | 
			
		||||
 char ackbuf[PKTSIZE];
 | 
			
		||||
 int timeout;
 | 
			
		||||
-sigjmp_buf toplevel;
 | 
			
		||||
+extern sigjmp_buf toplevel;
 | 
			
		||||
 sigjmp_buf timeoutbuf;
 | 
			
		||||
 
 | 
			
		||||
 static void nak(int, const char *);
 | 
			
		||||
-- 
 | 
			
		||||
2.25.0
 | 
			
		||||
 | 
			
		||||
@@ -1,83 +0,0 @@
 | 
			
		||||
# Copyright 1999-2021 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI="7"
 | 
			
		||||
 | 
			
		||||
inherit systemd toolchain-funcs
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Port of the OpenBSD TFTP server"
 | 
			
		||||
HOMEPAGE="https://www.kernel.org/pub/software/network/tftp/"
 | 
			
		||||
SRC_URI="https://www.kernel.org/pub/software/network/tftp/${PN}/${P}.tar.xz"
 | 
			
		||||
 | 
			
		||||
LICENSE="BSD-4"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos"
 | 
			
		||||
IUSE="ipv6 readline selinux tcpd +client +server"
 | 
			
		||||
 | 
			
		||||
DEPEND="
 | 
			
		||||
	readline? ( sys-libs/readline:0= )
 | 
			
		||||
	tcpd? ( sys-apps/tcp-wrappers )
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
RDEPEND="${DEPEND}
 | 
			
		||||
	selinux? ( sec-policy/selinux-tftp )
 | 
			
		||||
	!net-ftp/atftp
 | 
			
		||||
	server? (
 | 
			
		||||
		!net-misc/iputils[tftpd(+)]
 | 
			
		||||
		!net-ftp/uftpd
 | 
			
		||||
	)
 | 
			
		||||
"
 | 
			
		||||
 | 
			
		||||
PATCHES=(
 | 
			
		||||
	"${FILESDIR}"/tftp-hpa-5.2-gcc-10.patch
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
src_prepare() {
 | 
			
		||||
	default
 | 
			
		||||
	# Pinkbyte: additional patch for Windows clients
 | 
			
		||||
	eapply "${FILESDIR}"/${P}-filecase.patch
 | 
			
		||||
	#
 | 
			
		||||
	sed -i "/^AR/s:ar:$(tc-getAR):" MCONFIG.in || die
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_configure() {
 | 
			
		||||
	local myconf=(
 | 
			
		||||
		ac_cv_search_bsd_signal=no
 | 
			
		||||
		$(use_with ipv6)
 | 
			
		||||
		$(use_with tcpd tcpwrappers)
 | 
			
		||||
		$(use_with readline)
 | 
			
		||||
	)
 | 
			
		||||
	econf "${myconf[@]}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_compile() {
 | 
			
		||||
	emake version.h
 | 
			
		||||
	emake -C lib
 | 
			
		||||
	emake -C common
 | 
			
		||||
	if use client; then
 | 
			
		||||
		emake -C tftp
 | 
			
		||||
	fi
 | 
			
		||||
	if use server; then
 | 
			
		||||
		emake -C tftpd
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	dodoc README* CHANGES tftpd/sample.rules
 | 
			
		||||
 | 
			
		||||
	if use client; then
 | 
			
		||||
		emake INSTALLROOT="${D}" -C tftp install
 | 
			
		||||
	fi
 | 
			
		||||
	if use server; then
 | 
			
		||||
		emake INSTALLROOT="${D}" -C tftpd install
 | 
			
		||||
 | 
			
		||||
		newconfd "${FILESDIR}"/in.tftpd.confd-0.44 in.tftpd
 | 
			
		||||
		newinitd "${FILESDIR}"/in.tftpd.rc6 in.tftpd
 | 
			
		||||
 | 
			
		||||
		systemd_dounit "${FILESDIR}"/tftp.service
 | 
			
		||||
		systemd_dounit "${FILESDIR}"/tftp.socket
 | 
			
		||||
 | 
			
		||||
		insinto /etc/xinetd.d
 | 
			
		||||
		newins "${FILESDIR}"/tftp.xinetd tftp
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
DIST jitsi-2.10-5550.i686.rpm 46488540 BLAKE2B c2348c1e8c5cb9a527e3d77ece3ab3795bf0ec118c820e10628f79cf7aaa5904ca3a94b3ec7424adb65c11dc24222198e59ab916ea32a2b25e92e092850045f9 SHA512 f18c1ce639ddde638efa35c7a71cbc7c589e42b01930b7f08ab0fbcaed2f9f69ef918458e2f94601a01b055cc69f0e06de2575bff1e4c60a571b814be64bdbca
 | 
			
		||||
DIST jitsi-2.10-5550.x86_64.rpm 46491220 BLAKE2B bbbf7b380a6f0c6b6d89ddb9bd03ae2e19d34f7be4756e28ccfe45d21b8aaab5eac9f78e4fafaed80bf9b7b1ca7e4d5ad3b47a078d436f04d3740d9afa8d0ad7 SHA512 781d77675c727691ae0f7150a1d1d72ef9d639e0f1f10357ec7daa6671e150fc2241b91fce855a3fac68591223b00a377771ed4addfd82f8403a224cea80b40d
 | 
			
		||||
@@ -1,36 +0,0 @@
 | 
			
		||||
# Copyright 1999-2019 Gentoo Foundation
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit rpm
 | 
			
		||||
 | 
			
		||||
PV_RAND="5550"
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Secure IM communicator that supports SIP, XMPP, AIM/ICQ, Windows Live, Yahoo"
 | 
			
		||||
HOMEPAGE="https://jitsi.org/"
 | 
			
		||||
SRC_URI="
 | 
			
		||||
	x86? ( https://download.jitsi.org/jitsi/rpm/jitsi-${PV}-${PV_RAND}.i686.rpm )
 | 
			
		||||
	amd64? ( https://download.jitsi.org/jitsi/rpm/jitsi-${PV}-${PV_RAND}.x86_64.rpm )"
 | 
			
		||||
 | 
			
		||||
RESTRICT="strip"
 | 
			
		||||
 | 
			
		||||
LICENSE="LGPL-2"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~amd64 ~x86"
 | 
			
		||||
IUSE=""
 | 
			
		||||
 | 
			
		||||
DEPEND="app-arch/rpm2targz"
 | 
			
		||||
RDEPEND="virtual/jre"
 | 
			
		||||
 | 
			
		||||
QA_PREBUILT="usr/share/jitsi/lib/native/*"
 | 
			
		||||
 | 
			
		||||
S="${WORKDIR}"
 | 
			
		||||
 | 
			
		||||
src_unpack() {
 | 
			
		||||
	rpm_unpack
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	cp -pPR "${S}/usr" "${D}"/
 | 
			
		||||
}
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<maintainer type="person">
 | 
			
		||||
		<email>admin@pinkbyte.ru</email>
 | 
			
		||||
		<name>Sergey Popov</name>
 | 
			
		||||
	</maintainer>
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
DIST radiusplugin_v2.1.tar.gz 239270 SHA256 d858e9c26a2f71390ca2c0229eb3205fbe407876a6efda3f30433d20044ace88 SHA512 21d5fcb5f3aa607445d28cef1bed357a5027d4c54e0003d8e7d05874182c791031802703cb481e1f127a9582867d677452102df0b4eff6b2f6a5ea5a201d7738 WHIRLPOOL 75c8f106a98ae91f7e2cc8b51aa53bc3a0a0a010f22390f6c3edbb28e02ea194ee4f55061b763d6d3e5ea0cd45ba5f58b8de36647c89fdc32a04040fac80c5cb
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<maintainer type="person">
 | 
			
		||||
		<email>pinkbyte@gentoo.org</email>
 | 
			
		||||
		<name>Sergey Popov</name>
 | 
			
		||||
	</maintainer>
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
@@ -1,59 +0,0 @@
 | 
			
		||||
# Copyright 1999-2017 Gentoo Foundation
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
# $Header: $
 | 
			
		||||
 | 
			
		||||
EAPI=6
 | 
			
		||||
 | 
			
		||||
MY_PN="radiusplugin"
 | 
			
		||||
MY_P="${MY_PN}_v${PV}"
 | 
			
		||||
 | 
			
		||||
inherit flag-o-matic multilib toolchain-funcs
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Radiusplugin for OpenVPN"
 | 
			
		||||
HOMEPAGE="http://www.nongnu.org/radiusplugin/index.html"
 | 
			
		||||
SRC_URI="http://www.nongnu.org/radiusplugin/${MY_P}.tar.gz"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-2"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~amd64 ~x86"
 | 
			
		||||
 | 
			
		||||
# TODO: handle with optional doxygen documentation generation
 | 
			
		||||
#IUSE="doc"
 | 
			
		||||
IUSE=""
 | 
			
		||||
 | 
			
		||||
DEPEND="dev-libs/libgcrypt:="
 | 
			
		||||
RDEPEND="${DEPEND}
 | 
			
		||||
	net-vpn/openvpn"
 | 
			
		||||
 | 
			
		||||
S="${WORKDIR}/${MY_PN}"
 | 
			
		||||
 | 
			
		||||
src_prepare() {
 | 
			
		||||
	# Make compilation process verbose
 | 
			
		||||
	# Respect CFLAGS, LDFLAGS and compiler
 | 
			
		||||
	sed -i \
 | 
			
		||||
		-e 's:@$(CC):$(CC):g' \
 | 
			
		||||
		-e '/^CFLAGS/d' \
 | 
			
		||||
		-e '/^LDFLAGS/d' \
 | 
			
		||||
		Makefile || die 'sed on Makefile failed'
 | 
			
		||||
	# needed for proper compilation
 | 
			
		||||
	append-cflags -shared -fPIC -DPIC
 | 
			
		||||
 | 
			
		||||
	eapply_user
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_compile() {
 | 
			
		||||
	emake CC="$(tc-getCC)"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	insinto /etc/openvpn
 | 
			
		||||
	doins "${MY_PN}.cnf"
 | 
			
		||||
	exeinto "/usr/$(get_libdir)/openvpn"
 | 
			
		||||
	doexe "${MY_PN}.so"
 | 
			
		||||
	dodoc README ToDo
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	elog "Radiusplugin is installed into '/usr/$(get_libdir)/openvpn'"
 | 
			
		||||
	elog "Path for it should be set in your openvpn.conf"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 | 
			
		||||
<pkgmetadata>
 | 
			
		||||
	<maintainer type="person">
 | 
			
		||||
		<email>admin@pinkbyte.ru</email>
 | 
			
		||||
		<name>Sergey Popov</name>
 | 
			
		||||
	</maintainer>
 | 
			
		||||
</pkgmetadata>
 | 
			
		||||
@@ -1,41 +0,0 @@
 | 
			
		||||
# Copyright 1999-2020 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
EGIT_REPO_URI="https://www.uninformativ.de/git/sgopherd.git"
 | 
			
		||||
 | 
			
		||||
inherit git-r3
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Small Gopher Server written in GNU Bash"
 | 
			
		||||
HOMEPAGE="https://www.uninformativ.de/git/sgopherd/file/README.html"
 | 
			
		||||
SRC_URI=""
 | 
			
		||||
 | 
			
		||||
LICENSE="MIT"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS=""
 | 
			
		||||
 | 
			
		||||
DEPEND=""
 | 
			
		||||
RDEPEND="app-shells/bash
 | 
			
		||||
	sys-apps/sed
 | 
			
		||||
	sys-apps/xinetd"
 | 
			
		||||
 | 
			
		||||
src_prepare() {
 | 
			
		||||
	# Set default user to run sgopherd
 | 
			
		||||
	sed -i -e '/user/s/http/nobody/' xinetd/xinetd-example.conf || die 'sed failed'
 | 
			
		||||
	default
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
src_install() {
 | 
			
		||||
	dodoc README
 | 
			
		||||
	doman man8/"${PN}".8
 | 
			
		||||
	dobin "${PN}"
 | 
			
		||||
	insinto /etc/xinetd.d
 | 
			
		||||
	newins xinetd/xinetd-example.conf "${PN}"
 | 
			
		||||
	# TODO: add installation of systemd-related files
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	elog "${PN} can be launched through xinetd"
 | 
			
		||||
	elog "Configuration options are in /etc/xinetd.d/${PN}"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user