3 2

[alpine-aports] [PATCH] testing/gdnsd: new aport

Details
Message ID
<1456148606-10120-1-git-send-email-k.scherban@gmail.com>
Sender timestamp
1456148606
DKIM signature
missing
Download raw message
Patch: +107 -0
From: Konstantin Shcherban <k.scherban@gmail.com>

https://github.com/gdnsd/gdnsd/
Geographic Authoritative DNS server
---
 testing/gdnsd/APKBUILD          | 56 +++++++++++++++++++++++++++++++++++++++++
 testing/gdnsd/gdnsd.initd       | 46 +++++++++++++++++++++++++++++++++
 testing/gdnsd/gdnsd.pre-install |  5 ++++
 3 files changed, 107 insertions(+)
 create mode 100644 testing/gdnsd/APKBUILD
 create mode 100755 testing/gdnsd/gdnsd.initd
 create mode 100644 testing/gdnsd/gdnsd.pre-install

diff --git a/testing/gdnsd/APKBUILD b/testing/gdnsd/APKBUILD
new file mode 100644
index 0000000..fbd1bb5
--- /dev/null
+++ b/testing/gdnsd/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Timo Teräs <timo.teras@iki.fi>
+pkgname=gdnsd
+pkgver=2.2.2
+pkgrel=1
+pkgdesc="Geographic Authoritative DNS server"
+url="https://github.com/gdnsd/gdnsd/"
+arch="all"
+license="GPL3"
+depends=""
+depends_dev=""
+makedepends="userspace-rcu-dev libev-dev libcap-dev ragel autoconf automake libtool"
+install="$pkgname.pre-install"
+subpackages="$pkgname-dev $pkgname-doc"
+source="saveas-https://github.com/blblack/gdnsd/archive/v$pkgver.tar.gz/gdnsd-$pkgver.tar.gz
+	gdnsd.initd"
+
+_builddir="$srcdir"/gdnsd-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+	autoreconf -vif
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--localstatedir=/var \
+		--enable-fast-install \
+		|| return 1
+	make || return 1
+	install -Dm755 "$srcdir"/gdnsd.initd \
+		"$pkgdir"/etc/init.d/gdnsd || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+        install -Dm755 "$srcdir"/gdnsd.initd \
+		"$pkgdir"/etc/init.d/gdnsd || return 1
+}
+md5sums="67714ffdd04c6c15bc5f9dc492794b80  gdnsd-2.2.2.tar.gz
+ddb2591fdeac1c0c0f04f6d7c6e0af2c  gdnsd.initd"
+sha256sums="e951f29f2710886f2bec089a34acb2857c000eb90565a70b2b96b94534b9c3eb  gdnsd-2.2.2.tar.gz
+f6304d3dc49cced580ad30f450887d3daaa98685b901332b62b8c6ec9798ce99  gdnsd.initd"
+sha512sums="056f4976fb5e0ae7b7cef649e0b7be43fbcf85331781240c63b508367aa71d32c2cd2e12075fd520738ab313366cdd3bf79edd86950993e8fa2274f6a3ee64b0  gdnsd-2.2.2.tar.gz
+9abfeb63156828f98b9a96ddb51c3828311331e56c98f17f0a3bdbd261d351549aef55c6cbcf351fdf2ac0a22f2be7b8e8930e3a0d89d74b6b5bec90bc422f16  gdnsd.initd"
diff --git a/testing/gdnsd/gdnsd.initd b/testing/gdnsd/gdnsd.initd
new file mode 100755
index 0000000..7a4c2ee
--- /dev/null
+++ b/testing/gdnsd/gdnsd.initd
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+
+name="gdnsd daemon"
+extra_commands="configtest"
+extra_started_commands="reload fastrestart"
+description="Geographic Authoritative DNS server"
+description_configtest="Run syntax tests for configuration files only."
+description_reload="Signal running gdnsd to reload configuration files"
+description_fastrestart="Optimized restart sequence (minimizes down time)"
+
+
+depend() {
+	need net
+	use logger
+	after firewall
+	provide auth-dns
+}
+
+act() {
+	ebegin "$1 ${SVCNAME}"
+	/usr/sbin/gdnsd $2
+	eend $?
+}
+
+configtest() {
+	act "Checking configuration" checkconf
+}
+
+start() {
+	act "Starting" start
+}
+
+stop () {
+	if [ "${RC_CMD}" = "restart" ]; then
+		configtest || return 1
+	fi
+	act "Stopping" stop
+}
+
+restart() {
+	act "Restarting" restart
+}
+
+reload-zones() {
+	act "Reloading" reload-zones
+}
diff --git a/testing/gdnsd/gdnsd.pre-install b/testing/gdnsd/gdnsd.pre-install
new file mode 100644
index 0000000..dc6e44b
--- /dev/null
+++ b/testing/gdnsd/gdnsd.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup gdnsd 2>/dev/null
+adduser -S -H -h /dev/null -s /sbin/nologin -D -G gdnsd gdnsd 2>/dev/null
+exit 0
-- 
2.6.4



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Timo Teras
Details
Message ID
<20160222203127.344ea835@vostro>
In-Reply-To
<1456148606-10120-1-git-send-email-k.scherban@gmail.com> (view parent)
Sender timestamp
1456165887
DKIM signature
missing
Download raw message
On Mon, 22 Feb 2016 13:43:26 +0000
k.scherban@gmail.com wrote:

