diff --git a/systemd.spec b/systemd.spec index b526871..0b19b99 100644 --- a/systemd.spec +++ b/systemd.spec @@ -32,6 +32,9 @@ # Build from git main %bcond upstream 0 +# Build with OBS-specific quirks +%bcond obs 0 + # When bootstrap, libcryptsetup is disabled # but auto-features causes many options to be turned on # that depend on libcryptsetup (e.g. libcryptsetup-plugins, homed) @@ -47,7 +50,13 @@ Name: systemd Url: https://systemd.io # Allow users to specify the version and release when building the rpm by # setting the %%version_override and %%release_override macros. +# But don't do that on OBS, otherwise the version subst fails, and will be +# like 257-123-gabcd257.1 instead of 257-123-gabcd +%if %{without obs} Version: %{?version_override}%{!?version_override:257.1} +%else +Version: %{?version_override}%{!?version_override:%(cat meson.version)} +%endif Release: %autorelease %global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)