[Git][reproducible-builds/diffoscope][master] Prevent CI (and runtime) apksigner test failures due to lack of binfmt_misc on...

Chris Lamb gitlab at salsa.debian.org
Sat May 16 17:50:04 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
f101c91d by Chris Lamb at 2020-05-16T18:48:01+01:00
Prevent CI (and runtime) apksigner test failures due to lack of binfmt_misc on Salsa CI and elsewhere.

In Debian, the `apksigner` binary is a symbolic link to the .jar file itself,
requiring binfmt_misc support to execute directly. We therefore resolve its
location and pass that to `java -jar` instead

- - - - -


1 changed file:

- diffoscope/comparators/apk.py


Changes:

=====================================
diffoscope/comparators/apk.py
=====================================
@@ -193,7 +193,20 @@ class Apksigner(Command):
 
     @tool_required('apksigner')
     def cmdline(self):
-        return ["apksigner", "verify", "--verbose", "--print-certs", self.path]
+        # In Debian, the `apksigner` binary is a symbolic link to the .jar file
+        # itself, requiring binfmt_misc support to execute directly. We
+        # therefore resolve its location and pass that to `java -jar`.
+        apksigner_jar = find_executable("apksigner")
+
+        return [
+            "java",
+            "-jar",
+            apksigner_jar,
+            "verify",
+            "--verbose",
+            "--print-certs",
+            self.path,
+        ]
 
 
 class ApkFile(File):



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/f101c91dc484e5f8ffac14bc81fe8f91deafeef9

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/f101c91dc484e5f8ffac14bc81fe8f91deafeef9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200516/18039529/attachment.htm>


More information about the rb-commits mailing list