Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): build libvirt #588

Draft
wants to merge 54 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
212582a
chore(ci): build libvirt
universal-itengineer Dec 18, 2024
a10473c
chore(ci): fix build
universal-itengineer Dec 18, 2024
53964ae
chore: build via meson
universal-itengineer Dec 18, 2024
5b5dbf1
chore: prepere build env
universal-itengineer Dec 18, 2024
0c74ef1
chore: use make build
universal-itengineer Dec 18, 2024
b738cb4
chore: experimet of libvirt build
universal-itengineer Dec 23, 2024
884defe
chore: change werf.inc for build linvirt rpm
universal-itengineer Dec 23, 2024
002ec83
chore: try build all libvirt rpms
universal-itengineer Dec 23, 2024
fb45507
chore: use dockerfile insted werf
universal-itengineer Dec 23, 2024
e41d376
chore: add ccache conf
universal-itengineer Dec 23, 2024
2627942
chore: docker build qemu
universal-itengineer Dec 26, 2024
f386f3b
chore: build libvirt werf
universal-itengineer Dec 27, 2024
1b987ea
chore: add qemu werf build
universal-itengineer Dec 27, 2024
620487d
chore: try to qemu build as root
universal-itengineer Dec 27, 2024
e97bbac
add draft virt-launcher build
universal-itengineer Dec 27, 2024
ed08b2e
build virt-launcher try1
universal-itengineer Dec 28, 2024
9d08878
edk2 up to edk2-ovmf-20240811
universal-itengineer Dec 28, 2024
dfd65dc
fix script libvirt-install, correct symlinc
universal-itengineer Jan 9, 2025
ca2e8cf
add symlinc in virt-launcher, remove creations symlinc from libvirt-a…
universal-itengineer Jan 9, 2025
cdc93f0
add dbg virt-launch
universal-itengineer Jan 9, 2025
04cc22e
add libs in virtlauncher, rm dublicate pks from libartifact
universal-itengineer Jan 9, 2025
4548967
Copy BINS to virtlauncher
universal-itengineer Jan 9, 2025
9b81dfd
fix libvirt adn qemu buildr and files location
universal-itengineer Jan 9, 2025
48a26d1
try via tmp-merged image
universal-itengineer Jan 9, 2025
13153c0
cleanup virt-launcher build
universal-itengineer Jan 10, 2025
b550857
refactor libvirt artifact build
universal-itengineer Jan 10, 2025
b9e5b4e
refactor qemu build
universal-itengineer Jan 10, 2025
cafa57a
refactor build libvirt
universal-itengineer Jan 10, 2025
c673eb0
refactor qemu build
universal-itengineer Jan 10, 2025
22bb334
libvirt, rm examples from BINS
universal-itengineer Jan 10, 2025
5e7eed1
virt-launcher: temporary disable build OVMF, libvirt-artifact: disabl…
universal-itengineer Jan 10, 2025
1958905
qemu enable-tcg
universal-itengineer Jan 10, 2025
5805260
libvirt: Dcurl=enabled, qemu: comment enable-tcg
universal-itengineer Jan 10, 2025
afe34d1
back edk alt
universal-itengineer Jan 10, 2025
828f77f
qemu: enable-tcg
universal-itengineer Jan 10, 2025
9200368
libvirt: comment Ddriver_hyperv=disabled
universal-itengineer Jan 10, 2025
98e2085
qemu: change enable features ti kvm tcg vnc virtfs spice curl
universal-itengineer Jan 10, 2025
6b82d82
refactor libvirt and qemu
universal-itengineer Jan 13, 2025
c4f4bfc
virt-launcher: coment rm OVMF and add symlink
universal-itengineer Jan 13, 2025
b17861a
virt-launcher: add var for symlinks
universal-itengineer Jan 13, 2025
7520c60
add edk2 build
universal-itengineer Jan 13, 2025
578a90f
fix packages for edk2 artifact
universal-itengineer Jan 13, 2025
3409a13
ovmf: try to build with script
universal-itengineer Jan 13, 2025
3c21f2a
qemu: chnage build
universal-itengineer Jan 14, 2025
18c1465
qemu: add feat numa,balloon,trim
universal-itengineer Jan 14, 2025
e533521
fix build iso edk, copy OVMF to virt-launcher
universal-itengineer Jan 16, 2025
dd7299d
minimize script output
universal-itengineer Jan 16, 2025
b9758c5
qemu change '/usr/local/bin' to '/usr/bin'
universal-itengineer Jan 16, 2025
2242957
add xorriso pkg to virt-launcher
universal-itengineer Jan 16, 2025
e676411
qemu change folder for all from '/usr/local/*' to '/usr/*'
universal-itengineer Jan 16, 2025
d25dfd9
edk2: try with enrol
universal-itengineer Jan 17, 2025
9c43e09
add json cfgs
universal-itengineer Jan 17, 2025
f5eba7f
add import json
universal-itengineer Jan 17, 2025
3c87906
OVMF: chage enroll func
universal-itengineer Jan 17, 2025
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
10 changes: 7 additions & 3 deletions .github/workflows/dev_module_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ on:
type: number
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
branches:
- main
- chore/ci/build-libvirt
push:
branches:
- main
Expand Down Expand Up @@ -208,7 +211,8 @@ jobs:
task virtualization-controller:test:unit

