contrib/rpm: fix parsing of %real_version_major for ".0" versions

(cherry picked from commit 6c9880f8ca)
This commit is contained in:
Thomas Haller 2019-07-29 21:45:52 +02:00
parent e5912389c6
commit d734a4766c

View file

@ -40,7 +40,7 @@
%global snap %{?snapshot_dot}%{?git_sha_dot}
%global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[1-9][0-9]*\\)\\.[1-9][0-9]*$/\\1/p')
%global real_version_major %(printf '%s' '%{real_version}' | sed -n 's/^\\([1-9][0-9]*\\.[0-9][0-9]*\\)\\.[0-9][0-9]*$/\\1/p')
%global systemd_units NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service