From a25cdb433d98536163458e19181b73f63f6d7fed3d166063139004351ad32562 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 29 Mar 2017 15:10:27 +0000 Subject: [PATCH 1/6] Accepting request 483281 from home:msmeissn:branches:Virtualization - prerequire groupadd and useradd. OBS-URL: https://build.opensuse.org/request/show/483281 OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=33 --- sanlock.changes | 5 +++++ sanlock.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/sanlock.changes b/sanlock.changes index ff3db59..8257cdf 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 29 10:49:35 UTC 2017 - meissner@suse.com + +- prerequire groupadd and useradd. + ------------------------------------------------------------------- Wed Mar 15 08:23:44 UTC 2017 - zren@suse.com diff --git a/sanlock.spec b/sanlock.spec index 85dce4c..4b94ebd 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -53,6 +53,8 @@ Requires(pre): %fillup_prereq %if 0%{?suse_version} > 1320 Requires(pre): group(disk) %endif +Requires(pre): %{_sbindir}/groupadd +Requires(pre): %{_sbindir}/useradd Requires: %{name}-lib = %{version}-%{release} Recommends: logrotate Source0: %{name}-%{version}.tar.xz From 9868a10d1eff144858ea1c5bf45f4fb88e3d352cb4c5e060704d8586a2b21451 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 3 Apr 2017 15:26:48 +0000 Subject: [PATCH 2/6] Accepting request 484795 from home:pluskalm:branches:Virtualization - Use correct permissions on unit files (bsc#1032046) OBS-URL: https://build.opensuse.org/request/show/484795 OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=34 --- sanlock.changes | 5 +++++ sanlock.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sanlock.changes b/sanlock.changes index 8257cdf..ebda803 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 3 07:21:10 UTC 2017 - mpluskal@suse.com + +- Use correct permissions on unit files (bsc#1032046) + ------------------------------------------------------------------- Wed Mar 29 10:49:35 UTC 2017 - meissner@suse.com diff --git a/sanlock.spec b/sanlock.spec index 4b94ebd..381974d 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -186,9 +186,9 @@ install -D -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-template install -D -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd %if %{with_systemd} -install -D -m 755 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service +install -D -m 644 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsanlock -install -D -m 755 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service +install -D -m 644 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwdmd %if %{with_fence_sanlockd} install -D -m 0755 %SOURCE5 $RPM_BUILD_ROOT/usr/lib/systemd/systemd-fence_sanlockd From a1a50e1c49779ae0fcaa622421f8b7283b90eb70cc49c3db83e396d32ba0a06d Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 3 Apr 2017 15:32:51 +0000 Subject: [PATCH 3/6] - Use System/Base in fence and reset subpackages OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=35 --- sanlock.changes | 5 +++++ sanlock.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sanlock.changes b/sanlock.changes index ebda803..fb76d2d 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 3 15:31:43 UTC 2017 - jfehlig@suse.com + +- Use System/Base in fence and reset subpackages + ------------------------------------------------------------------- Mon Apr 3 07:21:10 UTC 2017 - mpluskal@suse.com diff --git a/sanlock.spec b/sanlock.spec index 381974d..f3c0003 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -114,7 +114,7 @@ developing applications that use %{name}. %if %{with_fence_sanlockd} %package -n fence-sanlock Summary: Fence agent using sanlock and wdmd -Group: System Environment/Base +Group: System/Base Requires: sanlock = %{version}-%{release} %description -n fence-sanlock @@ -125,7 +125,7 @@ daemon for using sanlock and wdmd as a cluster fence agent. %if %{with_sanlk_reset} %package -n sanlk-reset Summary: Host reset daemon and client using sanlock -Group: System Environment/Base +Group: System/Base Requires: libsanlock1 = %{version}-%{release} Requires: sanlock = %{version}-%{release} From 88af9ec68ddb453ab439f159ceeed08b28f5119b4fdc368c50ee11a2d4131159 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 3 Apr 2017 15:44:34 +0000 Subject: [PATCH 4/6] - spec: fix permisssions on config files OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=36 --- sanlock.changes | 5 +++++ sanlock.spec | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sanlock.changes b/sanlock.changes index fb76d2d..0857b60 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 3 15:43:17 UTC 2017 - jfehlig@suse.com + +- spec: fix permisssions on config files + ------------------------------------------------------------------- Mon Apr 3 15:31:43 UTC 2017 - jfehlig@suse.com diff --git a/sanlock.spec b/sanlock.spec index f3c0003..4cf584c 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -181,9 +181,9 @@ make -C reset \ DESTDIR=$RPM_BUILD_ROOT %endif -install -D -m 755 src/sanlock.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sanlock/sanlock.conf -install -D -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock -install -D -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd +install -D -m 644 src/sanlock.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sanlock/sanlock.conf +install -D -m 644 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock +install -D -m 644 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd %if %{with_systemd} install -D -m 644 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service From 534fe664ad59c5bfb37fba9d1a61a8f0ff9b00b2a0e75ac83a17839329000893 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 3 Apr 2017 15:45:46 +0000 Subject: [PATCH 5/6] fix typo in changelog OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=37 --- sanlock.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanlock.changes b/sanlock.changes index 0857b60..3e0a7cf 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon Apr 3 15:43:17 UTC 2017 - jfehlig@suse.com -- spec: fix permisssions on config files +- spec: fix permissions on config files ------------------------------------------------------------------- Mon Apr 3 15:31:43 UTC 2017 - jfehlig@suse.com From 95451a96b2ac16188174eb4b22289f553f58a88f3307e2b522f41cbc3d774658 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 10 Apr 2017 20:54:42 +0000 Subject: [PATCH 6/6] Accepting request 486659 from home:jengelh:branches:Virtualization - Remove redundant %if guards around %package and scriptlets. They are only really needed for %files. - Replace $RPM_ shell vars by modern macros. - Trim descriptions a little. OBS-URL: https://build.opensuse.org/request/show/486659 OBS-URL: https://build.opensuse.org/package/show/Virtualization/sanlock?expand=0&rev=38 --- sanlock.changes | 8 +++++ sanlock.spec | 83 ++++++++++++++++++------------------------------- 2 files changed, 39 insertions(+), 52 deletions(-) diff --git a/sanlock.changes b/sanlock.changes index 3e0a7cf..d2a52c9 100644 --- a/sanlock.changes +++ b/sanlock.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Apr 7 21:53:33 UTC 2017 - jengelh@inai.de + +- Remove redundant %if guards around %package and scriptlets. + They are only really needed for %files. +- Replace $RPM_ shell vars by modern macros. +- Trim descriptions a little. + ------------------------------------------------------------------- Mon Apr 3 15:43:17 UTC 2017 - jfehlig@suse.com diff --git a/sanlock.spec b/sanlock.spec index 4cf584c..badf0fb 100644 --- a/sanlock.spec +++ b/sanlock.spec @@ -86,8 +86,7 @@ Summary: A shared disk lock manager library Group: Development/Libraries/C and C++ %description -n libsanlock1 -The %{name}-lib package contains the runtime libraries for sanlock, -a shared disk lock manager. +The runtime libraries for sanlock, a shared disk lock manager. Hosts connected to a common SAN can use this to synchronize their access to the shared disks. @@ -98,9 +97,8 @@ Group: Development/Libraries/Python Requires: libsanlock1 = %{version}-%{release} %description -n python-%name -The %{name}-python package contains a module that permits applications -written in the Python programming language to use the interface -supplied by the sanlock library. +A module that permits applications written in the Python programming +language to use the interface supplied by the sanlock library. %package devel Summary: Development files for %{name} @@ -111,18 +109,14 @@ Requires: libsanlock1 = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%if %{with_fence_sanlockd} %package -n fence-sanlock Summary: Fence agent using sanlock and wdmd Group: System/Base Requires: sanlock = %{version}-%{release} %description -n fence-sanlock -The fence-sanlock package contains the fence agent and -daemon for using sanlock and wdmd as a cluster fence agent. -%endif +Fence agent and daemon for using sanlock and wdmd as a cluster fence agent. -%if %{with_sanlk_reset} %package -n sanlk-reset Summary: Host reset daemon and client using sanlock Group: System/Base @@ -130,11 +124,10 @@ Requires: libsanlock1 = %{version}-%{release} Requires: sanlock = %{version}-%{release} %description -n sanlk-reset -The sanlk-reset package contains the reset daemon and client. +The reset daemon and client for sanlock. A cooperating host running the daemon can be reset by a host running the client, so long as both maintain access to a common sanlock lockspace. -%endif %prep %setup -q @@ -150,69 +143,69 @@ common sanlock lockspace. %build # upstream does not require configure # upstream does not support _smp_mflags -CFLAGS=$RPM_OPT_FLAGS make -C wdmd -CFLAGS=$RPM_OPT_FLAGS make -C src -CFLAGS=$RPM_OPT_FLAGS make -C python +CFLAGS="%{optflags}" make -C wdmd +CFLAGS="%{optflags}" make -C src +CFLAGS="%{optflags}" make -C python %if %{with_fence_sanlockd} -CFLAGS=$RPM_OPT_FLAGS make -C fence_sanlock +CFLAGS="%{optflags}" make -C fence_sanlock %endif %if %{with_sanlk_reset} -CFLAGS=$RPM_OPT_FLAGS make -C reset +CFLAGS="%{optflags}" make -C reset %endif %install make -C src \ install LIBDIR=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR="%{buildroot}" make -C wdmd \ install LIBDIR=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR="%{buildroot}" make -C python \ install LIBDIR=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT PREFIX=%_prefix + DESTDIR="%{buildroot}" PREFIX=%_prefix %if %{with_fence_sanlockd} make -C fence_sanlock \ install LIBDIR=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR="%{buildroot}" %endif %if %{with_sanlk_reset} make -C reset \ install LIBDIR=%{_libdir} \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR="%{buildroot}" %endif -install -D -m 644 src/sanlock.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sanlock/sanlock.conf -install -D -m 644 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock -install -D -m 644 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd +install -D -m 644 src/sanlock.conf %{buildroot}/%{_sysconfdir}/sanlock/sanlock.conf +install -D -m 644 %SOURCE2 %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock +install -D -m 644 %SOURCE4 %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd %if %{with_systemd} -install -D -m 644 init.d/sanlock.service $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service +install -D -m 644 init.d/sanlock.service %{buildroot}/%{_unitdir}/sanlock.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsanlock -install -D -m 644 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service +install -D -m 644 init.d/wdmd.service %{buildroot}/%{_unitdir}/wdmd.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwdmd %if %{with_fence_sanlockd} -install -D -m 0755 %SOURCE5 $RPM_BUILD_ROOT/usr/lib/systemd/systemd-fence_sanlockd -install -D -m 0644 init.d/fence_sanlockd.service $RPM_BUILD_ROOT/%{_unitdir}/fence_sanlockd.service +install -D -m 0755 %SOURCE5 %{buildroot}/usr/lib/systemd/systemd-fence_sanlockd +install -D -m 0644 init.d/fence_sanlockd.service %{buildroot}/%{_unitdir}/fence_sanlockd.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcfence_sanlockd %endif %if %{with_sanlk_reset} -install -D -m 0644 init.d/sanlk-resetd.service $RPM_BUILD_ROOT/%{_unitdir}/sanlk-resetd.service +install -D -m 0644 init.d/sanlk-resetd.service %{buildroot}/%{_unitdir}/sanlk-resetd.service %endif %else -install -D -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/sanlock -ln -s /etc/init.d/sanlock $RPM_BUILD_ROOT%{_sbindir}/rcsanlock -install -D -m 755 %SOURCE3 $RPM_BUILD_ROOT/etc/init.d/wdmd -ln -s /etc/init.d/wdmd $RPM_BUILD_ROOT%{_sbindir}/rcwdmd +install -D -m 755 %SOURCE1 %{buildroot}/etc/init.d/sanlock +ln -s /etc/init.d/sanlock %{buildroot}%{_sbindir}/rcsanlock +install -D -m 755 %SOURCE3 %{buildroot}/etc/init.d/wdmd +ln -s /etc/init.d/wdmd %{buildroot}%{_sbindir}/rcwdmd %if %{with_fence_sanlockd} -install -D -m 755 %SOURCE5 $RPM_BUILD_ROOT/%{_initddir}/fence_sanlockd -ln -s /etc/init.d/fence_sanlockd $RPM_BUILD_ROOT%{_sbindir}/rcfence_sanlockd +install -D -m 755 %SOURCE5 %{buildroot}/%{_initddir}/fence_sanlockd +ln -s /etc/init.d/fence_sanlockd %{buildroot}%{_sbindir}/rcfence_sanlockd %endif %endif install -Dm 0644 src/logrotate.sanlock \ - $RPM_BUILD_ROOT/etc/logrotate.d/sanlock + %{buildroot}/etc/logrotate.d/sanlock -install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d +install -Dd -m 0755 %{buildroot}/etc/wdmd.d %pre %{_bindir}/getent group sanlock > /dev/null || %{_sbindir}/groupadd \ @@ -226,19 +219,15 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d %service_add_pre sanlock.service %endif -%if %{with_fence_sanlockd} %pre -n fence-sanlock %if %{with_systemd} %service_add_pre fence_sanlockd.service %endif -%endif -%if %{with_sanlk_reset} %pre -n sanlk-reset %if %{with_systemd} %service_add_pre sanlk-resetd.service %endif -%endif %post %if %{with_systemd} @@ -264,13 +253,11 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d #fi %endif -%if %{with_sanlk_reset} %post -n sanlk-reset %if %{with_systemd} %service_add_post sanlk-resetd.service %endif %restart_on_update sanlk-resetd -%endif %preun %if %{with_systemd} @@ -280,23 +267,19 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d %stop_on_removal sanlock %endif -%if %{with_fence_sanlockd} %preun -n fence-sanlock %if %{with_systemd} %service_del_preun fence_sanlockd.service %else %stop_on_removal fence_sanlockd %endif -%endif -%if %{with_sanlk_reset} %preun -n sanlk-reset %if %{with_systemd} %service_del_preun sanlk-resetd.service %else %stop_on_removal sanlk-resetd %endif -%endif %postun %if %{with_systemd} @@ -307,19 +290,15 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d %postun -n libsanlock1 -p /sbin/ldconfig -%if %{with_fence_sanlockd} %postun -n fence-sanlock %if %{with_systemd} %service_del_postun fence_sanlockd.service %endif -%endif -%if %{with_sanlk_reset} %postun -n sanlk-reset %if %{with_systemd} %service_del_postun sanlk-resetd.service %endif -%endif %files %defattr(-,root,root,-)