dev_setup_build:
runs-on: ubuntu-latest
runs-on: [self-hosted, regular, selectel]
# runs-on: ubuntu-latest
name: Build and Push images
needs: set_vars
env:
Expand All @@ -230,8 +234,8 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Remove unwanted software
uses: ./.github/actions/remove-unwanted-software
# - name: Remove unwanted software
# uses: ./.github/actions/remove-unwanted-software

- uses: deckhouse/modules-actions/setup@v1

Expand Down
626 changes: 626 additions & 0 deletions images/libvirt-artifact/install-libvirt.sh

Large diffs are not rendered by default.

159 changes: 159 additions & 0 deletions images/libvirt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
{{- $versionLibvirt := "10.10.0" }}
{{- $gitRepoUrl := "https://github.com/libvirt/libvirt.git" }}
{{- $gitRepoName := "libvirt" }}

image: {{ $.ImageName }}
final: false
fromImage: base-alt-p11
git:
- add: /images/{{ $.ImageName }}/
to: /
includePaths:
- install-libvirt.sh
stageDependencies:
setup:
- install-libvirt.sh
shell:
beforeInstall:
- |
apt-get update && apt-get install --yes \
su sudo \
dmidecode \
gcc-c++ \
git \
gettext \
bash-completion \
clang \
ccache \
make cmake \
meson \
ninja-build \
libudev-devel \
libpciaccess-devel \
libyajl-devel \
sanlock-devel \
libpcap-devel \
libnl-devel \
libselinux-devel \
iproute \
iptables \
iptables-nft \
iptables-ipv6 \
openvswitch \
ebtables \
libsasl2-devel \
pkgconfig \
libssh-devel \
libssh2-devel \
polkit kmod \
qemu-img \
lvm2 \
libparted-devel \
parted \
libdevmapper-devel \
ceph-devel \
open-iscsi \
libiscsi-devel \
libglusterfs-devel \
libnuma-devel \
libcap-ng-devel \
libcurl-devel \
libaudit-devel \
libfuse-devel \
libnbd-devel \
libblkid-devel \
libgcrypt-devel \
libgnutls-devel \
libp11-kit-devel \
libreadline-devel \
libtasn1-devel \
libattr-devel \
libbsd-devel \
libsystemd-devel \
libuuid-devel \
libjson-c-devel \
systemtap-sdt-devel \
systemd-container \
attr \
libacl-devel \
glib2-devel \
glibc-utils \
libgio-devel \
libxml2-devel \
xml-utils \
xsltproc \
python3 python3-devel \
python3-module-pytest \
python3-module-docutils \
python3-tools \
python3-module-pip \
polkit \
libtirpc-devel \
libsasl2-devel \
wireshark-devel \
tshark \
zlib-devel \
mdevctl \
util-linux dmsetup pm-utils libclocale \
libfuse3-devel libnuma libslirp-devel \
libyajl-devel libselinux-devel

apt-get clean
rm --recursive --force /var/lib/apt/lists/ftp.altlinux.org* /var/cache/apt/*.bin

rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
rpm -qa | sort > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc

pip3 install black
grep -qw ^rpm /etc/group || groupadd rpm
id -u builder &>/dev/null || useradd builder --shell /bin/bash --create-home --group rpm

install:
- |
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"

git clone --depth=1 --branch v{{ $versionLibvirt }} {{ $gitRepoUrl }} {{ $gitRepoName }}-{{ $versionLibvirt }}

cd {{ $gitRepoName }}-{{ $versionLibvirt }}

CFLAGS="-Wframe-larger-than=8192" meson setup build \
-Dinit_script=systemd \
-Dsystem=true \
-Ddriver_qemu=enabled \
-Ddriver_libvirtd=enabled \
-Dcurl=enabled \
-Ddocs=disabled \
-Ddriver_ch=disabled \
-Ddriver_lxc=disabled \
-Ddriver_openvz=disabled \
-Ddriver_test=disabled \
-Ddriver_vbox=disabled \
-Dvbox_xpcomc_dir=disabled \
-Ddriver_vmware=disabled \
-Ddriver_vz=disabled \
-Dwireshark_dissector=disabled \
-Dwireshark_plugindir=disabled \
-Dstorage_gluster=disabled \
-Dstorage_zfs=disabled \
-Dstorage_vstorage=disabled \
-Dstorage_rbd=disabled

ninja -C build -j$(nproc)

setup:
- |
echo "/{{ $gitRepoName }}-{{ $versionLibvirt }}"

# ls -lah /{{ $gitRepoName }}-{{ $versionLibvirt }}

/install-libvirt.sh -s /{{ $gitRepoName }}-{{ $versionLibvirt }} \
-d /BINS \
-b build
Loading
Loading