diff options
-rw-r--r-- | main/oidentd/APKBUILD | 20 | ||||
-rw-r--r-- | main/oidentd/oidentd.confd | 14 | ||||
-rw-r--r-- | main/oidentd/oidentd.initd | 26 | ||||
-rw-r--r-- | main/oidentd/oidentd.pre-install | 8 |
4 files changed, 30 insertions, 38 deletions
diff --git a/main/oidentd/APKBUILD b/main/oidentd/APKBUILD index 594051a023..98d8dd7853 100644 --- a/main/oidentd/APKBUILD +++ b/main/oidentd/APKBUILD @@ -1,23 +1,21 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=oidentd -pkgver=2.2.3 +pkgver=2.4.0 pkgrel=0 pkgdesc="Configurable IDENT server that supports NAT/IP masq" url="https://oidentd.janikrabe.com" arch="all" license="GPL-2.0-only" -makedepends="bison flex linux-headers" -subpackages="$pkgname-doc" -source="https://github.com/janikrabe/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2 +makedepends="bison flex linux-headers libnetfilter_conntrack-dev" +install="$pkgname.pre-install" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://files.janikrabe.com/pub/oidentd/releases/$pkgver/oidentd-$pkgver.tar.xz $pkgname.initd $pkgname.confd " -builddir="$srcdir/$pkgname-$pkgver" build() { - cd "$builddir" - ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -29,14 +27,12 @@ build() { } package() { - cd "$builddir" - make DESTDIR="$pkgdir" install install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname } -sha512sums="c9ab6819e54ad1b8ff59b72f9aebc300b3a31cf7cfe689ec2f34337bf3e5755a7a67a7724ccf388dd3c7c90330cd955dfc790f61efa716931456c42cff2bcb67 oidentd-2.2.3.tar.bz2 -b161b75eb315185d836c25e94393c927fc16136519901eaecae62622ea5556fdafc1f8af70457ad1f7890e50d46d3939b8f0dd97050a183b0055d94d78e26f5d oidentd.initd -41156b9030e1f64e5849dae36bd67f3489a0921a7f3f9fc3cfdecd0e5fbe34b926cd784eaf9e41d7dcdca87ed037834ad1e347f1770f0bcf08b74f4a742341c0 oidentd.confd" +sha512sums="3dc6f8ba1c374c21bbc721516f83c5b825d5bc75dbda390d5e5e0e72ceac31495380a6025c626edcec4f8685a009f5be9571606c50e28fc28dc9f73a20f1b2d0 oidentd-2.4.0.tar.xz +8f4efbd888ab729be6e04197a6f05080a2c5cc3d0c2b6944529f087a9be3a5e4946138aed9c8d74bdce64664e9ba5f2533859e950c6083ce778dac5147cb6a60 oidentd.initd +387acc88fb9331ea57614785abc679dea69401c2d6d266c1481da208d8f9c9d5fb15619aab3871fff51aa5871bd1bd5f55baa7ba9748e8ced97d7d1fbabb1b40 oidentd.confd" diff --git a/main/oidentd/oidentd.confd b/main/oidentd/oidentd.confd index 32c9b9bdbd..cad263f5ed 100644 --- a/main/oidentd/oidentd.confd +++ b/main/oidentd/oidentd.confd @@ -1,13 +1,3 @@ # Configuration for /etc/init.d/oidentd - -# Path of the configuration file. -#cfgfile="/etc/oidentd.conf" - -# User or UID to run as after dropping privileges. -#user="nobody" - -# Group or GID to run as after dropping privileges. -#group="nobody" - -# Additional options for oidentd. -#command_args="" +# cfgfile=/etc/oidentd.conf +# opts="" diff --git a/main/oidentd/oidentd.initd b/main/oidentd/oidentd.initd index a1a880ba97..08d0117650 100644 --- a/main/oidentd/oidentd.initd +++ b/main/oidentd/oidentd.initd @@ -1,23 +1,21 @@ #!/sbin/openrc-run +supervisor=supervise-daemon -# Upper case variables are for backward compatibility only. -: ${cfgfile:="/etc/oidentd.conf"} -: ${user:=${USER:-"nobody"}} -: ${group:=${GROUP:-"nobody"}} - -command="/usr/sbin/oidentd" -command_args=" - --foreground - --config $cfgfile - --user $user - --group $group - ${command_args:-$OPTIONS}" -command_background="yes" -pidfile="/run/$RC_SVCNAME.pid" +: ${cfgfile:=/etc/oidentd.conf} +command=/usr/sbin/oidentd +command_args="-u oidentd -g oidentd $opts" +command_args_foreground="--foreground" required_files="$cfgfile" +extra_started_commands="reload" depend() { need net after firewall } + +reload() { + ebegin "Reloading $RC_SVCNAME configuration" + $supervisor $RC_SVCNAME --signal HUP + eend $? +} diff --git a/main/oidentd/oidentd.pre-install b/main/oidentd/oidentd.pre-install new file mode 100644 index 0000000000..6751687b21 --- /dev/null +++ b/main/oidentd/oidentd.pre-install @@ -0,0 +1,8 @@ +#!/bin/sh + +name=oidentd + +addgroup -S "$name" 2>/dev/null +adduser -S -D -H -h /var/empty -s /bin/nologin -G $name -g $name $name 2>/dev/null + +exit 0 |