Re: [update] net/ddclient 3.10.0

2023-05-21 Thread Stefan Hagen
Morgan Aldridge wrote (2023-05-21 03:04 CEST):
> On Thu, Oct 20, 2022 at 6:20 PM Pascal Stumpf  wrote:
> >
> > Update to ddclient 3.10.0.
> >
> > * switched to auto(re)conf
> > * killed the samples (they are mostly useless)
> > * is there any reason we're placing the config file in a separate
> >   directory?  I kept the /etc/ddclient/ddclient.conf dance for now, but
> >   maybe we can just go with /etc/ddclient.conf?
> > * there is now the option to use curl.  I think it's reasonable to not
> >   add a dependency.  However, the path needs to be hardcoded.
> > * there are now tests.  One of them fails for a stupid reason.
> >
> > Works for my use case (afraid.freedns.org).  Please test with your
> > configuration.

> Builds under amd64/7.2-stable and successfully run-tested for my use case:
> Gandi LiveDNS. Actually, this version introduces Gandi LiveDNS support and
> many others, so is required in my setup.
> 
> I have yet to test under 7.3-stable or -current, but will try to do so in
> the next week or two now that I have working configs.

The port looks good. I shortly tested the client, not the daemon part.

OK sdk@

Best Regards,
Stefan

Updated patch that cleanly applies after the last REVISION bump for
convenience:


Index: net/ddclient/Makefile
===
RCS file: /cvs/ports/net/ddclient/Makefile,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 Makefile
--- net/ddclient/Makefile   8 Nov 2022 11:14:54 -   1.29
+++ net/ddclient/Makefile   21 May 2023 17:13:12 -
@@ -2,8 +2,7 @@ COMMENT=update client for dynamic DNS s
 
 GH_ACCOUNT=ddclient
 GH_PROJECT=ddclient
-GH_TAGNAME=v3.9.1
-REVISION=  0
+GH_TAGNAME=v3.10.0
 
 CATEGORIES=net
 
@@ -12,30 +11,26 @@ HOMEPAGE=   https://ddclient.net/
 # GPLv2+
 PERMIT_PACKAGE=Yes
 
-RUN_DEPENDS=   devel/p5-Data-Validate-IP \
-   net/p5-IO-Socket-INET6 \
+CONFIGURE_STYLE= gnu autoreconf
+AUTOMAKE_VERSION=  1.11
+AUTOCONF_VERSION=  2.63
+
+# hardcode path, but do not add a dependency
+CONFIGURE_ENV= CURL=${LOCALBASE}/bin/curl
+
+MAKE_ENV=  runstatedir=/var/run/ddclient
+FAKE_FLAGS=sysconfdir=${PREFIX}/share/examples/ddclient
+
+RUN_DEPENDS=   net/p5-IO-Socket-INET6 \
security/p5-IO-Socket-SSL
+TEST_DEPENDS=  devel/p5-Test-Warnings
 
-NO_BUILD=  Yes
-NO_TEST=   Yes
 PKG_ARCH=  *
 
-SAMPLES=   sample-etc_cron.d_ddclient sample-etc_ddclient.conf \
-   sample-etc_dhclient-exit-hooks sample-etc_dhcpc_dhcpcd-eth0.exe 
\
-   sample-etc_ppp_ip-up.local sample-ddclient-wrapper.sh
+SYSCONFDIR=${BASESYSCONFDIR}/ddclient
 
 post-extract:
-   @sed -i -e "s,/var/cache/ddclient/,/var/db/ddclient/,g;" \
-   -e "s,/etc/ddclient/,${SYSCONFDIR}/ddclient/,g" \
-   ${WRKSRC}/ddclient
-
-do-install:
-   ${INSTALL_SCRIPT} ${WRKSRC}/ddclient ${PREFIX}/sbin/
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ddclient
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ddclient
-   ${INSTALL_DATA} ${WRKSRC}/README* ${PREFIX}/share/doc/ddclient
-.for i in ${SAMPLES}
-   ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/examples/ddclient
-.endfor
+   @sed -i -e "s,/cache/ddclient,/db/ddclient,g" \
+   ${WRKSRC}/{ddclient.in,Makefile.am}
 
 .include 
