Rebase to sanlock upstream release 5.1.0

Resolves: RHEL-163450
This commit is contained in:
Marian Csontos 2026-04-28 11:33:53 +02:00
parent 998e2f3a19
commit 8fb2768fbb
3 changed files with 19 additions and 10 deletions

1
.gitignore vendored
View File

@ -36,3 +36,4 @@
/sanlock-3.9.5.tar.gz
/sanlock-4.0.0.tar.gz
/sanlock-4.1.0.tar.gz
/sanlock-5.1.0.tar.gz

View File

@ -1,13 +1,15 @@
Name: sanlock
Version: 4.1.0
Version: 5.1.0
Release: 1%{?dist}
Summary: A shared storage lock manager
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later
URL: https://pagure.io/sanlock/
URL: https://codeberg.org/sanlock/sanlock
BuildRequires: gcc
BuildRequires: libaio-devel
BuildRequires: libblkid-devel
BuildRequires: libuuid-devel
# TODO: This creates a cyclic dependency, as lvm2 depends on sanlock-devel
BuildRequires: device-mapper-devel
BuildRequires: make
BuildRequires: systemd-units
Requires: %{name}-lib = %{version}-%{release}
@ -15,7 +17,7 @@ Requires(post): systemd-units
Requires(post): systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
Source0: https://codeberg.org/sanlock/sanlock/archive/%{name}-%{version}.tar.gz
# Patch0: 0001-foo.patch
@ -24,7 +26,7 @@ The sanlock daemon manages leases for applications on hosts using shared storage
%prep
%setup -q
# %patch0 -p1
#%%patch0 -p1
%build
%set_build_flags
@ -42,23 +44,24 @@ make -C wdmd \
install LIBDIR=%{_libdir} \
DESTDIR=$RPM_BUILD_ROOT
install -D -m 0644 init.d/sanlock.service.native $RPM_BUILD_ROOT%{_unitdir}/sanlock.service
install -D -m 0644 init.d/sanlock.service $RPM_BUILD_ROOT%{_unitdir}/sanlock.service
install -D -m 0755 init.d/systemd-wdmd $RPM_BUILD_ROOT%{_prefix}/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
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sanlock
install -D -m 0644 src/sanlock.conf \
$RPM_BUILD_ROOT/etc/sanlock/sanlock.conf
$RPM_BUILD_ROOT%{_sysconfdir}/sanlock/sanlock.conf
install -D -m 0644 init.d/wdmd.sysconfig \
$RPM_BUILD_ROOT/etc/sysconfig/wdmd
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wdmd
install -Dd -m 0755 $RPM_BUILD_ROOT/etc/wdmd.d
install -Dd -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/wdmd.d
# TODO: Is there a support for sysusers in RHEL10? This could be dropped
%pre
# As libvirt does, install a sysusers file, but also directly
# create the user and group to avoid rpm installation errors
@ -87,6 +90,7 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%{_sbindir}/wdmd
%dir %{_sysconfdir}/wdmd.d
%dir %{_sysconfdir}/sanlock
%dir %{_sharedstatedir}/sanlock
%{_mandir}/man8/wdmd*
%{_mandir}/man8/sanlock*
%config(noreplace) %{_sysconfdir}/logrotate.d/sanlock
@ -132,6 +136,10 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/libsanlock_client.pc
%changelog
* Tue Apr 28 2026 Marian Csontos <mcsontos@redhat.com> - 5.1.0-1
- new upstream release.
- Add support for atomic leases using compare and write.
* Thu Oct 09 2025 Marian Csontos <mcsontos@redhat.com> - 4.1.0-1
- new upstream release

View File

@ -1 +1 @@
SHA512 (sanlock-4.1.0.tar.gz) = dd3786aa22a3bf94981141d244d1422bfbe12870c070d0f835b68601b9f0152265144e68426a6f112248df0dbfcb65914b1586f0cd83ab4aece79d8279f4438e
SHA512 (sanlock-5.1.0.tar.gz) = 360d6ac99f60246ecdd49460df6601ba3468d4dc83f33aab2f2a914d47d4a28380de3e98b82ba1d862ae925b30d351488473f96f80e8256acba76fd6103aaa4c