Skip to content
Snippets Groups Projects
Commit a1c1a55d authored by Robert Marshall's avatar Robert Marshall
Browse files

Allow Raspberry Pi builds on Graviton

parent ad77ad3b
No related branches found
No related tags found
Loading
......@@ -15,6 +15,7 @@
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'grafana'
version = Gitlab::Version.new('grafana', '7.5.9')
......@@ -26,7 +27,7 @@
skip_transitive_dependency_licensing true
arch, sha = if ohai['platform'] == 'raspbian' && /armv/.match?(ohai['kernel']['machine'])
arch, sha = if OhaiHelper.raspberry_pi?
%w[armv7 e40949ac119ab0977208d1fd610412b494de38874742a56f83f593f1dc4574a7]
elsif /aarch64/.match?(ohai['kernel']['machine'])
%w[arm64 bea6eab7b28aa36e236f106b577f070e29e679a53a7131ed0d3c80c264156442]
......
......@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'libffi'
......@@ -46,6 +47,7 @@
if version == '3.2.1'
patch source: 'libffi-3.2.1-disable-multi-os-directory.patch', plevel: 1, env: env
configure_command << '--disable-multi-os-directory'
configure_command << "--build=#{OhaiHelper.gcc_target}" if OhaiHelper.raspberry_pi?
end
end
......
......@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'libgcrypt'
default_version '1.8.6'
......@@ -31,8 +32,9 @@
build do
env = with_standard_compiler_flags(with_embedded_path)
command './configure ' \
"--prefix=#{install_dir}/embedded --disable-doc", env: env
configure_options = ["--prefix=#{install_dir}/embedded", "--disable-doc"]
configure_options += %w(host build).map { |w| "--#{w}=#{OhaiHelper.gcc_target}" } if OhaiHelper.raspberry_pi?
configure(*configure_options, env: env)
make "-j #{workers}", env: env
make 'install', env: env
......
......@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'openssl'
......@@ -84,6 +85,8 @@
# With gcc > 4.3 on s390x there is an error building
# with inline asm enabled
'./Configure linux64-s390x -DOPENSSL_NO_INLINE_ASM'
elsif OhaiHelper.raspberry_pi?
'./Configure linux-generic32'
else
'./config'
end
......
......@@ -202,6 +202,7 @@
elsif windows?
configure_command << ' debugflags=-g'
else
configure_command << %w(host target build).map { |w| "--#{w}=#{OhaiHelper.gcc_target}" } if OhaiHelper.raspberry_pi?
configure_command << "--with-opt-dir=#{install_dir}/embedded"
end
......
......@@ -381,7 +381,7 @@
variables:
NO_SOURCEMAPS: "true"
tags:
- docker-rpi-builder
- docker-arm-builder
<<: *dev-ce-branch-only-except-nightly
artifacts: *package-artifacts
retry: 1
......@@ -426,7 +426,7 @@
variables:
NO_SOURCEMAPS: "true"
tags:
- docker-rpi-builder
- docker-arm-builder
<<: *dev-ce-tag-only
### This stage is used for uploading packages
......
......@@ -128,7 +128,7 @@
def ohai
@ohai ||= Ohai::System.new.tap do |oh|
oh.all_plugins(['platform'])
oh.all_plugins(['platform', 'languages'])
end.data
end
......@@ -159,5 +159,13 @@
# Any Arm (32-bit or 64-bit)
(armhf? || arm64?)
end
def raspberry_pi?
os_platform == 'raspbian'
end
def gcc_target
ohai['languages']['c']['gcc']['target']
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment