From afeb54c6bb70158b57000ae26dba1e0232c457f9 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Thu, 12 Aug 2021 10:47:20 +0200 Subject: [PATCH] Remove unused relprefix and prerel macros that break rpmdev-bumpspec logic During mass rebuilds NVR is bumped by rpmdev-bumpspec. But it can't handle complex Release: fields such as ours, that has %{prerel} and %{relprefix} macros. It adds .1 after the %{dist} macro instead of increasing the release number. The issue for rpmdev-bumpspec is unsolved since 2012: https://pagure.io/rpmdevtools/issue/18 These macros are unused by us and only cause issues when NVR is bumped. So let's remove them. Related: rhbz#1991688 --- 389-ds-base.spec | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/389-ds-base.spec b/389-ds-base.spec index a45bc9d..6c8e015 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -5,13 +5,6 @@ # Exclude i686 bit arches ExcludeArch: i686 -# for a pre-release, define the prerel field e.g. .a1 .rc2 - comment out for official release -# also remove the space between % and global - this space is needed because -# fedpkg verrel stupidly ignores comment lines -#% global prerel .rc3 -# also need the relprefix field for a pre-release e.g. .0 - also comment out for official release -#% global relprefix 0. - # If perl-Socket-2.000 or newer is available, set 0 to use_Socket6. %global use_Socket6 0 @@ -54,7 +47,7 @@ ExcludeArch: i686 Summary: 389 Directory Server (base) Name: 389-ds-base Version: 2.0.7 -Release: %{?relprefix}2%{?prerel}%{?dist}.1 +Release: 3%{?dist} License: GPLv3+ and ASL 2.0 and MPLv2.0 and Boost URL: https://www.port389.org Conflicts: selinux-policy-base < 3.9.8 @@ -254,7 +247,7 @@ Requires: perl-Archive-Tar Obsoletes: %{name} <= 1.3.5.4 -Source0: https://releases.pagure.org/389-ds-base/%{name}-%{version}%{?prerel}.tar.bz2 +Source0: https://releases.pagure.org/389-ds-base/%{name}-%{version}.tar.bz2 # 389-ds-git.sh should be used to generate the source tarball from git Source1: %{name}-git.sh Source2: %{name}-devel.README @@ -359,11 +352,11 @@ A cockpit UI Plugin for configuring and administering the 389 Directory Server %endif %prep -%autosetup -p1 -v -n %{name}-%{version}%{?prerel} -%setup -q -n %{name}-%{version}%{?prerel} +%autosetup -p1 -v -n %{name}-%{version} +%setup -q -n %{name}-%{version} %if %{bundle_jemalloc} -%setup -q -n %{name}-%{version}%{?prerel} -T -D -b 3 +%setup -q -n %{name}-%{version} -T -D -b 3 %endif cp %{SOURCE2} README.devel @@ -450,10 +443,10 @@ pushd ./src/lib389 popd # argparse-manpage dynamic man pages have hardcoded man v1 in header, # need to change it to v8 -sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsconf.8 -sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsctl.8 -sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsidm.8 -sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dscreate.8 +sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsconf.8 +sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsctl.8 +sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dsidm.8 +sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dscreate.8 # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS @@ -475,7 +468,7 @@ find %{buildroot}%{_datadir}/cockpit/389-console -type f | sed -e "s@%{buildroot %endif # Copy in our docs from doxygen. -cp -r %{_builddir}/%{name}-%{version}%{?prerel}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3 +cp -r %{_builddir}/%{name}-%{version}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3 # lib389 pushd src/lib389 @@ -500,8 +493,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.la %if %{bundle_jemalloc} pushd ../%{jemalloc_name}-%{jemalloc_ver} make DESTDIR="$RPM_BUILD_ROOT" install_lib install_bin -cp -pa COPYING ../%{name}-%{version}%{?prerel}/COPYING.jemalloc -cp -pa README ../%{name}-%{version}%{?prerel}/README.jemalloc +cp -pa COPYING ../%{name}-%{version}/COPYING.jemalloc +cp -pa README ../%{name}-%{version}/README.jemalloc popd %endif @@ -711,6 +704,10 @@ exit 0 %endif %changelog +* Thu Aug 12 2021 Viktor Ashirov - 2.0.7-3 +- Remove unused relprefix and prerel macros that break rpmdev-bumpspec logic + Related: rhbz#1991688 + * Mon Aug 09 2021 Mohan Boddu - 2.0.7-2.1 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688