Index: net/ddclient/distinfo
===
RCS file: /cvs/ports/net/ddclient/distinfo,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 distinfo
--- net/ddclient/distinfo   17 Jan 2021 15:46:53 -  1.12
+++ net/ddclient/distinfo   21 May 2023 17:13:12 -
@@ -1,2 +1,2 @@
-SHA256 (ddclient-3.9.1.tar.gz) = 5JaeFcxJH8Ur3NZJ1MKw5LG/DJ+duiNHHGNIcazFJHA=
-SIZE (ddclient-3.9.1.tar.gz) = 63469
+SHA256 (ddclient-3.10.0.tar.gz) = NLbZqUYpCvCSfidGCpZa0BinxSViUGOw84DL3f/AHBs=
+SIZE (ddclient-3.10.0.tar.gz) = 275494
Index: net/ddclient/patches/patch-ddclient
===
RCS file: net/ddclient/patches/patch-ddclient
diff -N net/ddclient/patches/patch-ddclient
--- net/ddclient/patches/patch-ddclient 11 Mar 2022 19:45:52 -  1.4
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,20 +0,0 @@
-Index: ddclient
 ddclient.orig
-+++ ddclient
-@@ -1163,16 +1163,6 @@ sub _read_config {
-   # fatal("Cannot open file '%s'. ($!)", $file);
-   warning("Cannot open file '%s'. ($!)", $file);
- }
--# Check for only owner has any access to config file
--my ($dev, $ino, $mode, @statrest) = stat(FD);
--if ($mode & 077) {  
--  if (-f FD && (chmod 0600, $file)) {
--  warning("file $file must be accessible only by its owner (fixed).");
--  } else {
--  # fatal("file $file must be accessible only by its owner.");
--  warning("file $file must be accessible only by its owner.");
--  }
--}
- 
- local $lineno  

Re: [update] net/ddclient 3.10.0

2023-05-20 Thread Morgan Aldridge
Builds under amd64/7.2-stable and successfully run-tested for my use case:
Gandi LiveDNS. Actually, this version introduces Gandi LiveDNS support and
many others, so is required in my setup.

I have yet to test under 7.3-stable or -current, but will try to do so in
the next week or two now that I have working configs.

Morgan

