Skip to content

Commit d1cac7d

Browse files
fix(core): add missing libs for swtpm
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent 8af16d6 commit d1cac7d

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

images/virt-launcher/werf.inc.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ import:
239239
- vlctl
240240
- image: packages/binaries/swtpm
241241
add: /swtpm
242-
to: /relocate
243-
after: setup
242+
to: /VBINS
243+
before: install
244244
- image: {{ $.ImageName }}-cbuilder
245245
add: /bins
246246
to: /relocate/usr/bin
@@ -252,12 +252,24 @@ shell:
252252
- |
253253
apt-get update && apt-get install -y {{ $virtLauncherDependencies.libs | join " " }} {{ $virtLauncherDependencies.packages | join " " }}
254254
255+
# libtpms libtpms-devel requares version 0.10 that in sisyphus repo
256+
cat >/etc/apt/sources.list.d/alt-sisyphus.list<<EOF
257+
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic
258+
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic
259+
EOF
260+
apt-get update
261+
apt-get install -y libtpms-devel
262+
rm -f /etc/apt/sources.list.d/alt-sisyphus.list
263+
apt-get update
264+
255265
apt-get clean
266+
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin
256267
install:
257268
- |
258269
echo "Create folder hierarchy in VBINS"
259270
mkdir -p /VBINS/{etc,root}
260271
mkdir -p /VBINS/var/{log/libvirt/qemu,log/swtpm/libvirt/qemu,lib/libvirt/qemu,run/libvirt/qemu}
272+
mkdir -p /VBINS/usr/{lib64/swtpm,share/swtpm}
261273
262274
echo "=====Copy libvirt binaries to temp folder======"
263275
cp -a /libvirt-bins/. /VBINS/
@@ -271,7 +283,7 @@ shell:
271283
272284
LIBS="/usr/lib64/libbsd.so* /usr/lib64/libnbd.so* /usr/lib64/libfuse3.so*"
273285
LIBS+=" /usr/lib64/libjson-c.so* /usr/lib64/libssh.so* /usr/lib64/libssh2.so*"
274-
LIBS+=" /usr/lib64/libtpms.so*"
286+
LIBS+=" /usr/lib64/libtpms* /usr/lib64/libjson* /usr/lib64/libfuse*"
275287
LIBS+=" /usr/lib64/libxml2.so* /usr/lib64/libgcc_s*"
276288
277289
echo "Relocate additional libs for files in /VBINS"

0 commit comments

Comments
 (0)