Commit a0b976ac authored by Thomas Haller's avatar Thomas Haller

contrib/rpm: quote snapshot/git_sha variables in spec-file

Otherwise the following fails:

    $ ./contrib/fedora/rpm/ -g -s x.1
    error: parse error in expression
    error: /data/src/_NetworkManager/contrib/fedora/rpm/NetworkManager.20190207-165257.XOkW4i/SPECS/NetworkManager.spec:35: bad %if condition
    ERROR: rpmbuild FAILED

Even with the fix, not all characters are allowed:

    $ ./contrib/fedora/rpm/ -g -s x-1
    error: line 112: Illegal char '-' (0x2d) in: Release: 22165.x-1.25b13e2053.fc29
    ERROR: rpmbuild FAILED
parent db980702
Pipeline #18011 canceled with stages
in 43 minutes and 47 seconds
......@@ -32,10 +32,10 @@
%global _hardened_build 1
%if x%{?snapshot} != x
%if "x%{?snapshot}" != x
%global snapshot_dot .%{snapshot}
%if x%{?git_sha} != x
%if "x%{?git_sha}" != x
%global git_sha_dot .%{git_sha}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment