From edf91e2b8a0170cc4fa2e40ff193106d1aef60db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Jan 2020 15:11:16 +0100 Subject: [PATCH] Fix wrong evaluation of pre-release timestamps. It seems that the variables might be evaluated in wrong order, causing the `%{release_string}` to not be expanded properly, probably depending on RPM version. It seems that `%define`s are lazy evaluated, which fixes the situation. --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index fdc4115..4ee7d8f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,8 +17,8 @@ # If revision and milestone are removed/commented out, the official release build is expected. %if 0%{?milestone:1}%{?revision:1} != 0 %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision}} -%define ruby_archive_timestamp %%(stat --printf='@%Y' %%{ruby_archive}.tar.xz | date -f - +"%Y%m%d") -%global development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}} +%define ruby_archive_timestamp %(stat --printf='@%Y' %{ruby_archive}.tar.xz | date -f - +"%Y%m%d") +%define development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}} %endif