From 34f0448c77163c9a727c242dd900c8692b5712f5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Thu, 1 Aug 2019 14:57:14 +0200 Subject: [PATCH] debian/patches/0009-fix-nutshutdown-install.patch: Use patch coming from upstream instead of our own patch --- debian/changelog | 4 +- .../0009-fix-nutshutdown-install.patch | 73 ++++++++++++++++++- debian/patches/series | 2 +- 3 files changed, 73 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9d8c246..4960981 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,8 +43,10 @@ nut (2.7.4-9) UNRELEASED; urgency=medium documentation reproductible * debian/patches/0003-install-dev-files-in-usr.patch: Also change the prefix in libnutclient.pc.in for consistency + * debian/patches/0009-fix-nutshutdown-install.patch: Use patch coming from + upstream instead of our own patch - -- Laurent Bigonville Sun, 28 Jul 2019 00:45:57 +0200 + -- Laurent Bigonville Thu, 01 Aug 2019 14:55:56 +0200 nut (2.7.4-8) unstable; urgency=medium diff --git a/debian/patches/0009-fix-nutshutdown-install.patch b/debian/patches/0009-fix-nutshutdown-install.patch index 732cc22..2d35566 100644 --- a/debian/patches/0009-fix-nutshutdown-install.patch +++ b/debian/patches/0009-fix-nutshutdown-install.patch @@ -1,11 +1,76 @@ +commit 491d088af70a67b6ed1d2a6a6711d83be71dd911 +Author: Michal Marek +Date: Mon Oct 30 21:43:45 2017 +0100 + + configure.ac: Fix systemd shutdown directory detection + + The configure script assumes that systemd is installed below ${libdir}, + which is not true on many biarch Linux distros with /lib64. Instead of + guessing, use pkg-config to find the path and provide a + --with-systemdshutdowndir option so that make distcheck can override it. + Also, rename the internal variable to systemdshutdowndir to rhyme with + the respective systemd.pc variable. + + Signed-off-by: Michal Marek + +--- a/Makefile.am ++++ b/Makefile.am +@@ -22,6 +22,7 @@ DISTCHECK_LIGHT_FLAGS = --with-all=auto + + DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ + --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ ++ --with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \ + --with-hotplug-dir='$${prefix}/etc/hotplug' \ + --with-udev-dir='$${prefix}/etc/udev' \ + --with-devd-dir='$${prefix}/etc/devd' --- a/configure.ac +++ b/configure.ac -@@ -1065,7 +1065,7 @@ dnl Override installation directory, wit - dnl prefix. This is needed for 'distcheck*' targets, otherwise - dnl files will try to get intalled to the actual system directories +@@ -1062,16 +1062,24 @@ AC_ARG_WITH([systemdsystemunitdir], + ;; + esac + ], []) +-dnl Override installation directory, with the local installation +-dnl prefix. This is needed for 'distcheck*' targets, otherwise +-dnl files will try to get intalled to the actual system directories if test -n "${systemdsystemunitdir}"; then - systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" -+ systemdsystemshutdowndir=`$PKG_CONFIG --variable=systemdshutdowndir systemd` AC_MSG_RESULT(using ${systemdsystemunitdir}) else AC_MSG_RESULT(no) + fi + AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "") ++dnl This option is only provided so that make distcheck can override it, ++dnl otherwise we ask pkg-config whenever --with-systemdsystemunitdir is ++dnl given ++AC_ARG_WITH([systemdshutdowndir], ++ AS_HELP_STRING([--with-systemdshutdowndir=DIR], [Directory for systemd shutdown scripts (auto)]), ++ [systemdshutdowndir=${withval}]) ++if test -n "${systemdsystemunitdir}"; then ++ case "${systemdshutdowndir}" in ++ yes|auto|"") ++ systemdshutdowndir=`$PKG_CONFIG --variable=systemdshutdowndir systemd` ++ esac ++fi + + AC_MSG_CHECKING(whether to install hotplug rules) + AC_ARG_WITH(hotplug-dir, +@@ -1261,7 +1269,7 @@ AC_SUBST(driverexecdir) + AC_SUBST(htmldir) + AC_SUBST(pkgconfigdir) + AC_SUBST(systemdsystemunitdir) +-AC_SUBST(systemdsystemshutdowndir) ++AC_SUBST(systemdshutdowndir) + AC_SUBST(hotplugdir) + AC_SUBST(udevdir) + +--- a/scripts/systemd/Makefile.am ++++ b/scripts/systemd/Makefile.am +@@ -7,7 +7,7 @@ systemdsystemunit_DATA = \ + nut-monitor.service \ + nut-server.service + +-systemdsystemshutdown_SCRIPTS = nutshutdown ++systemdshutdown_SCRIPTS = nutshutdown + + else + EXTRA_DIST += nut-driver.service.in nut-monitor.service.in \ diff --git a/debian/patches/series b/debian/patches/series index 13ced72..ee943a6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,10 +3,10 @@ 0002-nut-monitor-paths.patch 0004-fix-systemd-service.patch 0008-drop-w3c-icons.patch -0009-fix-nutshutdown-install.patch # Upstream patches 0006-ups-conf-maxretry.patch +0009-fix-nutshutdown-install.patch 0010-fix-nutscanner-ftbfs.patch 0011-use-pkgconfig-module.patch 0012-add-AEG-PROTECT-NAS-support.patch