vanagon 0.19.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -2
- data/lib/vanagon/cli/list.rb +12 -1
- data/lib/vanagon/cli/ship.rb +1 -17
- data/lib/vanagon/component.rb +4 -3
- data/lib/vanagon/component/dsl.rb +21 -15
- data/lib/vanagon/component/source.rb +1 -0
- data/lib/vanagon/component/source/git.rb +30 -5
- data/lib/vanagon/platform.rb +32 -0
- data/lib/vanagon/platform/defaults/debian-10-amd64.rb +11 -0
- data/lib/vanagon/platform/defaults/debian-8-amd64.rb +12 -0
- data/lib/vanagon/platform/defaults/debian-8-i386.rb +12 -0
- data/lib/vanagon/platform/defaults/debian-9-amd64.rb +12 -0
- data/lib/vanagon/platform/defaults/debian-9-i386.rb +12 -0
- data/lib/vanagon/platform/defaults/el-6-i386.rb +11 -0
- data/lib/vanagon/platform/defaults/el-6-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/el-7-aarch64.rb +13 -0
- data/lib/vanagon/platform/defaults/el-7-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/el-8-aarch64.rb +10 -0
- data/lib/vanagon/platform/defaults/el-8-x86_64.rb +10 -0
- data/lib/vanagon/platform/defaults/fedora-30-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/fedora-31-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/fedora-32-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/fedora-34-x86_64.rb +17 -0
- data/lib/vanagon/platform/defaults/osx-10.14-x86_64.rb +21 -0
- data/lib/vanagon/platform/defaults/osx-10.15-x86_64.rb +21 -0
- data/lib/vanagon/platform/defaults/osx-11-x86_64.rb +20 -0
- data/lib/vanagon/platform/defaults/redhatfips-7-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/sles-12-x86_64.rb +11 -0
- data/lib/vanagon/platform/defaults/sles-15-x86_64.rb +10 -0
- data/lib/vanagon/platform/defaults/solaris-11-i386.rb +9 -0
- data/lib/vanagon/platform/defaults/solaris-11-sparc.rb +10 -0
- data/lib/vanagon/platform/defaults/ubuntu-16.04-amd64.rb +12 -0
- data/lib/vanagon/platform/defaults/ubuntu-16.04-i386.rb +12 -0
- data/lib/vanagon/platform/defaults/ubuntu-18.04-amd64.rb +12 -0
- data/lib/vanagon/platform/defaults/ubuntu-20.04-aarch64.rb +11 -0
- data/lib/vanagon/platform/defaults/ubuntu-20.04-amd64.rb +11 -0
- data/lib/vanagon/platform/dsl.rb +30 -2
- data/lib/vanagon/platform/osx.rb +8 -0
- data/lib/vanagon/platform/windows.rb +3 -21
- data/lib/vanagon/project.rb +5 -1
- data/lib/vanagon/utilities.rb +1 -0
- data/lib/vanagon/utilities/extra_files_signer.rb +39 -0
- data/resources/deb/postinst.erb +24 -13
- data/resources/deb/postrm.erb +9 -6
- data/resources/deb/prerm.erb +18 -8
- data/resources/rpm/project.spec.erb +11 -11
- data/spec/lib/vanagon/cli_spec.rb +59 -8
- data/spec/lib/vanagon/component/dsl_spec.rb +45 -8
- data/spec/lib/vanagon/component/source/git_spec.rb +17 -4
- data/spec/lib/vanagon/component_spec.rb +12 -0
- data/spec/lib/vanagon/platform_spec.rb +80 -0
- data/spec/lib/vanagon/utilities/extra_files_signer_spec.rb +90 -0
- data/spec/lib/vanagon/utilities_spec.rb +4 -1
- metadata +60 -29
@@ -0,0 +1,13 @@
|
|
1
|
+
platform "el-7-aarch64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/el/7/aarch64/pl-build-tools-aarch64.repo"
|
7
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/el/7/x86_64/pl-build-tools-x86_64.repo"
|
8
|
+
packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
|
9
|
+
plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
|
10
|
+
plat.install_build_dependencies_with "yum install --assumeyes"
|
11
|
+
plat.cross_compiled true
|
12
|
+
plat.vmpooler_template "redhat-7-x86_64"
|
13
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "el-7-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
|
7
|
+
packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
|
8
|
+
plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "yum install --assumeyes"
|
10
|
+
plat.vmpooler_template "redhat-7-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "el-8-aarch64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
packages = %w(autoconf automake createrepo gcc gcc-c++ rsync cmake make rpm-libs rpm-build libarchive)
|
7
|
+
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
|
+
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
|
+
plat.vmpooler_template "redhat-8-arm64"
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "el-8-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
packages = %w(gcc gcc-c++ autoconf automake createrepo rsync cmake make rpm-libs rpm-build rpm-sign libtool libarchive)
|
7
|
+
plat.provision_with "dnf install -y --allowerasing #{packages.join(' ')}"
|
8
|
+
plat.install_build_dependencies_with "dnf install -y --allowerasing "
|
9
|
+
plat.vmpooler_template "redhat-8-x86_64"
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "fedora-30-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.dist "fc30"
|
6
|
+
|
7
|
+
packages = %w(autoconf automake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs cmake rpm-sign yum-utils)
|
8
|
+
plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
|
10
|
+
plat.vmpooler_template "fedora-30-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "fedora-31-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.dist "fc31"
|
6
|
+
|
7
|
+
packages = %w(autoconf automake cmake createrepo rsync gcc gcc-c++ make rpmdevtools rpm-libs rpm-sign)
|
8
|
+
plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
|
10
|
+
plat.vmpooler_template "fedora-31-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "fedora-32-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.dist "fc32"
|
6
|
+
|
7
|
+
packages = %w(autoconf automake rsync gcc gcc-c++ make rpmdevtools cmake)
|
8
|
+
plat.provision_with "/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "/usr/bin/dnf install -y --best --allowerasing"
|
10
|
+
plat.vmpooler_template "fedora-32-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
platform 'fedora-34-x86_64' do |plat|
|
2
|
+
plat.servicedir '/usr/lib/systemd/system'
|
3
|
+
plat.defaultdir '/etc/sysconfig'
|
4
|
+
plat.servicetype 'systemd'
|
5
|
+
plat.dist 'fc34'
|
6
|
+
|
7
|
+
packages = %w[
|
8
|
+
autoconf automake bzip2-devel gcc gcc-c++ libselinux-devel
|
9
|
+
libsepol libsepol-devel make cmake pkgconfig readline-devel
|
10
|
+
rpmdevtools rsync swig zlib-devel systemtap-sdt-devel
|
11
|
+
perl-lib perl-FindBin
|
12
|
+
]
|
13
|
+
plat.provision_with("/usr/bin/dnf install -y --best --allowerasing #{packages.join(' ')}")
|
14
|
+
|
15
|
+
plat.install_build_dependencies_with '/usr/bin/dnf install -y --best --allowerasing'
|
16
|
+
plat.vmpooler_template 'fedora-34-x86_64'
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
platform "osx-10.14-x86_64" do |plat|
|
2
|
+
plat.servicetype "launchd"
|
3
|
+
plat.servicedir "/Library/LaunchDaemons"
|
4
|
+
plat.codename "mojave"
|
5
|
+
|
6
|
+
plat.provision_with "export HOMEBREW_NO_EMOJI=true"
|
7
|
+
plat.provision_with "export HOMEBREW_VERBOSE=true"
|
8
|
+
plat.provision_with "sudo dscl . -create /Users/test"
|
9
|
+
plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
|
10
|
+
plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
|
11
|
+
plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
|
12
|
+
plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
|
13
|
+
plat.provision_with "sudo dscl . -passwd /Users/test password"
|
14
|
+
plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
|
15
|
+
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
|
16
|
+
plat.provision_with "mkdir -p /etc/homebrew"
|
17
|
+
plat.provision_with "cd /etc/homebrew"
|
18
|
+
plat.provision_with %Q(su test -c 'echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
|
19
|
+
plat.provision_with "sudo chown -R test:admin /Users/test/"
|
20
|
+
plat.vmpooler_template "osx-1014-x86_64"
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
platform "osx-10.15-x86_64" do |plat|
|
2
|
+
plat.servicetype "launchd"
|
3
|
+
plat.servicedir "/Library/LaunchDaemons"
|
4
|
+
plat.codename "catalina"
|
5
|
+
|
6
|
+
plat.provision_with "export HOMEBREW_NO_EMOJI=true"
|
7
|
+
plat.provision_with "export HOMEBREW_VERBOSE=true"
|
8
|
+
plat.provision_with "sudo dscl . -create /Users/test"
|
9
|
+
plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
|
10
|
+
plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
|
11
|
+
plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
|
12
|
+
plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
|
13
|
+
plat.provision_with "sudo dscl . -passwd /Users/test password"
|
14
|
+
plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
|
15
|
+
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
|
16
|
+
plat.provision_with "mkdir -p /etc/homebrew"
|
17
|
+
plat.provision_with "cd /etc/homebrew"
|
18
|
+
plat.provision_with %Q(su test -c 'echo | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"')
|
19
|
+
plat.provision_with "sudo chown -R test:admin /Users/test/"
|
20
|
+
plat.vmpooler_template "osx-1015-x86_64"
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
platform "osx-11-x86_64" do |plat|
|
2
|
+
plat.servicetype "launchd"
|
3
|
+
plat.servicedir "/Library/LaunchDaemons"
|
4
|
+
plat.codename "bigsur"
|
5
|
+
plat.provision_with "export HOMEBREW_NO_EMOJI=true"
|
6
|
+
plat.provision_with "export HOMEBREW_VERBOSE=true"
|
7
|
+
plat.provision_with "sudo dscl . -create /Users/test"
|
8
|
+
plat.provision_with "sudo dscl . -create /Users/test UserShell /bin/bash"
|
9
|
+
plat.provision_with "sudo dscl . -create /Users/test UniqueID 1001"
|
10
|
+
plat.provision_with "sudo dscl . -create /Users/test PrimaryGroupID 1000"
|
11
|
+
plat.provision_with "sudo dscl . -create /Users/test NFSHomeDirectory /Users/test"
|
12
|
+
plat.provision_with "sudo dscl . -passwd /Users/test password"
|
13
|
+
plat.provision_with "sudo dscl . -merge /Groups/admin GroupMembership test"
|
14
|
+
plat.provision_with "echo 'test ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/username"
|
15
|
+
plat.provision_with "mkdir -p /etc/homebrew"
|
16
|
+
plat.provision_with "cd /etc/homebrew"
|
17
|
+
plat.provision_with %Q(su test -c 'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
|
18
|
+
plat.provision_with "sudo chown -R test:admin /Users/test/"
|
19
|
+
plat.vmpooler_template "macos-112-x86_64"
|
20
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "redhatfips-7-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-el-7.noarch.rpm"
|
7
|
+
packages = %w(autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign)
|
8
|
+
plat.provision_with "yum install --assumeyes #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "yum install --assumeyes"
|
10
|
+
plat.vmpooler_template "redhat-fips-7-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "sles-12-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
|
7
|
+
packages = %w(aaa_base autoconf automake rsync gcc make rpm-build)
|
8
|
+
plat.provision_with "zypper -n --no-gpg-checks install -y #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
|
10
|
+
plat.vmpooler_template "sles-12-x86_64"
|
11
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "sles-15-x86_64" do |plat|
|
2
|
+
plat.servicedir "/usr/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/sysconfig"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
|
6
|
+
packages = %w(aaa_base autoconf automake rsync gcc gcc-c++ make rpm-build gettext-tools cmake)
|
7
|
+
plat.provision_with "zypper -n --no-gpg-checks install -y #{packages.join(' ')}"
|
8
|
+
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
|
9
|
+
plat.vmpooler_template "sles-15-x86_64"
|
10
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
platform "solaris-11-i386" do |plat|
|
2
|
+
plat.servicedir "/lib/svc/manifest"
|
3
|
+
plat.defaultdir "/lib/svc/method"
|
4
|
+
plat.servicetype "smf"
|
5
|
+
|
6
|
+
plat.vmpooler_template "solaris-11-x86_64"
|
7
|
+
plat.add_build_repository "http://solaris-11-reposync.delivery.puppetlabs.net:81", "puppetlabs.com"
|
8
|
+
plat.install_build_dependencies_with "pkg install ", " || [[ $? -eq 4 ]]"
|
9
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
platform "solaris-11-sparc" do |plat|
|
2
|
+
plat.servicedir "/lib/svc/manifest"
|
3
|
+
plat.defaultdir "/lib/svc/method"
|
4
|
+
plat.servicetype "smf"
|
5
|
+
|
6
|
+
plat.cross_compiled true
|
7
|
+
plat.vmpooler_template "solaris-11-x86_64"
|
8
|
+
plat.add_build_repository "http://solaris-11-reposync.delivery.puppetlabs.net:81", "puppetlabs.com"
|
9
|
+
plat.install_build_dependencies_with "pkg install ", " || [[ $? -eq 4 ]]"
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
platform "ubuntu-16.04-amd64" do |plat|
|
2
|
+
plat.servicedir "/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/default"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.codename "xenial"
|
6
|
+
|
7
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
|
8
|
+
packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
|
9
|
+
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
|
10
|
+
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
|
11
|
+
plat.vmpooler_template "ubuntu-1604-x86_64"
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
platform "ubuntu-16.04-i386" do |plat|
|
2
|
+
plat.servicedir "/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/default"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.codename "xenial"
|
6
|
+
|
7
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
|
8
|
+
packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
|
9
|
+
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
|
10
|
+
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
|
11
|
+
plat.vmpooler_template "ubuntu-1604-i386"
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
platform "ubuntu-18.04-amd64" do |plat|
|
2
|
+
plat.servicedir "/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/default"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.codename "bionic"
|
6
|
+
|
7
|
+
plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/debian/pl-build-tools-release-#{plat.get_codename}.deb"
|
8
|
+
packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot)
|
9
|
+
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
|
10
|
+
plat.install_build_dependencies_with "export DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
|
11
|
+
plat.vmpooler_template "ubuntu-1804-x86_64"
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "ubuntu-20.04-aarch64" do |plat|
|
2
|
+
plat.servicedir "/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/default"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.codename "focal"
|
6
|
+
|
7
|
+
packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot cmake)
|
8
|
+
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
|
10
|
+
plat.vmpooler_template "ubuntu-2004-arm64"
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
platform "ubuntu-20.04-amd64" do |plat|
|
2
|
+
plat.servicedir "/lib/systemd/system"
|
3
|
+
plat.defaultdir "/etc/default"
|
4
|
+
plat.servicetype "systemd"
|
5
|
+
plat.codename "focal"
|
6
|
+
|
7
|
+
packages = %w(build-essential devscripts make quilt pkg-config debhelper rsync fakeroot cmake)
|
8
|
+
plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends #{packages.join(' ')}"
|
9
|
+
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
|
10
|
+
plat.vmpooler_template "ubuntu-2004-x86_64"
|
11
|
+
end
|
data/lib/vanagon/platform/dsl.rb
CHANGED
@@ -10,6 +10,7 @@ require 'vanagon/platform/solaris_11'
|
|
10
10
|
require 'vanagon/platform/windows'
|
11
11
|
require 'vanagon/logger'
|
12
12
|
require 'securerandom'
|
13
|
+
require 'ostruct'
|
13
14
|
require 'uri'
|
14
15
|
|
15
16
|
class Vanagon
|
@@ -84,6 +85,13 @@ class Vanagon
|
|
84
85
|
method_name.to_s.start_with?('get_') || super
|
85
86
|
end
|
86
87
|
|
88
|
+
def inherit_from_default(name = @name)
|
89
|
+
default_file = File.join(__dir__, 'defaults', "#{name}.rb")
|
90
|
+
default_object = Vanagon::Platform::DSL.new(name)
|
91
|
+
|
92
|
+
@platform = default_object.instance_eval(File.read(default_file), default_file, 1)
|
93
|
+
end
|
94
|
+
|
87
95
|
# Adds an arbitrary environment variable to a Platform, which will be
|
88
96
|
# merged with any environment variables defined by the Project into the
|
89
97
|
# rendered Makefile
|
@@ -206,6 +214,11 @@ class Vanagon
|
|
206
214
|
@platform.provision_with(command)
|
207
215
|
end
|
208
216
|
|
217
|
+
# Clears the provisioning commands array
|
218
|
+
def clear_provisioning
|
219
|
+
@platform.provisioning.clear
|
220
|
+
end
|
221
|
+
|
209
222
|
# Set the command to install any needed build dependencies for the target machine
|
210
223
|
#
|
211
224
|
# @param command [String] Command to install build dependencies for the target machine
|
@@ -219,6 +232,11 @@ class Vanagon
|
|
219
232
|
# @param dir [String] Directory where service files live on the platform
|
220
233
|
def servicedir(dir)
|
221
234
|
@platform.servicedir = dir
|
235
|
+
|
236
|
+
# Add to the servicetypes array if we haven't already
|
237
|
+
if @platform.servicetype && @platform.servicedir && @platform.servicetypes.select { |s| s.servicetype == @platform.servicetype }.empty?
|
238
|
+
@platform.servicetypes << OpenStruct.new(:servicetype => @platform.servicetype, :servicedir => @platform.servicedir)
|
239
|
+
end
|
222
240
|
end
|
223
241
|
|
224
242
|
# Set the directory where default or sysconfig files live for the platform
|
@@ -231,8 +249,18 @@ class Vanagon
|
|
231
249
|
# Set the servicetype for the platform so that services can be installed correctly.
|
232
250
|
#
|
233
251
|
# @param type [String] service type for the platform ('sysv' for example)
|
234
|
-
|
235
|
-
|
252
|
+
# @param servicedir [String] service dir for this platform and service type ('/etc/init.d' for example). Optional.
|
253
|
+
def servicetype(type, servicedir: nil) # rubocop:disable Metrics/AbcSize
|
254
|
+
if servicedir
|
255
|
+
@platform.servicetypes << OpenStruct.new(:servicetype => type, :servicedir => servicedir)
|
256
|
+
else
|
257
|
+
@platform.servicetype = type
|
258
|
+
end
|
259
|
+
|
260
|
+
# Add to the servicetypes array if we haven't already
|
261
|
+
if @platform.servicetype && @platform.servicedir && @platform.servicetypes.select { |s| s.servicetype == @platform.servicetype }.empty?
|
262
|
+
@platform.servicetypes << OpenStruct.new(:servicetype => @platform.servicetype, :servicedir => @platform.servicedir)
|
263
|
+
end
|
236
264
|
end
|
237
265
|
|
238
266
|
# Set the list of possible host to perform a build on (when not using
|
data/lib/vanagon/platform/osx.rb
CHANGED
@@ -35,6 +35,11 @@ class Vanagon
|
|
35
35
|
bom_install = []
|
36
36
|
end
|
37
37
|
|
38
|
+
if project.extra_files_to_sign.any?
|
39
|
+
sign_commands = Vanagon::Utilities::ExtraFilesSigner.commands(project, @mktemp, "/osx/build/root/#{project.name}-#{project.version}")
|
40
|
+
else
|
41
|
+
sign_commands = []
|
42
|
+
end
|
38
43
|
|
39
44
|
# Setup build directories
|
40
45
|
["bash -c 'mkdir -p $(tempdir)/osx/build/{dmg,pkg,scripts,resources,root,payload,plugins}'",
|
@@ -51,6 +56,9 @@ class Vanagon
|
|
51
56
|
|
52
57
|
bom_install,
|
53
58
|
|
59
|
+
# Sign extra files
|
60
|
+
sign_commands,
|
61
|
+
|
54
62
|
# Package the project
|
55
63
|
"(cd $(tempdir)/osx/build/; #{@pkgbuild} --root root/#{project.name}-#{project.version} \
|
56
64
|
--scripts $(tempdir)/osx/build/scripts \
|
@@ -214,28 +214,10 @@ class Vanagon
|
|
214
214
|
"gunzip -c #{project.name}-#{project.version}.tar.gz | '#{@tar}' -C '$(tempdir)/SourceDir' --strip-components 1 -xf -"
|
215
215
|
]
|
216
216
|
|
217
|
-
|
218
|
-
|
219
|
-
tempdir = nil
|
220
|
-
# Skip signing extra files if logging into the signing_host fails
|
221
|
-
# This enables things like CI being able to sign the additional files,
|
222
|
-
# but locally triggered builds by developers who don't have access to
|
223
|
-
# the signing host just print a message and skip the signing.
|
224
|
-
Vanagon::Utilities.retry_with_timeout(3, 5) do
|
225
|
-
tempdir = Vanagon::Utilities::remote_ssh_command("#{project.signing_username}@#{project.signing_hostname}", "#{@mktemp} 2>/dev/null", return_command_output: true)
|
226
|
-
end
|
227
|
-
project.extra_files_to_sign.each do |file|
|
228
|
-
file_location = File.join(tempdir, File.basename(file))
|
229
|
-
make_commands << [
|
230
|
-
"rsync -e '#{Vanagon::Utilities.ssh_command}' -rHlv --no-perms --no-owner --no-group #{File.join('$(tempdir)', 'SourceDir', file)} #{project.signing_username}@#{project.signing_hostname}:#{tempdir}",
|
231
|
-
"#{Vanagon::Utilities.ssh_command} #{project.signing_username}@#{project.signing_hostname} #{project.signing_command} #{file_location}",
|
232
|
-
"rsync -e '#{Vanagon::Utilities.ssh_command}' -rHlv -O --no-perms --no-owner --no-group #{project.signing_username}@#{project.signing_hostname}:#{file_location} #{File.join('$(tempdir)', 'SourceDir', file)}"
|
233
|
-
]
|
234
|
-
end
|
235
|
-
rescue RuntimeError
|
236
|
-
VanagonLogger.error "Unable to connect to #{project.signing_username}@#{project.signing_hostname}, skipping signing extra files: #{project.extra_files_to_sign.join(',')}"
|
237
|
-
end
|
217
|
+
if project.extra_files_to_sign.any?
|
218
|
+
make_commands << Vanagon::Utilities::ExtraFilesSigner.commands(project, @mktemp, 'SourceDir')
|
238
219
|
end
|
220
|
+
|
239
221
|
make_commands << [
|
240
222
|
"mkdir -p $(tempdir)/#{misc_dir}",
|
241
223
|
# Need to use awk here to convert to DOS format so that notepad can display file correctly.
|
data/lib/vanagon/project.rb
CHANGED
@@ -351,10 +351,14 @@ class Vanagon
|
|
351
351
|
# will return nil
|
352
352
|
#
|
353
353
|
# @param [string] name of service to grab
|
354
|
-
# @return [@component.service obj] specific service
|
354
|
+
# @return [@component.service obj] specific service, or array of services
|
355
|
+
# if there's more than one
|
355
356
|
def get_service(name)
|
356
357
|
components.each do |component|
|
357
358
|
if component.name == name
|
359
|
+
if component.service.size == 1
|
360
|
+
return component.service.first
|
361
|
+
end
|
358
362
|
return component.service
|
359
363
|
end
|
360
364
|
end
|