Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(VANAGON-85) Move platform definitions into core vanagon. Inherit def… #283

Merged
merged 1 commit into from Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -10,7 +10,7 @@ def location_for(place)
end
end

gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || '~> 0.18')
gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || '~> 0.21')
gem 'packaging', *location_for(ENV['PACKAGING_LOCATION'] || '>= 0.99.76')

# csv > 3.1.5 requires 'stringio' which the latest version of requires Ruby >= 2.5.0
Expand Down
10 changes: 1 addition & 9 deletions configs/platforms/debian-10-amd64.rb
@@ -1,11 +1,3 @@
platform "debian-10-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "buster"

plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "debian-10-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end
11 changes: 1 addition & 10 deletions configs/platforms/debian-8-amd64.rb
@@ -1,12 +1,3 @@
platform "debian-8-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "jessie"

plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "debian-8-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end
11 changes: 1 addition & 10 deletions configs/platforms/debian-9-amd64.rb
@@ -1,12 +1,3 @@
platform "debian-9-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "stretch"

plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "debian-9-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end
9 changes: 1 addition & 8 deletions configs/platforms/el-6-x86_64.rb
@@ -1,10 +1,3 @@
platform "el-6-x86_64" do |plat|
plat.servicedir "/etc/rc.d/init.d"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "sysv"
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/el/6/x86_64/pl-build-tools-release-6-1.noarch.rpm"
plat.provision_with "rpm --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"
plat.provision_with "yum install --assumeyes --nogpgcheck autoconf automake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs yum-utils"
plat.install_build_dependencies_with "yum install --assumeyes"
plat.vmpooler_template "redhat-6-x86_64"
plat.inherit_from_default
end
12 changes: 3 additions & 9 deletions configs/platforms/el-7-x86_64.rb
@@ -1,11 +1,5 @@
platform "el-7-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.provision_with "rpm --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-el-7.noarch.rpm"
plat.provision_with "yum install --assumeyes --nogpgcheck autoconf automake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs yum-utils rpm-sign"
plat.install_build_dependencies_with "yum install --assumeyes"
plat.vmpooler_template "redhat-7-x86_64"
plat.inherit_from_default
packages = %w(gcc-c++)
plat.provision_with("yum install --assumeyes #{packages.join(' ')}")
end
15 changes: 1 addition & 14 deletions configs/platforms/el-8-x86_64.rb
@@ -1,16 +1,3 @@
platform "el-8-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

packages = %w[
autoconf automake createrepo gcc gcc-c++ java-1.8.0-openjdk-devel cmake
libsepol libsepol-devel libselinux-devel make pkgconfig readline-devel
rsync rpm-build rpm-libs rpm-sign rpmdevtools swig yum-utils zlib-devel
systemtap-sdt-devel
]

plat.provision_with("dnf install -y --allowerasing #{packages.join(' ')}")
plat.install_build_dependencies_with 'dnf install -y --allowerasing'
plat.vmpooler_template "redhat-8-x86_64"
plat.inherit_from_default
end
16 changes: 1 addition & 15 deletions configs/platforms/fedora-30-x86_64.rb
@@ -1,17 +1,3 @@
platform "fedora-30-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.vmpooler_template "fedora-30-x86_64"
plat.dist "fc30"

packages = %w[
autoconf automake bzip2-devel gcc gcc-c++
make cmake pkgconfig readline-devel
rpm-libs rpmdevtools rsync swig zlib-devel
]
plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")

plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
plat.inherit_from_default
end
16 changes: 1 addition & 15 deletions configs/platforms/fedora-31-x86_64.rb
@@ -1,17 +1,3 @@
platform "fedora-31-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.vmpooler_template "fedora-31-x86_64"
plat.dist "fc31"

packages = %w[
autoconf automake bzip2-devel gcc gcc-c++
make cmake pkgconfig readline-devel
rpm-libs rpmdevtools rsync swig zlib-devel
]
plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")

plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
plat.inherit_from_default
end
29 changes: 2 additions & 27 deletions configs/platforms/osx-10.14-x86_64.rb
@@ -1,28 +1,3 @@
platform 'osx-10.14-x86_64' do |plat|
plat.servicetype 'launchd'
plat.servicedir '/Library/LaunchDaemons'
plat.codename 'mojave'

plat.provision_with 'export HOMEBREW_NO_EMOJI=true'
plat.provision_with 'export HOMEBREW_VERBOSE=true'

