Accepting request 487143 from Virtualization
1 OBS-URL: https://build.opensuse.org/request/show/487143 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sanlock?expand=0&rev=14
This commit is contained in:
commit
ccea45f802
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
|
- spec: fix permissions on config files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
||||||
|
- Use correct permissions on unit files (bsc#1032046)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Wed Mar 15 08:23:44 UTC 2017 - zren@suse.com
|
||||||
|
|
||||||
|
89
sanlock.spec
89
sanlock.spec
@ -53,6 +53,8 @@ Requires(pre): %fillup_prereq
|
|||||||
%if 0%{?suse_version} > 1320
|
%if 0%{?suse_version} > 1320
|
||||||
Requires(pre): group(disk)
|
Requires(pre): group(disk)
|
||||||
%endif
|
%endif
|
||||||
|
Requires(pre): %{_sbindir}/groupadd
|
||||||
|
Requires(pre): %{_sbindir}/useradd
|
||||||
Requires: %{name}-lib = %{version}-%{release}
|
Requires: %{name}-lib = %{version}-%{release}
|
||||||
Recommends: logrotate
|
Recommends: logrotate
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
@ -84,8 +86,7 @@ Summary: A shared disk lock manager library
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
|
|
||||||
%description -n libsanlock1
|
%description -n libsanlock1
|
||||||
The %{name}-lib package contains the runtime libraries for sanlock,
|
The runtime libraries for sanlock, a shared disk lock manager.
|
||||||
a shared disk lock manager.
|
|
||||||
Hosts connected to a common SAN can use this to synchronize their
|
Hosts connected to a common SAN can use this to synchronize their
|
||||||
access to the shared disks.
|
access to the shared disks.
|
||||||
|
|
||||||
@ -96,9 +97,8 @@ Group: Development/Libraries/Python
|
|||||||
Requires: libsanlock1 = %{version}-%{release}
|
Requires: libsanlock1 = %{version}-%{release}
|
||||||
|
|
||||||
%description -n python-%name
|
%description -n python-%name
|
||||||
The %{name}-python package contains a module that permits applications
|
A module that permits applications written in the Python programming
|
||||||
written in the Python programming language to use the interface
|
language to use the interface supplied by the sanlock library.
|
||||||
supplied by the sanlock library.
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
@ -109,30 +109,25 @@ Requires: libsanlock1 = %{version}-%{release}
|
|||||||
The %{name}-devel package contains libraries and header files for
|
The %{name}-devel package contains libraries and header files for
|
||||||
developing applications that use %{name}.
|
developing applications that use %{name}.
|
||||||
|
|
||||||
%if %{with_fence_sanlockd}
|
|
||||||
%package -n fence-sanlock
|
%package -n fence-sanlock
|
||||||
Summary: Fence agent using sanlock and wdmd
|
Summary: Fence agent using sanlock and wdmd
|
||||||
Group: System Environment/Base
|
Group: System/Base
|
||||||
Requires: sanlock = %{version}-%{release}
|
Requires: sanlock = %{version}-%{release}
|
||||||
|
|
||||||
%description -n fence-sanlock
|
%description -n fence-sanlock
|
||||||
The fence-sanlock package contains the fence agent and
|
Fence agent and daemon for using sanlock and wdmd as a cluster fence agent.
|
||||||
daemon for using sanlock and wdmd as a cluster fence agent.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with_sanlk_reset}
|
|
||||||
%package -n sanlk-reset
|
%package -n sanlk-reset
|
||||||
Summary: Host reset daemon and client using sanlock
|
Summary: Host reset daemon and client using sanlock
|
||||||
Group: System Environment/Base
|
Group: System/Base
|
||||||
Requires: libsanlock1 = %{version}-%{release}
|
Requires: libsanlock1 = %{version}-%{release}
|
||||||
Requires: sanlock = %{version}-%{release}
|
Requires: sanlock = %{version}-%{release}
|
||||||
|
|
||||||
%description -n sanlk-reset
|
%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
|
A cooperating host running the daemon can be reset by a host
|
||||||
running the client, so long as both maintain access to a
|
running the client, so long as both maintain access to a
|
||||||
common sanlock lockspace.
|
common sanlock lockspace.
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -148,69 +143,69 @@ common sanlock lockspace.
|
|||||||
%build
|
%build
|
||||||
# upstream does not require configure
|
# upstream does not require configure
|
||||||
# upstream does not support _smp_mflags
|
# upstream does not support _smp_mflags
|
||||||
CFLAGS=$RPM_OPT_FLAGS make -C wdmd
|
CFLAGS="%{optflags}" make -C wdmd
|
||||||
CFLAGS=$RPM_OPT_FLAGS make -C src
|
CFLAGS="%{optflags}" make -C src
|
||||||
CFLAGS=$RPM_OPT_FLAGS make -C python
|
CFLAGS="%{optflags}" make -C python
|
||||||
%if %{with_fence_sanlockd}
|
%if %{with_fence_sanlockd}
|
||||||
CFLAGS=$RPM_OPT_FLAGS make -C fence_sanlock
|
CFLAGS="%{optflags}" make -C fence_sanlock
|
||||||
%endif
|
%endif
|
||||||
%if %{with_sanlk_reset}
|
%if %{with_sanlk_reset}
|
||||||
CFLAGS=$RPM_OPT_FLAGS make -C reset
|
CFLAGS="%{optflags}" make -C reset
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make -C src \
|
make -C src \
|
||||||
install LIBDIR=%{_libdir} \
|
install LIBDIR=%{_libdir} \
|
||||||
DESTDIR=$RPM_BUILD_ROOT
|
DESTDIR="%{buildroot}"
|
||||||
make -C wdmd \
|
make -C wdmd \
|
||||||
install LIBDIR=%{_libdir} \
|
install LIBDIR=%{_libdir} \
|
||||||
DESTDIR=$RPM_BUILD_ROOT
|
DESTDIR="%{buildroot}"
|
||||||
make -C python \
|
make -C python \
|
||||||
install LIBDIR=%{_libdir} \
|
install LIBDIR=%{_libdir} \
|
||||||
DESTDIR=$RPM_BUILD_ROOT PREFIX=%_prefix
|
DESTDIR="%{buildroot}" PREFIX=%_prefix
|
||||||
%if %{with_fence_sanlockd}
|
%if %{with_fence_sanlockd}
|
||||||
make -C fence_sanlock \
|
make -C fence_sanlock \
|
||||||
install LIBDIR=%{_libdir} \
|
install LIBDIR=%{_libdir} \
|
||||||
DESTDIR=$RPM_BUILD_ROOT
|
DESTDIR="%{buildroot}"
|
||||||
%endif
|
%endif
|
||||||
%if %{with_sanlk_reset}
|
%if %{with_sanlk_reset}
|
||||||
make -C reset \
|
make -C reset \
|
||||||
install LIBDIR=%{_libdir} \
|
install LIBDIR=%{_libdir} \
|
||||||
DESTDIR=$RPM_BUILD_ROOT
|
DESTDIR="%{buildroot}"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -D -m 755 src/sanlock.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sanlock/sanlock.conf
|
install -D -m 644 src/sanlock.conf %{buildroot}/%{_sysconfdir}/sanlock/sanlock.conf
|
||||||
install -D -m 755 %SOURCE2 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock
|
install -D -m 644 %SOURCE2 %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.sanlock
|
||||||
install -D -m 755 %SOURCE4 $RPM_BUILD_ROOT/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd
|
install -D -m 644 %SOURCE4 %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.wdmd
|
||||||
|
|
||||||
%if %{with_systemd}
|
%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 %{buildroot}/%{_unitdir}/sanlock.service
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcsanlock
|
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 %{buildroot}/%{_unitdir}/wdmd.service
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwdmd
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwdmd
|
||||||
%if %{with_fence_sanlockd}
|
%if %{with_fence_sanlockd}
|
||||||
install -D -m 0755 %SOURCE5 $RPM_BUILD_ROOT/usr/lib/systemd/systemd-fence_sanlockd
|
install -D -m 0755 %SOURCE5 %{buildroot}/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 0644 init.d/fence_sanlockd.service %{buildroot}/%{_unitdir}/fence_sanlockd.service
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcfence_sanlockd
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcfence_sanlockd
|
||||||
%endif
|
%endif
|
||||||
%if %{with_sanlk_reset}
|
%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
|
%endif
|
||||||
%else
|
%else
|
||||||
install -D -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/sanlock
|
install -D -m 755 %SOURCE1 %{buildroot}/etc/init.d/sanlock
|
||||||
ln -s /etc/init.d/sanlock $RPM_BUILD_ROOT%{_sbindir}/rcsanlock
|
ln -s /etc/init.d/sanlock %{buildroot}%{_sbindir}/rcsanlock
|
||||||
install -D -m 755 %SOURCE3 $RPM_BUILD_ROOT/etc/init.d/wdmd
|
install -D -m 755 %SOURCE3 %{buildroot}/etc/init.d/wdmd
|
||||||
ln -s /etc/init.d/wdmd $RPM_BUILD_ROOT%{_sbindir}/rcwdmd
|
ln -s /etc/init.d/wdmd %{buildroot}%{_sbindir}/rcwdmd
|
||||||
%if %{with_fence_sanlockd}
|
%if %{with_fence_sanlockd}
|
||||||
install -D -m 755 %SOURCE5 $RPM_BUILD_ROOT/%{_initddir}/fence_sanlockd
|
install -D -m 755 %SOURCE5 %{buildroot}/%{_initddir}/fence_sanlockd
|
||||||
ln -s /etc/init.d/fence_sanlockd $RPM_BUILD_ROOT%{_sbindir}/rcfence_sanlockd
|
ln -s /etc/init.d/fence_sanlockd %{buildroot}%{_sbindir}/rcfence_sanlockd
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -Dm 0644 src/logrotate.sanlock \
|
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
|
%pre
|
||||||
%{_bindir}/getent group sanlock > /dev/null || %{_sbindir}/groupadd \
|
%{_bindir}/getent group sanlock > /dev/null || %{_sbindir}/groupadd \
|
||||||
@ -224,19 +219,15 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
|
|||||||
%service_add_pre sanlock.service
|
%service_add_pre sanlock.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_fence_sanlockd}
|
|
||||||
%pre -n fence-sanlock
|
%pre -n fence-sanlock
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_add_pre fence_sanlockd.service
|
%service_add_pre fence_sanlockd.service
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with_sanlk_reset}
|
|
||||||
%pre -n sanlk-reset
|
%pre -n sanlk-reset
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_add_pre sanlk-resetd.service
|
%service_add_pre sanlk-resetd.service
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
@ -262,13 +253,11 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
|
|||||||
#fi
|
#fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_sanlk_reset}
|
|
||||||
%post -n sanlk-reset
|
%post -n sanlk-reset
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_add_post sanlk-resetd.service
|
%service_add_post sanlk-resetd.service
|
||||||
%endif
|
%endif
|
||||||
%restart_on_update sanlk-resetd
|
%restart_on_update sanlk-resetd
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
@ -278,23 +267,19 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
|
|||||||
%stop_on_removal sanlock
|
%stop_on_removal sanlock
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_fence_sanlockd}
|
|
||||||
%preun -n fence-sanlock
|
%preun -n fence-sanlock
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_del_preun fence_sanlockd.service
|
%service_del_preun fence_sanlockd.service
|
||||||
%else
|
%else
|
||||||
%stop_on_removal fence_sanlockd
|
%stop_on_removal fence_sanlockd
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with_sanlk_reset}
|
|
||||||
%preun -n sanlk-reset
|
%preun -n sanlk-reset
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_del_preun sanlk-resetd.service
|
%service_del_preun sanlk-resetd.service
|
||||||
%else
|
%else
|
||||||
%stop_on_removal sanlk-resetd
|
%stop_on_removal sanlk-resetd
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
@ -305,19 +290,15 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
|
|||||||
|
|
||||||
%postun -n libsanlock1 -p /sbin/ldconfig
|
%postun -n libsanlock1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%if %{with_fence_sanlockd}
|
|
||||||
%postun -n fence-sanlock
|
%postun -n fence-sanlock
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_del_postun fence_sanlockd.service
|
%service_del_postun fence_sanlockd.service
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with_sanlk_reset}
|
|
||||||
%postun -n sanlk-reset
|
%postun -n sanlk-reset
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%service_del_postun sanlk-resetd.service
|
%service_del_postun sanlk-resetd.service
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
Loading…
Reference in New Issue
Block a user