From c931ebc2a5d62f8e4c4c1cee6db70a8d5a1231a9 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 8 Oct 2015 13:03:19 +0000 Subject: [PATCH] - move run dir from /run to /var/run so required lvm dir will not vanish on reboot --- lvm2-run-dir.patch | 13 +++++++++++++ lvm2.spec | 10 ++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 lvm2-run-dir.patch diff --git a/lvm2-run-dir.patch b/lvm2-run-dir.patch new file mode 100644 index 0000000..02aa77f --- /dev/null +++ b/lvm2-run-dir.patch @@ -0,0 +1,13 @@ +diff -ur LVM2.2.02.132.orig/configure.in LVM2.2.02.132/configure.in +--- LVM2.2.02.132.orig/configure.in 2015-10-08 12:26:23.000000000 +0000 ++++ LVM2.2.02.132/configure.in 2015-10-08 12:42:41.249042000 +0000 +@@ -707,8 +707,7 @@ + + ################################################################################ + AC_MSG_CHECKING(for default run directory) +-RUN_DIR="/run" +-test -d "/run" || RUN_DIR="/var/run" ++RUN_DIR="/var/run" + AC_MSG_RESULT($RUN_DIR) + dnl -- Set up pidfile and run directory + AH_TEMPLATE(DEFAULT_PID_DIR) diff --git a/lvm2.spec b/lvm2.spec index 277b4f9..5cd551d 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -40,7 +40,7 @@ Summary: The new version of Logical Volume Manager for Linux Summary(pl.UTF-8): Nowa wersja Logical Volume Managera dla Linuksa Name: lvm2 Version: 2.02.132 -Release: 3 +Release: 4 License: GPL v2 and LGPL v2.1 Group: Applications/System Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz @@ -54,6 +54,7 @@ Patch4: dl-dlsym.patch Patch6: %{name}-lvm_path.patch Patch7: %{name}-clvmd_cmd_timeout.patch Patch8: device-mapper-dmsetup-deps-export.patch +Patch9: %{name}-run-dir.patch URL: http://www.sourceware.org/lvm2/ BuildRequires: autoconf >= 2.61 BuildRequires: automake @@ -321,6 +322,7 @@ potrzeby initrd. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # do not force --export-symbol linker option for e.g. statically linked executables # -rdynamic compiler option drives linker in the right way. @@ -474,7 +476,7 @@ rm -rf $RPM_BUILD_ROOT # no service restart available /sbin/chkconfig --add blk-availability -%postun +%preun if [ "$1" = "0" ]; then %service lvm2-lvmetad stop /sbin/chkconfig --del lvm2-lvmetad @@ -495,7 +497,7 @@ export NORESTART=1 # re-exec instead /usr/sbin/clvmd -S 2>/dev/null || : -%postun clvmd +%preun clvmd if [ "$1" = "0" ]; then %service clvmd stop /sbin/chkconfig --del clvmd @@ -541,8 +543,8 @@ fi %attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmpolld %endif %attr(754,root,root) /etc/rc.d/init.d/lvm2-monitor -%attr(700,root,root) %dir /run/lvm %attr(700,root,root) %dir /var/lock/lvm +%attr(700,root,root) %dir /var/run/lvm %if %{with cluster} %files clvmd -- 2.44.0