Skip to content

Commit

Permalink
Fix distro patches for e2e tests
Browse files Browse the repository at this point in the history
After adsys#1175, we bumped the minimum Go version to 1.23. On a
toolchain level, this should not make such a difference since Go is able
to update itself as needed according to what's specified in go.mod.
However, the PR also introduced changes to d/control and those broke the
patches that we need to apply in order to run the e2e tests.
  • Loading branch information
denisonbarbosa committed Jan 23, 2025
1 parent e339126 commit 51b8ac7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion e2e/scripts/patches/focal.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Even though we need Go >= 1.23, the Go toolchain is able to auto-update itself and download the correct version
# we need to build the source code.
# This works great on CI and local builds that have internet access. However, this build process won't work on
# Launchpad builds, as the runners there do not have internet access.
diff --git a/debian/control b/debian/control
index ccf213e0..40a2aa9f 100644
--- a/debian/control
Expand All @@ -10,7 +14,7 @@ index ccf213e0..40a2aa9f 100644
+Build-Depends: debhelper-compat (= 12),
dh-apport,
dh-golang,
- golang-go (>= 2:1.22~),
- golang-go (>= 2:1.23~),
+ golang-1.22-go,
apparmor,
dbus,
Expand Down
8 changes: 4 additions & 4 deletions e2e/scripts/patches/jammy.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ index ccf213e0..2d34a328 100644
Build-Depends: debhelper-compat (= 13),
dh-apport,
dh-golang,
- golang-go (>= 2:1.22~),
+ golang-1.22-go,
- golang-go (>= 2:1.23~),
+ golang-1.23-go,
apparmor,
dbus,
libdbus-1-dev,
Expand All @@ -19,8 +19,8 @@ index 43646c6a..403e7bb9 100755
# Tests needing sudo will be skipped automatically
export ADSYS_SKIP_INTEGRATION_TESTS=1

+# Run with Go 1.22
+export PATH := /usr/lib/go-1.22/bin/:$(PATH)
+# Run with Go 1.23
+export PATH := /usr/lib/go-1.23/bin/:$(PATH)
+
%:
dh $@ --buildsystem=golang --with=golang,apport
Expand Down

0 comments on commit 51b8ac7

Please sign in to comment.