[sanlock/f18] systemd: add wdmd dependency for sanlock
David Teigland
teigland at fedoraproject.org
Tue Nov 13 17:08:33 UTC 2012
commit 812c258b5e470a5f8772a293d8061114b060294c
Author: David Teigland <teigland at redhat.com>
Date: Tue Nov 13 11:07:41 2012 -0600
systemd: add wdmd dependency for sanlock
0002-wdmd-use-mode-775-for-run-dir.patch | 29 ++++++++++++++++++++
0003-systemd-add-wdmd-dependency-for-sanlock.patch | 26 +++++++++++++++++
sanlock.spec | 9 +++++-
3 files changed, 63 insertions(+), 1 deletions(-)
---
diff --git a/0002-wdmd-use-mode-775-for-run-dir.patch b/0002-wdmd-use-mode-775-for-run-dir.patch
new file mode 100644
index 0000000..b9eacae
--- /dev/null
+++ b/0002-wdmd-use-mode-775-for-run-dir.patch
@@ -0,0 +1,29 @@
+From c7e288e4609bb84167a2ccb56ac66567c71be557 Mon Sep 17 00:00:00 2001
+From: David Teigland <teigland at redhat.com>
+Date: Tue, 6 Nov 2012 15:36:16 -0600
+Subject: [PATCH 2/3] wdmd: use mode 775 for run dir
+
+init script already creates it as 775,
+so this isn't a big problem.
+
+Signed-off-by: David Teigland <teigland at redhat.com>
+---
+ wdmd/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wdmd/main.c b/wdmd/main.c
+index 482ab29..646a0ac 100644
+--- a/wdmd/main.c
++++ b/wdmd/main.c
+@@ -1185,7 +1185,7 @@ static int lockfile(void)
+ int fd, rv;
+
+ old_umask = umask(0022);
+- rv = mkdir(WDMD_RUN_DIR, 0777);
++ rv = mkdir(WDMD_RUN_DIR, 0775);
+ if (rv < 0 && errno != EEXIST) {
+ umask(old_umask);
+ return rv;
+--
+1.7.10.1.362.g242cab3
+
diff --git a/0003-systemd-add-wdmd-dependency-for-sanlock.patch b/0003-systemd-add-wdmd-dependency-for-sanlock.patch
new file mode 100644
index 0000000..de7e6fd
--- /dev/null
+++ b/0003-systemd-add-wdmd-dependency-for-sanlock.patch
@@ -0,0 +1,26 @@
+From 917c64327acb0ae53ce605dc6b47a4a0f4983827 Mon Sep 17 00:00:00 2001
+From: Federico Simoncelli <fsimonce at redhat.com>
+Date: Tue, 13 Nov 2012 10:59:09 -0600
+Subject: [PATCH 3/3] systemd: add wdmd dependency for sanlock
+
+Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ init.d/sanlock.service | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/init.d/sanlock.service b/init.d/sanlock.service
+index f026fe0..64d9ced 100644
+--- a/init.d/sanlock.service
++++ b/init.d/sanlock.service
+@@ -1,6 +1,7 @@
+ [Unit]
+ Description=Shared Storage Lease Manager
+-After=syslog.target wdmd.service
++After=syslog.target
++Wants=wdmd.service
+
+ [Service]
+ Type=forking
+--
+1.7.10.1.362.g242cab3
+
diff --git a/sanlock.spec b/sanlock.spec
index 505fe25..2310058 100644
--- a/sanlock.spec
+++ b/sanlock.spec
@@ -1,6 +1,6 @@
Name: sanlock
Version: 2.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A shared disk lock manager
Group: System Environment/Base
@@ -20,6 +20,8 @@ Requires(pre): /usr/sbin/useradd
Source0: https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz
Patch0: 0001-fix-systemd-service-files.patch
+Patch1: 0002-wdmd-use-mode-775-for-run-dir.patch
+Patch2: 0003-systemd-add-wdmd-dependency-for-sanlock.patch
%description
sanlock uses disk paxos to manage leases on shared storage.
@@ -29,6 +31,8 @@ access to the shared disks.
%prep
%setup -q
%patch0 -p1 -b .0001-fix-systemd-service-files.patch
+%patch0 -p1 -b .0002-wdmd-use-mode-775-for-run-dir.patch
+%patch0 -p1 -b .0003-systemd-add-wdmd-dependency-for-sanlock.patch
%build
# upstream does not require configure
@@ -258,6 +262,9 @@ if [ $1 -ge 1 ] ; then
fi
%changelog
+* Tue Nov 13 2012 David Teigland <teigland at redhat.com> - 2.6-4
+- systemd: add wdmd dependency for sanlock
+
* Mon Nov 05 2012 David Teigland <teigland at redhat.com> - 2.6-3
- fix systemd service files and install them on rhel7
More information about the scm-commits
mailing list