Skip to content

Commit

Permalink
Finalize deb packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Oct 18, 2023
1 parent f3797a7 commit bba1119
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 14 additions & 6 deletions debian/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@ set -e
VERSION=$1
SELF_TEST_IMG=$2

tmp_dir=.debpkg/usr/lib/yagna/plugins/ya-runtime-vm-nvidia/runtime
tmp_dir=.debpkg/usr/lib/yagna/plugins/ya-runtime-vm-nvidia

mkdir -p ${tmp_dir}
mkdir -p ${tmp_dir}/runtime
mkdir -p .debpkg/DEBIAN

cp "$SELF_TEST_IMG" "${tmp_dir}/self-test.gvmi"
for file in bios-256k.bin efi-virtio.rom initramfs.cpio.gz kvmvapic.bin linuxboot_dma.bin vmlinuz-virt vmrt; do
ln -s ../../ya-runtime-vm/runtime/$file ${tmp_dir}/
cp "$SELF_TEST_IMG" "${tmp_dir}/runtime/self-test.gvmi"
for file in bios-256k.bin efi-virtio.rom kvmvapic.bin linuxboot_dma.bin vmrt; do
ln -s ../../ya-runtime-vm/runtime/$file ${tmp_dir}/runtime/
done

ln -s ../../ya-runtime-vm/ya-runtime-vm ${tmp_dir}/ya-runtime-vm-nvidia
cp conf/ya-runtime-vm-nvidia.json ${tmp_dir}.json

cp debian/* .debpkg/DEBIAN/

VERSION="$(echo "$VERSION" | sed -E "s,^refs/tags/,,")"
FIXED_VERSION="$(echo "$VERSION" | sed -E 's/^v//')"
if [[ "$VERSION" = "pre-rel-"* ]]; then
FIXED_VERSION="$(echo "$VERSION" | sed -E 's/pre-rel-//;s/-rc/~rc/')"
else
FIXED_VERSION="$(echo "$VERSION" | sed -E 's/^v//')"
fi
sed -i "s/#version/${FIXED_VERSION}/g" .debpkg/DEBIAN/control
sed -i "s/__VERSION__/${FIXED_VERSION}/g" ${tmp_dir}.json

DEB_FILE="ya-runtime-vm-nvidia_${VERSION}.deb"

Expand Down
4 changes: 3 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Package: ya-runtime-vm-nvidia
Version: #version
Maintainer: Golem Factory <[email protected]>
Architecture: all
Depends: ya-runtime-vm
Depends:
ya-runtime-vm,
golem-nvidia-kernel,
Priority: standard
Description: VM + Nvidia runtime for Yagna.

0 comments on commit bba1119

Please sign in to comment.