summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--.gitlab/deb.yml204
-rwxr-xr-xbin/docker-pull11
-rwxr-xr-xbin/lint1
-rwxr-xr-xbin/omnibus31
-rwxr-xr-xbin/setup2
-rw-r--r--config/projects/asdf.rb20
-rw-r--r--config/projects/dotnet.rb20
-rw-r--r--config/projects/golang.rb22
-rw-r--r--config/projects/java.rb21
-rw-r--r--config/projects/license_management.rb4
-rw-r--r--config/projects/mono.rb21
-rw-r--r--config/projects/nodejs.rb21
-rw-r--r--config/projects/php.rb21
-rw-r--r--config/projects/python.rb21
-rw-r--r--config/projects/ruby.rb21
-rw-r--r--config/projects/rust.rb21
-rw-r--r--config/software/asdf.rb47
-rw-r--r--config/software/asdf_dotnet_sdk.rb24
-rw-r--r--config/software/asdf_golang.rb16
-rw-r--r--config/software/asdf_gradle.rb16
-rw-r--r--config/software/asdf_java.rb46
-rw-r--r--config/software/asdf_maven.rb17
-rw-r--r--config/software/asdf_mono.rb40
-rw-r--r--config/software/asdf_nodejs.rb28
-rw-r--r--config/software/asdf_php.rb37
-rw-r--r--config/software/asdf_python.rb99
-rw-r--r--config/software/asdf_ruby.rb75
-rw-r--r--config/software/asdf_rust.rb28
-rw-r--r--config/software/libsqlite3.rb22
-rw-r--r--config/software/license_management.rb25
-rw-r--r--config/software/ruby.rb7
32 files changed, 982 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0907992..1b25016 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,12 +12,14 @@ include:
- template: Dependency-Scanning.gitlab-ci.yml
- template: Jobs/Code-Quality.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
+ - local: .gitlab/deb.yml
- local: .gitlab/build.yml
- local: .gitlab/test.yml
- local: .gitlab/deploy.yml
- local: .gitlab/maintenance.yml
stages:
+ - deb
- build
- test
- deploy
diff --git a/.gitlab/deb.yml b/.gitlab/deb.yml
new file mode 100644
index 0000000..89708f4
--- /dev/null
+++ b/.gitlab/deb.yml
@@ -0,0 +1,204 @@
+.deb:
+ image: debian:stable
+ stage: deb
+ script:
+ - bin/omnibus setup
+ - bin/omnibus build $OMNIBUS_PROJECT
+ allow_failure: true
+ artifacts:
+ paths:
+ - pkg/
+ cache:
+ key: ${CI_JOB_NAME}
+ paths:
+ - tmp/omnibus
+
+asdf:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: asdf
+
+dotnet-3:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: dotnet
+ DOTNET_VERSION: '3.1.302'
+
+gem:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: license_management
+
+golang-1-14:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: golang
+ GOLANG_VERSION: '1.14.6'
+
+java-8:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: java
+ JAVA_VERSION: '8'
+
+java-11:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: java
+ JAVA_VERSION: '11'
+
+java-14:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: java
+ JAVA_VERSION: '14'
+
+mono-6:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: mono
+ MONO_VERSION: '6.8.0.123'
+
+nodejs-10:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: nodejs
+ NODE_VERSION: '10.21.0'
+
+nodejs-12:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: nodejs
+ NODE_VERSION: '12.18.2'
+
+php-7:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: php
+ PHP_VERSION: '7.4.8'
+
+python-2-7:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '2.7.18'
+
+python-3-8:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.8.5'
+
+python-3-7:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.7.7'
+
+python-3-6:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.6.11'
+
+python-3-5:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.5.9'
+
+python-3-4:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.4.10'
+
+python-3-3:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: python
+ PYTHON_VERSION: '3.3.7'
+
+ruby-2-7-1:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.7.1'
+
+ruby-2-7-0:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.7.0'
+
+ruby-2-6-6:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.6'
+
+ruby-2-6-5:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.5'
+
+ruby-2-6-4:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.4'
+
+ruby-2-6-3:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.3'
+
+ruby-2-6-2:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.2'
+
+ruby-2-6-1:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.1'
+
+ruby-2-6-0:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.6.0'
+
+ruby-2-5-8:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.5.8'
+
+ruby-2-4-10:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.4.10'
+
+ruby-2-4-9:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.4.9'
+
+ruby-2-4-5:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: ruby
+ RUBY_VERSION: '2.4.5'
+
+rust-1-45:
+ extends: .deb
+ variables:
+ OMNIBUS_PROJECT: rust
+ RUST_VERSION: '1.45.0'
diff --git a/bin/docker-pull b/bin/docker-pull
new file mode 100755
index 0000000..aced17d
--- /dev/null
+++ b/bin/docker-pull
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+cd "$(dirname "$0")/.."
+
+IMAGE_NAME=${IMAGE_NAME:-$(basename "$PWD"):latest}
+LATEST_IMAGE=registry.gitlab.com/gitlab-org/security-products/license-management:latest
+
+docker pull $LATEST_IMAGE
+docker tag $LATEST_IMAGE "$IMAGE_NAME"
diff --git a/bin/lint b/bin/lint
index dada38c..8a283f4 100755
--- a/bin/lint
+++ b/bin/lint
@@ -8,5 +8,6 @@ shellcheck bin/*
shellcheck config/files/.bashrc
shellcheck config/files/.profile
shellcheck config/*.sh
+shellcheck config/scripts/**/*
shellcheck run.sh
bundle exec rubocop
diff --git a/bin/omnibus b/bin/omnibus
index 526b8d7..c46155c 100755
--- a/bin/omnibus
+++ b/bin/omnibus
@@ -11,30 +11,61 @@ case $1 in
autoconf \
automake \
bison \
+ bsdmainutils \
build-essential \
ca-certificates \
+ clang \
cmake \
curl \
+ default-libmysqlclient-dev \
fakeroot \
gettext \
git \
+ gpg \
+ libcairo2-dev \
+ libcurl4-openssl-dev \
libdb-dev \
+ libedit-dev \
+ libexif-dev \
libffi-dev \
libgdbm-dev \
libgdbm6 \
+ libgif-dev \
+ libglib2.0-dev \
+ libicu-dev \
+ libjpeg-dev \
libncurses5-dev \
+ libonig-dev \
+ libpng-dev \
+ libpq-dev \
+ libreadline-dev \
libreadline6-dev \
+ libsqlite3-dev \
libssl-dev \
+ libtiff-dev \
libtool \
libtool-bin \
+ libxml2-dev \
libyaml-dev \
+ libzip-dev \
+ locate \
maven \
+ mono-complete \
+ openssl \
+ pkg-config \
+ python \
python3 \
+ re2c \
ruby \
ruby-dev \
+ unzip \
zlib1g-dev \
zstd
+ curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
+ python /tmp/get-pip.py
+ python3 /tmp/get-pip.py
+
gem install bundler
bundle install
;;
diff --git a/bin/setup b/bin/setup
index 03f0938..ada231f 100755
--- a/bin/setup
+++ b/bin/setup
@@ -7,7 +7,7 @@ cd "$(dirname "$0")/.."
export PATH="/builds/gitlab-org/security-products/license-management/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [ ! -f /usr/sbin/haproxy ] && command -v apt-get; then
- apt-get update -y && apt-get install -y --no-install-recommends haproxy
+ apt-get update -y && apt-get install -y --no-install-recommends git haproxy
fi
[[ -z "$CI_JOB_ID" ]] && enable_dev_mode
diff --git a/config/projects/asdf.rb b/config/projects/asdf.rb
new file mode 100644
index 0000000..037bdb1
--- /dev/null
+++ b/config/projects/asdf.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+asdf_version = ENV.fetch('ASDF_VERSION', '0.7.8')
+
+name "asdf"
+maintainer "GitLab B.V."
+homepage "https://github.com/asdf-vm/asdf"
+
+install_dir "/opt/asdf"
+package_scripts_path Pathname.pwd.join("config/scripts/asdf")
+
+build_version asdf_version
+build_iteration 1
+
+override 'asdf', version: "v#{asdf_version}"
+dependency "asdf"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/dotnet.rb b/config/projects/dotnet.rb
new file mode 100644
index 0000000..8624925
--- /dev/null
+++ b/config/projects/dotnet.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+dotnet_version = ENV.fetch('DOTNET_VERSION', '3.1.302')
+
+name "dotnet-#{dotnet_version}"
+maintainer "GitLab B.V."
+homepage "https://docs.microsoft.com/en-us/dotnet/core/"
+
+install_dir "/opt/asdf/installs/dotnet-core/#{dotnet_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/dotnet")
+
+build_version dotnet_version
+build_iteration 1
+
+dependency "asdf_dotnet_sdk"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/golang.rb b/config/projects/golang.rb
new file mode 100644
index 0000000..d40d6aa
--- /dev/null
+++ b/config/projects/golang.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+golang_version = ENV.fetch('GOLANG_VERSION', '1.14.6')
+
+name "golang-#{golang_version}"
+maintainer "GitLab B.V."
+homepage "https://golang.org/"
+
+major, minor, _patch = golang_version.split('.')
+install_dir "/opt/asdf/installs/golang/#{major}.#{minor}/go"
+package_scripts_path Pathname.pwd.join("config/scripts/golang")
+
+build_version golang_version
+build_iteration 1
+
+override 'asdf_golang', version: golang_version
+dependency "asdf_golang"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/java.rb b/config/projects/java.rb
new file mode 100644
index 0000000..80e5cc7
--- /dev/null
+++ b/config/projects/java.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+java_version = ENV.fetch('JAVA_VERSION', '11')
+
+name "java-#{java_version}"
+maintainer "GitLab B.V."
+homepage "https://adoptopenjdk.net/"
+
+install_dir "/opt/asdf/installs/java/#{java_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/java")
+
+build_version java_version
+build_iteration 1
+
+override 'asdf_java', version: java_version
+dependency "asdf_java"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/license_management.rb b/config/projects/license_management.rb
index c34a680..9e23406 100644
--- a/config/projects/license_management.rb
+++ b/config/projects/license_management.rb
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
+
require_relative '../../lib/license/management/version.rb'
name "license-management"
-maintainer "mkhan@gitlab.com"
+maintainer "GitLab B.V."
homepage "https://gitlab.com/gitlab-org/security-products/license-management"
license_file "LICENSE"
diff --git a/config/projects/mono.rb b/config/projects/mono.rb
new file mode 100644
index 0000000..f844863
--- /dev/null
+++ b/config/projects/mono.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+mono_version = ENV.fetch('MONO_VERSION', '6.8.0.123')
+
+name "mono-#{mono_version}"
+maintainer "GitLab B.V."
+homepage "https://www.mono-project.com/"
+
+install_dir "/opt/asdf/installs/mono/#{mono_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/mono")
+
+build_version mono_version
+build_iteration 1
+
+override 'asdf_mono', version: mono_version
+dependency "asdf_mono"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/nodejs.rb b/config/projects/nodejs.rb
new file mode 100644
index 0000000..2ee6d1b
--- /dev/null
+++ b/config/projects/nodejs.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+nodejs_version = ENV.fetch('NODE_VERSION', '12.18.2')
+
+name "nodejs-#{nodejs_version}"
+maintainer "GitLab B.V."
+homepage "https://nodejs.org/"
+
+install_dir "/opt/asdf/installs/nodejs/#{nodejs_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/nodejs")
+
+build_version nodejs_version
+build_iteration 1
+
+override 'asdf_nodejs', version: nodejs_version
+dependency "asdf_nodejs"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/php.rb b/config/projects/php.rb
new file mode 100644
index 0000000..1ad2c49
--- /dev/null
+++ b/config/projects/php.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+php_version = ENV.fetch('PHP_VERSION', '7.4.8')
+
+name "php-#{php_version}"
+maintainer "GitLab B.V."
+homepage "https://www.php.net/"
+
+install_dir "/opt/asdf/installs/php/#{php_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/php")
+
+build_version php_version
+build_iteration 1
+
+override 'asdf_php', version: php_version
+dependency "asdf_php"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/python.rb b/config/projects/python.rb
new file mode 100644
index 0000000..6b75a1c
--- /dev/null
+++ b/config/projects/python.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+python_version = ENV.fetch('PYTHON_VERSION', '3.8.5')
+
+name "python-#{python_version}"
+maintainer "GitLab B.V."
+homepage "https://www.python.org/"
+
+install_dir "/opt/asdf/installs/python/#{python_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/python")
+
+build_version python_version
+build_iteration 1
+
+override 'asdf_python', version: python_version
+dependency "asdf_python"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/ruby.rb b/config/projects/ruby.rb
new file mode 100644
index 0000000..6202715
--- /dev/null
+++ b/config/projects/ruby.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+ruby_version = ENV.fetch('RUBY_VERSION', '2.7.1')
+
+name "ruby-#{ruby_version}"
+maintainer "GitLab B.V."
+homepage "https://www.ruby-lang.org/"
+
+install_dir "/opt/asdf/installs/ruby/#{ruby_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/ruby")
+
+build_version ruby_version
+build_iteration 1
+
+override 'asdf_ruby', version: ruby_version
+dependency "asdf_ruby"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/projects/rust.rb b/config/projects/rust.rb
new file mode 100644
index 0000000..005ff0f
--- /dev/null
+++ b/config/projects/rust.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+rust_version = ENV.fetch('RUST_VERSION', '1.45.0')
+
+name "rust-#{rust_version}"
+maintainer "GitLab B.V."
+homepage "https://github.com/rust-lang/rust"
+
+install_dir "/opt/asdf/installs/rust/#{rust_version}"
+package_scripts_path Pathname.pwd.join("config/scripts/rust")
+
+build_version rust_version
+build_iteration 1
+
+override 'asdf_rust', version: rust_version
+dependency "asdf_rust"
+
+package :deb do
+ compression_level 9
+ compression_type :xz
+end
diff --git a/config/software/asdf.rb b/config/software/asdf.rb
new file mode 100644
index 0000000..1b5ba26
--- /dev/null
+++ b/config/software/asdf.rb
@@ -0,0 +1,47 @@
+# frozen_string_literal: true
+
+name "asdf"
+default_version "v0.7.8"
+
+source git: "https://github.com/asdf-vm/asdf.git"
+relative_path "asdf-#{version}"
+
+env = with_embedded_path.merge('ASDF_DATA_DIR' => install_dir)
+env['PATH'] = "#{install_dir}/shims:#{env['PATH']}"
+
+build do
+ sync project_dir, install_dir
+ command "echo 'always_keep_download = yes' >> #{install_dir}/defaults", env: env
+ command "echo 'legacy_version_file = yes' >> #{install_dir}/defaults", env: env
+ command "echo 'use_release_candidates = no' >> #{install_dir}/defaults", env: env
+end
+
+build do
+ command "asdf plugin list all", env: env
+ command "asdf plugin-add dotnet-core", env: env
+ command "asdf plugin-add elixir", env: env
+ command "asdf plugin-add golang", env: env
+ command "asdf plugin-add gradle", env: env
+ command "asdf plugin-add java", env: env
+ command "asdf plugin-add maven", env: env
+ command "asdf plugin-add nodejs", env: env
+ command "asdf plugin-add php", env: env
+ command "asdf plugin-add python", env: env
+ command "asdf plugin-add ruby", env: env
+ command "asdf plugin-add rust", env: env
+ command "asdf plugin-add sbt", env: env
+end
+
+build do
+ command "asdf install elixir 1.10.4", env: env
+ command "asdf install sbt 1.3.8", env: env
+ # trigger download of pyenv
+ command "asdf list-all python", env: env
+ # trigger download of java cached file list
+ command "asdf list-all java", env: env.merge('CACHE_DIR' => install_dir)
+ command "asdf reshim", env: env
+end
+
+build do
+ delete "#{install_dir}/installs/elixir/**/man"
+end
diff --git a/config/software/asdf_dotnet_sdk.rb b/config/software/asdf_dotnet_sdk.rb
new file mode 100644
index 0000000..0d29611
--- /dev/null
+++ b/config/software/asdf_dotnet_sdk.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+name "asdf_dotnet_sdk"
+default_version "3.1.302"
+whitelist_file(%r{shared/.*/.*\.so\z})
+
+dependency "curl"
+dependency "libffi"
+dependency "zlib"
+
+source url: "https://dotnetcli.azureedge.net/dotnet/Sdk/#{version}/dotnet-sdk-#{version}-linux-x64.tar.gz"
+relative_path ""
+
+version "3.1.302" do
+ source sha256: "777f376b65974e459e8804671461747c53b4eb6917f3e28db2cf6f9ed4be23c8"
+end
+version "3.1.301" do
+ source sha256: "a0c416bb57f7e16a4767e7cd4dbeab80386fffc354ee7cdc68d367694bc40269"
+end
+
+build do
+ mkdir install_dir
+ sync "#{project_dir}/", install_dir
+end
diff --git a/config/software/asdf_golang.rb b/config/software/asdf_golang.rb
new file mode 100644
index 0000000..d8240b0
--- /dev/null
+++ b/config/software/asdf_golang.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+name "asdf_golang"
+default_version "1.14.6"
+
+source url: "https://golang.org/dl/go#{version}.linux-amd64.tar.gz"
+relative_path "go"
+
+version "1.14.6" do
+ source sha256: "5c566ddc2e0bcfc25c26a5dc44a440fcc0177f7350c1f01952b34d5989a0d287"
+end
+
+build do
+ mkdir install_dir
+ sync "#{project_dir}/", install_dir
+end
diff --git a/config/software/asdf_gradle.rb b/config/software/asdf_gradle.rb
new file mode 100644
index 0000000..d35972c
--- /dev/null
+++ b/config/software/asdf_gradle.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+name "asdf_gradle"
+default_version "6.5.1"
+
+source url: "https://services.gradle.org/distributions/gradle-#{version}-bin.zip"
+relative_path "gradle-#{version}"
+
+version "6.5.1" do
+ source sha256: "50a7d30529fa939721fe9268a0205142f3f2302bcac5fb45b27a3902e58db54a"
+end
+
+build do
+ mkdir install_dir
+ copy "#{project_dir}/**", "#{install_dir}/"
+end
diff --git a/config/software/asdf_java.rb b/config/software/asdf_java.rb
new file mode 100644
index 0000000..dc8cb15
--- /dev/null
+++ b/config/software/asdf_java.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+name "asdf_java"
+default_version "11"
+
+dependency "asdf_maven"
+dependency "asdf_gradle"
+dependency "zlib"
+
+whitelist_file "bin"
+whitelist_file "lib"
+whitelist_file "jre/bin"
+whitelist_file "jre/lib"
+
+version "8" do
+ relative_path "jdk8u262-b10"
+ source(
+ url: "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u262-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u262b10.tar.gz",
+ sha256: "733755fd649fad6ae91fc083f7e5a5a0b56410fb6ac1815cff29f744b128b1b1"
+ )
+end
+
+version "11" do
+ relative_path "jdk-11.0.8+10"
+ source(
+ url: "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz",
+ sha256: "6e4cead158037cb7747ca47416474d4f408c9126be5b96f9befd532e0a762b47"
+ )
+end
+
+version "14" do
+ relative_path "jdk-14.0.2+12"
+ source(
+ url: "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz",
+ sha256: "7d5ee7e06909b8a99c0d029f512f67b092597aa5b0e78c109bd59405bbfa74fe"
+ )
+end
+
+build do
+ mkdir install_dir
+ copy "#{project_dir}/**", "#{install_dir}/"
+ delete "#{install_dir}/lib/ext"
+ delete "#{install_dir}/man"
+ delete "#{install_dir}/sample"
+ delete "#{install_dir}/src.zip"
+end
diff --git a/config/software/asdf_maven.rb b/config/software/asdf_maven.rb
new file mode 100644
index 0000000..da63722
--- /dev/null
+++ b/config/software/asdf_maven.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+name "asdf_maven"
+default_version "3.6.3"
+
+major = version.split('.')[0]
+source url: "https://archive.apache.org/dist/maven/maven-#{major}/#{version}/binaries/apache-maven-#{version}-bin.tar.gz"
+relative_path "apache-maven-#{version}"
+
+version "3.6.3" do
+ source sha256: "26ad91d751b3a9a53087aefa743f4e16a17741d3915b219cf74112bf87a438c5"
+end
+
+build do
+ mkdir install_dir
+ copy "#{project_dir}/**", "#{install_dir}/"
+end
diff --git a/config/software/asdf_mono.rb b/config/software/asdf_mono.rb
new file mode 100644
index 0000000..f45521d
--- /dev/null
+++ b/config/software/asdf_mono.rb
@@ -0,0 +1,40 @@
+# frozen_string_literal: true
+
+name "asdf_mono"
+default_version "6.8.0.123"
+license_file "LICENSE"
+license_file "COPYING"
+
+dependency "zlib"
+
+source url: "https://download.mono-project.com/sources/mono/mono-#{version}.tar.xz"
+relative_path "mono-#{version}"
+
+version("6.8.0.123") do
+ source sha256: 'e2e42d36e19f083fc0d82f6c02f7db80611d69767112af353df2f279744a2ac5'
+end
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--disable-crash-reporting",
+ # "--enable-minimal=profiler,decimal,pinvoke,debug,appdomains,verifier,reflection_emit,reflection_emit_save,large_code,logging,com,ssa,generics,attach,interpreter,simd,soft_debug,perfcounters,normalization,desktop_loader,shared_perfcounters,remoting,security,lldb,mdb,assert_messages,cleanup,sgen_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_debug_helpers,sockets,gac",
+ "--enable-small-config",
+ "--with-crash-privacy=yes",
+ "--with-libgdiplus=sibling",
+ "--with-moonlight=no",
+ "--with-x=no",
+ "--with-mcs-docs=no",
+ "--prefix=#{install_dir}"
+ ]
+ env['CFLAGS'] << ' -Os'
+
+ configure(*configure_command, env: env)
+ make "-j #{workers}", env: env
+ make "-j #{workers} install", env: env
+end
+
+build do
+ command "curl -o #{install_dir}/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
+ copy "#{install_dir}/bin/nuget.exe", "#{install_dir}/bin/nuget"
+end
diff --git a/config/software/asdf_nodejs.rb b/config/software/asdf_nodejs.rb
new file mode 100644
index 0000000..3ad55c5
--- /dev/null
+++ b/config/software/asdf_nodejs.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+name "asdf_nodejs"
+default_version "12.18.2"
+
+source url: "https://nodejs.org/dist/v#{version}/node-v#{version}-linux-x64.tar.gz"
+relative_path "node-v#{version}-linux-x64"
+
+version "12.18.2" do
+ source sha256: "2d316e55994086e41761b0c657e0027e9d16d7160d3f8854cc9dc7615b99a526"
+end
+version "10.21.0" do
+ source sha256: "d0bac246001eed9268ba9cadbfc6cfd8b6eb0728ad000a0f9fa7ce29e66c2be4"
+end
+
+build do
+ mkdir install_dir
+ sync "#{project_dir}/", install_dir
+ touch "#{install_dir}/.npm/.keep"
+end
+
+build do
+ command "#{install_dir}/bin/node #{install_dir}/bin/npm install -g bower bower-npm-resolver npm npm-install-peers yarn"
+end
+
+build do
+ delete "#{install_dir}/share"
+end
diff --git a/config/software/asdf_php.rb b/config/software/asdf_php.rb
new file mode 100644
index 0000000..3225ac8
--- /dev/null
+++ b/config/software/asdf_php.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+name "asdf_php"
+default_version "7.4.8"
+license_file "LICENSE"
+
+dependency "autoconf"
+dependency "libtool"
+dependency "libxml2"
+dependency "openssl"
+dependency "zlib"
+dependency "libsqlite3"
+
+source url: "https://www.php.net/distributions/php-#{version}.tar.gz"
+relative_path "php-#{version}"
+
+version("7.4.8") { source sha256: "649f6bcdb60dc38d5edd7f3a7b2905d15d88c1d13e40307e8972ede347cea6ba" }
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--prefix=#{install_dir}",
+ "--with-openssl=#{install_dir}/embedded"
+ ]
+ configure(*configure_command, env: env)
+ make "-j #{workers}", env: env
+ make "-j #{workers} install", env: env
+end
+
+build do
+ command "curl https://getcomposer.org/installer -o #{project_dir}/composer-setup.php"
+ command "#{install_dir}/bin/php #{project_dir}/composer-setup.php --install-dir=#{install_dir}/bin --filename=composer"
+end
+
+build do
+ delete "#{install_dir}/embedded/bin/sqlite3"
+end
diff --git a/config/software/asdf_python.rb b/config/software/asdf_python.rb
new file mode 100644
index 0000000..5a0e9c9
--- /dev/null
+++ b/config/software/asdf_python.rb
@@ -0,0 +1,99 @@
+# frozen_string_literal: true
+
+name "asdf_python"
+default_version "3.8.5"
+
+dependency "bzip2"
+dependency "libffi"
+dependency "liblzma"
+dependency "libsqlite3"
+dependency "libuuid"
+dependency "libyaml"
+dependency "ncurses"
+dependency "openssl"
+dependency "zlib"
+
+source url: "https://python.org/ftp/python/#{version}/Python-#{version}.tar.xz"
+relative_path "Python-#{version}"
+
+version("3.8.5") { source md5: "35b5a3d0254c1c59be9736373d429db7" }
+version("3.8.4") { source md5: "e16df33cd7b58702e57e137f8f5d13e7" }
+version("3.8.3") { source md5: "3000cf50aaa413052aef82fd2122ca78" }
+version("3.8.2") { source md5: "e9d6ebc92183a177b8e8a58cad5b8d67" }
+version("3.8.1") { source md5: "b3fb85fd479c0bf950c626ef80cacb57" }
+version("3.8.0") { source md5: "dbac8df9d8b9edc678d0f4cacdb7dbb0" }
+version("3.7.7") { source md5: "172c650156f7bea68ce31b2fd01fa766" }
+version("3.7.6") { source md5: "c08fbee72ad5c2c95b0f4e44bf6fd72c" }
+version("3.7.5") { source md5: "08ed8030b1183107c48f2092e79a87e2" }
+version("3.7.4") { source md5: "d33e4aae66097051c2eca45ee3604803" }
+version("3.7.3") { source md5: "93df27aec0cd18d6d42173e601ffbbfd" }
+version("3.7.2") { source md5: "df6ec36011808205beda239c72f947cb" }
+version("3.7.1") { source md5: "0a57e9022c07fad3dadb2eef58568edb" }
+version("3.7.0") { source md5: "eb8c2a6b1447d50813c02714af4681f3" }
+version("3.6.11") { source md5: "8f91c770b546a4938efbdb3064796c6c" }
+version("3.5.9") { source md5: "ef7f82485e83c7f8f8bcb920a9c2457b" }
+version("3.4.10") { source md5: "f88a98bce17a03c43a6a5f8a66ab2e62" }
+version("3.3.7") { source md5: "84e2f12f044ca53b577f6224c53f82ac" }
+version("3.2.6") { source md5: "e0ba4360dfcb4aec735e666cc0ae7b0e" }
+version("3.1.5") { source md5: "20dd2b7f801dc97db948dd168df4dd52" }
+version("3.0.1") { source md5: "7291eac6a9a7a3642e309c78b8d744e5" }
+
+version("2.7.18") { source md5: "fd6cc8ec0a78c44036f825e739f36e5a" }
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--enable-shared",
+ "--enable-ipv6",
+ "--prefix=#{install_dir}/embedded",
+ "--with-ssl=#{install_dir}/embedded",
+ "--with-dbmliborder=",
+ "--without-dtrace",
+ "--without-valgrind"
+ ]
+ configure(*configure_command, env: env)
+ make "-j #{workers}", env: env
+ make "-j #{workers} install", env: env
+ command "ln -s #{install_dir}/embedded/bin #{install_dir}/bin"
+end
+
+build do
+ if version.start_with?('3.')
+ command "ln -s #{install_dir}/bin/python3 #{install_dir}/bin/python"
+ command "ln -s #{install_dir}/bin/pip3 #{install_dir}/bin/pip"
+ end
+
+ if File.exist?("#{install_dir}/bin/pip")
+ command "#{install_dir}/bin/pip install --upgrade pip"
+ else
+ case version
+ when /^3\.2\./
+ command "curl https://bootstrap.pypa.io/3.2/get-pip.py -o #{project_dir}/get-pip.py"
+ when /^3\.3\./
+ command "curl https://bootstrap.pypa.io/3.3/get-pip.py -o #{project_dir}/get-pip.py"
+ when /^3\.4\./
+ command "curl https://bootstrap.pypa.io/3.4/get-pip.py -o #{project_dir}/get-pip.py"
+ when /^2\.6\./
+ command "curl https://bootstrap.pypa.io/2.6/get-pip.py -o #{project_dir}/get-pip.py"
+ else
+ command "curl https://bootstrap.pypa.io/get-pip.py -o #{project_dir}/get-pip.py"
+ end
+
+ command "#{install_dir}/bin/python #{project_dir}/get-pip.py \"pip<20.0\""
+ end
+ command "#{install_dir}/bin/pip install pipenv virtualenv"
+ command "#{install_dir}/bin/pip install conan" if version == default_version
+end
+
+build do
+ command "find #{install_dir} -type f -name '*.exe' -exec rm {} +"
+ command "find #{install_dir} -type d -name '__pycache__' -exec rm -r {} +"
+ command "find #{install_dir} -type d -name 'test' -exec rm -r {} +"
+ command "find #{install_dir} -type d -name 'tests' -exec rm -r {} +"
+ delete "#{install_dir}/embedded/bin/sqlite3"
+ delete "#{install_dir}/embedded/lib/python*/unittest"
+ delete "#{install_dir}/embedded/lib/python*/lib-dynload/_bsddb*"
+ delete "#{install_dir}/embedded/lib/python*/lib-dynload/readline*"
+ delete "#{install_dir}/embedded/man"
+ delete "#{install_dir}/embedded/share"
+end
diff --git a/config/software/asdf_ruby.rb b/config/software/asdf_ruby.rb
new file mode 100644
index 0000000..13b98c5
--- /dev/null
+++ b/config/software/asdf_ruby.rb
@@ -0,0 +1,75 @@
+# frozen_string_literal: true
+
+name "asdf_ruby"
+default_version "2.7.1"
+license "BSD-2-Clause"
+license_file "BSDL"
+license_file "COPYING"
+license_file "LEGAL"
+
+dependency "libffi"
+dependency "libyaml"
+dependency "openssl"
+dependency "zlib"
+
+source url: "https://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz"
+relative_path "ruby-#{version}"
+
+version("2.7.1") { source sha256: "d418483bdd0000576c1370571121a6eb24582116db0b7bb2005e90e250eae418" }
+version("2.7.0") { source sha256: "8c99aa93b5e2f1bc8437d1bbbefd27b13e7694025331f77245d0c068ef1f8cbe" }
+
+version("2.6.6") { source sha256: "364b143def360bac1b74eb56ed60b1a0dca6439b00157ae11ff77d5cd2e92291" }
+version("2.6.5") { source sha256: "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d" }
+version("2.6.4") { source sha256: "4fc1d8ba75505b3797020a6ffc85a8bcff6adc4dabae343b6572bf281ee17937" }
+version("2.6.3") { source sha256: "577fd3795f22b8d91c1d4e6733637b0394d4082db659fccf224c774a2b1c82fb" }
+version("2.6.2") { source sha256: "a0405d2bf2c2d2f332033b70dff354d224a864ab0edd462b7a413420453b49ab" }
+version("2.6.1") { source sha256: "17024fb7bb203d9cf7a5a42c78ff6ce77140f9d083676044a7db67f1e5191cb8" }
+version("2.6.0") { source sha256: "f3c35b924a11c88ff111f0956ded3cdc12c90c04b72b266ac61076d3697fc072" }
+
+version("2.5.8") { source sha256: "6c0bdf07876c69811a9e7dc237c43d40b1cb6369f68e0e17953d7279b524ad9a" }
+
+version("2.4.10") { source sha256: "93d06711795bfb76dbe7e765e82cdff3ddf9d82eff2a1f24dead9bb506eaf2d0" }
+version("2.4.9") { source sha256: "f99b6b5e3aa53d579a49eb719dd0d3834d59124159a6d4351d1e039156b1c6ae" }
+version("2.4.5") { source sha256: "6737741ae6ffa61174c8a3dcdd8ba92bc38827827ab1d7ea1ec78bc3cefc5198" }
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--disable-debug-env",
+ "--disable-dtrace",
+ "--disable-install-capi",
+ "--disable-install-doc",
+ "--disable-install-rdoc",
+ "--disable-jit-support",
+ "--enable-shared",
+ "--prefix=#{install_dir}",
+ "--with-out-ext=coverage,dbm,readline,rdoc,win32,win32ole,sdbm",
+ "--without-gdbm",
+ "--without-gmp",
+ "--without-jemalloc",
+ "--without-tk",
+ "--without-valgrind"
+ ]
+ configure(*configure_command, env: env)
+ make "-j #{workers}", env: env
+ make "-j #{workers} install", env: env
+end
+
+build do
+ delete "#{install_dir}/share"
+ delete "#{install_dir}/bin/*racc*"
+ delete "#{install_dir}/bin/erb"
+ delete "#{install_dir}/bin/irb"
+ delete "#{install_dir}/bin/rake"
+ delete "#{install_dir}/bin/rdoc"
+ delete "#{install_dir}/bin/ri"
+ delete "#{install_dir}/embedded/share"
+ delete "#{install_dir}/lib/ruby/gems/**/cache"
+ delete "#{install_dir}/lib/ruby/gems/**/doc"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/.github"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/.gitignore"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/.travis.yml"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/bundler/man"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/man"
+ delete "#{install_dir}/lib/ruby/gems/**/gems/**/test"
+end
diff --git a/config/software/asdf_rust.rb b/config/software/asdf_rust.rb
new file mode 100644
index 0000000..fa1016d
--- /dev/null
+++ b/config/software/asdf_rust.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+name "asdf_rust"
+default_version "1.45.0"
+whitelist_file "lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld"
+
+source url: "https://static.rust-lang.org/dist/rust-#{version}-x86_64-unknown-linux-gnu.tar.gz"
+relative_path "rust-#{version}-x86_64-unknown-linux-gnu"
+
+version "1.45.0" do
+ source sha256: "c34ed8722759fd60c94dbc9069833da5b3b873dcd19afaa9b34c1ce2c2cfa229"
+end
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ command "sh install.sh" \
+ " --prefix=#{install_dir}" \
+ " --components=rustc,cargo" \
+ " --verbose", env: env
+end
+
+build do
+ delete "#{install_dir}/share"
+ delete "#{install_dir}/etc"
+ delete "#{install_dir}/bin/rustdoc"
+ delete "#{install_dir}/bin/rust-gdb"
+ delete "#{install_dir}/bin/rust-gdbgui"
+end
diff --git a/config/software/libsqlite3.rb b/config/software/libsqlite3.rb
new file mode 100644
index 0000000..ff9cc27
--- /dev/null
+++ b/config/software/libsqlite3.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+name "libsqlite3"
+default_version "3.32.3"
+
+dependency "config_guess"
+
+source url: "https://www.sqlite.org/2020/sqlite-autoconf-3320300.tar.gz",
+ sha1: "ea14ef2dc4cc7fcbc5ebbb018d3a03faa3a41cb4"
+
+relative_path "sqlite-autoconf-3320300"
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--prefix=#{install_dir}/embedded",
+ "--disable-nls"
+ ]
+ configure(*configure_command, env: env)
+ make("-j #{workers}", env: env)
+ make("-j #{workers} install", env: env)
+end
diff --git a/config/software/license_management.rb b/config/software/license_management.rb
index be19ddb..de8a854 100644
--- a/config/software/license_management.rb
+++ b/config/software/license_management.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require_relative '../../lib/license/management/version.rb'
name "license_management"
@@ -18,17 +20,34 @@ build do
gem "build #{project_dir}/license-management.gemspec -o #{project_dir}/release.gem"
gem "install -f #{project_dir}/release.gem --no-document"
delete "#{project_dir}/release.gem"
- command "cp #{install_dir}/embedded/bin/license_management #{install_dir}/bin/license_management"
-
+ copy "#{install_dir}/embedded/bin/license_management", "#{install_dir}/bin/license_management"
command "cp -r #{project_dir}/config/files/. #{install_dir}/"
+end
+
+build do
command "mvn license:license-list"
- command "mvn dependency:get -Dartifact=gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0 -DremoteRepositories=https://plugins.gradle.org/m2"
+ command [
+ :mvn,
+ "dependency:get",
+ "-Dartifact=gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.15.0",
+ "-DremoteRepositories=https://plugins.gradle.org/m2"
+ ].map(&:to_s).join(' ')
command "mvn dependency:get -Dartifact=org.codehaus.plexus:plexus-utils:2.0.6"
copy "#{Dir.home}/.m2/repository/", "#{install_dir}/.m2/repository/"
end
build do
+ touch "#{install_dir}/.config/virtualenv/app-data/.keep"
+ command "pip2 download -d #{install_dir}/.config/virtualenv/app-data pip-licenses pip setuptools wheel"
+ command "pip3 download -d #{install_dir}/.config/virtualenv/app-data pip-licenses pip setuptools wheel"
+end
+
+build do
delete "#{install_dir}/embedded/lib/ruby/gems/**/cache"
delete "#{install_dir}/embedded/lib/ruby/gems/**/doc"
delete "#{install_dir}/embedded/lib/ruby/gems/**/build_info"
+ command "find #{install_dir} -type f -name '*.png' -exec rm {} +"
+ command "find #{install_dir} -type f -name '*.ttf' -exec rm {} +"
+ command "find #{install_dir} -type f -name '*.rhtml' -exec rm {} +"
+ command "find #{install_dir} -type f -name '*.js' -exec rm {} +"
end
diff --git a/config/software/ruby.rb b/config/software/ruby.rb
index 56a04fc..316a342 100644
--- a/config/software/ruby.rb
+++ b/config/software/ruby.rb
@@ -1,4 +1,4 @@
-require 'fileutils'
+# frozen_string_literal: true
name "ruby"
@@ -6,7 +6,6 @@ license "BSD-2-Clause"
license_file "BSDL"
license_file "COPYING"
license_file "LEGAL"
-skip_transitive_dependency_licensing true
default_version "2.7.1"
@@ -44,8 +43,8 @@ build do
end
build do
- command "#{embedded_dir}/bin/gem install bundler -v'~> 2.0' --no-document"
- command "#{embedded_dir}/bin/gem install bundler -v'~> 1.0' --no-document"
+ command "#{embedded_dir}/bin/gem install bundler -v '~> 1.0' --no-document"
+ command "#{embedded_dir}/bin/gem install bundler -v '~> 2.0' --no-document"
end
build do