Commit 938a7190 authored by Ryan Hass's avatar Ryan Hass

Fix building RPMs on ARM platforms.

The BuildArch line technically is not needed as we are not building
anything during the RPM generation stage. On some systems this line
causes a failure, which can be handled by specifying the target arch
when creating the rpm instead.

Closes #540.
parent 5e806ee0
......@@ -288,7 +288,6 @@ module Omnibus
vendor: vendor,
license: license,
dist_tag: dist_tag,
architecture: safe_architecture,
maintainer: project.maintainer,
homepage: project.homepage,
description: project.description,
......@@ -316,6 +315,7 @@ module Omnibus
#
def create_rpm_file
command = %|fakeroot rpmbuild|
command << %| --target #{safe_architecture}|
command << %| -bb|
command << %| --buildroot #{staging_dir}/BUILD|
command << %| --define '_topdir #{staging_dir}'|
......
......@@ -19,7 +19,6 @@ Name: <%= name %>
Version: <%= version %>
Release: <%= iteration %><%= dist_tag %>
Summary: <%= description.split("\n").first.empty? ? "_" : description.split("\n").first %>
BuildArch: <%= architecture %>
AutoReqProv: no
BuildRoot: %buildroot
Prefix: /
......
......@@ -144,7 +144,6 @@ module Omnibus
expect(contents).to include("Version: 1.2.3")
expect(contents).to include("Release: 2.el6")
expect(contents).to include("Summary: The full stack of project")
expect(contents).to include("BuildArch: x86_64")
expect(contents).to include("AutoReqProv: no")
expect(contents).to include("BuildRoot: %buildroot")
expect(contents).to include("Prefix: /")
......@@ -252,7 +251,7 @@ module Omnibus
it 'uses the correct command' do
expect(subject).to receive(:shellout!)
.with(/rpmbuild -bb --buildroot/)
.with(/rpmbuild --target x86_64 -bb --buildroot/)
subject.create_rpm_file
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment