Skip to content

Commit

Permalink
eext: Fix incorrect 'Release' macro in spec files
Browse files Browse the repository at this point in the history
Release macro in eext packages' spec files were created with incorrect
values. Issue arises due to naming the rpmReleaseMacro as 'release'
too, which conflicts with the macro for 'Release'. Instead using
'eext_release' to denote rpmReleaseMacro to resolve conflict.
  • Loading branch information
manith-arista committed Sep 28, 2023
1 parent 792dbc4 commit 4a547e3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cmd/testData/debugedit-1/spec/debugedit.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name: debugedit
Version: 5.0
Release: %{?release:%{release}}%{!?release:eng}
Release: %{?eext_release:%{eext_release}}%{!?eext_release:eng}
Summary: Tools for debuginfo creation
License: GPLv3+ and GPLv2+ and LGPLv2+
URL: https://sourceware.org/debugedit/
Expand Down
16 changes: 8 additions & 8 deletions cmd/testData/mrtparse-1/spec/mrtparse.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Patch1000: arista-remove-default-sigpipe.patch
Summary: Tool for parsing routing information dump files in MRT format
Name: mrtparse
Version: 2.0.1
Release: %{?release:%{release}}%{!?release:eng}
Release: %{?eext_release:%{eext_release}}%{!?eext_release:eng}

License: Apache
License: Apache
Source0: mrtparse-2.0.1.tar.gz
Url: https://github.com/YoshiyukiYamauchi/mrtparse
BuildArch: noarch

%description
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
/ Zebra, BIRD, OpenBGPD and PyRT can dump the MRT fotmat data.

%package -n python3-mrtparse
Expand All @@ -25,9 +25,9 @@ BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-mrtparse}

%description -n python3-mrtparse
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
/ Zebra, BIRD, OpenBGPD and PyRT can dump the MRT fotmat data.

%prep
Expand Down
16 changes: 8 additions & 8 deletions cmd/testData/mrtparse-2/mrtparse/spec/mrtparse.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Patch1000: arista-remove-default-sigpipe.patch
Summary: Tool for parsing routing information dump files in MRT format
Name: mrtparse
Version: 2.0.1
Release: %{?release:%{release}}%{!?release:eng}
Release: %{?eext_release:%{eext_release}}%{!?eext_release:eng}

License: Apache
License: Apache
Source0: mrtparse-2.0.1.tar.gz
Url: https://github.com/YoshiyukiYamauchi/mrtparse
BuildArch: noarch

%description
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
/ Zebra, BIRD, OpenBGPD and PyRT can dump the MRT fotmat data.

%package -n python3-mrtparse
Expand All @@ -25,9 +25,9 @@ BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-mrtparse}

%description -n python3-mrtparse
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
mrtprse is a module to read and analyze the MRT format data. The MRT format data
can be used to export routing protocol messages, state changes, and routing
information base contents, and is standardized in RFC6396. Programs like Quagga
/ Zebra, BIRD, OpenBGPD and PyRT can dump the MRT fotmat data.

%prep
Expand Down
2 changes: 1 addition & 1 deletion impl/create_srpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (bldr *srpmBuilder) build(prep bool) error {

if rpmReleaseMacro != "" {
rpmbuildArgs = append(rpmbuildArgs, []string{
"--define", fmt.Sprintf("release %s", rpmReleaseMacro),
"--define", fmt.Sprintf("eext_release %s", rpmReleaseMacro),
}...)
}
rpmbuildArgs = append(rpmbuildArgs, specFile)
Expand Down
2 changes: 1 addition & 1 deletion impl/mock_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (cfgBldr *mockCfgBuilder) populateTemplateData() error {

cfgBldr.templateData.Macros = make(map[string]string)
if cfgBldr.rpmReleaseMacro != "" {
cfgBldr.templateData.Macros["release"] = cfgBldr.rpmReleaseMacro
cfgBldr.templateData.Macros["eext_release"] = cfgBldr.rpmReleaseMacro
}

if cfgBldr.eextSignature != "" {
Expand Down
2 changes: 1 addition & 1 deletion impl/testData/expected-mock.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ config_opts['target_arch'] = "x86_64"

# Autogenerated macros
config_opts['macros']['distribution'] = 'eextsig=my-signature'
config_opts['macros']['release'] = 'my-release'
config_opts['macros']['eext_release'] = 'my-release'

# Autogenerated dnf.conf
config_opts['dnf.conf'] = """
Expand Down

0 comments on commit 4a547e3

Please sign in to comment.