Skip to content
Snippets Groups Projects
Commit 08c29cbf authored by Andrew Patterson's avatar Andrew Patterson
Browse files

Merge branch '8714-drop-rhel-7' into 'master'

CI: Stop building RHEL 7 packages

Closes #8714

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/8097



Merged-by: default avatarAndrew Patterson <apatterson@gitlab.com>
Approved-by: default avatarAlec Xu <axu@gitlab.com>
Approved-by: default avatarAndrew Patterson <apatterson@gitlab.com>
Co-authored-by: default avatarClemens Beck <cbeck@gitlab.com>
parents cd6d7c9a 5f4845ea
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 104 deletions
Loading
Loading
@@ -70,9 +70,6 @@ end
 
if rhel?
case OhaiHelper.get_centos_version
when '6', '7'
runtime_dependency 'policycoreutils-python'
runtime_dependency 'perl'
when '8', '9'
runtime_dependency 'policycoreutils-python-utils'
runtime_dependency 'perl-interpreter'
Loading
Loading
Loading
Loading
@@ -48,14 +48,13 @@ build do
 
git_cflags = '-fno-omit-frame-pointer'
 
# CentOS 7 uses gcc v4.8.5, which uses C90 (`-std=gnu90`) by default.
# SLES uses gcc with C90 (`-std=gnu90`) by default.
# C11 is a newer standard than C90, and gcc v5.1.0 switched the default
# from `std=gnu90` to `std=gnu11`.
# Git v2.35 added a balloon test that will fail the build if
# C99 is not supported. On other platforms, C11 may be required
# (https://gitlab.com/gitlab-org/gitlab-git/-/commit/7bc341e21b5).
# Similar is the case for SLES OSs also.
git_cflags += ' -std=gnu99' if OhaiHelper.get_centos_version.to_i == 7 || OhaiHelper.os_platform == 'sles'
git_cflags += ' -std=gnu99' if OhaiHelper.os_platform == 'sles'
 
# NOTE: the Git software definition is in the process of being deprecated in favour of bundling
# Git with Gitaly. Any changes to the following build options must be replicated to the Gitaly
Loading
Loading
Loading
Loading
@@ -56,14 +56,13 @@ build do
 
git_cflags = '-fno-omit-frame-pointer'
 
# CentOS 7 uses gcc v4.8.5, which uses C90 (`-std=gnu90`) by default.
# SLES uses gcc v4.8.5 with C90 (`-std=gnu90`) by default.
# C11 is a newer standard than C90, and gcc v5.1.0 switched the default
# from `std=gnu90` to `std=gnu11`.
# Git v2.35 added a balloon test that will fail the build if
# C99 is not supported. On other platforms, C11 may be required
# (https://gitlab.com/gitlab-org/gitlab-git/-/commit/7bc341e21b5).
# Similar is the case for SLES OSs also.
git_cflags += ' -std=gnu99' if OhaiHelper.get_centos_version.to_i == 7 || OhaiHelper.os_platform == 'sles'
git_cflags += ' -std=gnu99' if OhaiHelper.os_platform == 'sles'
 
git_append_build_options = [
"# Added by Omnibus git software definition gitaly.rb",
Loading
Loading
Loading
Loading
@@ -97,13 +97,10 @@ build do
env['PKG_CONFIG_PATH'] = "#{OpenSSLHelper.pkg_config_dirs}:/opt/gitlab/embedded/lib/pkgconfig"
end
 
env['CFLAGS'] = '-std=gnu99' if OhaiHelper.centos7? || OhaiHelper.os_platform == 'sles'
env['CFLAGS'] = '-std=gnu99' if OhaiHelper.os_platform == 'sles'
 
# Special configuration for Rust extensions, which require clang 3.9+.
if OhaiHelper.centos7?
env['PATH'] = "/opt/rh/llvm-toolset-7/root/bin:#{env['PATH']}"
env['LIBCLANG_PATH'] = '/opt/rh/llvm-toolset-7/root/usr/lib64'
elsif OhaiHelper.sles12?
if OhaiHelper.sles12?
env['BINDGEN_EXTRA_CLANG_ARGS'] = "-I/usr/lib64/clang/7.0.1/include"
elsif OhaiHelper.raspberry_pi?
# This is needed to workaround a bug in QEMU: https://gitlab.com/gitlab-org/gitlab-omnibus-builder/-/issues/60
Loading
Loading
Loading
Loading
@@ -37,8 +37,6 @@ relative_path "gnupg-#{version}"
 
build do
env = with_standard_compiler_flags(with_embedded_path)
# For gnupg to build fine in Debian Wheezy and Centos ^
env['LDFLAGS'] << " -lrt"
 
prefix = "#{install_dir}/embedded"
 
Loading
Loading
@@ -53,10 +51,6 @@ build do
"--with-libgpg-error-prefix=#{prefix}",
]
 
