forked from OpenNebula/addon-context-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
targets.sh
170 lines (156 loc) · 6.59 KB
/
targets.sh
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
case "${TARGET}" in
'el6')
NAME=${NAME:-one-context}
RELSUFFIX=${RELSUFFIX:-.el6}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm sysv one}
DEPENDS=${DEPENDS:-util-linux-ng bash curl bind-utils cloud-utils-growpart dracut-modules-growroot ruby rubygem-json sudo shadow-utils open-vm-tools qemu-guest-agent}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
POSTIN=${POSTINST:-pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'el6_ec2')
NAME=${NAME:-one-context-ec2}
RELSUFFIX=${RELSUFFIX:-.el6}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm sysv ec2}
DEPENDS=${DEPENDS:-util-linux-ng bash curl bind-utils cloud-utils-growpart dracut-modules-growroot ruby rubygem-json sudo shadow-utils}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context}
POSTIN=${POSTINST:-pkg/postinstall.ec2 pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall.ec2 pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'el7')
NAME=${NAME:-one-context}
RELSUFFIX=${RELSUFFIX:-.el7}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm systemd one}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart ruby rubygem-json sudo shadow-utils open-vm-tools qemu-guest-agent}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
POSTIN=${POSTINST:-pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'el7_ec2')
NAME=${NAME:-one-context-ec2}
RELSUFFIX=${RELSUFFIX:-.el7}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm systemd ec2}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils cloud-utils-growpart ruby rubygem-json sudo shadow-utils}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context}
POSTIN=${POSTINST:-pkg/postinstall.ec2 pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall.ec2 pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'suse')
NAME=${NAME:-one-context}
RELSUFFIX=${RELSUFFIX:-.suse}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm systemd one}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils growpart ruby sudo shadow open-vm-tools qemu-guest-agent} # rubygem-json}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init cloud-init-config-suse}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
POSTIN=${POSTINST:-pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'suse_ec2')
NAME=${NAME:-one-context-ec2}
RELSUFFIX=${RELSUFFIX:-.suse}
TYPE=${TYPE:-rpm}
TAGS=${TAGS:-rpm systemd ec2}
DEPENDS=${DEPENDS:-util-linux bash curl bind-utils growpart ruby sudo shadow} # rubygem-json}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init cloud-init-config-suse}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context}
POSTIN=${POSTINST:-pkg/postinstall.ec2 pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall.ec2 pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'deb')
NAME=${NAME:-one-context}
RELSUFFIX=${RELSUFFIX:-}
TYPE=${TYPE:-deb}
TAGS=${TAGS:-deb sysv systemd upstart one}
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils ruby python ifupdown acpid sudo passwd open-vm-tools qemu-guest-agent}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context-ec2}
POSTIN=${POSTINST:-pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'deb_ec2')
NAME=${NAME:-one-context-ec2}
RELSUFFIX=${RELSUFFIX:-}
TYPE=${TYPE:-deb}
TAGS=${TAGS:-deb sysv systemd upstart ec2}
DEPENDS=${DEPENDS:-util-linux bash curl bind9-host cloud-utils ruby python ifupdown sudo passwd resolvconf}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-cloud-init}
CONFLICTS=${CONFLICTS:-${REPLACES} one-context}
POSTIN=${POSTINST:-pkg/postinstall.ec2 pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall.ec2 pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-pkg/postupgrade}
;;
'alpine')
NAME=${NAME:-one-context}
RELSUFFIX=${RELSUFFIX:-}
TYPE=${TYPE:-apk}
TAGS=${TAGS:-apk one}
DEPENDS=${DEPENDS:-util-linux bash curl rsync udev iptables sfdisk e2fsprogs-extra keepalived quagga sudo shadow open-vm-tools qemu-guest-agent}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-} #not respected
CONFLICTS=${CONFLICTS:-one-context-ec2}
POSTIN=${POSTINST:-pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-} # FPM 1.9.3 bug: https://github.com/jordansissel/fpm/blob/v1.9.3/lib/fpm/package/apk.rb#L149
;;
'alpine_ec2')
NAME=${NAME:-one-context-ec2}
RELSUFFIX=${RELSUFFIX:-}
TYPE=${TYPE:-apk}
TAGS=${TAGS:-apk ec2}
DEPENDS=${DEPENDS:-util-linux bash curl rsync udev iptables sfdisk e2fsprogs-extra keepalived quagga sudo shadow}
PROVIDES=${PROVIDES:-}
REPLACES=${REPLACES:-} #not respected
CONFLICTS=${CONFLICTS:-one-context}
POSTIN=${POSTINST:-pkg/postinstall.ec2 pkg/postinstall}
PREUN=${PREUN:-pkg/preuninstall.ec2 pkg/preuninstall}
POSTUN=${POSTUN:-pkg/postuninstall}
POSTUP=${POSTUP:-} # FPM 1.9.3 bug: https://github.com/jordansissel/fpm/blob/v1.9.3/lib/fpm/package/apk.rb#L149
;;
'iso')
NAME=${NAME:-one-context-linux}
TYPE=${TYPE:-iso}
;;
'arch')
NAME=${NAME:-one-context}
TYPE=${TYPE:-dir}
TAGS=${TAGS:-arch one}
echo 'ArchLinux target is currently not maintained'
exit 1
;;
*)
echo "Invalid target ${TARGET}"
exit 1
esac