plat.provision_with 'sudo dscl . -create /Users/test'
plat.provision_with 'sudo dscl . -create /Users/test UserShell /bin/bash'
plat.provision_with 'sudo dscl . -create /Users/test UniqueID 1001'
plat.provision_with 'sudo dscl . -create /Users/test PrimaryGroupID 1000'
plat.provision_with 'sudo dscl . -create /Users/test NFSHomeDirectory /Users/test'
plat.provision_with 'sudo dscl . -passwd /Users/test password'
plat.provision_with 'sudo dscl . -merge /Groups/admin GroupMembership test'
plat.provision_with 'echo "test ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/username'
plat.provision_with 'mkdir -p /etc/homebrew'
plat.provision_with 'cd /etc/homebrew'
plat.provision_with 'su test -c \'echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"\''
plat.provision_with 'sudo chown -R test:admin /Users/test/Library/'

packages = %w[cmake pkg-config yaml-cpp]

plat.provision_with "su test -c '/usr/local/bin/brew install #{packages.join(' ')}'"

plat.vmpooler_template 'osx-1014-x86_64'
plat.output_dir File.join('apple', '10.14', 'PC1', 'x86_64')
platform "osx-10.14-x86_64" do |plat|
plat.inherit_from_default
end
29 changes: 2 additions & 27 deletions configs/platforms/osx-10.15-x86_64.rb
@@ -1,28 +1,3 @@
platform 'osx-10.15-x86_64' do |plat|
plat.servicetype 'launchd'
plat.servicedir '/Library/LaunchDaemons'
plat.codename 'catalina'

plat.provision_with 'export HOMEBREW_NO_EMOJI=true'
plat.provision_with 'export HOMEBREW_VERBOSE=true'

plat.provision_with 'sudo dscl . -create /Users/test'
plat.provision_with 'sudo dscl . -create /Users/test UserShell /bin/bash'
plat.provision_with 'sudo dscl . -create /Users/test UniqueID 1001'
plat.provision_with 'sudo dscl . -create /Users/test PrimaryGroupID 1000'
plat.provision_with 'sudo dscl . -create /Users/test NFSHomeDirectory /Users/test'
plat.provision_with 'sudo dscl . -passwd /Users/test password'
plat.provision_with 'sudo dscl . -merge /Groups/admin GroupMembership test'
plat.provision_with 'echo "test ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/username'
plat.provision_with 'mkdir -p /etc/homebrew'
plat.provision_with 'cd /etc/homebrew'
plat.provision_with 'su test -c \'echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"\''
plat.provision_with 'sudo chown -R test:admin /Users/test/Library/'

packages = %w[cmake pkg-config yaml-cpp]

plat.provision_with "su test -c '/usr/local/bin/brew install #{packages.join(' ')}'"

plat.vmpooler_template 'osx-1015-x86_64'
plat.output_dir File.join('apple', '10.15', 'PC1', 'x86_64')
platform "osx-10.15-x86_64" do |plat|
plat.inherit_from_default
end
9 changes: 1 addition & 8 deletions configs/platforms/sles-12-x86_64.rb
@@ -1,10 +1,3 @@
platform "sles-12-x86_64" do |plat|
plat.servicedir "/etc/init.d"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "sysv"

plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/sles/12/x86_64/pl-build-tools-sles-12-x86_64.repo"
plat.provision_with "zypper -n --no-gpg-checks install -y aaa_base autoconf automake rsync gcc gcc-c++ make rpm-build"
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
plat.vmpooler_template "sles-12-x86_64"
plat.inherit_from_default
end
12 changes: 1 addition & 11 deletions configs/platforms/ubuntu-16.04-amd64.rb
@@ -1,13 +1,3 @@
platform "ubuntu-16.04-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "xenial"

plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat_get_codename}.deb"
plat.provision_with "curl http://apt.puppetlabs.com/pubkey.gpg | apt-key add - "
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "ubuntu-1604-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end
11 changes: 1 addition & 10 deletions configs/platforms/ubuntu-18.04-amd64.rb
@@ -1,12 +1,3 @@
platform "ubuntu-18.04-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "bionic"

plat.provision_with "curl http://apt.puppetlabs.com/pubkey.gpg | apt-key add - "
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "ubuntu-1804-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end
11 changes: 1 addition & 10 deletions configs/platforms/ubuntu-20.04-amd64.rb
@@ -1,12 +1,3 @@
platform "ubuntu-20.04-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "focal"

plat.provision_with "curl http://apt.puppetlabs.com/pubkey.gpg | apt-key add - "
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.vmpooler_template "ubuntu-2004-x86_64"
plat.output_dir File.join("deb", plat.get_codename, "PC1")
plat.inherit_from_default
end