From 081bc13eb87bb9aa679c3909821751125c5433a7 Mon Sep 17 00:00:00 2001 From: John Thacker Date: Sun, 24 Jul 2022 19:00:57 -0400 Subject: rpm: Disable build terminating on double dash versions for all distros RPM 4.11.2 introduced build failures on "wrong" version formatting, including everything with a double dash. This broke a lot of packages, so many distributions turned it off by default, but some don't. Make sure it's off, because build from git versions have dashes. Fixes the Rocky 9 CI build. Note that we try to work around this by replacing the dashes in our version number with underscores, but RPM will still complain about an invalid version in the dependency it generates from our pkg-config file. --- packaging/rpm/wireshark.spec.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'packaging') diff --git a/packaging/rpm/wireshark.spec.in b/packaging/rpm/wireshark.spec.in index bfec1ea8ad..a7018bab61 100644 --- a/packaging/rpm/wireshark.spec.in +++ b/packaging/rpm/wireshark.spec.in @@ -43,6 +43,13 @@ # are set. %global use_wireshark_group 1 +# RPM 4.11.2 and higher errors out on double dash in versions by default. +# Some, but not all, distros make this a warning instead; ensure that it is. +# We override the dashes with underscores for the main wireshark RPM version, +# but rpmbuild will fail based on its generated dependency from the pkg-config +# file (wireshark.pc), which has our original version with dashes. +%global _wrong_version_format_terminate_build 0 + %global package_version @PROJECT_VERSION@ @@ -132,12 +139,6 @@ BuildRequires: lua-devel < 5.3 %endif %endif -# Fedora complains about double dash in version. -# Shut it up just for it. -%if 0%{?fedora} -%define _wrong_version_format_terminate_build 0 -%endif - %if %{with nghttp2} BuildRequires: libnghttp2-devel %endif -- cgit v1.2.3