-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
T6758: Add build package xen-guest-agent
The 'xen-guest-agent' could be used for XCP-NG images
- Loading branch information
1 parent
2b9303d
commit 654bbc2
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
xen-guest-agent/ | ||
*.buildinfo | ||
*.build | ||
*.changes | ||
*.deb | ||
*.dsc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[[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.5.0) UNRELEASED; urgency=medium | ||
* Upstream package | ||
-- VyOS Maintainers <[email protected]> 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 | ||
# Build deb | ||
cargo build -F static --profile release | ||
dpkg-buildpackage -b -us -uc | ||
""" |