Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,12 @@
# Default settings for xinetd. This file is sourced by /bin/sh from
# /etc/init.d/xinetd
# enable xinetd Inetd compat mode
INETD_COMPAT=Yes
# Options to pass to xinetd
#
# -stayalive comes by default : it can be removed if xinetd is expected
# not to start when no service is configured
#
XINETD_OPTS="-stayalive"
@@ -0,0 +1,64 @@
#!/bin/sh
#
# /etc/init.d/xinetd -- script to start and stop xinetd.
# Source function library.
. /etc/init.d/functions
if test -f /etc/default/xinetd; then
. /etc/default/xinetd
fi
test -x /usr/sbin/xinetd || exit 0
checkportmap () {
if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
echo
echo "WARNING: portmapper inactive - RPC services unavailable!"
echo " Commenting out or removing the RPC services from"
echo " the /etc/xinetd.conf file will remove this message."
echo
fi
fi
}
case "$1" in
start)
checkportmap
echo -n "Starting internet superserver: xinetd"
start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS
echo "."
;;
stop)
echo -n "Stopping internet superserver: xinetd"
start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
echo "."
;;
status)
status /usr/sbin/xinetd;
exit $?
;;
reload)
echo -n "Reloading internet superserver configuration: xinetd"
start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
echo "."
;;
force-reload)
echo "$0 force-reload: Force Reload is deprecated"
echo -n "Forcefully reloading internet superserver configuration: xinetd"
start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}"
exit 1
;;
esac
exit 0
@@ -0,0 +1,10 @@
[Unit]
Description=Xinetd A Powerful Replacement For Inetd
After=syslog.target network.target
[Service]
EnvironmentFile=-/etc/sysconfig/xinetd
ExecStart=@SBINDIR@/xinetd -dontfork "$EXTRAOPTIONS"
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,54 @@
SUMMARY = "Socket-based service activation daemon"
HOMEPAGE = "https://github.com/xinetd-org/xinetd"
DESCRIPTION = "xinetd is a powerful replacement for inetd, xinetd has access control mechanisms, extensive logging capabilities, the ability to make services available based on time, can place limits on the number of servers that can be started, and has deployable defence mechanisms to protect against port scanners, among other things."
LICENSE = "xinetd"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=55c5fdf02cfcca3fc9621b6f2ceae10f"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
SRC_URI = "git://github.com/openSUSE/xinetd.git;protocol=https;branch=master \
file://xinetd.init \
file://xinetd.default \
file://xinetd.service \
"
SRCREV = "6a4af7786630ce48747d9687e2f18f45ea6684c4"
S = "${WORKDIR}/git"
# https://github.com/xinetd-org/xinetd/pull/10 is merged into this git tree revision
CVE_STATUS[CVE-2013-4342] = "fixed-version: Fixed directly in git tree revision"
inherit autotools update-rc.d systemd pkgconfig
SYSTEMD_SERVICE:${PN} = "xinetd.service"
INITSCRIPT_NAME = "xinetd"
INITSCRIPT_PARAMS = "defaults"
PACKAGECONFIG ??= "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
CFLAGS += "-D_GNU_SOURCE"
CONFFILES:${PN} = "${sysconfdir}/xinetd.conf"
do_install:append() {
install -d "${D}${sysconfdir}/init.d"
install -d "${D}${sysconfdir}/default"
install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
# Install systemd unit files
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_system_unitdir}
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
${D}${systemd_system_unitdir}/xinetd.service
}
# Script for converting inetd.conf files into xinetd.conf files
PACKAGES =+ "${PN}-xconv"
FILES:${PN}-xconv = "${bindir}/xconv.pl"
RDEPENDS:${PN}-xconv += "perl"