net-dns/ddclient: bump to version 3.9.0
authorConrad Kostecki <conrad@kostecki.com>
Sat, 1 Sep 2018 21:24:57 +0000 (23:24 +0200)
committerAaron W. Swenson <titanofold@gentoo.org>
Sun, 2 Sep 2018 10:23:42 +0000 (06:23 -0400)
Closes: https://bugs.gentoo.org/665070
Package-Manager: Portage-2.3.48, Repoman-2.3.10
Closes: https://github.com/gentoo/gentoo/pull/9762

net-dns/ddclient/Manifest
net-dns/ddclient/ddclient-3.9.0.ebuild [new file with mode: 0644]
net-dns/ddclient/files/ddclient-3.9.0-use_iproute2.patch [new file with mode: 0644]
net-dns/ddclient/files/ddclient.initd-r5 [new file with mode: 0644]
net-dns/ddclient/files/ddclient.service-r1 [new file with mode: 0644]
net-dns/ddclient/metadata.xml

index 03aaf5c5581ad3927912a3a9c122123ad65753d5..54506bc1f8064875c40505dbfbe585cd76502905 100644 (file)
@@ -1,3 +1,4 @@
 DIST ddclient-3.8.1.tar.gz 48600 BLAKE2B a945adcb42bd298422c71c0eea6bea36c6b266ce39e97ebfd833b29819a2f30f2651d7f7b17dbfc0720b6209d0c0ed94bf2673624777f07e6de83a7081471995 SHA512 d6722582dffe0c5a806176f24bd3d9117bc1210ea0137aa92138390be16e67d47b746777dc431282a664849c91626969a5e267777126bac03304c7aa34a9dad7
 DIST ddclient-3.8.2.tar.gz 46059 BLAKE2B 95dc19f26fe4a14d67154ad86723882ef371545156d88119d000366d97e045f37e9d6af229a24950740b915404cb35250baf05aa7cf1268f756ce7b1e776c6cb SHA512 8f74ce90ce4a31b8d53887b99556661343b96734ae630403434689459eaeb1354159ae26f0404b9db21a0ff4151816d1650746a13c547064748656a8c6e3f13b
 DIST ddclient-3.8.3.tar.gz 54516 BLAKE2B a472c84c05b6eccdef3ead0abfa6e38d5ef04fdc0df3327dad2181088102f1b40ac7986492c8d964589e3994cace9103ba56664809174f99d14d9c86c377c46a SHA512 055b6edf91a3b72d9ba80c9dedfbc1d60f62d6879bc722735488a5a1a37fafeb2e97567da98939ccc62fd39b0846438dfad1c022635d602c67bafda178574a76
