Skip to content

Commit a4b0b97

Browse files
committed
Add support to build upstream package
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
1 parent 823da1e commit a4b0b97

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.container

Lines changed: 0 additions & 1 deletion
This file was deleted.

prepare_source

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
apt_src google-guest-agent
1+
version_orig=20250122.00
22
version_suffix=gl0
3+
4+
# Clone upstream repository
5+
workdir="$(mktemp -d)"
6+
7+
git clone --depth 1 --recurse-submodules --branch "${version_orig}" https://github.com/GoogleCloudPlatform/guest-agent.git "$workdir"
8+
9+
pushd "$workdir"
10+
11+
# Fix upstream Debian package definition
12+
mv ./packaging/debian ./
13+
14+
latest_commit_message="$(git log -1 --pretty="format:%s" ./google_guest_agent)"
15+
latest_commit_datetime="$(git log -1 --pretty="format:%aD" ./google_guest_agent)"
16+
17+
tee ./debian/changelog << EOF
18+
google-guest-agent (1:${version_orig}) stable; urgency=medium
19+
20+
* $latest_commit_message
21+
* Detailed changelog an be found at https://github.com/GoogleCloudPlatform/guest-agent/commits/${version_orig}
22+
23+
-- $maintainer <$email> $latest_commit_datetime
24+
EOF
25+
26+
echo "3.0 (native)" > ./debian/source/format
27+
28+
# Cleanup
29+
rm -rf ./.git
30+
rm -rf ./packaging
31+
32+
popd
33+
34+
# Import modified upstream source distribution
35+
import_src "$workdir"
36+
37+
rm -rf "$workdir"

0 commit comments

Comments
 (0)