# CentOS 6 doesn't have inotify, which will raise an error
# IN_EXCL_UNLINK undeclared. Hence disabling it explicitly.
configure_command << "ac_cv_func_inotify_init=no" if ohai['platform'] =~ /centos/ && ohai['platform_version'] =~ /^6/
command configure_command.join(' '), env: env
 
make "-j #{workers}", env: env
Loading
Loading
Loading
Loading
@@ -34,13 +34,6 @@ env = with_standard_compiler_flags(with_embedded_path)
relative_path "jemalloc-#{version}"
 
build do
# CentOS 6 doesn't have a new enough version of autoconf so we have to
# use the one packaged in EPEL
if ohai['platform'] =~ /centos/ && ohai['platform_version'] =~ /^6/
command 'sed -i -e s:autoconf:autoconf268: autogen.sh', env: env
env['AUTOCONF'] = '/usr/bin/autoconf268'
end
autogen_command = [
'./autogen.sh',
'--enable-prof',
Loading
Loading
Loading
Loading
@@ -34,10 +34,7 @@ build do
mkdir build_dir.to_s
 
block 'use a custom compiler for OSs with older gcc' do
if ohai['platform'] == 'centos' && ohai['platform_version'].start_with?('7.')
env['CC'] = "/opt/rh/devtoolset-8/root/usr/bin/gcc"
env['CXX'] = "/opt/rh/devtoolset-8/root/usr/bin/g++"
elsif ohai['platform'] == 'suse' && ohai['platform_version'].start_with?('12.')
if ohai['platform'] == 'suse' && ohai['platform_version'].start_with?('12.')
env['CC'] = "/usr/bin/gcc-5"
env['CXX'] = "/usr/bin/g++-5"
elsif ohai['platform'] == 'opensuseleap' && ohai['platform_version'].start_with?('15.')
Loading
Loading
Loading
Loading
@@ -35,36 +35,18 @@ source git: version.remote
build do
env = with_standard_compiler_flags(with_embedded_path)
 
# Use cmake for CentOS 6 builds
# CentOS 6 doesn't have a new enough version of automake, so we need to use
# the cmake build steps, but the cmake steps aren't working properly in
# Debian 8, which is why we don't just switch to cmake for all platforms
if ohai['platform'] =~ /centos/ && ohai['platform_version'] =~ /^6/
configure_command = [
'cmake',
'-G"Unix Makefiles"',
'-Dzstd=OFF',
"-DZLIB_ROOT=#{install_dir}/embedded",
"-DCMAKE_INSTALL_LIBDIR:PATH=lib", # ensure lib64 isn't used
"-DCMAKE_INSTALL_RPATH=#{install_dir}/embedded/lib",
"-DCMAKE_FIND_ROOT_PATH=#{install_dir}/embedded",
"-DCMAKE_PREFIX_PATH=#{install_dir}/embedded",
"-DCMAKE_INSTALL_PREFIX=#{install_dir}/embedded"
]
else
# Patch the code to download config.guess and config.sub. We instead copy
# the ones we vendor to the correct location.
patch source: 'remove-config-guess-sub-download.patch'
command './autogen.sh', env: env
update_config_guess(target: 'config')
configure_command = [
'./configure',
'--disable-zstd',
"--prefix=#{install_dir}/embedded"
]
end
# Patch the code to download config.guess and config.sub. We instead copy
# the ones we vendor to the correct location.
patch source: 'remove-config-guess-sub-download.patch'
command './autogen.sh', env: env
update_config_guess(target: 'config')
configure_command = [
'./configure',
'--disable-zstd',
"--prefix=#{install_dir}/embedded"
]
 
command configure_command.join(' '), env: env
 
Loading
Loading
Loading
Loading
@@ -88,7 +88,7 @@ env['CFLAGS'] << " -DOPENSSL_FIPS" if Build::Check.use_system_ssl?
env['CFLAGS'] << ' -O3 -g -pipe'
 
# Workaround for https://bugs.ruby-lang.org/issues/19161
env['CFLAGS'] << ' -std=gnu99' if OhaiHelper.get_centos_version.to_i == 7 || OhaiHelper.os_platform == 'sles'
env['CFLAGS'] << ' -std=gnu99' if OhaiHelper.os_platform == 'sles'
 
build do
env['CFLAGS'] << ' -fno-omit-frame-pointer'
Loading
Loading
Loading
Loading
@@ -137,9 +137,6 @@ Ubuntu-20.04-fips-check:
USE_SYSTEM_LIBGCRYPT: "true"
 
# yum based
CentOS-7-check:
image: "${BUILDER_IMAGE_REGISTRY}/centos_7:latest"
extends: .yum-install
AlmaLinux-8-check:
image: "${BUILDER_IMAGE_REGISTRY}/almalinux_8:latest"
extends: .yum-install
Loading
Loading
Loading
Loading
@@ -337,9 +337,6 @@ Ubuntu-22.04-arm64-branch:
Ubuntu-24.04-arm64-branch:
image: "${BUILDER_IMAGE_REGISTRY}/ubuntu_24.04_arm64:${BUILDER_IMAGE_REVISION}"
extends: .arm64_branch_template
CentOS-7-branch:
image: "${BUILDER_IMAGE_REGISTRY}/centos_7:${BUILDER_IMAGE_REVISION}"
extends: .branch_template
AlmaLinux-8-branch:
image: "${BUILDER_IMAGE_REGISTRY}/almalinux_8:${BUILDER_IMAGE_REVISION}"
extends: .branch_template
Loading
Loading
@@ -598,9 +595,6 @@ Ubuntu-22.04-arm64:
Ubuntu-24.04-arm64:
image: "${BUILDER_IMAGE_REGISTRY}/ubuntu_24.04_arm64:${BUILDER_IMAGE_REVISION}"
extends: .arm64_tag_template
CentOS-7:
image: "${BUILDER_IMAGE_REGISTRY}/centos_7:${BUILDER_IMAGE_REVISION}"
extends: .tag_template
AlmaLinux-8:
image: "${BUILDER_IMAGE_REGISTRY}/almalinux_8:${BUILDER_IMAGE_REVISION}"
extends: .tag_template
Loading
Loading
@@ -736,13 +730,6 @@ Ubuntu-24.04-arm64-staging:
optional: true
- job: Ubuntu-24.04-arm64-branch
optional: true
CentOS-7-staging:
extends: .staging_upload_template
needs:
- job: CentOS-7
optional: true
- job: CentOS-7-branch
optional: true
AlmaLinux-8-staging:
extends: .staging_upload_template
needs:
Loading
Loading
@@ -924,10 +911,6 @@ Debian-12-arm64-release:
extends: .production_release_template
needs:
- Debian-12-arm64
CentOS-7-release:
extends: .production_release_template
needs:
- CentOS-7
AlmaLinux-8-release:
extends: .production_release_template
needs:
Loading
Loading
Loading
Loading
@@ -363,7 +363,6 @@ danger-review:
- if: '$PIPELINE_TYPE =~ /_MR_PIPELINE$/'
- if: '$PIPELINE_TYPE == "DOCS_PIPELINE"'
 
Centos 7 knapsack: !reference [.knapsack]
AlmaLinux 8 knapsack: !reference [.knapsack]
AlmaLinux 9 knapsack: !reference [.knapsack]
Debian 11 knapsack: !reference [.knapsack]
Loading
Loading
@@ -421,12 +420,6 @@ Debian 12 specs :
parallel: 6
needs:
- Debian 12 knapsack
Centos 7 specs :
image: "${PUBLIC_BUILDER_IMAGE_REGISTRY}/centos_7-ruby:${BUILDER_IMAGE_REVISION}"
extends: .chef_spec_template
parallel: 6
needs:
- Centos 7 knapsack
AlmaLinux 8 specs :
image: "${PUBLIC_BUILDER_IMAGE_REGISTRY}/almalinux_8-ruby:${BUILDER_IMAGE_REVISION}"
extends: .chef_spec_template
Loading
Loading
Loading
Loading
@@ -190,10 +190,6 @@ class OhaiHelper
ohai['languages']['c']['gcc']['target']
end
 
def centos7?
ohai['platform'] == 'centos' && get_centos_version.to_i == 7
end
def sles12?
os_platform == 'sles' && get_suse_version.to_i == 12
end
Loading
Loading
Loading
Loading
@@ -39,8 +39,7 @@ class PackageRepository
return
end
 
# For CentOS 6 and 7 we will upload the same package to Scientific and Oracle Linux
# For all other OSs, we only upload one package.
# For CentOS 8 and 9 we upload the same package to the Oracle Linux repository.
upload_list = package_list(repository)
raise "No packages found for upload. Are artifacts available?" if upload_list.empty?
 
Loading
Loading
@@ -97,10 +96,8 @@ class PackageRepository
# We can copy EL packages to Oracle and Scientific Linux repos also as
# they are binary compatible.
enterprise_linux_additional_uploads = {
'6' => %w(scientific ol),
'7' => %w(scientific ol),
'8' => %w(ol), # There is no Scientific Linux 8
'9' => %w(ol), # There is no Scientific Linux 9
'8' => %w(ol),
'9' => %w(ol),
}
 
source_os, target_os = enterprise_linux_additional_uploads.find { |os| platform.match?(/^el\/#{os}/) }
Loading
Loading
Loading
Loading
@@ -15,7 +15,6 @@ RSpec.describe SELinuxDistroHelper do
'centos' | '8.0' | true
'centos' | '8' | true
'centos' | '9' | true
'centos' | '7.0' | true
'amzn' | '2' | true
'notadistro' | '42' | false
nil | '7' | false
Loading
Loading
Loading
Loading
@@ -153,14 +153,13 @@ RSpec.describe PackageRepository do
 
context 'with artifacts available' do
before do
allow(Build::Info::Package).to receive(:file_list).and_return(['pkg/el-6/gitlab-ce.rpm'])
allow(Build::Info::Package).to receive(:file_list).and_return(['pkg/el-9/gitlab-ce.rpm'])
end
 
it 'in dry run mode prints the upload commands' do
expect { repo.upload('my-staging-repository', true) }.to output(%r{Uploading...\n}).to_stdout
expect { repo.upload('my-staging-repository', true) }.to output(%r{bin/package_cloud push gitlab/my-staging-repository/scientific/6 pkg/el-6/gitlab-ce.rpm --url=https://packages.gitlab.com\n}).to_stdout
expect { repo.upload('my-staging-repository', true) }.to output(%r{bin/package_cloud push gitlab/my-staging-repository/ol/6 pkg/el-6/gitlab-ce.rpm --url=https://packages.gitlab.com\n}).to_stdout
expect { repo.upload('my-staging-repository', true) }.to output(%r{bin/package_cloud push gitlab/my-staging-repository/el/6 pkg/el-6/gitlab-ce.rpm --url=https://packages.gitlab.com\n}).to_stdout
expect { repo.upload('my-staging-repository', true) }.to output(%r{bin/package_cloud push gitlab/my-staging-repository/ol/9 pkg/el-9/gitlab-ce.rpm --url=https://packages.gitlab.com\n}).to_stdout
expect { repo.upload('my-staging-repository', true) }.to output(%r{bin/package_cloud push gitlab/my-staging-repository/el/9 pkg/el-9/gitlab-ce.rpm --url=https://packages.gitlab.com\n}).to_stdout
end
 
it 'retries upload if it fails' do
Loading
Loading
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