-
Notifications
You must be signed in to change notification settings - Fork 26
/
solaris-10-i386.rb
68 lines (61 loc) · 2.85 KB
/
solaris-10-i386.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
platform "solaris-10-i386" do |plat|
plat.servicedir "/var/svc/manifest"
plat.defaultdir "/lib/svc/method"
plat.servicetype "smf"
plat.vmpooler_template "solaris-10-x86_64"
base_pkgs = %w[arc gnu-idn gpch gtar hea libm wgetu xcu4]
base_url = 'http://pl-build-tools.delivery.puppetlabs.net/solaris/10/depends'
build_pkgs = [
"pl-binutils-2.27-1.i386.pkg.gz",
"pl-cmake-3.2.3-15.i386.pkg.gz",
"pl-gcc-4.8.2-1.i386.pkg.gz"
]
build_url = "http://pl-build-tools.delivery.puppetlabs.net/solaris/10"
plat.provision_with %[echo "# Write the noask file to a temporary directory
# please see man -s 4 admin for details about this file:
# http://www.opensolarisforum.org/man/man4/admin.html
#
# The key thing we don't want to prompt for are conflicting files.
# The other nocheck settings are mostly defensive to prevent prompts
# We _do_ want to check for available free space and abort if there is
# not enough
mail=
# Overwrite already installed instances
instance=overwrite
# Do not bother checking for partially installed packages
partial=nocheck
# Do not bother checking the runlevel
runlevel=nocheck
# Do not bother checking package dependencies (We take care of this)
idepend=nocheck
rdepend=nocheck
# DO check for available free space and abort if there isn't enough
space=quit
# Do not check for setuid files.
setuid=nocheck
# Do not check if files conflict with other packages
conflict=nocheck
# We have no action scripts. Do not check for them.
action=nocheck
# Install to the default base directory.
basedir=default" > /var/tmp/vanagon-noask;
echo "mirror=https://artifactory.delivery.puppetlabs.net/artifactory/generic__remote_opencsw_mirror/testing" > /var/tmp/vanagon-pkgutil.conf;
ln -sf /opt/csw/bin/rsync /usr/bin/rsync;
# RE-6121 openssl 1.0.2e requires functionality not in sytem grep
ln -sf /opt/csw/bin/ggrep /usr/bin/grep;
# RE-5250 - Solaris 10 templates are awful
/opt/csw/bin/pkgutil -l gcc | xargs -I{} pkgrm -n -a /var/tmp/vanagon-noask {};
/opt/csw/bin/pkgutil -l ruby18 | xargs -I{} pkgrm -n -a /var/tmp/vanagon-noask {};
/opt/csw/bin/pkgutil -l readline | xargs -I{} pkgrm -n -a /var/tmp/vanagon-noask {};
/opt/csw/bin/pkgutil --config=/var/tmp/vanagon-pkgutil.conf -y -i rsync gmake pkgconfig ggrep libffi_dev libreadline6 || exit 1;
# Install base build dependencies
for pkg in #{base_pkgs.map { |pkg| "SUNW#{pkg}.pkg.gz" }.join(' ')}; do \
tmpdir=$(mktemp -p /var/tmp -d); (cd ${tmpdir} && curl -O #{base_url}/${pkg} && gunzip -c ${pkg} | pkgadd -d /dev/stdin -a /var/tmp/vanagon-noask all); \
done
# Install component build dependencies
for pkg in #{build_pkgs.join(' ')}; do \
tmpdir=$(mktemp -p /var/tmp -d); (cd ${tmpdir} && curl -O #{build_url}/${pkg} && gunzip -c ${pkg} | pkgadd -d /dev/stdin -a /var/tmp/vanagon-noask all); \
done
ntpdate pool.ntp.org]
plat.output_dir File.join("solaris", "10", "PC1")
end