lvm2/lvm2-2_02_92-add-with-systemdsystemunitdir-config.patch

118 lines
4.3 KiB
Diff
Raw Normal View History

diff -purN LVM2.2.02.91.orig/configure LVM2.2.02.91.new/configure
--- LVM2.2.02.91.orig/configure 2012-01-31 22:21:53.000000000 +0100
+++ LVM2.2.02.91.new/configure 2012-02-13 13:49:27.339271246 +0100
@@ -596,6 +596,7 @@ ac_default_prefix=/usr
ac_subst_vars='LTLIBOBJS
usrsbindir
usrlibdir
+systemdsystemunitdir
udevdir
udev_prefix
tmpdir
@@ -840,6 +841,7 @@ with_usrlibdir
with_usrsbindir
with_udev_prefix
with_udevdir
+with_systemdsystemunitdir
with_dmeventd_pidfile
with_dmeventd_path
with_default_run_dir
@@ -1580,6 +1582,8 @@ Optional Packages:
--with-udev-prefix=UPREFIX
install udev rule files in UPREFIX [[EPREFIX]]
--with-udevdir=DIR udev rules in DIR [[UPREFIX/lib/udev/rules.d]]
+ --with-systemdsystemunitdir=DIR
+ systemd service files in DIR
--with-dmeventd-pidfile=PATH
dmeventd pidfile [[/var/run/dmeventd.pid]]
--with-dmeventd-path=PATH
@@ -9695,6 +9699,23 @@ fi
################################################################################
+
+# Check whether --with-systemdsystemunitdir was given.
+if test "${with_systemdsystemunitdir+set}" = set; then :
+ withval=$with_systemdsystemunitdir; systemdsystemunitdir=$withval
+else
+ pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+fi
+
+
+if test -n "$pkg_systemdsystemunitdir"; then
+ systemdsystemunitdir=$pkg_systemdsystemunitdir;
+fi
+
+if test -z "$systemdsystemunitdir"; then
+ systemdsystemunitdir='/lib/systemd/system';
+fi
+################################################################################
if test x$READLINE = xyes; then
for ac_header in readline/readline.h readline/history.h
do :
@@ -10233,6 +10254,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]'
+
diff -purN LVM2.2.02.91.orig/configure.in LVM2.2.02.91.new/configure.in
--- LVM2.2.02.91.orig/configure.in 2012-01-31 22:21:54.000000000 +0100
+++ LVM2.2.02.91.new/configure.in 2012-02-13 13:49:27.339271246 +0100
@@ -1159,6 +1159,22 @@ AC_ARG_WITH(udevdir,
udevdir=$withval, udevdir='${udev_prefix}/lib/udev/rules.d')
################################################################################
+dnl -- Get the systemd system unit dir value from pkg_config automatically if value not given explicitly.
+dnl -- This follows the recommendation for systemd integration best practices mentioned in daemon(7) manpage.
+AC_ARG_WITH(systemdsystemunitdir,
+ AC_HELP_STRING([--with-systemdsystemunitdir=DIR],
+ [systemd service files in DIR]),
+ systemdsystemunitdir=$withval,
+ pkg_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd))
+
+if test -n "$pkg_systemdsystemunitdir"; then
+ systemdsystemunitdir=$pkg_systemdsystemunitdir;
+fi
+
+if test -z "$systemdsystemunitdir"; then
+ systemdsystemunitdir='/lib/systemd/system';
+fi
+################################################################################
dnl -- Ensure additional headers required
if test x$READLINE = xyes; then
AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out))
@@ -1426,6 +1442,7 @@ AC_SUBST(kernelvsn)
AC_SUBST(tmpdir)
AC_SUBST(udev_prefix)
AC_SUBST(udevdir)
+AC_SUBST(systemdsystemunitdir)
AC_SUBST(usrlibdir)
AC_SUBST(usrsbindir)
diff -purN LVM2.2.02.91.orig/make.tmpl.in LVM2.2.02.91.new/make.tmpl.in
--- LVM2.2.02.91.orig/make.tmpl.in 2011-11-23 13:19:23.000000000 +0100
+++ LVM2.2.02.91.new/make.tmpl.in 2012-02-13 13:49:27.340271242 +0100
@@ -66,7 +66,7 @@ staticdir = $(DESTDIR)@STATICDIR@
udevdir = $(DESTDIR)@udevdir@
pkgconfigdir = $(usrlibdir)/pkgconfig
initdir = $(DESTDIR)@sysconfdir@/rc.d/init.d
-systemd_dir = $(DESTDIR)/lib/systemd/system
+systemd_dir = $(DESTDIR)/@systemdsystemunitdir@
ocf_scriptdir = $(DESTDIR)@OCFDIR@
USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
diff -purN LVM2.2.02.91.orig/WHATS_NEW LVM2.2.02.91.new/WHATS_NEW
--- LVM2.2.02.91.orig/WHATS_NEW 2012-02-13 00:02:52.000000000 +0100
+++ LVM2.2.02.91.new/WHATS_NEW 2012-02-13 13:51:04.104940437 +0100
@@ -1,3 +1,7 @@
+Version 2.02.92 -
+====================================
+ Add configure --with-systemdsystemunitdir.
+
Version 2.02.91 - 12th February 2012
====================================
Remove PV-based format instances (which are no longer needed).