> From: Konstantin Shcherban <k.scherban@gmail.com>
> 
> https://github.com/gdnsd/gdnsd/
> Geographic Authoritative DNS server
> ---

Is there any particular reason (e.g. configuration file
incompatibility) why you suggest adding this to testing, instead of
just upgrading the package in main?

Thanks,
Timo
 


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Konstantin
Details
Message ID
<CADLF7mA+dKeuDRX1NHhzhJ6F7ZwznsPpx86+HJB=2hq261+u6Q@mail.gmail.com>
In-Reply-To
<20160222203127.344ea835@vostro> (view parent)
Sender timestamp
1456167082
DKIM signature
missing
Download raw message
Hello Timo,

There are several configuration incompatibilities from 1.x.x branch as well
as signal processing and daemon parameters changes.
See: http://gdnsd.org/2014/10/02/version-2.0.0-released.html

Also I haven't tested compiled package under Alpine Linux as i don't know
how to install it locally.

--
Regards,
Konstantin

2016-02-22 21:31 GMT+03:00 Timo Teras <timo.teras@iki.fi>:

> On Mon, 22 Feb 2016 13:43:26 +0000
> k.scherban@gmail.com wrote:
>
> > From: Konstantin Shcherban <k.scherban@gmail.com>
> >
> > https://github.com/gdnsd/gdnsd/
> > Geographic Authoritative DNS server
> > ---
>
> Is there any particular reason (e.g. configuration file
> incompatibility) why you suggest adding this to testing, instead of
> just upgrading the package in main?
>
> Thanks,
> Timo
>
>
Timo Teras
Details
Message ID
<20160222224416.4c9caada@vostro>
In-Reply-To
<CADLF7mA+dKeuDRX1NHhzhJ6F7ZwznsPpx86+HJB=2hq261+u6Q@mail.gmail.com> (view parent)
Sender timestamp
1456173856
DKIM signature
missing
Download raw message
On Mon, 22 Feb 2016 21:51:22 +0300
Konstantin <k.scherban@gmail.com> wrote:

> Hello Timo,
> 
> There are several configuration incompatibilities from 1.x.x branch
> as well as signal processing and daemon parameters changes.
> See: http://gdnsd.org/2014/10/02/version-2.0.0-released.html
> 
> Also I haven't tested compiled package under Alpine Linux as i don't
> know how to install it locally.

Fair enough. Pushed. I did reset pkgrel to 0. We start at zero for each
new revision.

Thanks,
Timo


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---