Skip to content

Commit 86ae1f4

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

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.container

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

prepare_source

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
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+
mkdir -p "$workdir/github.com/GoogleCloudPlatform"
8+
git clone --depth 1 --recurse-submodules --branch "${version_orig}" https://github.com/GoogleCloudPlatform/guest-agent.git "$workdir/github.com/GoogleCloudPlatform/guest-agent"
9+
10+
pushd "$workdir/github.com/GoogleCloudPlatform/guest-agent"
11+
cp -ar ./packaging/debian $workdir
12+
rm -rf ./packaging
13+
latest_commit_message="$(git log -1 --pretty="format:%s" ./google_guest_agent)"
14+
latest_commit_time="$(git log -1 --pretty="format:%aD" ./google_guest_agent)"
15+
popd
16+
17+
# Fix upstream Debian package definition
18+
tee $workdir/debian/changelog << EOF
19+
google-guest-agent (1:${version_orig}) stable; urgency=medium
20+
21+
* $latest_commit_message
22+
* Detailed changelog an be found at https://github.com/GoogleCloudPlatform/guest-agent/commits/${version_orig}
23+
24+
-- $maintainer <$email> $latest_commit_time
25+
EOF
26+
27+
echo "3.0 (native)" > $workdir/debian/source/format
28+
29+
# Import modified upstream source distribution
30+
import_src "$workdir"
31+
32+
rm -rf "$workdir"

0 commit comments

Comments
 (0)