+DIST ddclient-3.9.0.tar.gz 59018 BLAKE2B b9b58108d9f124fcd5a72cc57bfb0e6a5bc2e115edc27a1d5950a929670d67d5c703b09f51e7e82e977ccfb544d115da177b0ac8dc06a76a800aa207cde5a42d SHA512 ae314c96a37dd90256d6acf62f4a4523b72f540194131e351a032239b00b4520351f6549d3b20a9209fe49ccc6de7ce158ffa8635d341066ea71b789dc667438
diff --git a/net-dns/ddclient/ddclient-3.9.0.ebuild b/net-dns/ddclient/ddclient-3.9.0.ebuild
new file mode 100644 (file)
index 0000000..850df0d
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit systemd user
+
+DESCRIPTION="Perl client used to update dynamic DNS entries"
+HOMEPAGE="https://sourceforge.net/projects/ddclient/"
+SRC_URI="mirror://sourceforge/ddclient/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~mips ~x86 ~x86-fbsd"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="examples iproute2"
+
+RDEPEND="dev-lang/perl
+       dev-perl/Data-Validate-IP
+       dev-perl/Digest-SHA1
+       dev-perl/IO-Socket-INET6
+       dev-perl/IO-Socket-SSL
+       virtual/perl-Digest-SHA
+       virtual/perl-JSON-PP
+       iproute2? ( sys-apps/iproute2 )"
+
+pkg_setup() {
+       enewgroup ddclient
+       enewuser ddclient -1 -1 -1 ddclient
+}
+
+src_prepare() {
+       # Remove PID setting, to reliably setup the environment for the init script
+       sed -e '/^pid/d' -i sample-etc_ddclient.conf || die
+
+       # Remove windows executable
+       if use examples; then
+               rm sample-etc_dhcpc_dhcpcd-eth0.exe || die
+       fi
+
+       # Use sys-apps/iproute2 instead of sys-apps/net-tools
+       use iproute2 && eapply "${FILESDIR}"/${P}-use_iproute2.patch
+
+       default
+}
+
+src_install() {
+       dobin ddclient
+
+       newinitd "${FILESDIR}"/ddclient.initd-r5 ddclient
+       systemd_newunit "${FILESDIR}"/ddclient.service-r1 ddclient
+
+       insinto /etc/ddclient
+       insopts -m 0600 -o ddclient -g ddclient
+       newins sample-etc_ddclient.conf ddclient.conf
+
+       newinitd "${FILESDIR}"/ddclient.initd-r5 ddclient
+       systemd_dounit "${FILESDIR}"/ddclient.service
+
+       dodoc Change* README* RELEASENOTE TODO UPGRADE
+
+       if use examples; then
+               docinto examples
+               dodoc sample-*
+       fi
+}
diff --git a/net-dns/ddclient/files/ddclient-3.9.0-use_iproute2.patch b/net-dns/ddclient/files/ddclient-3.9.0-use_iproute2.patch
new file mode 100644 (file)
index 0000000..b57f78b
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/ddclient 2018-08-09 17:58:16.000000000 +0200
++++ b/ddclient 2018-09-01 22:35:43.000000000 +0200
+@@ -710,7 +710,7 @@
+     [ "ip",          "=s", "-ip address           : set the IP address to 'address'" ],
+     "",                            
+     [ "if",          "=s", "-if interface         : obtain IP address from 'interface'" ],
+-    [ "if-skip",     "=s", "-if-skip pattern      : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ],
++    [ "if-skip",     "=s", "-if-skip pattern      : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ],
+     "",
+     [ "web",         "=s", "-web provider|url     : obtain IP address from provider's IP checking page" ],
+     [ "web-skip",    "=s", "-web-skip pattern     : skip any IP addresses before 'pattern' on the web provider|url" ],
+@@ -1448,7 +1448,7 @@
+     {
+       local $opt{'use'} = 'if';
+-      foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) {
++      foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) {
+           $if =~ s/:?\s.*//is;
+           local $opt{'if'} = $if;
+           printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND');
+@@ -2165,7 +2165,7 @@
+     } elsif ($use eq 'if') {
+       $skip  = opt('if-skip', $h)  || '';
+-      $reply = `ifconfig $arg 2> /dev/null`;
++      $reply = `ip addr show $arg 2> /dev/null`;
+       $reply = `ip addr list dev $arg 2> /dev/null` if $?;
+       $reply = '' if $?;
diff --git a/net-dns/ddclient/files/ddclient.initd-r5 b/net-dns/ddclient/files/ddclient.initd-r5
new file mode 100644 (file)
index 0000000..a2284a2
--- /dev/null
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+name="DDclient"
+pidfile="/run/ddclient/${RC_SVCNAME}.pid"
+
+command="/usr/bin/ddclient"
+command_args="-pid ${pidfile}"
+command_group="ddclient"
+command_user="ddclient"
+
+depend() {
+       use dns logger
+}
+
+start_pre() {
+       checkpath -f -m 0600 -o ${command_user}:${command_group} /etc/ddclient/ddclient.conf
+       checkpath -d -m 0700 -o ${command_user}:${command_group} /run/ddclient
+       checkpath -d -m 0700 -o ${command_user}:${command_group} /var/cache/ddclient
+}
diff --git a/net-dns/ddclient/files/ddclient.service-r1 b/net-dns/ddclient/files/ddclient.service-r1
new file mode 100644 (file)
index 0000000..77cc3f7
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+After=network-online.target
+ConditionPathExists=/etc/ddclient/ddclient.conf
+Description=DDclient
+
+[Service]
+ExecStart=/usr/sbin/ddclient --foreground
+Group=ddclient
+Type=simple
+User=ddclient
+
+[Install]
+WantedBy=multi-user.target
index e4faff9063ad23a626eb11f15e3b0bdf77d96391..4e40c4923a780ddce80e6913ebfe84fdb48b6267 100644 (file)
@@ -1,15 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <maintainer type="person">
-    <email>titanofold@gentoo.org</email>
-    <name>Aaron W. Swenson</name>
-  </maintainer>
-  <use>
-    <flag name="cloudflare">Enable support for updating IP address via CloudFlare</flag>
-    <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag>
-  </use>
-  <upstream>
-    <remote-id type="sourceforge">ddclient</remote-id>
-  </upstream>
+       <maintainer type="person">
+               <email>titanofold@gentoo.org</email>
+               <name>Aaron W. Swenson</name>
+       </maintainer>
+       <maintainer type="person">
+               <email>ck+gentoo@bl4ckb0x.de</email>
+               <name>Conrad Kostecki</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <use>
+               <flag name="cloudflare">Enable support for updating IP address via CloudFlare</flag>
+               <flag name="examples">Install various example files, like for cron.</flag>
+               <flag name="hardened">Use iproute2 instead of ifconfig to grab an IP address</flag>
+               <flag name="iproute2">Use <pkg>sys-apps/iproute2</pkg> instead of <pkg>sys-apps/net-tools</pkg> for interaction.</flag>
+       </use>
+       <longdescription>
+               DDclient is a perl client used to update dynamic DNS entries
+               for accounts on dynamic DNS network service providers.
+               It has the capability to update more than just dynamic DNS
+               and it can fetch WAN-IP-addresses in a few different ways.
+       </longdescription>
+       <upstream>
+               <bugs-to>https://sourceforge.net/p/ddclient/bugs/</bugs-to>
+               <remote-id type="sourceforge">ddclient</remote-id>
+       </upstream>
 </pkgmetadata>