Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/minidyndns: new aport

From: Leonardo Arena <rnalrd_at_gmail.com>
Date: Mon, 31 Dec 2018 12:17:58 +0100

Hi,

thank you for the contribution. Please see some comments below.

On Sun, Dec 30, 2018 at 12:17 PM Martin Rusko <martin.rusko_at_gmail.com>
wrote:

> https://github.com/arkanis/minidyndns
> A simple no fuss DNS server with built-in HTTP/HTTPS interface to update
> IPs
> ---
> testing/minidyndns/APKBUILD | 55 +++++++++++++++++++
> .../minidyndns-openrc.pre-deinstall | 6 ++
> testing/minidyndns/minidyndns.confd | 5 ++
> testing/minidyndns/minidyndns.initd | 31 +++++++++++
> 4 files changed, 97 insertions(+)
> create mode 100644 testing/minidyndns/APKBUILD
> create mode 100644 testing/minidyndns/minidyndns-openrc.pre-deinstall
> create mode 100644 testing/minidyndns/minidyndns.confd
> create mode 100644 testing/minidyndns/minidyndns.initd
>
> diff --git a/testing/minidyndns/APKBUILD b/testing/minidyndns/APKBUILD
> new file mode 100644
> index 0000000000..ccb1d974e1
> --- /dev/null
> +++ b/testing/minidyndns/APKBUILD
> _at__at_ -0,0 +1,55 @@
> +# Contributor: Martin Rusko <martin.rusko_at_gmail.com>
> +# Maintainer: Martin Rusko <martin.rusko_at_gmail.com>
> +pkgname=minidyndns
> +pkgver=1.1.4
> +pkgrel=0
> +pkgdesc="A simple no fuss DNS server with built-in HTTP/HTTPS interface
> to update IPs"
> +url="https://github.com/arkanis/minidyndns"
> +arch="noarch"
> +license="MIT"
> +depends="ruby ruby-etc"
> +makedepends=""
> +install="$pkgname-openrc.pre-deinstall"
> +subpackages="$pkgname-doc $pkgname-openrc"
> +source="minidyndns-$pkgver.tar.gz::
> https://github.com/arkanis/minidyndns/archive/v$pkgver.tar.gz"
> +builddir="$srcdir/$pkgname-$pkgver"
> +
> +build() {
> + cd "$builddir"
> +}
> +
> +check() {
> + cd "$builddir"
> +}
> +
>


Since check() does effectly nothing here you should add "options=!check"
and perhaps adding a comment next to it there is no test suite.



> +package() {
> + cd "$builddir"
> +
> + install -Dm755 "$srcdir"/../minidyndns.initd \
> + "$pkgdir"/etc/init.d/minidyndns
> + install -Dm644 "$srcdir"/../minidyndns.confd \
> + "$pkgdir"/etc/conf.d/minidyndns
> +
> + install -Dm755 "$builddir"/dns.rb \
> + "$pkgdir"/usr/share/minidyndns/dns.rb
> +
> + install -Dm644 "$builddir"/config.example.yml \
> + "$pkgdir"/etc/minidyndns_config.yml
> +
> + install -d -o nobody -g nogroup "$pkgdir"/var/log/minidyndns
> +
> + install -d -o nobody -g nogroup "$pkgdir"/var/lib/minidyndns
> + install -Dm640 -o nobody -g nogroup "$builddir"/db.example.yml \
> + "$pkgdir"/var/lib/minidyndns/db.yml
> +
> + install -Dm644 "$builddir"/config.example.yml \
> +
> "$pkgdir"/usr/share/doc/minidyndns/config.example.yml
> +
> + install -Dm644 "$builddir"/db.example.yml \
> + "$pkgdir"/usr/share/doc/minidyndns/db.example.yml
> +
> + install -Dm644 "$builddir"/README.md \
> + "$pkgdir"/usr/share/doc/minidyndns/README.md
> +}
> +
> +sha512sums="523e53e1a937b4d3f36eb1666444fd9024b6c059c6b145be5d725670c24fc3b339cc75eae6dde61f62c09cb195805202440df84599d197d117f0cb575d6d4f6b
> minidyndns-1.1.4.tar.gz"
> diff --git a/testing/minidyndns/minidyndns-openrc.pre-deinstall
> b/testing/minidyndns/minidyndns-openrc.pre-deinstall
> new file mode 100644
> index 0000000000..712bc37943
> --- /dev/null
> +++ b/testing/minidyndns/minidyndns-openrc.pre-deinstall
> _at__at_ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +rc-service --ifexists minidyndns stop
> +rc-update --all del minidyndns
> +
> +exit 0
>


I saw your email on alpine-devel. So far there is no package trying to stop
the daemon before uninstalling and I think we would like to keep it that
way.
We don't try to be smart in our packages like other distros. We prefer to
keep things simple and we assume that the administrator knows what he is
doing. :)



> diff --git a/testing/minidyndns/minidyndns.confd
> b/testing/minidyndns/minidyndns.confd
> new file mode 100644
> index 0000000000..3cf5d10be2
> --- /dev/null
> +++ b/testing/minidyndns/minidyndns.confd
> _at__at_ -0,0 +1,5 @@
> +#
> +# Specify daemon options here.
> +#
> +
> +minidyndns_opts="--config /etc/minidyndns_config.yml --db
> /var/lib/minidyndns/db.yml"
>


Since these are default values, may be you can add those to the init script
itself and leave the conf file for customizations.

: ${minidyndns_opts:="--config /etc/minidyndns_config.yml --db
/var/lib/minidyndns/db.yml"}


 Thanks!

/eo



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Dec 31 2018 - 12:17:58 UTC