Skip to content
Snippets Groups Projects
Commit 792115b9 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Make sure we recommend apksigcopier. (Re: !105)

parent 1852890a
No related branches found
No related tags found
No related merge requests found
Pipeline #463257 passed with warnings
......@@ -9,6 +9,7 @@ Uploaders:
Build-Depends:
abootimg <!nocheck>,
androguard <!nocheck>,
apksigcopier <!nocheck>,
apksigner <!nocheck>,
apktool [!ppc64el !s390x] <!nocheck>,
bash-completion,
......
......@@ -7,7 +7,7 @@
# $ mv debian/tests/control.tmp debian/tests/control
Tests: pytest-with-recommends
Depends: python3-all, diffoscope, black, python3-pytest, python3-h5py, file, linux-image-amd64 [amd64] | linux-image-generic [amd64], abootimg, acl, apksigner, apktool [!ppc64el !s390x], binutils-multiarch, bzip2, caca-utils, colord, coreboot-utils, db-util, default-jdk-headless | default-jdk | java-sdk, device-tree-compiler, docx2txt, e2fsprogs, enjarify, ffmpeg, fontforge-extras, fonttools, fp-utils [!ppc64el !s390x], genisoimage, gettext, ghc, ghostscript, giflib-tools, gnumeric, gnupg, gnupg-utils, hdf5-tools, html2text, imagemagick, jsbeautifier, libarchive-tools, libxmlb-dev, llvm, lz4 | liblz4-tool, lzip, mono-utils, ocaml-nox, odt2txt, oggvideotools [!s390x], openssh-client, openssl, pgpdump, poppler-utils, procyon-decompiler, python3-pdfminer, r-base-core, rpm2cpio, sng, sqlite3, squashfs-tools, tcpdump, u-boot-tools, unzip, wabt, xmlbeans, xxd, xz-utils, zip, zstd, androguard, python3-argcomplete, python3-binwalk, python3-defusedxml, python3-distro, python3-guestfs, python3-jsondiff, python3-progressbar, python3-pypdf2, python3-debian, python3-pyxattr, python3-rpm, python3-tlsh
  • Developer

    @lamby removing androguard (and other packages) in this commit seems odd. What am I missing?

  • Author Owner

    Hm, something messed up when generating this. Interesting how everything from androguard onwards goes; perhaps the script died. Anyway, regenerated and fixed in 3daa321e .. :thumbsup:

  • Please register or sign in to reply
Depends: python3-all, diffoscope, black, python3-pytest, python3-h5py, file, linux-image-amd64 [amd64] | linux-image-generic [amd64], abootimg, acl, apksigcopier, apksigner, apktool [!ppc64el !s390x], binutils-multiarch, bzip2, caca-utils, colord, coreboot-utils, db-util, default-jdk-headless | default-jdk | java-sdk, device-tree-compiler, docx2txt, e2fsprogs, enjarify, ffmpeg, fontforge-extras, fonttools, fp-utils [!ppc64el !s390x], genisoimage, gettext, ghc, ghostscript, giflib-tools, gnumeric, gnupg, gnupg-utils, hdf5-tools, html2text, imagemagick, jsbeautifier, libarchive-tools, libxmlb-dev, llvm, lz4 | liblz4-tool, lzip, mono-utils, ocaml-nox, odt2txt, oggvideotools [!s390x], openssh-client, openssl, pgpdump, poppler-utils, procyon-decompiler, python3-pdfminer, r-base-core, rpm2cpio, sng, sqlite3, squashfs-tools, tcpdump, u-boot-tools, unzip, wabt, xmlbeans, xxd, xz-utils, zip, zstd,
Tests: pytest
Depends: python3-all, diffoscope, python3-pytest, python3-h5py, file, python3-tlsh
......
......@@ -243,7 +243,7 @@ class ApkFile(ZipFileBase):
return super().as_container
def compare_details(self, other, source=None):
self.only_run_apktool_with_differences_before_signing_block(other)
self.check_differences_before_signing_block(other)
differences = zipinfo_differences(self, other)
......@@ -272,15 +272,19 @@ class ApkFile(ZipFileBase):
return differences
def only_run_apktool_with_differences_before_signing_block(self, other):
def check_differences_before_signing_block(self, other):
try:
import apksigcopier
except ImportError:
self._check_differences_before_signing_block(other)
except (RequiredToolNotFound, ImportError):
self.add_comment(
"'apksigcopier' Python package not installed; unconditionally running 'apktool'."
)
return
@tool_required("apksigcopier")
def _check_differences_before_signing_block(self, other):
import apksigcopier
try:
offset_self, _ = apksigcopier.extract_v2_sig(self.path)
offset_other, _ = apksigcopier.extract_v2_sig(other.path)
......
......@@ -25,6 +25,7 @@ that might resolve to, for example, `/usr/bin/abootimg`.
EXTERNAL_TOOLS = {
"abootimg": {"debian": "abootimg", "guix": "abootimg"},
"androguard": {"debian": "androguard"},
"apksigcopier": {"debian": "apksigcopier"},
"apktool": {"debian": "apktool"},
"apksigner": {"debian": "apksigner"},
"db_dump": {"debian": "db-util", "guix": "bdb"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment