[sysadmin/neon-tooling] nci: add support for adt patching in resolute
Carlos De Maine <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 8cfffbd421a709cbc9613008205efe7579a4952b by Carlos De Maine.
Committed on 26/07/2026 at 08:23.
Pushed by carlosdem into branch 'master'.
add support for adt patching in resolute
A +13 -0 nci/adt-helpers/adt-run-resolute.diff
M +5 -7 nci/adt.rb
https://invent.kde.org/sysadmin/neon-tooling/-/commit/8cfffbd421a709cbc9613008205efe7579a4952b
diff --git a/nci/adt-helpers/adt-run-resolute.diff b/nci/adt-helpers/adt-run-resolute.diff
new file mode 100644
index 00000000..cc9632dd
--- /dev/null
+++ b/nci/adt-helpers/adt-run-resolute.diff
@@ -0,0 +1,13 @@
+Index: /usr/bin/adt-run
+===================================================================
+--- .orig/usr/bin/adt-run
++++ /usr/bin/adt-run
+@@ -585,7 +585,7 @@ def build_source(kind, arg, built_binaries):
+ # (and back up) the tree here for efficiency; so shortcut everything
+ # below and just set the tests_tree and get the package version
+ tests_tree = TestbedPath(
+- testbed, arg, os.path.join(testbed.scratch, "tree"), is_dir=True
++ testbed, arg, os.path.join(testbed.scratch, "build"), is_dir=True
+ )
+
+ changelog = os.path.join(arg, "debian", "changelog")
diff --git a/nci/adt.rb b/nci/adt.rb
index 622f73a2..7cf5d5c4 100755
--- a/nci/adt.rb
+++ b/nci/adt.rb
@@ -83,13 +83,11 @@ Dir.chdir('/') do
FileUtils.cp("#{__dir__}/adt-helpers/mktemp", '/usr/sbin/mktemp',
verbose: true)
FileUtils.chmod(0o0755, '/usr/sbin/mktemp')
- if File.exist?('/usr/bin/autopkgtest') # bionic and focal
- # Applies with a bit of offset.
- system('patch',
- '/usr/bin/autopkgtest',
- "#{__dir__}/adt-helpers/adt-run.diff") || raise
- else # xenial
- system("patch -p0 < #{__dir__}/adt-helpers/adt-run.diff") || raise
+ if File.exist?('/usr/bin/autopkgtest') # noble
+ system("patch -p0 < #{__dir__}/adt-helpers/adt-run.diff" || raise
+ binary = 'adt-run'
+ else # resolute
+ system("patch -p0 < #{__dir__}/adt-helpers/adt-run-resolute.diff") || raise
binary = 'adt-run'
end