summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2014-01-28 09:22:49 +0000
committerYixun Lan <dlan@gentoo.org>2014-01-28 09:22:49 +0000
commit070b15426ccf3dbe7a285baf815c245919a1f7dc (patch)
treef224be4425b16c851cdbfe99d9d3b1cb900c2ff0 /net-dns
parentVersion bump to 1.4.2. Drop older. (diff)
downloadgentoo-2-070b15426ccf3dbe7a285baf815c245919a1f7dc.tar.gz
gentoo-2-070b15426ccf3dbe7a285baf815c245919a1f7dc.tar.bz2
gentoo-2-070b15426ccf3dbe7a285baf815c245919a1f7dc.zip
support ipv6 address via -a option, bug #432764, thanks Andreas Steinmetz
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/ez-ipupdate/ChangeLog11
-rw-r--r--net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild124
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff41
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate.initd14
4 files changed, 182 insertions, 8 deletions
diff --git a/net-dns/ez-ipupdate/ChangeLog b/net-dns/ez-ipupdate/ChangeLog
index c0b3e6f1f326..fa8cd51d9e70 100644
--- a/net-dns/ez-ipupdate/ChangeLog
+++ b/net-dns/ez-ipupdate/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-dns/ez-ipupdate
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/ChangeLog,v 1.36 2013/10/13 16:00:04 pacho Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/ChangeLog,v 1.37 2014/01/28 09:22:49 dlan Exp $
+
+*ez-ipupdate-3.0.11.13.3_beta8-r1 (28 Jan 2014)
+
+ 28 Jan 2014; Yixun Lan <dlan@gentoo.org>
+ +ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild,
+ +files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff, files/ez-ipupdate.initd:
+ support ipv6 address via -a option, bug #432764, thanks Andreas Steinmetz
13 Oct 2013; Pacho Ramos <pacho@gentoo.org> files/ez-ipupdate.initd:
Stop using deprecated stuff for init.d (#466846)
diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild
new file mode 100644
index 000000000000..d20f2edb19ec
--- /dev/null
+++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r1.ebuild,v 1.1 2014/01/28 09:22:49 dlan Exp $
+
+EAPI="5"
+
+inherit eutils user versionator
+
+MY_BETA="$(get_version_component_range 6)"
+MY_PATCH="$(get_version_component_range 4-5)"
+MY_PV="$(get_version_component_range 1-3)${MY_BETA/beta/b}"
+
+DESCRIPTION="Dynamic DNS client for lots of dynamic dns services"
+HOMEPAGE="http://ez-ipupdate.com/"
+SRC_URI="mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}-${MY_PATCH}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ # apply debian patches
+ epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff"
+
+ # repair/apply additional debian patches
+ sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff
+ EPATCH_SOURCE="${S}/debian/patches" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch
+
+ # adding members.3322.org support
+ epatch "${FILESDIR}/${P}-3322.diff"
+
+ # adding www.dnsexit.com support
+ epatch "${FILESDIR}/${P}-dnsexit.diff"
+
+ # make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905)
+ epatch "${FILESDIR}/${P}-linux.diff"
+
+ # allows to set IPv6 via -a option, (bug #432764)
+ epatch "${FILESDIR}/${P}-ipv6.diff"
+
+ # repair format mask issues
+ sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die
+
+ # comment out obsolete options
+ sed -i -e "s:^\(run-as-user.*\):#\1:g" \
+ -e "s:^\(cache-file.*\):#\1:g" ex*conf || die
+
+ # make 'missing' executable (bug #103480)
+ chmod +x missing
+}
+
+src_configure() {
+ econf --bindir=/usr/sbin
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ newinitd "${FILESDIR}/ez-ipupdate.initd" ez-ipupdate
+ keepdir /etc/ez-ipupdate
+
+ # install docs
+ dodoc README
+ newdoc debian/README.Debian README.debian
+ newdoc debian/changelog ChangeLog.debian
+ newdoc CHANGELOG ChangeLog
+ doman debian/ez-ipupdate.8
+
+ # install example configs
+ docinto examples
+ dodoc ex*conf
+}
+
+pkg_preinst() {
+ enewgroup ez-ipupd
+ enewuser ez-ipupd -1 -1 /var/cache/ez-ipupdate ez-ipupd
+}
+
+pkg_postinst() {
+ chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate
+ chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate
+
+ elog
+ elog "Please create one or more config files in"
+ elog "/etc/ez-ipupdate/. A bunch of samples can"
+ elog "be found in the doc directory."
+ elog
+ elog "All config files must have a '.conf' extension."
+ elog
+ elog "Please do not use the 'run-as-user', 'run-as-euser',"
+ elog "'cache-file' and 'pidfile' options, since these are"
+ elog "handled internally by the init-script!"
+ elog
+ elog "If you want to use ez-ipupdate in daemon mode,"
+ elog "please add 'daemon' to the config file(s) and"
+ elog "add the ez-ipupdate init-script to the default"
+ elog "runlevel."
+ elog
+ elog "Without the 'daemon' option, you can run the"
+ elog "init-script with the 'update' parameter inside"
+ elog "your PPP ip-up script."
+ elog
+
+ if [ -f /etc/ez-ipupdate.conf ]; then
+ elog "!!! IMPORTANT UPDATE NOTICE !!!"
+ elog
+ elog "The ez-ipupdate init-script can now handle more"
+ elog "than one config file. New config file location is"
+ elog "/etc/ez-ipupdate/*.conf"
+ elog
+ if [ ! -f /etc/ez-ipupdate/default.conf ]; then
+ mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf
+ elog "Your old configuration has been moved to"
+ elog "/etc/ez-ipupdate/default.conf"
+ elog
+ fi
+ fi
+}
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
new file mode 100644
index 000000000000..ec41647e066f
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-ipv6.diff
@@ -0,0 +1,41 @@
+diff --git a/ez-ipupdate.c b/ez-ipupdate.c
+index ff093a9..eea7624 100644
+--- a/ez-ipupdate.c
++++ b/ez-ipupdate.c
+@@ -849,6 +849,27 @@ int is_dotted_quad(char *addr)
+ return(1);
+ }
+
++int is_ip_addr(char *addr)
++{
++#if HAVE_ARPA_INET_H
++ char dst[16];
++
++ if(inet_pton(AF_INET,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ if(inet_pton(AF_INET6,addr,dst) == 1)
++ {
++ return(1);
++ }
++
++ return(0);
++#else
++ return is_dotted_quad(addr);
++#endif
++}
++
+ void parse_service(char *str)
+ {
+ int i;
+@@ -1859,7 +1880,7 @@ int DYNDNS_check_info(void)
+ chomp(host);
+ }
+
+- if(address != NULL && !is_dotted_quad(address))
++ if(address != NULL && !is_ip_addr(address))
+ {
+ fprintf(stderr, "the IP address \"%s\" is invalid\n", address);
+ return(-1);
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
index f33b1ee044c1..760bbfb272c1 100644
--- a/net-dns/ez-ipupdate/files/ez-ipupdate.initd
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.4 2013/10/13 16:00:04 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/ez-ipupdate/files/ez-ipupdate.initd,v 1.5 2014/01/28 09:22:49 dlan Exp $
extra_commands="update"
@@ -35,9 +35,11 @@ start() {
return 1
fi
- if [ ! -d /var/run/ez-ipupdate ]; then
- mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
- fi
+ for dir in /var/run/ez-ipupdate /var/cache/ez-ipupdate; do
+ if [ ! -d ${dir} ]; then
+ mkdir -p /var/run/ez-ipupdate && chown ez-ipupd:ez-ipupd /var/run/ez-ipupdate
+ fi
+ done
for NAME in ${LIST}; do
local CONFIG="/etc/ez-ipupdate/${NAME}.conf"
@@ -45,7 +47,7 @@ start() {
local CACHEFILE="/var/cache/ez-ipupdate/${NAME}.cache"
ebegin "Starting ez-ipupdate (${NAME})"
start-stop-daemon -p "${PIDFILE}" --start --quiet --exec /usr/sbin/ez-ipupdate \
- --chuid ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
+ --user ez-ipupd:ez-ipupd -- -c "${CONFIG}" -F "${PIDFILE}" -b "${CACHEFILE}"
eend $?
done
return 0 # do not fail