X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by lists.alpinelinux.org (Postfix) with ESMTP id BC4EDF857DF for ; Tue, 1 Jan 2019 15:23:08 +0000 (UTC) Received: by mail-wr1-f43.google.com with SMTP id p4so28357202wrt.7 for ; Tue, 01 Jan 2019 07:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=duOvZsgwS/Vwb3gRDdgd1PLL1bUZ6e0/m3X0Kmk+nVo=; b=a1gJ8qf0wSLmRN8uXl+CPDugm8czM1tjrxq6zd1NaZp0VxCfwvcnwtR9DML/4QnmcO y/PApUL0N/V17EgZ5nktMIG60PEgKRKadeQkd14aJHPkozdVIYrA22u7gM2ZpecKIYtT YdCqeq++3fGlpsBp/9/cbADNC3rAG1sj3tMY3TZWuvzi40SOHmpMw2OC89f4scX9twXN AnL8of1uhP62Hl5mCXogk6qmcViXnH1WtEQ1m1kHfSaKox3Q8/zZEbxn0clKz5iAbQAP gB7nkigPNi3RaG4MtgewlqVpLweal50KMPtSrtGBg59NfEAbVR5pRrG6evBzeFFDmFar sPfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=duOvZsgwS/Vwb3gRDdgd1PLL1bUZ6e0/m3X0Kmk+nVo=; b=c7J8+s4rmTFkUChgyHRvhpfIkKzVWXuqB60+DAa0yf1o02QacY1mcxD4t8X4o4IPwP fAVA0UcXqNHpwWe3XG56LbGaGuvt0y4WEindTDaUtkIT6TZCTwsk4eXuNIi93ma2NTU+ pzcVD6c8imXFGNrlQ1hTJ9KZyroHE9BSKNanKBw7PgaMa7/ygC53zEnp5VT2xKlsREgB MoLJ2cNF3yzkbOCCFfB7MxusMxMJXlLmc3zvqi0gjS0AuHmszVof4KqrTC97bbmQpFte hDSC/wd21zy17hT/YoJswdj4RytKKgL0gI4WIrstLcUva4ZKdpvzbnp0TWru68aRVedP DimQ== X-Gm-Message-State: AJcUukcgqZXulDfKgpLXc35SjDtf1vbt45ISHlPZZ19oWJWi95h4eca7 9872aLofsbYkQRfAhR2bkZE3vy78pnQ= X-Google-Smtp-Source: ALg8bN4rGXLial5Eyxx7MH9HImKvSTmGVAkhCtL4eve9Y0ZPFCG93gCSmH8aUaRYBtn/rofzr1Ogdw== X-Received: by 2002:adf:fc89:: with SMTP id g9mr34997827wrr.96.1546356187376; Tue, 01 Jan 2019 07:23:07 -0800 (PST) Received: from alpine.lan ([94.228.85.180]) by smtp.gmail.com with ESMTPSA id f187sm31226235wma.4.2019.01.01.07.23.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jan 2019 07:23:06 -0800 (PST) From: Martin Rusko To: alpine-aports@lists.alpinelinux.org Cc: Martin Rusko Subject: [alpine-aports] [PATCH v2] testing/minidyndns: new aport after review Date: Tue, 1 Jan 2019 16:22:35 +0100 Message-Id: <20190101152235.12881-1-martin.rusko@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: References: X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: https://github.com/arkanis/minidyndns A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs Changes v1 -> v2: - removed .pre-deinstall script stopping the daemon - disabled check explicitely - bumped release Note: Default options from confd file were left intact if they need to be modified. If the consensus tripple towards hardcoding them in the initd script, I will prepare v3. --- testing/minidyndns/APKBUILD | 48 +++++++++++++++++++++++++++++ testing/minidyndns/minidyndns.confd | 5 +++ testing/minidyndns/minidyndns.initd | 31 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 testing/minidyndns/APKBUILD 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..978337d8b3 --- /dev/null +++ b/testing/minidyndns/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Martin Rusko +# Maintainer: Martin Rusko +pkgname=minidyndns +pkgver=1.1.4 +pkgrel=1 +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="" +options="!check" # there is no testing suite at the moment +install="" +subpackages="$pkgname-doc $pkgname-openrc" +source="minidyndns-$pkgver.tar.gz::https://github.com/arkanis/minidyndns/archive/v$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" + +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.confd b/testing/minidyndns/minidyndns.confd new file mode 100644 index 0000000000..3cf5d10be2 --- /dev/null +++ b/testing/minidyndns/minidyndns.confd @@ -0,0 +1,5 @@ +# +# Specify daemon options here. +# + +minidyndns_opts="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml" diff --git a/testing/minidyndns/minidyndns.initd b/testing/minidyndns/minidyndns.initd new file mode 100644 index 0000000000..4a84ea07be --- /dev/null +++ b/testing/minidyndns/minidyndns.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run + +_logdir="/var/log/${RC_SVCNAME}" +command="ruby /usr/share/minidyndns/dns.rb" +command_args="$minidyndns_opts" +command_background="yes" + +description_reload="Reloading configuration" +extra_started_commands="reload" + +start_stop_daemon_args="--stdout $_logdir/access.log --stderr $_logdir/error.log" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + after firewall +} + +stop() { + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop --exec "$command" \ + --pidfile "$pidfile" --signal INT + eend $? +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --exec "$command" \ + --pidfile "$pidfile" --signal USR1 + eend $? +} -- 2.18.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---