Control: tags -1 + patch * Fix linking libupsclient. * Patch libtool.m4 and configure to support ppc64le.
diff -Nru nut-2.7.1/debian/patches/backport-fix-lp753661.patch nut-2.7.1/debian/patches/backport-fix-lp753661.patch --- nut-2.7.1/debian/patches/backport-fix-lp753661.patch 1970-01-01 01:00:00.000000000 +0100 +++ nut-2.7.1/debian/patches/backport-fix-lp753661.patch 2013-12-30 10:51:37.000000000 +0100 @@ -0,0 +1,35 @@ +Description: Trim extraneous end-of-line, in buggy HID string tables + Trim extraneous end-of-line, in buggy HID string tables, which results in + upsc breaking the communication pipe. + . + this would be expected to be included in next nut upstream package + (greater than 2.6.0) +Applied-Upstream: http://trac.networkupstools.org/projects/nut/changeset/2972 +Bug: https://bugs.launchpad.net/bugs/753661 +Author: Arnaud Quette <aquette....@gmail.com> +Last-Update: 2011-05-27 + +Index: b/drivers/libhid.c +=================================================================== +--- a/drivers/libhid.c ++++ b/drivers/libhid.c +@@ -400,8 +400,18 @@ + */ + char *HIDGetIndexString(hid_dev_handle_t udev, const int Index, char *buf, size_t buflen) + { +- if (comm_driver->get_string(udev, Index, buf, buflen) < 1) ++ char *ptr = NULL; ++ ++ if (comm_driver->get_string(udev, Index, buf, buflen) < 1) ++ { + buf[0] = '\0'; ++ } ++ else ++ { ++ /* Check for extraneous end-of-line */ ++ if( (ptr = strchr(buf, '\n')) != NULL) ++ *ptr = '\0'; ++ } + + return rtrim(buf, '\n'); + } diff -Nru nut-2.7.1/debian/patches/link-fixes.diff nut-2.7.1/debian/patches/link-fixes.diff --- nut-2.7.1/debian/patches/link-fixes.diff 1970-01-01 01:00:00.000000000 +0100 +++ nut-2.7.1/debian/patches/link-fixes.diff 2013-12-30 10:57:07.000000000 +0100 @@ -0,0 +1,105 @@ +Index: b/clients/Makefile.am +=================================================================== +--- a/clients/Makefile.am ++++ b/clients/Makefile.am +@@ -46,7 +46,7 @@ + + # not LDADD. + libupsclient_la_SOURCES = upsclient.c upsclient.h +-libupsclient_la_LIBADD = ../common/libparseconf.la ++libupsclient_la_LIBADD = ../common/libcommonclient.la + if WITH_SSL + libupsclient_la_LIBADD += $(LIBSSL_LIBS) + endif +Index: b/clients/Makefile.in +=================================================================== +--- a/clients/Makefile.in ++++ b/clients/Makefile.in +@@ -445,7 +445,7 @@ + + # not LDADD. + libupsclient_la_SOURCES = upsclient.c upsclient.h +-libupsclient_la_LIBADD = ../common/libparseconf.la $(am__append_4) ++libupsclient_la_LIBADD = ../common/libcommonclient.la $(am__append_4) + + # libupsclient version information + # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +Index: b/common/Makefile.am +=================================================================== +--- a/common/Makefile.am ++++ b/common/Makefile.am +@@ -2,7 +2,7 @@ + + AM_CFLAGS = -I$(top_srcdir)/include + +-noinst_LTLIBRARIES = libparseconf.la libcommon.la ++noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la + libparseconf_la_SOURCES = parseconf.c + + # do not hard depend on '../include/nut_version.h', since it blocks +@@ -10,6 +10,8 @@ + # BUILT_SOURCES (in ../include) will ensure nut_version.h will + # be built before anything else + libcommon_la_SOURCES = common.c state.c upsconf.c ++libcommonclient_la_SOURCES = common.c state.c + # ensure inclusion of local implementation of missing systems functions + # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS + libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ ++libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@ +Index: b/common/Makefile.in +=================================================================== +--- a/common/Makefile.in ++++ b/common/Makefile.in +@@ -91,6 +91,9 @@ + libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ + am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo + libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) ++libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ ++am_libcommonclient_la_OBJECTS = common.lo state.lo ++libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) + libparseconf_la_LIBADD = + am_libparseconf_la_OBJECTS = parseconf.lo + libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) +@@ -107,8 +110,10 @@ + LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +-SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) +-DIST_SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES) ++SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ ++ $(libparseconf_la_SOURCES) ++DIST_SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ ++ $(libparseconf_la_SOURCES) + am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ +@@ -303,7 +308,7 @@ + top_srcdir = @top_srcdir@ + udevdir = @udevdir@ + AM_CFLAGS = -I$(top_srcdir)/include +-noinst_LTLIBRARIES = libparseconf.la libcommon.la ++noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la + libparseconf_la_SOURCES = parseconf.c + + # do not hard depend on '../include/nut_version.h', since it blocks +@@ -311,9 +316,11 @@ + # BUILT_SOURCES (in ../include) will ensure nut_version.h will + # be built before anything else + libcommon_la_SOURCES = common.c state.c upsconf.c ++libcommonclient_la_SOURCES = common.c state.c + # ensure inclusion of local implementation of missing systems functions + # using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS + libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ ++libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@ + all: all-am + + .SUFFIXES: +@@ -359,6 +366,8 @@ + done + libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) + $(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) ++libcommonclient.la: $(libcommonclient_la_OBJECTS) $(libcommonclient_la_DEPENDENCIES) $(EXTRA_libcommonclient_la_DEPENDENCIES) ++ $(LINK) $(libcommonclient_la_OBJECTS) $(libcommonclient_la_LIBADD) $(LIBS) + libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES) $(EXTRA_libparseconf_la_DEPENDENCIES) + $(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS) + diff -Nru nut-2.7.1/debian/patches/ppc64el.diff nut-2.7.1/debian/patches/ppc64el.diff --- nut-2.7.1/debian/patches/ppc64el.diff 1970-01-01 01:00:00.000000000 +0100 +++ nut-2.7.1/debian/patches/ppc64el.diff 2013-12-30 10:55:15.000000000 +0100 @@ -0,0 +1,56 @@ +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -14149,7 +14149,10 @@ + ;; + esac + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -14168,7 +14171,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: b/m4/libtool.m4 +=================================================================== +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1333,7 +1333,10 @@ + ;; + esac + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -1352,7 +1355,10 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) diff -Nru nut-2.7.1/debian/patches/series nut-2.7.1/debian/patches/series --- nut-2.7.1/debian/patches/series 2013-11-24 20:58:03.000000000 +0100 +++ nut-2.7.1/debian/patches/series 2013-12-30 10:54:47.000000000 +0100 @@ -4,3 +4,6 @@ 0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch 0006-ups-conf-maxretry.patch 0007-killpower-path.patch +backport-fix-lp753661.patch +link-fixes.diff +ppc64el.diff