On Thu, Oct 20, 2022 at 6:20 PM Pascal Stumpf  wrote:
>
> Update to ddclient 3.10.0.
>
> * switched to auto(re)conf
> * killed the samples (they are mostly useless)
> * is there any reason we're placing the config file in a separate
>   directory?  I kept the /etc/ddclient/ddclient.conf dance for now, but
>   maybe we can just go with /etc/ddclient.conf?
> * there is now the option to use curl.  I think it's reasonable to not
>   add a dependency.  However, the path needs to be hardcoded.
> * there are now tests.  One of them fails for a stupid reason.
>
>
> Works for my use case (afraid.freedns.org).  Please test with your
> configuration.
>
>
> Index: Makefile
> ===
> RCS file: /home/cvs/ports/net/ddclient/Makefile,v
> retrieving revision 1.28
> diff -u -p -r1.28 Makefile
> --- Makefile11 Mar 2022 19:45:52 -  1.28
> +++ Makefile20 Oct 2022 22:04:21 -
> @@ -2,7 +2,7 @@ COMMENT=update client for dynamic DNS s
>
>  GH_ACCOUNT=ddclient
>  GH_PROJECT=ddclient
> -GH_TAGNAME=v3.9.1
> +GH_TAGNAME=v3.10.0
>
>  CATEGORIES=net
>
> @@ -11,30 +11,26 @@ HOMEPAGE=   https://ddclient.net/
>  # GPLv2+
>  PERMIT_PACKAGE=Yes
>
> -RUN_DEPENDS=   devel/p5-Data-Validate-IP \
> -   net/p5-IO-Socket-INET6 \
> +CONFIGURE_STYLE=gnu autoreconf
> +AUTOMAKE_VERSION=  1.11
> +AUTOCONF_VERSION=  2.63
> +
> +# hardcode path, but do not add a dependency
> +CONFIGURE_ENV= CURL=${LOCALBASE}/bin/curl
> +
> +MAKE_ENV=  runstatedir=/var/run/ddclient
> +FAKE_FLAGS=sysconfdir=${PREFIX}/share/examples/ddclient
> +
> +RUN_DEPENDS=   net/p5-IO-Socket-INET6 \
> security/p5-IO-Socket-SSL
> +TEST_DEPENDS=  devel/p5-Test-Warnings
>
> -NO_BUILD=  Yes
> -NO_TEST=   Yes
>  PKG_ARCH=  *
>
> -SAMPLES=   sample-etc_cron.d_ddclient sample-etc_ddclient.conf \
> -   sample-etc_dhclient-exit-hooks
sample-etc_dhcpc_dhcpcd-eth0.exe \
> -   sample-etc_ppp_ip-up.local sample-ddclient-wrapper.sh
> +SYSCONFDIR=${BASESYSCONFDIR}/ddclient
>
>  post-extract:
> -   @sed -i -e "s,/var/cache/ddclient/,/var/db/ddclient/,g;" \
> -   -e "s,/etc/ddclient/,${SYSCONFDIR}/ddclient/,g" \
> -   ${WRKSRC}/ddclient
> -
> -do-install:
> -   ${INSTALL_SCRIPT} ${WRKSRC}/ddclient ${PREFIX}/sbin/
> -   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ddclient
> -   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ddclient
> -   ${INSTALL_DATA} ${WRKSRC}/README* ${PREFIX}/share/doc/ddclient
> -.for i in ${SAMPLES}
> -   ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/examples/ddclient
> -.endfor
> +   @sed -i -e "s,/cache/ddclient,/db/ddclient,g" \
> +   ${WRKSRC}/{ddclient.in,Makefile.am}
>
>  .include 
> Index: distinfo
> ===
> RCS file: /home/cvs/ports/net/ddclient/distinfo,v
> retrieving revision 1.12
> diff -u -p -r1.12 distinfo
> --- distinfo17 Jan 2021 15:46:53 -  1.12
> +++ distinfo20 Oct 2022 19:36:46 -
> @@ -1,2 +1,2 @@
> -SHA256 (ddclient-3.9.1.tar.gz) =
5JaeFcxJH8Ur3NZJ1MKw5LG/DJ+duiNHHGNIcazFJHA=
> -SIZE (ddclient-3.9.1.tar.gz) = 63469
> +SHA256 (ddclient-3.10.0.tar.gz) =
NLbZqUYpCvCSfidGCpZa0BinxSViUGOw84DL3f/AHBs=
> +SIZE (ddclient-3.10.0.tar.gz) = 275494
> Index: patches/patch-ddclient
> ===
> RCS file: patches/patch-ddclient
> diff -N patches/patch-ddclient
> --- patches/patch-ddclient  11 Mar 2022 19:45:52 -  1.4
> +++ /dev/null   1 Jan 1970 00:00:00 -
> @@ -1,20 +0,0 @@
> -Index: ddclient
>  ddclient.orig
> -+++ ddclient
> -@@ -1163,16 +1163,6 @@ sub _read_config {
> -   # fatal("Cannot open file '%s'. ($!)", $file);
> -   warning("Cannot open file '%s'. ($!)", $file);
> - }
> --# Check for only owner has any access to config file
> --my ($dev, $ino, $mode, @statrest) = stat(FD);
> --if ($mode & 077) {
> --  if (-f FD && (chmod 0600, $file)) {
> --  warning("file $file must be accessible only by its owner
(fixed).");
> --  } else {
> --  # fatal("file $file must be accessible only by its owner.");
> --  warning("file $file must be accessible only by its owner.");
> --  }
> --}
> -
> - local $lineno   = 0;
> - my$continuation = '';
> Index: patches/patch-sample-etc_ddclient_conf
> ===
> RCS file: patches/patch-sample-etc_ddclient_conf
> diff -N patches/patch-sample-etc_ddclient_conf
> --- 

[update] net/ddclient 3.10.0

2022-10-20 Thread Pascal Stumpf
Update to ddclient 3.10.0.

* switched to auto(re)conf
* killed the samples (they are mostly useless)
* is there any reason we're placing the config file in a separate
  directory?  I kept the /etc/ddclient/ddclient.conf dance for now, but
  maybe we can just go with /etc/ddclient.conf?
* there is now the option to use curl.  I think it's reasonable to not
  add a dependency.  However, the path needs to be hardcoded.
* there are now tests.  One of them fails for a stupid reason.


Works for my use case (afraid.freedns.org).  Please test with your
configuration.


Index: Makefile
===
RCS file: /home/cvs/ports/net/ddclient/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile11 Mar 2022 19:45:52 -  1.28
+++ Makefile20 Oct 2022 22:04:21 -
@@ -2,7 +2,7 @@ COMMENT=update client for dynamic DNS s
 
 GH_ACCOUNT=ddclient
 GH_PROJECT=ddclient
-GH_TAGNAME=v3.9.1
+GH_TAGNAME=v3.10.0
 
 CATEGORIES=net
 
@@ -11,30 +11,26 @@ HOMEPAGE=   https://ddclient.net/
 # GPLv2+
 PERMIT_PACKAGE=Yes
 
-RUN_DEPENDS=   devel/p5-Data-Validate-IP \
-   net/p5-IO-Socket-INET6 \
+CONFIGURE_STYLE=gnu autoreconf
+AUTOMAKE_VERSION=  1.11
+AUTOCONF_VERSION=  2.63
+
+# hardcode path, but do not add a dependency
+CONFIGURE_ENV= CURL=${LOCALBASE}/bin/curl
+
+MAKE_ENV=  runstatedir=/var/run/ddclient
+FAKE_FLAGS=sysconfdir=${PREFIX}/share/examples/ddclient
+
+RUN_DEPENDS=   net/p5-IO-Socket-INET6 \
security/p5-IO-Socket-SSL
+TEST_DEPENDS=  devel/p5-Test-Warnings
 
-NO_BUILD=  Yes
-NO_TEST=   Yes
 PKG_ARCH=  *
 
-SAMPLES=   sample-etc_cron.d_ddclient sample-etc_ddclient.conf \
-   sample-etc_dhclient-exit-hooks sample-etc_dhcpc_dhcpcd-eth0.exe 
\
-   sample-etc_ppp_ip-up.local sample-ddclient-wrapper.sh
+SYSCONFDIR=${BASESYSCONFDIR}/ddclient
 
 post-extract:
-   @sed -i -e "s,/var/cache/ddclient/,/var/db/ddclient/,g;" \
-   -e "s,/etc/ddclient/,${SYSCONFDIR}/ddclient/,g" \
-   ${WRKSRC}/ddclient
-
-do-install:
-   ${INSTALL_SCRIPT} ${WRKSRC}/ddclient ${PREFIX}/sbin/
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ddclient
-   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ddclient
-   ${INSTALL_DATA} ${WRKSRC}/README* ${PREFIX}/share/doc/ddclient
-.for i in ${SAMPLES}
-   ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/examples/ddclient
-.endfor
+   @sed -i -e "s,/cache/ddclient,/db/ddclient,g" \
+   ${WRKSRC}/{ddclient.in,Makefile.am}
 
 .include 
Index: distinfo
===
RCS file: /home/cvs/ports/net/ddclient/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo17 Jan 2021 15:46:53 -  1.12
+++ distinfo20 Oct 2022 19:36:46 -
@@ -1,2 +1,2 @@
-SHA256 (ddclient-3.9.1.tar.gz) = 5JaeFcxJH8Ur3NZJ1MKw5LG/DJ+duiNHHGNIcazFJHA=
-SIZE (ddclient-3.9.1.tar.gz) = 63469
+SHA256 (ddclient-3.10.0.tar.gz) = NLbZqUYpCvCSfidGCpZa0BinxSViUGOw84DL3f/AHBs=
+SIZE (ddclient-3.10.0.tar.gz) = 275494
Index: patches/patch-ddclient
===
RCS file: patches/patch-ddclient
diff -N patches/patch-ddclient
--- patches/patch-ddclient  11 Mar 2022 19:45:52 -  1.4
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,20 +0,0 @@
-Index: ddclient
 ddclient.orig
-+++ ddclient
-@@ -1163,16 +1163,6 @@ sub _read_config {
-   # fatal("Cannot open file '%s'. ($!)", $file);
-   warning("Cannot open file '%s'. ($!)", $file);
- }
--# Check for only owner has any access to config file
--my ($dev, $ino, $mode, @statrest) = stat(FD);
--if ($mode & 077) {  
--  if (-f FD && (chmod 0600, $file)) {
--  warning("file $file must be accessible only by its owner (fixed).");
--  } else {
--  # fatal("file $file must be accessible only by its owner.");
--  warning("file $file must be accessible only by its owner.");
--  }
--}
- 
- local $lineno   = 0;
- my$continuation = '';
Index: patches/patch-sample-etc_ddclient_conf
===
RCS file: patches/patch-sample-etc_ddclient_conf
diff -N patches/patch-sample-etc_ddclient_conf
--- patches/patch-sample-etc_ddclient_conf  11 Mar 2022 19:45:52 -  
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,12 +0,0 @@
-Index: sample-etc_ddclient.conf
 sample-etc_ddclient.conf.orig
-+++ sample-etc_ddclient.conf
-@@ -20,7 +20,7 @@ daemon=300   # check every 300 
seconds
- syslog=yes# log update msgs to syslog
- mail=root # mail all msgs to root
- mail-failure=root # mail failed update msgs to root
--pid=/var/run/ddclient.pid # record PID