Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions component_versions/version_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ firmware:
edk2: stable202411
package:
swtpm: 0.10.0
numactl: 2.0.19
62 changes: 62 additions & 0 deletions images/packages/binaries/numactl/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
image: {{ $.ImageType }}/{{ $.ImageName }}
final: false
fromImage: builder/scratch
import:
- image: {{ $.ImageType }}/{{ $.ImageName }}-builder
add: /out
to: /numactl
before: setup

---
{{- $version := get $.Package $.ImageName }}
{{- $gitRepoUrl := "numactl/numactl.git" }}

{{- $name := print $.ImageName "-dependencies" -}}
{{- define "$name" -}}
packages:
- gcc
- git pkg-config trousers
- automake autoconf make libtool
{{- end -}}

{{ $builderDependencies := include "$name" . | fromYaml }}

image: {{ $.ImageType }}/{{ $.ImageName }}-builder
final: false
fromImage: builder/alt
secrets:
- id: SOURCE_REPO
value: {{ $.SOURCE_REPO_GIT }}
shell:
beforeInstall:
- |
apt-get update && apt-get install -y \
{{ $builderDependencies.packages | join " " }}
apt-get clean
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin

install:
- |
OUTDIR=/out
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config

git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src
cd /src

./autogen.sh

./configure --prefix=/usr --libdir=/usr/lib64 --enable-static=no

make -j$(nproc)

make DESTDIR=$OUTDIR install

strip $OUTDIR/usr/bin/*

# We don't need man, test and samples files
rm -rf $OUTDIR/usr/include
rm -rf $OUTDIR/usr/share
rm -rf $OUTDIR/usr/lib64/pkgconfig
rm -rf $OUTDIR/usr/bin/numademo

27 changes: 16 additions & 11 deletions images/virt-launcher/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ libs:
- libdaxctl-devel
- libfuse3-devel
- rdma-core-devel
- libnuma-devel
- bzlib-devel
- liblzo2-devel
- libsnappy-devel
Expand Down Expand Up @@ -113,7 +112,6 @@ libs:
- libtirpc-devel
- libclocale
- libLLVMSPIRVLib-devel
- libswtpm-devel
packages:
- acl
- attr
Expand All @@ -126,7 +124,6 @@ packages:
- iptables
- libffi8
- nftables
- numactl
- openssl
- passt
- pcre
Expand All @@ -151,7 +148,7 @@ binaries:
# Dmidecode
- /usr/sbin/biosdecode /usr/sbin/dmidecode
# Numactl
- /usr/bin/memhog /usr/bin/migratepages /usr/bin/migspeed /usr/bin/numactl /usr/bin/numademo /usr/bin/numastat
- /usr/bin/memhog /usr/bin/migratepages /usr/bin/migspeed /usr/bin/numactl /usr/bin/numastat
# Hwclock
- /usr/sbin/hwclock
{{- end -}}
Expand Down Expand Up @@ -239,7 +236,12 @@ import:

- image: packages/binaries/swtpm
add: /swtpm
to: /
to: /swtpm
before: install

- image: packages/binaries/numactl
add: /numactl
to: /numactl
before: install

- image: tools/coreutils
Expand All @@ -263,7 +265,7 @@ shell:
apt-get update && apt-get install -y {{ $virtLauncherDependencies.libs | join " " }} {{ $virtLauncherDependencies.packages | join " " }}

# libtpms libtpms-devel require version 0.10 that in sisyphus repo
cat >/etc/apt/sources.list.d/alt-sisyphus.list<<EOF
cat >/etc/apt/sources.list.d/alt-sisyphus.list<<EOF
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus x86_64 classic
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic
EOF
Expand All @@ -289,24 +291,27 @@ shell:
echo "find and copy additional libs"
FILES=$(find /VBINS/usr/bin/ -type f)
FILES+=" $(find /VBINS/usr/sbin/ -type f)"

LIBS="/usr/lib64/libbsd.so* /usr/lib64/libnbd.so* /usr/lib64/libfuse3.so*"
LIBS+=" /usr/lib64/libjson-c.so* /usr/lib64/libssh.so* /usr/lib64/libssh2.so*"
LIBS+=" /usr/lib64/libtpms* /usr/lib64/libjson* /usr/lib64/libfuse*"
LIBS+=" /usr/lib64/libxml2.so* /usr/lib64/libgcc_s*"

echo "Relocate additional libs for files in /VBINS"
./relocate_binaries.sh -i "$FILES" -o /VBINS

echo "Relocate additional libs to /VBINS"
./relocate_binaries.sh -i "$LIBS" -o /VBINS

cp -a /VBINS/. /relocate

cp -a /swtpm/. /
cp -a /numactl/. /

echo "Show libs after relocation in /relocate/usr/lib64"
ls -la /relocate/usr/lib64
# Cleanup
rm -rf /{VBINS,qemu-bins,libvirt-bins}
rm -rf /{VBINS,qemu-bins,libvirt-bins,swtpm,numactl}

setup:
- |
Expand Down Expand Up @@ -382,7 +387,7 @@ shell:

echo "List files in /relocate/usr/local/lib64"
ls -la usr/local/lib64

- |
cd /relocate

Expand Down Expand Up @@ -455,7 +460,7 @@ shell:
apt-get update && apt-get install --yes gcc musl-dev musl-tools
apt-get clean
install:
- |
- |
echo "Building simple app that prints I'am temp pod"
mkdir -p /bins
musl-gcc -static -Os -o /bins/temp_pod temp_pod.c
Expand Down
1 change: 1 addition & 0 deletions images/virtualization-artifact/pkg/common/kvvm/kvvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func DeletePodByKVVMI(ctx context.Context, cli client.Client, kvvmi *virtv1.Virt
if pod == nil {
return nil
}

return object.DeleteObject(ctx, cli, pod, opts)
}

Expand Down