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.
This commit is contained in:
John Thacker 2022-07-24 19:00:57 -04:00
parent d1bd808e84
commit 081bc13eb8
1 changed files with 7 additions and 6 deletions

View File

@ -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