-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
281 lines (223 loc) · 10.3 KB
/
Makefile
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
ROOT_DIR = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
ifndef DOCKER_REGISTRY
DOCKER_REGISTRY = normdoc-nexus.lab50:9000
endif
.PHONY: all clean \
astralinux \
smolensk-1.6.libvirt \
smolensk-1.7.libvirt smolensk-1.7-fly.libvirt \
smolensk-1.8.libvirt smolensk-1.8-fly.libvirt \
basealt \
aronia.libvirt aronia.vbox \
aronia-kde.libvirt \
salvia.libvirt salvia.vbox \
salvia-kde.libvirt \
debian \
bookworm.libvirt bookworm.vbox \
bookworm-kde.libvirt \
fedora fedora38 fedora38-kde fedora39 fedora39-kde fedora40 fedora40-kde \
lab50 \
gosjava11.libvirt gosjava11.vbox \
mono.libvirt mono.vbox \
nppkt \
onyx.libvirt onyx.vbox \
onyx.docker \
redsoft \
redos7.libvirt redos7.vbox \
redos7-mate.libvirt \
redos8.libvirt redos8.vbox \
redos8-kde.libvirt \
rosa \
fresh.libvirt fresh.vbox \
fresh.docker \
fresh-kde.libvirt \
chrome-kde cobalt \
ubuntu \
jammy.libvirt jammy.vbox \
noble.libvirt noble.vbox \
noble-kde.libvirt \
openeuler2403 \
openeuler2403.libvirt openeuler2403.vbox
all: astralinux basealt debian fedora lab50 nppkt redsoft rosa ubuntu
clean:
rm -rf packer_templates/astralinux/qemu
rm -rf packer_templates/basealt/qemu
rm -rf packer_templates/basealt/virtualbox-iso
rm -rf packer_templates/debian/qemu
rm -rf packer_templates/debian/virtualbox-iso
rm -f packer_templates/fedora/*.box
rm -rf packer_templates/lab50/qemu
rm -rf packer_templates/lab50/virtualbox-iso
rm -rf packer_templates/nppkt/qemu
rm -rf packer_templates/redsoft/qemu
rm -rf packer_templates/redsoft/virtualbox-iso
rm -rf packer_templates/rosa/qemu
rm -rf packer_templates/rosa/virtualbox-iso
rm -rf packer_templates/ubuntu/qemu
rm -rf packer_templates/ubuntu/virtualbox-iso
astralinux: smolensk-1.6.libvirt smolensk-1.6-fly.libvirt smolensk-1.7.libvirt smolensk-1.7-fly.libvirt smolensk-1.8.libvirt smolensk-1.8-fly.libvirt
smolensk-1.6.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.6.box
cd packer_templates/astralinux; packer build -only qemu.smolensk astra-1.6.pkr.hcl
smolensk-1.6-fly.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.6-fly.box
cd packer_templates/astralinux; packer build -only qemu.smolensk-fly astra-1.6.pkr.hcl
smolensk-1.7.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.7.box
cd packer_templates/astralinux; packer build -only qemu.smolensk astra-1.7.pkr.hcl
smolensk-1.7-fly.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.7-fly.box
cd packer_templates/astralinux; packer build -only qemu.smolensk-fly astra-1.7.pkr.hcl
smolensk-1.8.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.8.box
cd packer_templates/astralinux; packer build -only qemu.smolensk astra-1.8.pkr.hcl
smolensk-1.8-fly.libvirt:
rm -f packer_templates/astralinux/qemu/smolensk-1.8-fly.box
cd packer_templates/astralinux; packer build -only qemu.smolensk-fly astra-1.8.pkr.hcl
basealt: aronia.libvirt aronia.vbox aronia-kde.libvirt salvia.libvirt salvia.vbox salvia-kde.libvirt
aronia.libvirt:
rm -f packer_templates/basealt/qemu/aronia.box
cd packer_templates/basealt; packer build -only qemu.aronia aronia.pkr.hcl
aronia.vbox:
rm -f packer_templates/basealt/virtualbox-iso/aronia.box
cd packer_templates/basealt; packer build -only virtualbox-iso.aronia aronia.pkr.hcl
aronia-kde.libvirt:
rm -f packer_templates/basealt/qemu/aronia-kde.box
cd packer_templates/basealt; packer build -only qemu.aronia-kde aronia.pkr.hcl
salvia.libvirt:
rm -f packer_templates/basealt/qemu/salvia.box
cd packer_templates/basealt; packer build -only qemu.salvia salvia.pkr.hcl
salvia.vbox:
rm -f packer_templates/basealt/virtualbox-iso/salvia.box
cd packer_templates/basealt; packer build -only virtualbox-iso.salvia salvia.pkr.hcl
salvia-kde.libvirt:
rm -f packer_templates/basealt/qemu/salvia-kde.box
cd packer_templates/basealt; packer build -only qemu.salvia-kde salvia.pkr.hcl
debian: bookworm.libvirt bookworm.vbox bookworm-kde.libvirt
bookworm.libvirt:
rm -f packer_templates/debian/qemu/bookworm.box
cd packer_templates/debian; packer build -only qemu.bookworm bookworm.pkr.hcl
bookworm.vbox:
rm -f packer_templates/debian/virtualbox-iso/bookworm.box
cd packer_templates/debian; packer build -only virtualbox-iso.bookworm bookworm.pkr.hcl
bookworm-kde.libvirt:
rm -f packer_templates/debian/qemu/bookworm-kde.box
cd packer_templates/debian; packer build -only qemu.bookworm-kde bookworm.pkr.hcl
fedora: fedora38 fedora38-kde fedora39 fedora39-kde fedora40 fedora40-kde
fedora38:
rm -f packer_templates/fedora/fedora38.box
cd packer_templates/fedora; packer build -only qemu.fedora38 fedora38.pkr.hcl
fedora38-kde:
rm -f packer_templates/fedora/fedora38-kde.box
cd packer_templates/fedora; packer build -only qemu.fedora38-kde fedora38.pkr.hcl
fedora39:
rm -f packer_templates/fedora/fedora39.box
cd packer_templates/fedora; packer build -only qemu.fedora39 fedora39.pkr.hcl
fedora39-kde:
rm -f packer_templates/fedora/fedora39-kde.box
cd packer_templates/fedora; packer build -only qemu.fedora39-kde fedora39.pkr.hcl
fedora40:
rm -f packer_templates/fedora/fedora40.box
cd packer_templates/fedora; packer build -only qemu.fedora40 fedora40.pkr.hcl
fedora40-kde:
rm -f packer_templates/fedora/fedora40-kde.box
cd packer_templates/fedora; packer build -only qemu.fedora40-kde fedora40.pkr.hcl
lab50: gosjava11.libvirt gosjava11.vbox mono.libvirt mono.vbox
gosjava11.libvirt:
rm -f packer_templates/lab50/qemu/gosjava11.box
cd packer_templates/lab50; packer build -only qemu.gosjava11 gosjava.pkr.hcl
gosjava11.vbox:
rm -f packer_templates/lab50/virtualbox-iso/gosjava11.box
cd packer_templates/lab50; packer build -only virtualbox-iso.gosjava11 gosjava.pkr.hcl
mono.libvirt:
rm -f packer_templates/lab50/qemu/mono.box
cd packer_templates/lab50; packer build -only qemu.mono mono.pkr.hcl
mono.vbox:
rm -f packer_templates/lab50/virtualbox-iso/mono.box
cd packer_templates/lab50; packer build -only virtualbox-iso.mono mono.pkr.hcl
nppkt: onyx.libvirt onyx.vbox
onyx.libvirt:
rm -f packer_templates/nppkt/qemu/onyx.box
cd packer_templates/nppkt; packer build -only qemu.onyx onyx.pkr.hcl
onyx.vbox:
rm -f packer_templates/nppkt/virtualbox-iso/onyx.box
cd packer_templates/nppkt; packer build -only virtualbox-iso.onyx onyx.pkr.hcl
onyx.docker:
ifneq ($(shell id -u), 0)
@echo 'You are not root.'
exit 1
endif
ifndef OSNOVA_CREDENTIALS
@echo 'Environment variable OSNOVA_CREDENTIALS not found.'
exit 1
endif
$(eval INSTALLROOT = "${ROOT_DIR}/docker/nppkt/installroot")
@echo "Building in ${INSTALLROOT}."
rm -rf "${INSTALLROOT}"
mmdebstrap --mode=unshare --keyring=./osnova.asc --include=systemd-container --aptopt='APT::Install-Recommends false' --aptopt='APT::AutoRemove::SuggestsImportant false' --aptopt='APT::AutoRemove::RecommendsImportant false' --aptopt='Acquire::Languages "none"' --merged-usr --components=main,contrib,non-free onyx "${INSTALLROOT}" "https://${OSNOVA_CREDENTIALS}@dl.nppct.ru/onyx/stable/repos/disk1"
@echo "Using docker registry ${DOCKER_REGISTRY}."
docker build -f "${ROOT_DIR}/docker/nppkt/Dockerfile" -t "${DOCKER_REGISTRY}/nppkt/onyx" "${INSTALLROOT}"
redsoft: redos7.libvirt redos7.vbox redos7-mate.libvirt redos8.libvirt redos8.vbox redos8-kde.libvirt
redos7.libvirt:
rm -f packer_templates/redsoft/qemu/redos7.box
cd packer_templates/redsoft; packer build -only qemu.redos7 redos7.pkr.hcl
redos7.vbox:
rm -f packer_templates/redsoft/virtualbox-iso/redos7.box
cd packer_templates/redsoft; packer build -only virtualbox-iso.redos7 redos7.pkr.hcl
redos7-mate.libvirt:
rm -f packer_templates/redsoft/qemu/redos7-mate.box
cd packer_templates/redsoft; packer build -only qemu.redos7-mate redos7.pkr.hcl
redos8.libvirt:
rm -f packer_templates/redsoft/qemu/redos8.box
cd packer_templates/redsoft; packer build -only qemu.redos8 redos8.pkr.hcl
redos8.vbox:
rm -f packer_templates/redsoft/virtualbox-iso/redos8.box
cd packer_templates/redsoft; packer build -only virtualbox-iso.redos8 redos8.pkr.hcl
redos8-kde.libvirt:
rm -f packer_templates/redsoft/qemu/redos8-kde.box
cd packer_templates/redsoft; packer build -only qemu.redos8-kde redos8.pkr.hcl
rosa: fresh.libvirt fresh.vbox fresh-kde.libvirt
fresh.libvirt:
rm -f packer_templates/rosa/qemu/fresh-server.box
cd packer_templates/rosa; packer build -only qemu.fresh-server rosa.pkr.hcl
fresh.vbox:
rm -f packer_templates/rosa/virtualbox-iso/fresh-server.box
cd packer_templates/rosa; packer build -only virtualbox-iso.fresh-server rosa.pkr.hcl
fresh.docker:
ifneq ($(shell id -u), 0)
@echo 'You are not root.'
exit 1
endif
$(eval PACKAGES = branding-configs-fresh-desktop systemd util-linux rootfiles)
$(eval INSTALLROOT = "${ROOT_DIR}/docker/rosa-fresh/installroot")
@echo "Building in ${INSTALLROOT}."
rm -rf "${INSTALLROOT}"
dnf install -y --nogpgcheck --releasever 2021.1 --config "${ROOT_DIR}/docker/rosa-fresh/rosa-main-x86_64.repo" --installroot "${INSTALLROOT}" ${PACKAGES}
@echo "Using docker registry ${DOCKER_REGISTRY}."
docker build -f "${ROOT_DIR}/docker/rosa-fresh/Dockerfile" -t "${DOCKER_REGISTRY}/rosa-fresh" "${INSTALLROOT}"
fresh-kde.libvirt:
rm -f packer_templates/rosa/qemu/fresh-kde.box
cd packer_templates/rosa; packer build -only qemu.fresh-kde rosa.pkr.hcl
ubuntu: jammy.libvirt jammy.vbox noble.libvirt noble.vbox noble-kde.libvirt
jammy.libvirt:
rm -f packer_templates/ubuntu/qemu/jammy.box
cd packer_templates/ubuntu; packer build -only qemu.jammy jammy.pkr.hcl
jammy.vbox:
rm -f packer_templates/ubuntu/virtualbox-iso/jammy.box
cd packer_templates/ubuntu; packer build -only virtualbox-iso.jammy jammy.pkr.hcl
noble.libvirt:
rm -f packer_templates/ubuntu/qemu/noble.box
cd packer_templates/ubuntu; packer build -only qemu.noble noble.pkr.hcl
noble.vbox:
rm -f packer_templates/ubuntu/virtualbox-iso/noble.box
cd packer_templates/ubuntu; packer build -only virtualbox-iso.noble noble.pkr.hcl
noble-kde.libvirt:
rm -f packer_templates/ubuntu/qemu/noble-kde.box
cd packer_templates/ubuntu; packer build -only qemu.noble-kde noble.pkr.hcl
openeuler2403: openeuler2403.libvirt openeuler2403.vbox
openeuler2403.libvirt:
rm -f packer_templates/openeuler/qemu/openeuler2403.box
cd packer_templates/openeuler; packer build -only qemu.openeuler2403 openeuler2403.pkr.hcl
openeuler2403.vbox:
rm -f packer_templates/openeuler/virtualbox-iso/openeuler2403.box
cd packer_templates/openeuler; packer build -only virtualbox-iso.openeuler2403 openeuler2403.pkr.hcl