What is stopping 1% {? Dist} in the SPEC file in the RPM package

What does 1% {mean? dist}? What means? I did not find the point of this anywhere

Name:           hello
Version:        2.8
Release:        1%{?dist}
Summary:        The "Hello World" program from GNU
License:        GPLv3+
URL:            http://ftp.gnu.org/gnu/%{name}
Source0:        http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
BuildRequires: gettext
Requires(post): info
Requires(preun): info
%description 

The program "Hello World", executed with all the bells and whistles of a proper FOSS project, including configuration, assembly, internationalization, help files, etc.

%prep
%autosetup
%build
%configure
make %{?_smp_mflags}
+4
source share
2 answers

The question mark is for conditional assessment. When the macro is not rpm, the default tag macro remains the default. ?tells rpm to delete the macro tag if there is no value and replace the macro value if it is:

$ rpm -E 'foo:%{foo}'$'\n''bar:%{?bar}'
foo:%{foo}
bar:

$ rpm -D'foo foov' -E 'foo:%{foo}'$'\n''bar:%{?bar}'
foo:foov
bar:

$ rpm -D'foo foov' -D'bar barv' -E 'foo:%{foo}'$'\n''bar:%{?bar}'
foo:foov
bar:barv

, RahulKrishnanRA, %{?dist} , (rh, el5, rf ..), , , .

, , , . http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds .

+8

{? dist}

+2

All Articles