1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-16 06:25:23 +00:00

Fix Debian package building for inetd systems

This commit is contained in:
Kim Holviala 2016-11-13 12:54:53 +02:00
parent 1ac3b6e220
commit dddb647153
8 changed files with 33 additions and 17 deletions

View File

@ -1,5 +1,9 @@
[ Automatically generated from git log ]
2016-11-13 Kim Holviala <kim@holviala.com>
* Added systemd entries to Debian logcheck ignore file
2016-10-18 Kim Holviala <kim@holviala.com>
* Fixed a potentially uninitialized char in strcut()

View File

@ -69,10 +69,7 @@ withwrap:
# Special targets
#
deb: ChangeLog
@echo
@echo "Debian package building can haz borken, plz wait some moar..."
@echo
@#dpkg-buildpackage -rfakeroot -uc -us
dpkg-buildpackage -rfakeroot -uc -us
ChangeLog:
if [ -d .git ]; then \

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
gophernicus (2.1) unstable; urgency=low
* New upstream release
-- Kim Holviala <kim@holviala.com> Sun, 13 Nov 2016 11:11:11 +0200
gophernicus (1.8.1) unstable; urgency=low
* New upstream release

6
debian/control vendored
View File

@ -2,15 +2,15 @@ Source: gophernicus
Section: net
Priority: extra
Maintainer: Kim Holviala <kim@holviala.com>
Build-Depends: debhelper (>= 5)
Build-Depends: debhelper (>= 5), libwrap0-dev
Standards-Version: 3.7.3
Homepage: gopher://gophernicus.org/1/software/gophernicus/server/
Package: gophernicus
Architecture: any
Depends: ${shlibs:Depends}, debconf, netbase, openbsd-inetd | inet-superserver | systemd
Depends: ${shlibs:Depends}, debconf, netbase, update-inetd, libwrap0, openbsd-inetd | inet-superserver | systemd
Recommends: lsb-release
Suggests: lynx, php5-cli
Suggests: php5-cli
Description: Modern full-featured gopher server
Gophernicus is a modern full-featured (and hopefully) secure
gopher daemon.

View File

@ -1,4 +1,4 @@
# Options for Gophernicus
# Options for Gophernicus for use with systemd
#
# See README or run "in.gophernicus -?" to see a full list of
# configuration options.
@ -6,5 +6,5 @@
# Example:
# OPTIONS="-h full.hostname -D \"I find your lack of gopher disturbing.\""
#
# Uncomment and add your options here:
OPTIONS="-h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters"
# Add your options here:
OPTIONS="-h __HOSTNAME__ -l __LOGDIR__/server.log -f /usr/lib/__PACKAGE__/filters"

9
debian/postinst vendored
View File

@ -12,6 +12,7 @@ PACKAGE=gophernicus
LOGDIR=/var/log/$PACKAGE
LIBDIR=/usr/lib/$PACKAGE
BINARY=in.gophernicus
DEFAULT=/etc/default/$PACKAGE
USER=nobody
# Get hostname from debconf
@ -29,6 +30,12 @@ if [ "$1" = "configure" ]; then
chown $USER.adm $LOGDIR
chmod 0750 $LOGDIR
#update-inetd --add "gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters"
sed -i -e "s|-h [^ ]* |-h $HOSTNAME |" $DEFAULT
sed -i -e "s|__PACKAGE__|$PACKAGE|g" $DEFAULT
sed -i -e "s|__LOGDIR__|$LOGDIR|g" $DEFAULT
if [ -f /etc/inetd.conf ]; then
/usr/sbin/update-inetd --add "gopher\t\tstream\ttcp\tnowait\t$USER\t/usr/sbin/$BINARY\t$BINARY -h $HOSTNAME -l $LOGDIR/server.log -f /usr/lib/$PACKAGE/filters"
fi
fi

6
debian/postrm vendored
View File

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$1" = "purge" -a -x "/usr/sbin/update-inetd" ]; then
if [ "$1" = "purge" -a -f "/etc/inetd.conf" ]; then
/usr/sbin/update-inetd --remove "#<off># gopher"
fi
@ -8,8 +8,4 @@ if [ -d "/run/systemd/system" ]; then
systemctl --system daemon-reload >/dev/null || true
fi
if [ -x "/usr/bin/deb-systemd-helper" ]; then
/usr/bin/deb-systemd-helper disable gophernicus.socket >/dev/null
fi
#DEBHELPER#

8
debian/prerm vendored
View File

@ -1,6 +1,12 @@
#!/bin/sh
#update-inetd --disable gopher
if [ -f "/etc/inetd.conf" ]; then
/usr/sbin/update-inetd --disable gopher
fi
if [ -x "/usr/bin/deb-systemd-helper" ]; then
/usr/bin/deb-systemd-helper disable gophernicus.socket >/dev/null
fi
#DEBHELPER#