diff --git a/config/software/gitlab-rails.rb b/config/software/gitlab-rails.rb index 73f5742dd20a317664d53a2e3d2abcf21d1ac5bb_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1yYWlscy5yYg==..8cc760253e5c55f214b46375b40e7d1fe31673be_Y29uZmlnL3NvZnR3YXJlL2dpdGxhYi1yYWlscy5yYg== 100644 --- a/config/software/gitlab-rails.rb +++ b/config/software/gitlab-rails.rb @@ -89,10 +89,10 @@ end gem_source_compile_os = %w[ - el-8-aarch64 - amazon-2-aarch64 - debian-buster-aarch64 - raspbian-buster-aarch64 + el-8_aarch64 + amazon-2_aarch64 + debian-buster_aarch64 + raspbian-buster_aarch64 ] # Currently rake-compiler-dock uses a Ubuntu 20.04 image to create the diff --git a/lib/gitlab/build/info.rb b/lib/gitlab/build/info.rb index 73f5742dd20a317664d53a2e3d2abcf21d1ac5bb_bGliL2dpdGxhYi9idWlsZC9pbmZvLnJi..8cc760253e5c55f214b46375b40e7d1fe31673be_bGliL2dpdGxhYi9idWlsZC9pbmZvLnJi 100644 --- a/lib/gitlab/build/info.rb +++ b/lib/gitlab/build/info.rb @@ -163,7 +163,7 @@ # Fetch the package from an S3 bucket def deb_package_download_url(arch: 'amd64') folder = 'ubuntu-focal' - folder = "#{folder}-aarch64" if arch == 'arm64' + folder = "#{folder}_aarch64" if arch == 'arm64' package_filename_url_safe = Info.release_version.gsub("+", "%2B") "https://#{Info.release_bucket}.#{Info.release_bucket_s3_endpoint}/#{folder}/#{Info.package}_#{package_filename_url_safe}_#{arch}.deb" @@ -171,8 +171,8 @@ def rpm_package_download_url(arch: 'x86_64') folder = 'el-8' - folder = "#{folder}-aarch64" if arch == 'arm64' - folder = "#{folder}-fips" if Build::Check.use_system_ssl? + folder = "#{folder}_aarch64" if arch == 'arm64' + folder = "#{folder}_fips" if Build::Check.use_system_ssl? package_filename_url_safe = Info.release_version.gsub("+", "%2B") "https://#{Info.release_bucket}.#{Info.release_bucket_s3_endpoint}/#{folder}/#{Info.package}-#{package_filename_url_safe}.el8.#{arch}.rpm" diff --git a/lib/gitlab/ohai_helper.rb b/lib/gitlab/ohai_helper.rb index 73f5742dd20a317664d53a2e3d2abcf21d1ac5bb_bGliL2dpdGxhYi9vaGFpX2hlbHBlci5yYg==..8cc760253e5c55f214b46375b40e7d1fe31673be_bGliL2dpdGxhYi9vaGFpX2hlbHBlci5yYg== 100644 --- a/lib/gitlab/ohai_helper.rb +++ b/lib/gitlab/ohai_helper.rb @@ -6,5 +6,5 @@ def platform_dir os, codename, arch = fetch_os_with_codename - return "#{os}-#{codename}-#{arch}" if arm64? + return "#{os}-#{codename}_#{arch}" if arm64? @@ -10,5 +10,5 @@ - return "#{os}-#{codename}-fips" if Build::Check.use_system_ssl? + return "#{os}-#{codename}_fips" if Build::Check.use_system_ssl? "#{os}-#{codename}" end diff --git a/spec/lib/gitlab/package_repository_spec.rb b/spec/lib/gitlab/package_repository_spec.rb index 73f5742dd20a317664d53a2e3d2abcf21d1ac5bb_c3BlYy9saWIvZ2l0bGFiL3BhY2thZ2VfcmVwb3NpdG9yeV9zcGVjLnJi..8cc760253e5c55f214b46375b40e7d1fe31673be_c3BlYy9saWIvZ2l0bGFiL3BhY2thZ2VfcmVwb3NpdG9yeV9zcGVjLnJi 100644 --- a/spec/lib/gitlab/package_repository_spec.rb +++ b/spec/lib/gitlab/package_repository_spec.rb @@ -194,6 +194,28 @@ expect { repo.upload(nil, true) }.to output(%r{Uploading...\n}).to_stdout expect { repo.upload(nil, true) }.to output(%r{bin/package_cloud push gitlab/gitlab-ee/ubuntu/focal pkg/ubuntu-focal/gitlab.deb --url=https://packages.gitlab.com\n}).to_stdout end + + context 'for arm64 packages' do + before do + allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(['pkg/ubuntu-focal_aarch64/gitlab.deb']) + end + + it 'drops the architecture suffix from repo path' do + expect { repo.upload(nil, true) }.to output(%r{Uploading...\n}).to_stdout + expect { repo.upload(nil, true) }.to output(%r{bin/package_cloud push gitlab/gitlab-ee/ubuntu/focal pkg/ubuntu-focal_aarch64/gitlab.deb --url=https://packages.gitlab.com\n}).to_stdout + end + end + + context 'for fips packages' do + before do + allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(['pkg/ubuntu-focal_fips/gitlab.deb']) + end + + it 'drops the fips suffix from repo path' do + expect { repo.upload(nil, true) }.to output(%r{Uploading...\n}).to_stdout + expect { repo.upload(nil, true) }.to output(%r{bin/package_cloud push gitlab/gitlab-ee/ubuntu/focal pkg/ubuntu-focal_fips/gitlab.deb --url=https://packages.gitlab.com\n}).to_stdout + end + end end context 'of CE' do