Skip to content

Commit 453f76d

Browse files
committed
move libvirt to packages
Signed-off-by: Maksim Fedotov <[email protected]>
1 parent 5e5d08c commit 453f76d

File tree

8 files changed

+27
-24
lines changed

8 files changed

+27
-24
lines changed

images/libvirt/patches/001-disable-ro-and-admin-servers.patch renamed to images/packages/libvirt/patches/001-disable-ro-and-admin-servers.patch

File renamed without changes.

images/libvirt/patches/002-auth-pid-restriction.patch renamed to images/packages/libvirt/patches/002-auth-pid-restriction.patch

File renamed without changes.

images/libvirt/patches/002-treat-getpeercon-eintval-as-success.patch renamed to images/packages/libvirt/patches/002-treat-getpeercon-eintval-as-success.patch

File renamed without changes.
Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
---
2+
image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}
3+
final: false
4+
fromImage: builder/scratch
5+
import:
6+
- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder
7+
add: /out
8+
to: /{{ $.ImageName }}
9+
before: setup
10+
111
---
212
{{- $gitRepoName := $.ImageName }}
313
{{- $version := get $.Firmware $gitRepoName }}
414
{{- $gitRepoUrl := "libvirt/libvirt.git" }}
515

6-
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
16+
image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-src-artifact
717
final: false
818
fromImage: builder/src
919
git:
10-
- add: {{ .ModuleDir }}/images/{{ .ImageName }}
20+
- add: {{ .ModuleDir }}/images/packages/{{ .ImageName }}
1121
to: /src
1222
includePaths:
1323
- patches
@@ -92,15 +102,15 @@ packages:
92102
{{- end -}}
93103

94104
{{ $builderDependencies := include "$name" . | fromYaml }}
95-
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
105+
image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder
96106
final: false
97107
fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/alt" "builder/alt-go-svace" }}
98108
import:
99-
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
109+
- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-src-artifact
100110
add: /src/{{ $gitRepoName }}-{{ $version }}
101111
to: /{{ $gitRepoName }}-{{ $version }}
102112
before: install
103-
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
113+
- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-src-artifact
104114
add: /src/patches
105115
to: /patches
106116
before: install
@@ -198,14 +208,15 @@ shell:
198208
199209
setup:
200210
- |
211+
OUTDIR=/out
201212
cd /{{ $gitRepoName }}-{{ $version }}
202-
DESTDIR=/BINS ninja -C build install
203-
rm -rf /BINS/var
204-
rm -rf /BINS/etc/libvirt/qemu.conf
205-
rm -rf /BINS/etc/libvirt/virtqemud.conf
206-
find /BINS -type f -executable | while read -r execfile; do
213+
DESTDIR=$OUTDIR ninja -C build install
214+
rm -rf $OUTDIR/var
215+
rm -rf $OUTDIR/etc/libvirt/qemu.conf
216+
rm -rf $OUTDIR/etc/libvirt/virtqemud.conf
217+
find $OUTDIR -type f -executable | while read -r execfile; do
207218
if strip "$execfile"; then
208219
echo "Stripped: $execfile"
209220
fi
210221
done
211-
222+
tree -hp $OUTDIR

images/packages/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
{{- $_ := set $ctx "SVACE_ANALYZE_SSH_USER" $Root.SVACE_ANALYZE_SSH_USER }}
3636
{{- $_ := set $ctx "SVACE_ANALYZE_HOST" $Root.SVACE_ANALYZE_HOST }}
3737
{{- $_ := set $ctx "SVACE_IMAGE_SUFFIX" $Root.SVACE_IMAGE_SUFFIX }}
38+
{{- $_ := set $ctx "Firmware" $Root.Firmware }}
3839

3940
{{ include "module_image_template" $ctx }}
4041

images/virt-artifact/werf.inc.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ packages:
4040
- libtirpc libmd util-linux
4141
- pcre2
4242
- glibc
43+
- libvirt
4344
{{- end -}}
4445

4546
{{ $builderDependencies := include "$name" . | fromYaml }}
@@ -60,10 +61,6 @@ import:
6061
add: /src/kubevirt
6162
to: /kubevirt
6263
before: install
63-
- image: {{ .ModuleNamePrefix }}libvirt
64-
add: /BINS
65-
to: /libvirt
66-
before: install
6764
{{- include "importPackageImages" (list . $builderDependencies.packages "install") -}}
6865
shell:
6966
beforeInstall:
@@ -78,7 +75,6 @@ shell:
7875
- |
7976
# Install packages
8077
PKGS="{{ $builderDependencies.packages | join " " }}"
81-
PKGS+=" libvirt"
8278
for pkg in $PKGS; do
8379
cp -a /$pkg/. /
8480
rm -rf /$pkg

images/virt-launcher/werf.inc.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ packages:
131131
- glibc nghttp3 ngtcp2 nghttp2 libpsl libidn2 libgmp
132132
- openldap openssl
133133
- e2fsprogs libxcrypt lvm2 libjson-glib
134+
- libvirt
134135
{{- end -}}
135136

136137
{{ $builderDependencies := include "$name" . | fromYaml }}
@@ -161,8 +162,8 @@ git:
161162
- nsswitch.conf
162163
import:
163164
# Libvirt and QEMU libraries and binaries
164-
- image: {{ .ModuleNamePrefix }}libvirt
165-
add: /BINS
165+
- image: {{ .ModuleNamePrefix }}packages/libvirt
166+
add: /libvirt
166167
to: /libvirt-bins
167168
before: install
168169
- image: {{ .ModuleNamePrefix }}qemu
@@ -405,11 +406,6 @@ git:
405406
stageDependencies:
406407
install:
407408
- '**/*'
408-
import:
409-
- image: {{ .ModuleNamePrefix }}libvirt
410-
add: /BINS
411-
to: /libvirt
412-
before: install
413409
{{- include "importPackageImages" (list . $builderDependencies.packages "install") -}}
414410
secrets:
415411
- id: GOPROXY
@@ -423,7 +419,6 @@ shell:
423419
- |
424420
# Install packages
425421
PKGS="{{ $builderDependencies.packages | join " " }}"
426-
PKGS+=" libvirt"
427422
for pkg in $PKGS; do
428423
cp -a /$pkg/. /
429424
rm -rf /$pkg

0 commit comments

Comments
 (0)