From ee6588e90262b4eb2140f454c6a2d883d87c89f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 25 May 2022 14:32:47 +0200 Subject: [PATCH] Drop "v" from the version tag, add tilde back When -Dversion-tag was initially added in edaa157918874478659896090b9512af0c50f82e, I used "v" without any comment. But upstream does not use "v", so we have versions which don't compare directly: $ build/systemctl --version|head -n1 systemd 251 (251-66-g7e46a5c+) $ systemctl --version|head -n1 systemd 251 (v251-1.fc37) And in 3c4f9413a760fa2dc26c140a08e1d11cf46ac6e7, when -Dshared-lib-tag= was introduced, %{version} was replaced by %{version_no_tilde}, again without any specific comment. For the shared-lib-tag, it makes sense to use _no_tilde, because it's enough to have non-conflicting file names, and we don't compare the tags. I guess I wanted both uses to be consistent. But if we substitute the tilde, we can't do proper comparisons. I noticed the following issue: with sd-boot installed from git and a package, upgrades wouldn't work: Comparing versions: "systemd-boot v251-1.fc37" < "systemd-boot 251-rc1-390-g3603f15 Skipping "/boot/efi/EFI/systemd/systemd-bootx64.efi", since newer boot loader version in place already. The two changes should make those comparisons work properly in most cases. --- systemd.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systemd.spec b/systemd.spec index 4763dd4..594dde9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -526,7 +526,7 @@ CONFIGURE_OPTS=( -Db_lto=%[%{with lto}?"true":"false"] -Db_ndebug=false -Dman=true - -Dversion-tag=v%{version_no_tilde}-%{release} + -Dversion-tag=%{version}-%{release} # https://bugzilla.redhat.com/show_bug.cgi?id=1906010 # -Dshared-lib-tag=%{version_no_tilde}-%{release} -Dfallback-hostname=%[0%{?fedora}?"fedora":"localhost"] @@ -1020,6 +1020,7 @@ fi %changelog * Wed May 25 2022 Zbigniew Jędrzejewski-Szmek - 251.1-2 - Supress errors from useradd/groupadd (#2090129) +- Drop "v" from the version tag, add tilde back * Tue May 24 2022 Zbigniew Jędrzejewski-Szmek - 251.1-1 - First bugfix release for 250