aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-07-24 19:00:57 -0400
committerJohn Thacker <johnthacker@gmail.com>2022-07-24 20:13:46 -0400
commit081bc13eb87bb9aa679c3909821751125c5433a7 (patch)
tree4ef24b139588f39f93bd4ac0a0cbdcfb9c07f036 /packaging
parentd1bd808e8473fe4703694d2347c1c00b6c3733ba (diff)
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.
Diffstat (limited to 'packaging')
-rw-r--r--packaging/rpm/wireshark.spec.in13
1 files changed, 7 insertions, 6 deletions
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