Hello community,
here is the log from the commit of package ez-ipupdate for openSUSE:Factory checked in at 2013-04-12 20:29:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ez-ipupdate (Old)
and /work/SRC/openSUSE:Factory/.ez-ipupdate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ez-ipupdate", Maintainer is "hvogel@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ez-ipupdate/ez-ipupdate.changes 2011-12-08 11:48:34.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ez-ipupdate.new/ez-ipupdate.changes 2013-04-12 20:29:55.000000000 +0200
@@ -1,0 +2,15 @@
+Wed Apr 10 17:51:53 CEST 2013 - pth@suse.de
+
+- Add ez-ipupdate-joker_com.patch to add support for joker.com.
+ Don't install the file INSTALL as these are generic compile
+ instructions.
+- Get rid of acconfig.h and use the third argument of AC_DEFINE
+ and AC_DEFINE_UNQUTED plus AH_TEMPLATE to describe entries
+ in config.h (add to ez-ipupdate-auto_foo.patch).
+- Use AS_HELP_STRING to format help strings in configure.in.
+- Modernize the initialization in configure.ac.
+- Rename configure.in to configure.ac.
+- Added ez-ipupdate-code_cleanup.patch to reduce the number of
+ compiler warnings.
+
+-------------------------------------------------------------------
Old:
----
ez-ipupdate-3.0.11b8-fix_autofoo.patch
New:
----
ez-ipupdate-code_cleanup.patch
ez-ipupdate-fix_autofoo.patch
ez-ipupdate-joker_com.patch
ez-ipupdate-type-punning.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ez-ipupdate.spec ++++++
--- /var/tmp/diff_new_pack.i7L8ho/_old 2013-04-12 20:29:58.000000000 +0200
+++ /var/tmp/diff_new_pack.i7L8ho/_new 2013-04-12 20:29:58.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ez-ipupdate
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,13 +15,14 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: ez-ipupdate
Summary: A Small Utility for Updating a Dynamic DNS Service
+License: GPL-2.0+
+Group: Productivity/Networking/DNS/Utilities
Version: 3.0.11b8
Release: 0
-License: GPL-2.0+
BuildRequires: automake
-Group: Productivity/Networking/DNS/Utilities
Source0: %{name}-%{version}.tar.bz2
Source1: ez-ipupdate.init
Source2: ez-ipupdate.example.conf
@@ -30,7 +31,14 @@
Patch2: ez-ipupdate-format-string-vuln.patch
Patch3: ez-ipupdate-includes.patch
Patch4: ez-ipupdate-dnsexit.patch
-Patch5: ez-ipupdate-3.0.11b8-fix_autofoo.patch
+# PATCH-FIX-UPSTREAM Various fixes for configure.ac and Makefile.am
+Patch5: ez-ipupdate-fix_autofoo.patch
+# PATCH-FEATURE-UPSTREAM Add support for joker.com dyndns service
+Patch6: ez-ipupdate-joker_com.patch
+# PATCH-FIX-UPSTREAM do type punning via memcpy
+Patch7: ez-ipupdate-type-punning.patch
+# PATCH-FIX-UPSTREAM Reduce compiler warnings.
+Patch8: ez-ipupdate-code_cleanup.patch
Url: http://ez-ipupdate.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq
@@ -63,6 +71,8 @@
* http://www.zoneedit.com
+* http://www.joker.com
+
%prep
%setup -q
%patch -p1
@@ -70,7 +80,12 @@
%patch2 -p1
%patch3
%patch4
+mv configure.in configure.ac
%patch5
+%patch6
+%patch7
+%patch8
+rm acconfig.h
%build
find -name "example*" | xargs -n 1 sed -i "s@/usr/local/bin/@/usr/bin/@"
@@ -100,7 +115,7 @@
%files
%defattr(-, root, root)
-%doc README INSTALL CHANGELOG COPYING example*
+%doc README CHANGELOG COPYING example*
%{_bindir}/ez-ipupdate
%{_sbindir}/rcez-ipupdate
%config(noreplace) %{_sysconfdir}/ez-ipupdate.conf
++++++ ez-ipupdate-code_cleanup.patch ++++++
From: Philipp Thomas
Date: 2013-04-11 11:25:14+02:00
Subject: Clean up the code
---
ez-ipupdate.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
signed-off-by: pth@suse.de
Index: ez-ipupdate.c
===================================================================
--- ez-ipupdate.c.orig 2013-04-11 10:54:02.685445947 +0200
+++ ez-ipupdate.c 2013-04-11 11:21:24.515547623 +0200
@@ -2525,7 +2525,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);
@@ -2662,7 +2662,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);
@@ -4257,8 +4257,6 @@ int HEIPV6TB_update_entry(void)
switch(ret)
{
- char *p;
-
case -1:
if(!(options & OPT_QUIET))
{
++++++ ez-ipupdate-fix_autofoo.patch ++++++
---
Makefile.am | 11 ++++++++---
configure.in | 59 ++++++++++++++++++++++++++++++++---------------------------
2 files changed, 40 insertions(+), 30 deletions(-)
Index: Makefile.am
===================================================================
--- Makefile.am.orig 2001-07-07 23:19:35.000000000 +0200
+++ Makefile.am 2013-04-11 12:05:21.086671161 +0200
@@ -1,8 +1,13 @@
bin_PROGRAMS = ez-ipupdate
-ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h cache_file.c cache_file.h error.h pid_file.c pid_file.h dprintf.h @EXTRASRC@
-ez_ipupdate_LDADD = @EXTRAOBJ@
+ez_ipupdate_SOURCES = ez-ipupdate.c conf_file.c conf_file.h md5.c md5.h \
+ cache_file.c cache_file.h error.h pid_file.c pid_file.h \
+ dprintf.h
-EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf example-dhs.conf example-dyndns.conf example-ods.conf example-tzo.conf example-gnudip.conf example-easydns.conf example-justlinux.conf example-dyns.conf CHANGELOG mkbinary example-heipv6tb.conf
+EXTRA_DIST = getpass.c ez-ipupdate.lsm example.conf example-pgpow.conf \
+ example-dhs.conf example-dyndns.conf example-ods.conf \
+ example-tzo.conf example-gnudip.conf example-easydns.conf \
+ example-justlinux.conf example-dyns.conf CHANGELOG mkbinary \
+ example-heipv6tb.conf
AUTOMAKE_OPTIONS=foreign
Index: configure.ac
===================================================================
--- configure.ac.orig 2003-04-17 19:32:34.000000000 +0200
+++ configure.ac 2013-04-11 12:19:08.454510832 +0200
@@ -1,9 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ez-ipupdate.c)
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(ez-ipupdate,3.0.11b8)
-
+AC_INIT([ez-ipupdat]e, [3.0.11b8])
+AC_CONFIG_SRCDIR([ez-ipupdate.c])
+AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_FILES(Makefile)
+AM_INIT_AUTOMAKE([foreign dist-xz])
dnl Checks for programs.
@@ -16,13 +17,13 @@ AC_TYPE_SIGNAL
dnl Checks for libraries.
-AC_CHECK_FUNC(gethostbyname)
+AC_CHECK_FUNC([gethostbyname])
if test $ac_cv_func_gethostbyname = no; then
- AC_CHECK_LIB(nsl, gethostbyname)
+ AC_CHECK_LIB([nsl], [gethostbyname])
fi
-AC_CHECK_FUNC(connect)
+AC_CHECK_FUNC([connect])
if test $ac_cv_func_connect = no; then
- AC_CHECK_LIB(socket, connect)
+ AC_CHECK_LIB([socket], [connect])
fi
AC_CHECK_FUNCS( socket \
@@ -77,7 +78,8 @@ AC_CHECK_HEADERS( unistd.h \
,,
AC_MSG_ERROR(could not locate neccessary system header files) )
-AC_CHECK_LIB(c, sys_errlist, AC_DEFINE(HAVE_SYS_ERRLIST))
+AC_CHECK_LIB(c, sys_errlist, AC_DEFINE([HAVE_SYS_ERRLIST], 1,
+ [Define if you have sys_errlist]))
dnl you need at least to have getopt, but getopt_long will be used if it
dnl is present
@@ -86,27 +88,31 @@ if test "$ac_cv_func_getopt" != yes; the
AC_MSG_ERROR(getopt is needed for this program to work)
fi
-AC_CHECK_FUNC(getpass, AC_DEFINE(HAVE_GETPASS),
- [EXTRASRC="$EXTRASRC \$(srcdir)/getpass.c"]
- [EXTRAOBJ="$EXTRAOBJ \$(srcdir)/getpass.o"] )
+AC_CHECK_FUNC(getpass,
+ AC_DEFINE([HAVE_GETPASS], 1, [Define if you have the getpass function]),
+ AC_MSG_ERROR(Your system does not define getpass, fix it))
dnl Get system canonical name
AC_CANONICAL_HOST
-AC_DEFINE_UNQUOTED(OS, "${host}")
+AC_DEFINE_UNQUOTED([OS], "${host}", [Define the system canonical name])
dnl allow selection of the default service
dnl the default is to use ez-ip
-AC_MSG_CHECKING(for user supplied default service)
-AC_ARG_ENABLE(default-service,
- [ --enable-default-service=SERVICE
- the default service type to use
- possibilities are: ezip, pgpow, justlinux, dhs,
- dyndns, dyndns-static, ods, tzo, gnudip, easydns, easydns-partner, dyns, hn, zoneedit, heipv6tb],
+AC_MSG_CHECKING([for user supplied default service])
+AC_ARG_ENABLE([default-service],
+ AS_HELP_STRING([--enable-default-service=SERVICE],
+ [the default service type to use
+ possibilities are: ezip, pgpow, justlinux, dhs,
+ dyndns, dyndns-static, ods, tzo, gnudip, easydns,
+ easydns-partner, dyns, hn, zoneedit, heipv6tb, joker]),
[ use_SERVICE=$enableval;
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no)
use_SERVICE=null
- AC_MSG_WARN(not setting default service) ] )
+ AC_MSG_WARN([not setting default service]) ] )
+
+AH_TEMPLATE([DEF_SERVICE], [Define the dyndns service to use by default])
+
case "$use_SERVICE" in
ezip ) AC_DEFINE(DEF_SERVICE, "ezip");;
ez-ip ) AC_DEFINE(DEF_SERVICE, "ezip");;
@@ -126,6 +132,7 @@ case "$use_SERVICE" in
hn ) AC_DEFINE(DEF_SERVICE, "hn");;
zoneedit ) AC_DEFINE(DEF_SERVICE, "zoneedit");;
heipv6tb ) AC_DEFINE(DEF_SERVICE, "heipv6tb");;
+ joker) AC_DEFINE(DEF_SERVICE, "joker");;
null ) AC_DEFINE(DEF_SERVICE, "NULL");;
"" ) ;;
* ) AC_MSG_ERROR(unknown default service type);;
@@ -135,21 +142,19 @@ dnl check weather we want debugging supp
dnl the default is to NOT use debugging support
AC_MSG_CHECKING(whether user wants debugging support)
AC_ARG_ENABLE(debug,
- [ --enable-debug include support for debugging],
- [ AC_DEFINE(DEBUG)
+ AS_HELP_STRING([--enable-debug], [include support for debugging]),
+ [ AC_DEFINE(DEBUG, 1, [Define if you want to debug the program])
AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no) ] )
dnl check weather we want to disable MD5 support
AC_MSG_CHECKING(whether user wants to dissable MD5 support)
AC_ARG_ENABLE(md5,
- [ --disable-md5 disable MD5 support],
+ AS_HELP_STRING([--disable-md5], [disable MD5 support]),
[ AC_MSG_RESULT(yes) ],
- [ AC_DEFINE(USE_MD5)
+ [ AC_DEFINE(USE_MD5, 1, [Define to use md5])
AC_MSG_RESULT(no) ] )
-AC_SUBST(EXTRASRC)
-AC_SUBST(EXTRAOBJ)
-AC_OUTPUT(Makefile)
+AC_OUTPUT()
++++++ ez-ipupdate-joker_com.patch ++++++
From: Philipp Thomas
Date: 2013-04-10 17:53:34+02:00
Subject: Add support for joker.com
Add support for the dyndns service of joker.com.
---
ez-ipupdate.c | 192 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 192 insertions(+)
signed-off-by: pth@suse.de
Index: ez-ipupdate.c
===================================================================
--- ez-ipupdate.c.orig 2013-04-11 10:50:22.180672887 +0200
+++ ez-ipupdate.c 2013-04-11 10:54:02.685445947 +0200
@@ -107,6 +107,10 @@
#define DNSEXIT_DEFAULT_PORT "80"
#define DNSEXIT_REQUEST "/RemoteUpdate.sv"
+#define JOKER_DEFAULT_SERVER "svc.joker.com"
+#define JOKER_DEFAULT_PORT "80"
+#define JOKER_REQUEST "/nic/update"
+
#define DEFAULT_TIMEOUT 120
#define DEFAULT_UPDATE_PERIOD 120
#define DEFAULT_RESOLV_PERIOD 30
@@ -353,6 +357,10 @@ int DNSEXIT_check_info(void);
static char *DNSEXIT_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
#endif
+int JOKER_update_entry(void);
+int JOKER_check_info(void);
+static char *JOKER_fields_used[] = { "server", "user", "address", "wildcard", "mx", "host", NULL };
+
struct service_t services[] = {
{ "NULL",
{ "null", "NULL", 0, },
@@ -538,6 +546,16 @@ struct service_t services[] = {
DNSEXIT_REQUEST
},
#endif
+ { "joker",
+ { "joker", 0, 0, },
+ NULL,
+ JOKER_update_entry,
+ JOKER_check_info,
+ JOKER_fields_used,
+ JOKER_DEFAULT_SERVER,
+ JOKER_DEFAULT_PORT,
+ JOKER_REQUEST
+ },
};
static struct service_t *service = NULL;
@@ -4265,6 +4283,180 @@ int HEIPV6TB_update_entry(void)
}
return(UPDATERES_ERROR);
break;
+ }
+
+ return(UPDATERES_OK);
+}
+
+int JOKER_check_info(void)
+{
+ char buf[BUFSIZ+1];
+
+ if((host == NULL) || (*host == '\0'))
+ {
+ if(options & OPT_DAEMON)
+ {
+ return(-1);
+ }
+ if(host) { free(host); }
+ printf("host: ");
+ *buf = '\0';
+ fgets(buf, BUFSIZ, stdin);
+ host = strdup(buf);
+ chomp(host);
+ }
+
+ if(interface == NULL && address == NULL)
+ {
+ if(options & OPT_DAEMON)
+ {
+ fprintf(stderr, "you must provide either an interface or an address\n");
+ return(-1);
+ }
+ if(interface) { free(interface); }
+ printf("interface: ");
+ *buf = '\0';
+ fgets(buf, BUFSIZ, stdin);
+ chomp(buf);
+ option_handler(CMD_interface, buf);
+ }
+
+ warn_fields(service->fields_used);
+
+ return 0;
+}
+
+int JOKER_update_entry(void)
+{
+ char buf[BUFFER_SIZE+1];
+ char *bp = buf;
+ int bytes;
+ int btot;
+ int ret;
+
+ buf[BUFFER_SIZE] = '\0';
+
+ if(do_connect((int*)&client_sockfd, server, port) != 0)
+ {
+ if(!(options & OPT_QUIET))
+ {
+ show_message("error connecting to %s:%s\n", server, port);
+ }
+ return(UPDATERES_ERROR);
+ }
+
+ snprintf(buf, BUFFER_SIZE, "GET %s?", request);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "username", user_name);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "password", password);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "hostname", host);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "myip", address);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "wildcard", wildcard ? "yes" : "no");
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "mx", mx);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "%s=%s&", "backmx", *mx == '\0' ? "NO" : "YES");
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, " HTTP/1.0\015\012");
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "User-Agent: %s-%s %s [%s] (%s)\015\012",
+ "ez-update", VERSION, OS, (options & OPT_DAEMON) ? "daemon" : "", "by Angus Mackay");
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "Host: %s\015\012", server);
+ output(buf);
+ snprintf(buf, BUFFER_SIZE, "\015\012");
+ output(buf);
+
+ bp = buf;
+ bytes = 0;
+ btot = 0;
+ while((bytes=read_input(bp, BUFFER_SIZE-btot)) > 0)
+ {
+ bp += bytes;
+ btot += bytes;
+ dprintf((stderr, "btot: %d\n", btot));
+ }
+ close(client_sockfd);
+ buf[btot] = '\0';
+
+ dprintf((stderr, "server output: %s\n", buf));
+
+ if(sscanf(buf, " HTTP/1.%*c %3d", &ret) != 1)
+ {
+ ret = -1;
+ }
+
+ switch(ret)
+ {
+ case -1:
+ if(!(options & OPT_QUIET))
+ {
+ show_message("strange server response, are you connecting to the right server?\n");
+ }
+ return(UPDATERES_ERROR);
+ break;
+
+ case 200:
+ if(!(options & OPT_QUIET))
+ {
+ printf("request successful\n");
+ }
+ break;
+
+ case 302:
+ // There is no neat way to determine the exact error other than to
+ // parse the Location part of the mime header to find where we're
+ // being redirected.
+ if(!(options & OPT_QUIET))
+ {
+ // reuse the auth buffer
+ *auth = '\0';
+ bp = strstr(buf, "Location: ");
+ if((bp < strstr(buf, "\r\n\r\n")) && (sscanf(bp, "Location: http://%*[^/]%255[^\r\n]", auth) == 1))
+ {
+ bp = strrchr(auth, '/') + 1;
+ }
+ else
+ {
+ bp = "";
+ }
+ dprintf((stderr, "location: %s\n", bp));
+
+ if(!(strncmp(bp, "domainmismatch.htm", strlen(bp)) && strncmp(bp, "invname.htm", strlen(bp))))
+ {
+ show_message("invalid host name\n");
+ }
+ else if(!strncmp(bp, "invkey.htm", strlen(bp)))
+ {
+ show_message("invalid password(tzo key)\n");
+ }
+ else if(!(strncmp(bp, "emailmismatch.htm", strlen(bp)) && strncmp(bp, "invemail.htm", strlen(bp))))
+ {
+ show_message("invalid user name(email address)\n");
+ }
+ else
+ {
+ show_message("unknown error\n");
+ }
+ }
+ return(UPDATERES_ERROR);
+ break;
+
+ default:
+ if(!(options & OPT_QUIET))
+ {
+ // reuse the auth buffer
+ *auth = '\0';
+ sscanf(buf, " HTTP/1.%*c %*3d %255[^\r\n]", auth);
+ show_message("unknown return code: %d\n", ret);
+ show_message("server response: %s\n", auth);
+ }
+ return(UPDATERES_ERROR);
+ break;
}
return(UPDATERES_OK);
++++++ ez-ipupdate-type-punning.patch ++++++
From: Philipp Thomas
Date: 2013-04-11 11:24:54+02:00
Subject: Use memcpy for type-punning
---
md5.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
signed-off-by: pth@suse.de
Index: md5.c
===================================================================
--- md5.c.orig 2013-04-11 10:50:22.160673361 +0200
+++ md5.c 2013-04-11 11:18:46.118299579 +0200
@@ -92,6 +92,7 @@ md5_finish_ctx (struct md5_ctx *ctx, voi
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
+ md5_uint32 tmp;
size_t pad;
/* Now count remaining bytes. */
@@ -103,9 +104,10 @@ md5_finish_ctx (struct md5_ctx *ctx, voi
memcpy (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
- (ctx->total[0] >> 29));
+ tmp = SWAP (ctx->total[0] << 3);
+ memcpy(&ctx->buffer[bytes + pad], &tmp, sizeof(md5_uint32));
+ tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
+ memcpy(&ctx->buffer[bytes + pad + 4], &tmp, sizeof(md5_uint32));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org