Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: duiadns-1.1
Date: Tue, 21 Jul 2020 05:13:33 +0200	[thread overview]
Message-ID: <20200721031333.v7YHH2JquGU2uuzKWa0Ix9WRBClEHDjiNnNbiOve8sU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23678@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages duiadns
https://github.com/void-linux/void-packages/pull/23678

New package: duiadns-1.1


A patch file from https://github.com/void-linux/void-packages/pull/23678.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-duiadns-23678.patch --]
[-- Type: text/x-diff, Size: 3235 bytes --]

From 761ae376dec81d89aa70efbb5044b056157e0b89 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Mon, 20 Jul 2020 23:08:17 -0400
Subject: [PATCH] New package: duiadns-1.1

---
 srcpkgs/duiadns/INSTALL               |  8 ++++++++
 srcpkgs/duiadns/files/duiadns/log/run |  3 +++
 srcpkgs/duiadns/files/duiadns/run     | 25 +++++++++++++++++++++++++
 srcpkgs/duiadns/template              | 25 +++++++++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 100644 srcpkgs/duiadns/INSTALL
 create mode 100755 srcpkgs/duiadns/files/duiadns/log/run
 create mode 100755 srcpkgs/duiadns/files/duiadns/run
 create mode 100644 srcpkgs/duiadns/template

diff --git a/srcpkgs/duiadns/INSTALL b/srcpkgs/duiadns/INSTALL
new file mode 100644
index 00000000000..c652719da22
--- /dev/null
+++ b/srcpkgs/duiadns/INSTALL
@@ -0,0 +1,8 @@
+# INSTALL
+case "$ACTION" in
+post)
+	if [ "$UPDATE" != "yes" ]; then
+		chown _duiadns:_duiadns etc/duiadns.conf
+	fi
+	;;
+esac
diff --git a/srcpkgs/duiadns/files/duiadns/log/run b/srcpkgs/duiadns/files/duiadns/log/run
new file mode 100755
index 00000000000..94a82bf82da
--- /dev/null
+++ b/srcpkgs/duiadns/files/duiadns/log/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec vlogger -t duiadns
diff --git a/srcpkgs/duiadns/files/duiadns/run b/srcpkgs/duiadns/files/duiadns/run
new file mode 100755
index 00000000000..3e0c9119c34
--- /dev/null
+++ b/srcpkgs/duiadns/files/duiadns/run
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+[ -f ./conf ] && . ./conf
+
+# Make sure a configuration file exists
+: ${CONFIG:=/etc/duiadns.conf}
+[ -e "${CONFIG}" ] || exit 1
+
+if command -v snooze >/dev/null 2>&1; then
+	# Use snooze if available because time control is better
+
+	# PERIOD is a set of snooze arguments in this context
+	: ${PERIOD:=-H /1 -M /5 -s 5m -T 1m}
+	# TIMEFILE tracks the last runtime
+	: ${TIMEFILE:=/var/cache/duiadns/timefile}
+
+	exec chpst -u _duiadns:_duiadns \
+		snooze ${PERIOD} -t "${TIMEFILE}" \
+			sh -c "/usr/bin/duiadns '${CONFIG}'; : > '${TIMEFILE}'"
+else
+	# Fall back to dumb sleep if snooze is not available
+	# PERIOD is just the number of seconds to sleep in this context
+	sleep "${PERIOD:-300}" || exit 1
+	exec chpst -u _duiadns:_duiadns /usr/bin/duiadns "${CONFIG}"
+fi
diff --git a/srcpkgs/duiadns/template b/srcpkgs/duiadns/template
new file mode 100644
index 00000000000..ae34b00cb95
--- /dev/null
+++ b/srcpkgs/duiadns/template
@@ -0,0 +1,25 @@
+# Template file for 'duiadns'
+pkgname=duiadns
+version=1.1
+revision=1
+archs=noarch
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-netifaces python3-netaddr python3-requests"
+short_desc="Python client for Duiadns dynamic DNS hosting service"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="BSD-2-Clause"
+homepage="https://github.com/ahesford/duiadns"
+distfiles="${homepage}/archive/v${version}.tar.gz"
+checksum=d150f5d052ae3f2764bcfd6465c503fb9c620d994689ba093b5f926c72163638
+system_accounts="_duiadns"
+_duiadns_homedir="/var/empty"
+_duiadns_descr="duiadns user"
+make_dirs="/var/cache/duiadns 0755 _duiadns _duiadns"
+conf_files="/etc/duiadns.conf"
+
+post_install() {
+	vlicense LICENSE.txt
+	vinstall sample.conf 0600 etc duiadns.conf
+	vsv duiadns
+}

  reply	other threads:[~2020-07-21  3:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  3:11 [PR PATCH] " ahesford
2020-07-21  3:13 ` ahesford [this message]
2020-07-21  3:18 ` [PR PATCH] [Merged]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721031333.v7YHH2JquGU2uuzKWa0Ix9WRBClEHDjiNnNbiOve8sU@z \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).