Resolves: RHEL-53873

This commit is contained in:
David Teigland 2024-08-09 11:44:59 -05:00
parent ee8d8e8519
commit ad4779b199
3 changed files with 15 additions and 42 deletions

1
.gitignore vendored
View File

@ -32,3 +32,4 @@
/sanlock-3.8.4.tar.gz
/sanlock-3.8.5.tar.gz
/sanlock-3.9.0.tar.gz
/sanlock-3.9.4.tar.gz

View File

@ -1,22 +1,16 @@
Name: sanlock
Version: 3.9.0
Release: 3%{?dist}
Version: 3.9.4
Release: 1%{?dist}
Summary: A shared storage lock manager
License: GPLv2 and GPLv2+ and LGPLv2+
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later
URL: https://pagure.io/sanlock/
BuildRequires: gcc
BuildRequires: libaio-devel
BuildRequires: libblkid-devel
BuildRequires: libuuid-devel
BuildRequires: make
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: systemd-units
BuildRequires: python3-setuptools
Requires: %{name}-lib = %{version}-%{release}
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
Requires(post): systemd-units
Requires(post): systemd-sysv
Requires(preun): systemd-units
@ -38,7 +32,6 @@ The sanlock daemon manages leases for applications on hosts using shared storage
# 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 PY_VERSION=3
%install
rm -rf $RPM_BUILD_ROOT
@ -48,15 +41,12 @@ make -C src \
make -C wdmd \
install LIBDIR=%{_libdir} \
DESTDIR=$RPM_BUILD_ROOT
make -C python \
install LIBDIR=%{_libdir} \
DESTDIR=$RPM_BUILD_ROOT \
PY_VERSION=3
install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT/%{_unitdir}/sanlock.service
install -D -m 0755 init.d/wdmd $RPM_BUILD_ROOT/%{_libdir}/systemd/systemd-wdmd
install -D -m 0644 init.d/wdmd.service.native $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service
install -D -m 0755 init.d/systemd-wdmd $RPM_BUILD_ROOT/usr/lib/systemd/systemd-wdmd
install -D -m 0644 init.d/wdmd.service $RPM_BUILD_ROOT/%{_unitdir}/wdmd.service
install -p -D -m 0644 src/sanlock.sysusers $RPM_BUILD_ROOT/%{_sysusersdir}/sanlock.conf
install -D -m 0644 src/logrotate.sanlock \
$RPM_BUILD_ROOT/etc/logrotate.d/sanlock
@ -71,12 +61,7 @@ install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
install -Dd -m 0775 $RPM_BUILD_ROOT/%{_localstatedir}/run/sanlock
%pre
getent group sanlock > /dev/null || /usr/sbin/groupadd \
-g 179 sanlock
getent passwd sanlock > /dev/null || /usr/sbin/useradd \
-u 179 -c "sanlock" -s /sbin/nologin -r \
-g 179 -d /var/run/sanlock sanlock
/usr/sbin/usermod -a -G disk sanlock
%sysusers_create_compat sanlock.sysusers
%post
%systemd_post wdmd.service sanlock.service
@ -88,7 +73,7 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%systemd_postun wdmd.service sanlock.service
%files
%{_libdir}/systemd/systemd-wdmd
/usr/lib/systemd/systemd-wdmd
%{_unitdir}/sanlock.service
%{_unitdir}/wdmd.service
%{_sbindir}/sanlock
@ -101,9 +86,7 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%config(noreplace) %{_sysconfdir}/logrotate.d/sanlock
%config(noreplace) %{_sysconfdir}/sanlock/sanlock.conf
%config(noreplace) %{_sysconfdir}/sysconfig/wdmd
%doc init.d/sanlock
%doc init.d/sanlock.service
%doc init.d/wdmd.service
%{_sysusersdir}/sanlock.conf
%package lib
Summary: A shared storage lock manager library
@ -121,20 +104,6 @@ access to the shared disks.
%{_libdir}/libsanlock_client.so.*
%{_libdir}/libwdmd.so.*
%package -n python3-sanlock
%{?python_provide:%python_provide python3-sanlock}
Summary: Python bindings for the sanlock library
Requires: %{name}-lib = %{version}-%{release}
%description -n python3-sanlock
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.
%files -n python3-sanlock
%{python3_sitearch}/sanlock_python-*.egg-info
%{python3_sitearch}/sanlock*.so
%package devel
Summary: Development files for %{name}
Requires: %{name}-lib = %{version}-%{release}
@ -157,6 +126,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/libsanlock_client.pc
%changelog
* Fri Aug 09 2024 David Teigland <teigland@redhat.com> - 3.9.4-1
- new upstream release, adopt sysusers, drop python bindings
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.9.0-3
- Bump release for June 2024 mass rebuild

View File

@ -1 +1 @@
SHA512 (sanlock-3.9.0.tar.gz) = 16ac4333843d4cc68b8c62ca14480bda6cf7599c5bfd3cd3e008698625c9882a80db8e2d217327642abf8e029ce2a54f25672c7319e0178eb87a98d9aca06d82
SHA512 (sanlock-3.9.4.tar.gz) = e20e191230f84a33125c3dc4498fc2700ae43ce80946c2436ec619b420520f5c9d70f761a71016192240da6f587f66b9e63ee1221c75eb74f346df5a55252b6f