Commit edb06ab2 authored by 徐豪's avatar 徐豪
Browse files

init

parents

Too many changes to show.

To preserve performance only 532 of 532+ files are displayed.
#
# Copyright 2012-2014 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 'ncurses'
version = Gitlab::Version.new('ncurses', '6315e1a380ecdb706d4f6518d2e8c7eb0db8fbe2')
default_version version.print(false)
display_version '6.4-20230225'
source git: version.remote
license 'MIT'
license_file 'COPYING'
skip_transitive_dependency_licensing true
dependency 'config_guess'
########################################################################
#
# wide-character support:
# Ruby 1.9 optimistically builds against libncursesw for UTF-8
# support. In order to prevent Ruby from linking against a
# package-installed version of ncursesw, we build wide-character
# support into ncurses with the "--enable-widec" configure parameter.
# To support other applications and libraries that still try to link
# against libncurses, we also have to create non-wide libraries.
#
# The methods below are adapted from:
# http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html
#
########################################################################
build do
env = with_standard_compiler_flags(with_embedded_path)
env.delete('CPPFLAGS')
update_config_guess
configure_command = [
'./configure',
"--prefix=#{install_dir}/embedded",
'--enable-overwrite',
'--with-shared',
'--with-termlib',
'--without-ada',
'--without-cxx-binding',
'--without-debug',
'--without-manpages'
]
command configure_command.join(' '), env: env
make "-j #{workers}", env: env
make "-j #{workers} install", env: env
# Build non-wide-character libraries
make 'distclean', env: env
configure_command << '--enable-widec'
command configure_command.join(' '), env: env
make "-j #{workers}", env: env
# Installing the non-wide libraries will also install the non-wide
# binaries, which doesn't happen to be a problem since we don't
# utilize the ncurses binaries in private-chef (or oss chef)
make "-j #{workers} install", env: env
end
project.exclude "embedded/bin/ncurses6-config"
project.exclude "embedded/bin/ncursesw6-config"
#
# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.
# Copyright:: Copyright (c) 2014 GitLab B.V.
# License:: Apache License, Version 2.0
#
# 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
name 'nginx-module-vts'
version = Gitlab::Version.new('nginx-module-vts', '0.2.2')
default_version version.print
license 'BSD-2-Clause'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
source git: version.remote
# This is a source-only package for nginx.
#
# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.
# Copyright:: Copyright (c) 2014 GitLab B.V.
# License:: Apache License, Version 2.0
#
# 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 'nginx'
version = Gitlab::Version.new('nginx', 'release-1.24.0')
default_version version.print(false)
display_version version.print(false).delete_prefix('release-')
license 'BSD-2-Clause'
license_file 'docs/text/LICENSE'
skip_transitive_dependency_licensing true
source git: version.remote
# From https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/
# Runtime dependencies
dependency 'pcre'
dependency 'zlib'
dependency 'openssl' unless Build::Check.use_system_ssl?
# Include the nginx-module-vts for metrics.
dependency 'nginx-module-vts'
dependency 'ngx_security_headers'
build do
cwd = "#{Omnibus::Config.source_dir}/nginx"
patch source: 'CVE-2023-44487.patch'
command ['./auto/configure',
"--prefix=#{install_dir}/embedded",
'--with-http_ssl_module',
'--with-http_stub_status_module',
'--with-http_gzip_static_module',
'--with-http_v2_module',
'--with-http_realip_module',
'--with-http_sub_module',
'--with-ipv6',
'--with-debug',
"--add-module=#{Omnibus::Config.source_dir}/nginx-module-vts",
"--add-module=#{Omnibus::Config.source_dir}/ngx_security_headers",
"--with-ld-opt=-L#{install_dir}/embedded/lib",
"--with-cc-opt=\"-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include\""].join(' '), cwd: cwd
command "make -j #{workers}", env: { 'LD_RUN_PATH' => "#{install_dir}/embedded/lib" }, cwd: cwd
command 'make install', cwd: cwd
end
#
# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.
# Copyright:: Copyright (c) 2021 GitLab B.V.
# License:: Apache License, Version 2.0
#
# 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
name 'ngx_security_headers'
version = Gitlab::Version.new('ngx_security_headers', '0.0.9')
default_version version.print(false)
license 'BSD-2-Clause'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
source git: version.remote
# This is a source-only package for nginx.
#
# Copyright:: Copyright (c) 2017 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
require "#{Omnibus::Config.project_root}/lib/gitlab/prometheus_helper"
name 'node-exporter'
version = Gitlab::Version.new('node-exporter', '1.8.1')
default_version version.print
license 'APACHE-2.0'
license_file 'LICENSE'
license_file 'NOTICE'
skip_transitive_dependency_licensing true
source git: version.remote
go_source = 'github.com/prometheus/node_exporter'
relative_path "src/#{go_source}"
build do
env = {
'GOPATH' => "#{Omnibus::Config.source_dir}/node-exporter",
'CGO_ENABLED' => '0', # Details: https://github.com/prometheus/node_exporter/issues/870
'GO111MODULE' => 'on',
'GOTOOLCHAIN' => 'local',
}
prom_version = Prometheus::VersionFlags.new(version)
command "go build -ldflags '#{prom_version.print_ldflags}'", env: env
mkdir "#{install_dir}/embedded/bin"
copy 'node_exporter', "#{install_dir}/embedded/bin/"
command "license_finder report --enabled-package-managers godep gomodules --decisions-file=#{Omnibus::Config.project_root}/support/dependency_decisions.yml --format=json --columns name version licenses texts notice --save=license.json"
copy "license.json", "#{install_dir}/licenses/node-exporter.json"
end
#
# Copyright:: Copyright (c) 2017 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 'npth'
default_version '1.6'
license 'LGPL-2.1'
license_file 'COPYING.LIB'
skip_transitive_dependency_licensing true
source url: "https://www.gnupg.org/ftp/gcrypt/npth/npth-#{version}.tar.bz2",
sha256: '1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1'
relative_path "npth-#{version}"
build do
env = with_standard_compiler_flags(with_embedded_path)
command './configure ' \
"--prefix=#{install_dir}/embedded --disable-doc", env: env
make "-j #{workers}", env: env
make 'install', env: env
end
project.exclude "embedded/bin/npth-config"
#
# Copyright 2012-2015 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.
# 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 'omnibus-ctl'
version = Gitlab::Version.new('omnibus-ctl', 'v0.6.12')
default_version version.print(false)
display_version version.print(false)
license 'Apache-2.0'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
dependency 'rubygems'
source git: version.remote
relative_path 'omnibus-ctl'
build do
env = with_standard_compiler_flags(with_embedded_path)
patch source: 'skip-license-acceptance.patch'
# Remove existing built gems in case they exist in the current dir
delete 'omnibus-ctl-*.gem'
# Install chef-utils and chef-config from Packagecloud server. Their version
# should match that of chef-gem
gem 'install chef-utils ' \
'--clear-sources ' \
"--version '18.3.0' " \
'-s https://packagecloud.io/cinc-project/stable ' \
'-s https://rubygems.org ' \
'--no-document', env: env
gem 'install chef-config ' \
'--clear-sources ' \
"--version '18.3.0' " \
'-s https://packagecloud.io/cinc-project/stable ' \
'-s https://rubygems.org ' \
'--no-document', env: env
gem 'build omnibus-ctl.gemspec', env: env
gem 'install omnibus-ctl-*.gem --no-document', env: env
touch "#{install_dir}/embedded/service/omnibus-ctl/.gitkeep"
end
#
## Copyright:: Copyright (c) 2021 GitLab Inc.
## License:: Apache License, Version 2.0
##
## 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'omnibus-gitlab-gems'
default_version '20240619'
license 'MIT'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
dependency 'ruby'
# If libarchive is present in system library locations and not bundled with
# omnibus-gitlab package, then Chef will incorrectly attempt to use it, and can
# potentially fail as seen from
# https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7741. Hence, we need to
# bundle libarchive in the package.
dependency 'libarchive'
dependency 'rubygems'
build do
gemfile_dir = "#{install_dir}/embedded/service/omnibus-gitlab"
mkdir gemfile_dir
gemfile = File.join(Omnibus::Config.project_root, 'config/templates/omnibus-gitlab-gems/Gemfile')
gemfile_lock = "#{gemfile}.lock"
[gemfile, gemfile_lock].each do |filename|
copy filename, gemfile_dir
end
env = with_standard_compiler_flags(with_embedded_path)
target_gemfile = File.join(gemfile_dir, 'Gemfile')
env['BUNDLE_GEMFILE'] = target_gemfile
bundle "config set --local frozen 'true'", env: env
bundle 'config force_ruby_platform true', env: env if OhaiHelper.ruby_native_gems_unsupported?
bundle "install --jobs #{workers} --retry 5", env: env
bundle "exec license_finder report --project_path=#{gemfile_dir} --decisions-file=#{Omnibus::Config.project_root}/support/dependency_decisions.yml --format=json --columns name version licenses texts notice --save=license.json", env: env
copy "license.json", "#{install_dir}/licenses/omnibus-gitlab-gems.json"
end
openssl_software_definition = if Gitlab::Util.get_env('OPENSSL_VERSION')&.start_with?("3")
File.join(Omnibus::Config.software_dir, 'openssl_3.rb')
else
File.join(Omnibus::Config.software_dir, 'openssl_1.rb')
end
instance_eval(IO.read(openssl_software_definition))
#
# Copyright 2012-2019, 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'openssl'
license 'OpenSSL'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
dependency 'cacerts'
version = Gitlab::Version.new('openssl', 'OpenSSL_1_1_1w')
default_version version.print(false)
display_version version.print(false).delete_prefix('OpenSSL_').tr('_', '.')
vendor 'openssl'
source git: version.remote
build do
env = with_standard_compiler_flags(with_embedded_path)
configure_args = [
"--prefix=#{install_dir}/embedded",
'no-comp',
'no-idea',
'no-mdc2',
'no-rc5',
'no-ssl2',
'no-ssl3',
'no-zlib',
'shared',
]
prefix = if linux? && s390x?
# 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
configure_cmd = "#{prefix} disable-gost"
# Out of abundance of caution, we put the feature flags first and then
# the crazy platform specific compiler flags at the end.
configure_args << env['CFLAGS'] << env['LDFLAGS']
configure_command = configure_args.unshift(configure_cmd).join(' ')
command configure_command, env: env, in_msys_bash: true
patch source: "openssl-1.1.1f-do-not-install-docs.patch", env: env
make 'depend', env: env
# make -j N on openssl is not reliable
make env: env
make 'install', env: env
end
#
# Copyright 2012-2019, 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
name 'openssl'
license 'Apache-2.0'
license_file 'LICENSE.txt'
skip_transitive_dependency_licensing true
dependency 'cacerts'
version = Gitlab::Version.new('openssl', 'openssl-3.2.1')
default_version version.print(false)
display_version version.print(false).delete_prefix('openssl-')
vendor 'openssl'
source git: version.remote
build do
env = with_standard_compiler_flags(with_embedded_path)
configure_args = [
"--prefix=#{install_dir}/embedded",
"--libdir=#{install_dir}/embedded/lib",
'no-unit-test',
'no-docs',
'no-comp',
'no-idea',
'no-mdc2',
'no-rc5',
'no-ssl3',
'no-zlib',
'shared',
]
prefix = if linux? && s390x?
# 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?
# 32-bit arm OSs require linking against libatomic
'./Configure linux-latomic'
else
'./config'
end
configure_cmd = "#{prefix} disable-gost"
# Out of abundance of caution, we put the feature flags first and then
# the crazy platform specific compiler flags at the end.
configure_args << env['CFLAGS'] << env['LDFLAGS']
configure_command = configure_args.unshift(configure_cmd).join(' ')
command configure_command, env: env, in_msys_bash: true
make 'depend', env: env
# make -j N on openssl is not reliable
make env: env
make 'install', env: env
end
#
# Copyright:: Copyright (c) 2012 Opscode, Inc.
# Copyright:: Copyright (c) 2015 GitLab.com
# License:: Apache License, Version 2.0
#
# 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.
#
require "#{Omnibus::Config.project_root}/lib/gitlab/build/info/package"
name 'package-scripts'
license 'Apache-2.0'
license_file File.expand_path('LICENSE', Omnibus::Config.project_root)
skip_transitive_dependency_licensing true
default_version Gitlab::Util.get_env('CI_COMMIT_TAG') || Build::Info::Package.semver_version.split('+')[0]
build do
# Create the package-script folder. The gitlab.rb project excludes this folder from the package.
mkdir "#{install_dir}/.package_util/package-scripts"
external_url_script = File.read(File.join(Omnibus::Config.project_root, 'config/templates/package-scripts/external_url.sh'))
# Render the package script erb files
Dir.glob(File.join(Omnibus::Config.project_root, 'config/templates/package-scripts/*.erb')).each do |package_script|
script = File.basename(package_script, '.*')
erb dest: "#{install_dir}/.package_util/package-scripts/#{script}",
source: File.basename(package_script),
mode: 0755,
vars: {
install_dir: project.install_dir,
external_url_script: external_url_script,
build_version: project.build_version
}
end
end
#
# Copyright:: Copyright (c) 2020 GitLab Inc.
# License:: Apache License, Version 2.0
#
# 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 'patroni'
default_version '3.0.1'
license 'MIT'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
dependency 'python3'
dependency 'psycopg2'
build do
env = with_standard_compiler_flags(with_embedded_path)
patch source: "add-license-file.patch"
# Version 1.0 of PrettyTable does not work with Patroni 1.6.4
# https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5701
command "#{install_dir}/embedded/bin/pip3 install prettytable==0.7.2", env: env
# Pin ydiff to 1.2 since 1.3 requires cdiff:
# https://github.com/zalando/patroni/blob/634b44ee0586f063033074806a42b534a354cbff/docs/releases.rst
# According to Patroni 3.3.0 release notes, upgrading to this version
# should be enough to fix this problem. We should test unpinning
# this library once we update to Patroni 3.3.0.
# See: https://github.com/zalando/patroni/blob/634b44ee0586f063033074806a42b534a354cbff/docs/releases.rst
command "#{install_dir}/embedded/bin/pip3 install ydiff==1.2", env: env
command "#{install_dir}/embedded/bin/pip3 install patroni[consul]==#{version}", env: env
end
#
# Copyright 2012-2014 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 'pcre'
default_version '8.44'
license 'BSD-2-Clause'
license_file 'LICENCE'
skip_transitive_dependency_licensing true
dependency 'libedit'
dependency 'ncurses'
dependency 'config_guess'
version '8.44' do
source sha256: 'aecafd4af3bd0f3935721af77b889d9024b2e01d96b58471bd91a3063fb47728'
end
source url: "http://downloads.sourceforge.net/project/pcre/pcre/#{version}/pcre-#{version}.tar.gz"
relative_path "pcre-#{version}"
build do
env = with_standard_compiler_flags(with_embedded_path)
update_config_guess
command './configure' \
" --prefix=#{install_dir}/embedded" \
' --disable-cpp' \
' --enable-utf' \
' --enable-unicode-properties' \
' --enable-pcretest-libedit', env: env
make "-j #{workers}", env: env
make 'install', env: env
end
project.exclude "embedded/bin/pcre-config"
#
# Copyright 2018 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 'pcre2'
version = Gitlab::Version.new('pcre2', 'pcre2-10.44')
default_version version.print(false)
display_version version.print(false).delete_prefix('pcre2-')
license 'BSD-2-Clause'
license_file 'LICENCE'
skip_transitive_dependency_licensing true
dependency 'libedit'
dependency 'ncurses'
dependency 'config_guess'
dependency 'libtool'
source git: version.remote
build do
env = with_standard_compiler_flags(with_embedded_path)
env['CFLAGS'] << ' -std=c99'
update_config_guess
command "./autogen.sh", env: env
command './configure' \
" --prefix=#{install_dir}/embedded" \
' --disable-cpp' \
' --enable-jit' \
' --enable-pcre2test-libedit', env: env
make "-j #{workers}", env: env
make 'install', env: env
end
project.exclude "embedded/bin/pcre2-config"
#
## Copyright:: Copyright (c) 2018 GitLab.com
## License:: Apache License, Version 2.0
##
## 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.
##
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
require "#{Omnibus::Config.project_root}/lib/gitlab/prometheus_helper"
name 'pgbouncer-exporter'
version = Gitlab::Version.new('pgbouncer-exporter', '0.8.0')
default_version version.print
license 'MIT'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
source git: version.remote
go_source = 'github.com/prometheus-community/pgbouncer_exporter'
relative_path "src/#{go_source}"
build do
env = {
'GOPATH' => "#{Omnibus::Config.source_dir}/pgbouncer-exporter",
'GO111MODULE' => 'on',
'GOTOOLCHAIN' => 'local',
}
prom_version = Prometheus::VersionFlags.new(version)
command "go build -ldflags '#{prom_version.print_ldflags}'", env: env
mkdir "#{install_dir}/embedded/bin"
copy 'pgbouncer_exporter', "#{install_dir}/embedded/bin/"
command "license_finder report --enabled-package-managers godep gomodules --decisions-file=#{Omnibus::Config.project_root}/support/dependency_decisions.yml --format=json --columns name version licenses texts notice --save=license.json"
copy "license.json", "#{install_dir}/licenses/pgbouncer-exporter.json"
end
#
# Copyright:: Copyright (c) 2017 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 'pgbouncer'
version = Gitlab::Version.new('pgbouncer', 'pgbouncer_1_22_1')
default_version version.print(false)
license 'ISC'
license_file 'COPYRIGHT'
skip_transitive_dependency_licensing true
dependency 'libevent'
dependency 'openssl' unless Build::Check.use_system_ssl?
source git: version.remote
build do
env = with_standard_compiler_flags(with_embedded_path)
cwd = "#{Omnibus::Config.source_dir}/pgbouncer"
command %w[git submodule init], cwd: cwd
command %w[git submodule update], cwd: cwd
command './autogen.sh', env: env, cwd: cwd
prefix = "#{install_dir}/embedded"
configure_command = ["./configure", "--prefix=#{prefix}", "--with-libevent=#{prefix}"]
configure_command << "--with-openssl=#{prefix}" unless Build::Check.use_system_ssl?
command configure_command.join(' '), env: env, cwd: cwd
# Disable building of docs to avoid the need for pandoc
command 'sed -i -e "/^dist_man_MANS =/d" Makefile', env: env, cwd: cwd
make "-j #{workers}", env: env, cwd: cwd
make 'install', env: env, cwd: cwd
end
#
# Copyright 2013-2014 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 'pkg-config-lite'
default_version '0.28-1'
license 'GPL-2.0'
license_file 'COPYING'
skip_transitive_dependency_licensing true
dependency 'config_guess'
version '0.28-1' do
source sha256: '21b76ec4e115ee30f9b3077a2506e48e8b837332ed4d30c9776502e69c6a29e5'
end
source url: "https://downloads.sourceforge.net/project/pkgconfiglite/#{version}/pkg-config-lite-#{version}.tar.gz"
relative_path "pkg-config-lite-#{version}"
build do
env = with_standard_compiler_flags(with_embedded_path)
update_config_guess
command './configure' \
" --prefix=#{install_dir}/embedded" \
' --disable-host-tool' \
" --with-pc-path=#{install_dir}/embedded/bin/pkgconfig", env: env
make "-j #{workers}", env: env
make "-j #{workers} install", env: env
end
project.exclude 'embedded/bin/pkg-config'
project.exclude 'embedded/lib/pkgconfig'
#
# Copyright 2012-2014 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 'popt'
default_version '1.16'
license 'MIT'
license_file 'COPYING'
skip_transitive_dependency_licensing true
dependency 'config_guess'
source url: "https://ftp.osuosl.org/pub/blfs/conglomeration/popt/popt-#{version}.tar.gz",
sha256: 'e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8'
relative_path "popt-#{version}"
build do
env = with_standard_compiler_flags(with_embedded_path)
update_config_guess
# --disable-nls => Disable localization support.
command './configure' \
" --prefix=#{install_dir}/embedded" \
' --disable-nls', env: env
make "-j #{workers}", env: env
make 'install', env: env
end
#
## Copyright:: Copyright (c) 2016 GitLab Inc.
## License:: Apache License, Version 2.0
##
## 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.
##
#
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
name 'postgres-exporter'
version = Gitlab::Version.new('postgres-exporter', '0.15.0')
default_version version.print
license 'Apache-2.0'
license_file 'LICENSE'
skip_transitive_dependency_licensing true
source git: version.remote
relative_path 'src/github.com/wrouesnel/postgres_exporter'
build do
env = {
'GOPATH' => "#{Omnibus::Config.source_dir}/postgres-exporter",
'GOTOOLCHAIN' => 'local',
}
prom_version = Prometheus::VersionFlags.new(version)
command "go build -ldflags '#{prom_version.print_ldflags}' ./cmd/postgres_exporter", env: env
mkdir "#{install_dir}/embedded/bin"
copy 'postgres_exporter', "#{install_dir}/embedded/bin/"
command "license_finder report --enabled-package-managers godep gomodules --decisions-file=#{Omnibus::Config.project_root}/support/dependency_decisions.yml --format=json --columns name version licenses texts notice --save=license.json"
copy "license.json", "#{install_dir}/licenses/postgres-exporter.json"
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