Skip to content
Snippets Groups Projects
Commit d6af670db154 authored by Takuya Noguchi's avatar Takuya Noguchi
Browse files

Use rubygems bundled with ruby language

Removes the rubygems software configuration and updates
all dependencies to use the rubygems bundled with the
ruby language.

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6958

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6957



Signed-off-by: default avatarTakuya Noguchi <takninnovationresearch@gmail.com>

Changelog: other
parent c24ace64c958
No related branches found
No related tags found
1 merge request!81Merged upstream 15.3.0+rc42.ce.0 into heptapod branch
Showing with 29 additions and 174 deletions
......@@ -335,7 +335,6 @@
# AllowedMethods: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'config/software/rubygems.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/redis_helper.rb'
# Offense count: 1
......
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..8a0a51d
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,54 @@
+RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
+Weirich and others. You can redistribute it and/or modify it under
+either the terms of the MIT license (see the file MIT.txt), or the
+conditions below:
+
+1. You may make and give away verbatim copies of the source form of the
+ software without restriction, provided that you duplicate all of the
+ original copyright notices and associated disclaimers.
+
+2. You may modify your copy of the software in any way, provided that
+ you do at least ONE of the following:
+
+ a. place your modifications in the Public Domain or otherwise
+ make them Freely Available, such as by posting said
+ modifications to Usenet or an equivalent medium, or by allowing
+ the author to include your modifications in the software.
+
+ b. use the modified software only within your corporation or
+ organization.
+
+ c. give non-standard executables non-standard names, with
+ instructions on where to get the original software distribution.
+
+ d. make other distribution arrangements with the author.
+
+3. You may distribute the software in object code or executable
+ form, provided that you do at least ONE of the following:
+
+ a. distribute the executables and library files of the software,
+ together with instructions (in the manual page or equivalent)
+ on where to get the original distribution.
+
+ b. accompany the distribution with the machine-readable source of
+ the software.
+
+ c. give non-standard executables non-standard names, with
+ instructions on where to get the original software distribution.
+
+ d. make other distribution arrangements with the author.
+
+4. You may modify and include the part of the software into any other
+ software (possibly commercial).
+
+5. The scripts and library files supplied as input to or produced as
+ output from the software do not automatically fall under the
+ copyright of the software, but belong to whomever generated them,
+ and may be sold commercially, and may be aggregated with this
+ software.
+
+6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE.
+
......@@ -24,7 +24,7 @@
skip_transitive_dependency_licensing true
dependency 'rubygems'
dependency 'ruby'
build do
patch source: "add-license-file.patch"
......
#
# Copyright 2020-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name 'chef-bin'
# The version here should be in agreement with /Gemfile.lock so that our rspec
# testing stays consistent with the package contents.
......@@ -9,7 +25,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
build do
env = with_standard_compiler_flags(with_embedded_path)
......
#
# Copyright 2012-2014 Chef Software, Inc.
# Copyright 2017-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +27,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
dependency 'libffi'
dependency 'rb-readline'
......
#
# Copyright 2016 GitLab Inc.
# Copyright 2016-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -25,7 +25,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
build do
patch source: "license/add-license-file.patch"
......
#
# Copyright:: Copyright (c) 2017-2021 GitLab Inc.
# Copyright:: Copyright (c) 2017-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -27,4 +27,5 @@
skip_transitive_dependency_licensing true
dependency 'pkg-config-lite'
dependency 'ruby'
dependency 'bundler'
......@@ -30,5 +31,4 @@
dependency 'bundler'
dependency 'rubygems'
dependency 'libicu'
# Technically, gitaly depends on git also. But because of how omnibus arranges
......
#
# Copyright 2016 GitLab Inc.
# Copyright 2016-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -22,7 +22,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
dependency 'postgresql'
build do
......
#
# Copyright:: Copyright (c) 2012 Opscode, Inc.
# Copyright:: Copyright (c) 2014-2021 GitLab Inc.
# Copyright:: Copyright (c) 2014-2022 GitLab Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
......@@ -41,4 +41,5 @@
license_file combined_licenses_file
dependency 'pkg-config-lite'
dependency 'ruby'
dependency 'bundler'
......@@ -44,5 +45,4 @@
dependency 'bundler'
dependency 'rubygems'
dependency 'libxml2'
dependency 'libxslt'
dependency 'curl'
......
#
# Copyright 2016 GitLab Inc.
# Copyright 2016-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +26,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
build do
patch source: "license/add-license-file.patch"
......
#
# Copyright 2016 GitLab Inc.
# Copyright 2016-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +26,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
build do
patch source: "license/add-license-file.patch"
......
#
# Copyright 2012-2015 Chef Software, Inc.
# Copyright 2017-2021 GitLab Inc.
# Copyright 2017-2022 GitLab Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +26,6 @@
skip_transitive_dependency_licensing true
dependency 'bundler'
dependency 'rubygems'
source git: version.remote
......
#
# Copyright 2012-2016 Chef Software, Inc.
# Copyright 2012-2022 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +26,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
source git: version.remote
......
#
## Copyright:: Copyright (c) 2014 GitLab B.V.
## Copyright:: Copyright (c) 2014-2022 GitLab B.V.
## License:: Apache License, Version 2.0
##
## Licensed under the Apache License, Version 2.0 (the "License");
......@@ -25,7 +25,6 @@
skip_transitive_dependency_licensing true
dependency 'ruby'
dependency 'rubygems'
build do
patch source: "license/#{version}/add-license-file.patch"
......
#
# Copyright 2012-2016 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name 'rubygems'
default_version '3.1.4'
license 'MIT'
license_file 'LICENSE.txt'
skip_transitive_dependency_licensing true
dependency 'ruby'
if version && !source
# NOTE: 2.1.11 is the last version of rubygems before the 2.2.x change to native gem install location
#
# https://github.com/rubygems/rubygems/issues/874
#
# This is a breaking change for omnibus clients. Chef-11 needs to be pinned to 2.1.11 for eternity.
# We have switched from tarballs to just `gem update --system`, but for backcompat
# we pin the previously known tarballs.
known_tarballs = {
'2.1.11' => 'b561b7aaa70d387e230688066e46e448',
'2.2.1' => '1f0017af0ad3d3ed52665132f80e7443',
'2.4.1' => '7e39c31806bbf9268296d03bd97ce718',
'2.4.4' => '440a89ad6a3b1b7a69b034233cc4658e',
'2.4.5' => '5918319a439c33ac75fbbad7fd60749d',
'2.4.8' => 'dc77b51449dffe5b31776bff826bf559',
'2.7.9' => '173272ed55405caf7f858b6981fff526',
'3.1.4' => 'd117187a8f016cbe8f52011ae02e858b'
}
known_tarballs.each do |version, md5|
version version do
source md5: md5, url: "https://rubygems.org/rubygems/rubygems-#{version}.tgz"
relative_path "rubygems-#{version}"
end
end
version('v2.4.4_plus_debug') { source git: 'https://github.com/danielsdeleo/rubygems.git' }
version('2.4.4.debug.1') { source git: 'https://github.com/danielsdeleo/rubygems.git' }
# This is the 2.4.8 release with a fix for
# windows so things like `gem install "pry"` still
# work
version('jdm/2.4.8-patched') { source git: 'https://github.com/jaym/rubygems.git' }
end
# If we still don't have a source (if it's a tarball) grab from ruby ...
if version && !source
# If the version is a gem version, we"ll just be using rubygems.
# If it's a branch or SHA (i.e. v1.2.3) we use github.
begin
Gem::Version.new(version)
rescue ArgumentError
source git: 'https://github.com/rubygems/rubygems.git'
end
end
# git repo is always expanded to "rubygems"
relative_path 'rubygems' if source && source.include?(:git)
build do
env = with_standard_compiler_flags(with_embedded_path)
if source
# Building from source:
ruby 'setup.rb --no-document', env: env
else
# Installing direct from rubygems:
# If there is no version, this will get latest.
gem "update --system #{version}", env: env
patch source: "license/add-license-file.patch"
end
end
......@@ -120,12 +120,6 @@
replace_in_files:
- filename: config/software/remote-syslog.rb
pattern: "default_version '(\\S+)'"
# rubygems
https://github.com/rubygems/rubygems.git:
replace_in_files:
- filename: config/software/rubygems.rb
pattern: "default_version '(\\S+)'"
range: '<= 3.x'
# zlib
https://github.com/madler/zlib.git:
replace_in_files:
......
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