summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-03-27 13:41:50 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-03-27 14:01:46 +0100
commit1a734fe06aaf3740e468940aedb229fbea2fd06a (patch)
tree7853eedefa8452a4d0e27b3af69f224c879a805e /net-dns
parentdev-util/re2c: bump up to 2.1 (diff)
downloadgentoo-1a734fe06aaf3740e468940aedb229fbea2fd06a.tar.gz
gentoo-1a734fe06aaf3740e468940aedb229fbea2fd06a.tar.bz2
gentoo-1a734fe06aaf3740e468940aedb229fbea2fd06a.zip
net-dns/ez-ipupdate: EAPI-7, readme.gentoo-r1
Closes: https://bugs.gentoo.org/670320 Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild64
-rw-r--r--net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-fix-format-mask.patch35
2 files changed, 64 insertions, 35 deletions
diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
index c264e1c1aba0..0f1e0db86e0e 100644
--- a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
+++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
@@ -1,27 +1,22 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
-inherit eutils readme.gentoo systemd user versionator
+EAPI=7
-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}"
+MY_BETA="$(ver_cut 6-)"
+MY_PATCH="$(ver_cut 4-5)"
+MY_PV="$(ver_cut 1-3)${MY_BETA/beta/b}"
+inherit readme.gentoo-r1 systemd user
DESCRIPTION="Dynamic DNS client for lots of dynamic dns services"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
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"
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE=""
-
-DEPEND=""
-RDEPEND=""
-
-S="${WORKDIR}/${PN}-${MY_PV}"
DISABLE_AUTOFORMATTING="yes"
DOC_CONTENTS="
@@ -44,35 +39,34 @@ init-script with the 'update' parameter inside
your PPP ip-up script.
"
-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
-
+PATCHES=(
# adding members.3322.org support
- epatch "${FILESDIR}/${P}-3322.diff"
-
+ "${FILESDIR}/${P}-3322.diff"
# adding www.dnsexit.com support
- epatch "${FILESDIR}/${P}-dnsexit.diff"
-
+ "${FILESDIR}/${P}-dnsexit.diff"
# make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905)
- epatch "${FILESDIR}/${P}-linux.diff"
-
+ "${FILESDIR}/${P}-linux.diff"
# allows to set IPv6 via -a option, (bug #432764)
- epatch "${FILESDIR}/${P}-ipv6.diff"
-
+ "${FILESDIR}/${P}-ipv6.diff"
# repair format mask issues
- sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die
+ "${FILESDIR}/${P}-fix-format-mask.patch"
+)
+
+src_prepare() {
+ # Debian patches
+ eapply "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff"
+ # repair/apply additional Debian patches
+ sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff || die
+ eapply debian/patches
+
+ default
# 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
+ chmod +x missing || die
}
src_configure() {
@@ -105,17 +99,17 @@ pkg_preinst() {
}
pkg_postinst() {
- chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate
- chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate
+ chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate || die
+ chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate || die
readme.gentoo_print_elog
- if [ -f /etc/ez-ipupdate.conf ]; then
+ if [[ -f /etc/ez-ipupdate.conf ]]; then
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"
- if [ ! -f /etc/ez-ipupdate/default.conf ]; then
- mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf
+ if [[ ! -f /etc/ez-ipupdate/default.conf ]]; then
+ mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf || die
elog "Your old configuration has been moved to"
elog "/etc/ez-ipupdate/default.conf"
fi
diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-fix-format-mask.patch b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-fix-format-mask.patch
new file mode 100644
index 000000000000..51663504e2c9
--- /dev/null
+++ b/net-dns/ez-ipupdate/files/ez-ipupdate-3.0.11.13.3_beta8-fix-format-mask.patch
@@ -0,0 +1,35 @@
+From fe3aa40dfc94640e4faedad68ac3e5fd57353111 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Sat, 27 Mar 2021 13:07:11 +0100
+Subject: [PATCH] Fix format mask issues
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ ez-ipupdate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ez-ipupdate.c b/ez-ipupdate.c
+index ff093a9..8d206da 100644
+--- a/ez-ipupdate.c
++++ b/ez-ipupdate.c
+@@ -2483,7 +2483,7 @@ int DHS_update_entry(void)
+ p += strlen(p);
+ limit = BUFFER_SIZE - 1 - strlen(buf);
+
+- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
++ snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", (int)strlen(putbuf));
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "\015\012");
+ output(buf);
+@@ -2620,7 +2620,7 @@ int DHS_update_entry(void)
+ p += strlen(p);
+ limit = BUFFER_SIZE - 1 - strlen(buf);
+
+- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf));
++ snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", (int)strlen(putbuf));
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "\015\012");
+ output(buf);
+--
+2.31.0
+