Skip to content

Commit

Permalink
Add support to build upstream package (#2)
Browse files Browse the repository at this point in the history
What this PR does / why we need it:
Debian upstream discussed to cease support for building google-guest-agent because of it's unmaintained state and as Google Cloud Platform use their own packaging for distribution. Based on apparent removal of packages in Debian testing this PR switches to upstream as well.

Closes #1

Which issue(s) this PR fixes:
Fixes #2621

Signed-off-by: Tobias Wolf <[email protected]>
  • Loading branch information
NotTheEvilOne authored Jan 27, 2025
1 parent 823da1e commit 9f743cf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
1 change: 0 additions & 1 deletion .container

This file was deleted.

37 changes: 36 additions & 1 deletion prepare_source
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
apt_src google-guest-agent
version_orig=20250122.00
version_suffix=gl0

# Clone upstream repository
workdir="$(mktemp -d)"

git clone --depth 1 --recurse-submodules --branch "${version_orig}" https://github.com/GoogleCloudPlatform/guest-agent.git "$workdir"

pushd "$workdir"

# Fix upstream Debian package definition
mv ./packaging/debian ./

latest_commit_message="$(git log -1 --pretty="format:%s" ./google_guest_agent)"
latest_commit_datetime="$(git log -1 --pretty="format:%aD" ./google_guest_agent)"

tee ./debian/changelog << EOF
google-guest-agent (1:${version_orig}) stable; urgency=medium

* $latest_commit_message
* Detailed changelog an be found at https://github.com/GoogleCloudPlatform/guest-agent/commits/${version_orig}

-- $maintainer <$email> $latest_commit_datetime
EOF

echo "3.0 (native)" > ./debian/source/format

# Cleanup
rm -rf ./.git
rm -rf ./packaging

popd

# Import modified upstream source distribution
import_src "$workdir"

rm -rf "$workdir"

0 comments on commit 9f743cf

Please sign in to comment.