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
This commit is contained in:
parent
534fe664ad
commit
95451a96b2
@ -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
|
||||
|
||||
|
83
sanlock.spec
83
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,-)
|
||||
|
Loading…
Reference in New Issue
Block a user