diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-10-03 13:24:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-03 13:24:42 +0100 |
commit | d2c98d1510dcaa3c35a6095eeab51c40a0d5ecea (patch) | |
tree | 43b96f73a782f0bedca666a1f3f61eadb8c1def9 | |
parent | 2b9303d0bd6b43bd92e2b2e9835a048877a63e11 (diff) | |
parent | 1d69d490cad3fd7043fdeeb450681ad5f6dd82b4 (diff) | |
download | vyos-build-d2c98d1510dcaa3c35a6095eeab51c40a0d5ecea.tar.gz vyos-build-d2c98d1510dcaa3c35a6095eeab51c40a0d5ecea.zip |
Merge pull request #788 from sever-sever/T6758
T6758: Add build package xen-guest-agent
-rw-r--r-- | .github/workflows/trigger_rebuild_packages.yml | 6 | ||||
-rw-r--r-- | scripts/package-build/xen-guest-agent/.gitignore | 7 | ||||
l--------- | scripts/package-build/xen-guest-agent/build.py | 1 | ||||
-rw-r--r-- | scripts/package-build/xen-guest-agent/package.toml | 34 |
4 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/trigger_rebuild_packages.yml b/.github/workflows/trigger_rebuild_packages.yml index 2be662e8..7fa9a7e7 100644 --- a/.github/workflows/trigger_rebuild_packages.yml +++ b/.github/workflows/trigger_rebuild_packages.yml @@ -76,6 +76,8 @@ jobs: - 'scripts/package-build/waagent/**' wide-dhcpv6: - 'scripts/package-build/wide-dhcpv6/**' + xen-guest-agent: + - 'scripts/package-build/xen-guest-agent/**' - name: Trigger builds for changed packages run: | @@ -196,3 +198,7 @@ jobs: if [ "${{ steps.changes.outputs.wide-dhcpv6 }}" == "true" ]; then trigger_build "ethtool" fi + + if [ "${{ steps.changes.outputs.xen-guest-agent }}" == "true" ]; then + trigger_build "xen-guest-agent" + fi diff --git a/scripts/package-build/xen-guest-agent/.gitignore b/scripts/package-build/xen-guest-agent/.gitignore new file mode 100644 index 00000000..373bd76a --- /dev/null +++ b/scripts/package-build/xen-guest-agent/.gitignore @@ -0,0 +1,7 @@ +xen-guest-agent/ +*.buildinfo +*.build +*.changes +*.deb +*.dsc + diff --git a/scripts/package-build/xen-guest-agent/build.py b/scripts/package-build/xen-guest-agent/build.py new file mode 120000 index 00000000..3c76af73 --- /dev/null +++ b/scripts/package-build/xen-guest-agent/build.py @@ -0,0 +1 @@ +../build.py
\ No newline at end of file diff --git a/scripts/package-build/xen-guest-agent/package.toml b/scripts/package-build/xen-guest-agent/package.toml new file mode 100644 index 00000000..213425df --- /dev/null +++ b/scripts/package-build/xen-guest-agent/package.toml @@ -0,0 +1,34 @@ +[[packages]] +name = "xen-guest-agent" +commit_id = "0.4.0" +scm_url = "https://gitlab.com/xen-project/xen-guest-agent" + + +build_cmd = """ +# changelog +cat <<EOF > debian/changelog +xen-guest-agent (0.4.0) UNRELEASED; urgency=medium + + * Upstream package + + -- VyOS Maintainers <maintainers@vyos.io> Thu, 26 Sep 2024 12:35:47 +0000 + +EOF + +# Apply the patch to modify the debian/rules file +sed -i 's|../xen-guest-agent-$(UPSTREAM_VERSION)-linux-$(DEB_TARGET_GNU_CPU)|target/release/xen-guest-agent|' debian/rules + +sudo apt-get -y install --no-install-recommends libclang-dev libxen-dev +# Install rust +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain stable --profile default --no-modify-path + +# Set PATH for Cargo +export PATH="$HOME/.cargo/bin:$PATH" +rustup update +cd xen-guest-agent +cargo update + +# Build deb +cargo build -F static --profile release +dpkg-buildpackage -b -us -uc +""" |