From 80541b941b3342efc3b5562149a5fd0caf3ff1ff Mon Sep 17 00:00:00 2001 From: Fabrice Bauzac Date: Wed, 18 May 2022 21:12:23 +0200 Subject: [PATCH] --with-mailgroup: fix the locking of mail This should fix rhbz#2040522. --- liblockfile.spec | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/liblockfile.spec b/liblockfile.spec index 183470f..fc82707 100644 --- a/liblockfile.spec +++ b/liblockfile.spec @@ -1,6 +1,6 @@ Name: liblockfile Version: 1.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: This implements a number of functions found in -lmail on SysV systems # regarding license please see file COPYRIGHT @@ -31,17 +31,28 @@ developing applications that use %{name}. %prep %setup -q -n %{name}-%{VERSION} -# remove -g root from install -sed -i "s/-g root//" Makefile.in +# There are occurrences of "install -g GROUP ...". +# +# Changing the group requires permissions that are normally not +# available while packaging. +# +# Let's remove "-g GROUP". +sed -Ei "/install/ s/-g [^ ]+//" Makefile.in +# Makefile.in mixes and messes with DESTDIR and prefix. +# See the following pull requests submitted upstream: +# https://github.com/miquels/liblockfile/pull/11 +# https://github.com/miquels/liblockfile/pull/15 +sed -i \ + -e '/^prefix/s,\$(DESTDIR),,' \ + -e 's,\(\$(\(lib\|include\|man\|nfslock\|bin\)dir)\),$(DESTDIR)\1,' \ + -e '/-DLOCKPROG/s,\$(DESTDIR),,' Makefile.in %build -%configure --enable-shared --prefix=%{buildroot} --bindir=%{buildroot}%{_bindir} --mandir=%{buildroot}%{_mandir} --libdir=%{buildroot}%{_libdir} --includedir=%{buildroot}%{_includedir} +%configure --enable-shared --with-mailgroup %make_build - %install -export DESTDIR=%{buildroot} %make_install ldconfig -N -n %{buildroot}/%{_libdir} @@ -66,6 +77,9 @@ ldconfig -N -n %{buildroot}/%{_libdir} %changelog +* Tue May 17 2022 Fabrice Bauzac-Stehly - 1.17-2 +- Enable --with-mailgroup (rhbz#2040522) + * Fri Jan 28 2022 Richard Lescak - 1.17-1 - Rebase to version 1.17