Package: android-platform-build
Version: 1:10.0.0+r36-1
Severity: normal
Tags: patch


Dear maintainer,

I've prepared an NMU for android-platform-build (versioned as 
1:10.0.0+r36-1.1). The diff
is attached to this message.

Regards.


-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
diffstat for android-platform-build-10.0.0+r36 android-platform-build-10.0.0+r36

 changelog                                  |   21 ++++++++++++++++++++
 control                                    |    4 +--
 patches/bouncycastle177-compat.patch       |   30 +++++++++++++++++++++++++++++
 patches/series                             |    2 +
 patches/zip-archive-reader-signature.patch |   21 ++++++++++++++++++++
 rules                                      |    5 ----
 6 files changed, 77 insertions(+), 6 deletions(-)

diff -Nru android-platform-build-10.0.0+r36/debian/changelog android-platform-build-10.0.0+r36/debian/changelog
--- android-platform-build-10.0.0+r36/debian/changelog	2021-01-02 22:32:31.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/changelog	2025-02-05 17:19:30.000000000 +0100
@@ -1,3 +1,24 @@
+android-platform-build (1:10.0.0+r36-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Vladimir Petko ]
+  * Resolve ftbfs due to the API changes (Closes: #1042042):
+    - d/p/bouncycastle177-compat.patch: replace DerOutputStream with
+      ASN1OutputStream.
+    - d/p/zip-archive-reader-signature.patch: update ReadAtOffset
+      method signature.
+
+  [ Helmut Grohne ]
+  * Reduce Build-Depends: (Closes: #982189)
+    + Replace dh arg --with javahelper with dh-sequence-javahelper dependency.
+    + Drop unused makefile includes.
+
+  [ Mattia Rizzolo ]
+  * Mark android-logtags-tools's dep on python3 with :any.
+
+ -- Mattia Rizzolo <mat...@debian.org>  Wed, 05 Feb 2025 17:19:30 +0100
+
 android-platform-build (1:10.0.0+r36-1) unstable; urgency=medium
 
   * New upstream version (Closes: #975747)
diff -Nru android-platform-build-10.0.0+r36/debian/control android-platform-build-10.0.0+r36/debian/control
--- android-platform-build-10.0.0+r36/debian/control	2021-01-02 22:19:43.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/control	2025-02-05 17:19:30.000000000 +0100
@@ -7,7 +7,7 @@
            Chirayu Desai <chirayudes...@gmail.com>
 Build-Depends:
  debhelper-compat (= 12),
- javahelper
+ dh-sequence-javahelper,
 Build-Depends-Arch:
  android-libandroidfw-dev (>= 1:10.0.0+r36~),
  android-libbase-dev (>= 1:10.0.0+r36~),
@@ -78,7 +78,7 @@
 Architecture: all
 Depends:
  ${misc:Depends},
- python3
+ python3:any
 Description: Tools from AOSP that process event-log-tags files
  This package contains Python scripts from AOSP repository platform/build that
  process event-log-tags (.logtags) files. It contains:
diff -Nru android-platform-build-10.0.0+r36/debian/patches/bouncycastle177-compat.patch android-platform-build-10.0.0+r36/debian/patches/bouncycastle177-compat.patch
--- android-platform-build-10.0.0+r36/debian/patches/bouncycastle177-compat.patch	1970-01-01 01:00:00.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/patches/bouncycastle177-compat.patch	2025-02-05 17:19:26.000000000 +0100
@@ -0,0 +1,30 @@
+Description: remove usage of DerOutputStream
+ BouncyCastle removed DerOutputStream and replaced it
+ with ASN1OutputStream.
+Author: Vladimir Petko <vladimir.pe...@canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042042
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/android-platform-build/+bug/2056084
+Forwarded: not-needed
+Last-Update: 2024-03-06
+
+--- a/tools/signapk/src/com/android/signapk/SignApk.java
++++ b/tools/signapk/src/com/android/signapk/SignApk.java
+@@ -18,7 +18,8 @@
+
+ import org.bouncycastle.asn1.ASN1InputStream;
+ import org.bouncycastle.asn1.ASN1ObjectIdentifier;
+-import org.bouncycastle.asn1.DEROutputStream;
++import org.bouncycastle.asn1.ASN1OutputStream;
++import org.bouncycastle.asn1.ASN1Encoding;
+ import org.bouncycastle.asn1.cms.CMSObjectIdentifiers;
+ import org.bouncycastle.asn1.pkcs.PrivateKeyInfo;
+ import org.bouncycastle.cert.jcajce.JcaCertStore;
+@@ -334,7 +335,7 @@
+         CMSSignedData sigData = gen.generate(data, false);
+
+         try (ASN1InputStream asn1 = new ASN1InputStream(sigData.getEncoded())) {
+-            DEROutputStream dos = new DEROutputStream(out);
++            ASN1OutputStream dos = ASN1OutputStream.create(out, ASN1Encoding.DER);
+             dos.writeObject(asn1.readObject());
+         }
+     }
diff -Nru android-platform-build-10.0.0+r36/debian/patches/series android-platform-build-10.0.0+r36/debian/patches/series
--- android-platform-build-10.0.0+r36/debian/patches/series	2021-01-02 22:26:12.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/patches/series	2025-02-05 17:19:26.000000000 +0100
@@ -3,3 +3,5 @@
 fix_zipalign_typo.diff
 python-2to3.patch
 Implement-range-based-pin-list.patch
+zip-archive-reader-signature.patch
+bouncycastle177-compat.patch
diff -Nru android-platform-build-10.0.0+r36/debian/patches/zip-archive-reader-signature.patch android-platform-build-10.0.0+r36/debian/patches/zip-archive-reader-signature.patch
--- android-platform-build-10.0.0+r36/debian/patches/zip-archive-reader-signature.patch	1970-01-01 01:00:00.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/patches/zip-archive-reader-signature.patch	2025-02-05 17:19:26.000000000 +0100
@@ -0,0 +1,21 @@
+Description: update FileReader::ReadAtOffset signature
+ FileReader:ReadAtOffset() signature was changed in
+ android-libziparchive-dev. Update the method signature
+ to match.
+Author: Vladimir Petko <vladimir.pe...@canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042042
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/android-platform-build/+bug/2056084
+Forwarded: not-needed
+Last-Update: 2024-03-06
+
+--- a/tools/zipalign/ZipFile.cpp
++++ b/tools/zipalign/ZipFile.cpp
+@@ -1223,7 +1223,7 @@
+     FileReader(FILE* fp) : Reader(), fp_(fp), current_offset_(0) {
+     }
+
+-    bool ReadAtOffset(uint8_t* buf, size_t len, uint32_t offset) const {
++    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const {
+         // Data is usually requested sequentially, so this helps avoid pointless
+         // fseeks every time we perform a read. There's an impedence mismatch
+         // here because the original API was designed around pread and pwrite.
diff -Nru android-platform-build-10.0.0+r36/debian/rules android-platform-build-10.0.0+r36/debian/rules
--- android-platform-build-10.0.0+r36/debian/rules	2021-01-02 22:15:08.000000000 +0100
+++ android-platform-build-10.0.0+r36/debian/rules	2025-02-05 17:19:30.000000000 +0100
@@ -3,9 +3,6 @@
 # Security Hardening
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-include /usr/share/dpkg/architecture.mk
-include /usr/share/javahelper/java-vars.mk
-
 export DEB_HOST_MULTIARCH
 export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG -I/usr/include/android
 export DEB_LDFLAGS_MAINT_APPEND = -fPIC
@@ -46,7 +43,7 @@
 	jh_build --javacopts="-encoding UTF-8 -source 1.9 -target 1.9" --no-javadoc --main=com.android.signtos.SignTos $@ tools/signtos/
 
 %:
-	dh $@ --with javahelper
+	dh $@
 
 override_dh_auto_build-arch: makeparallel zipalign ziptime
 

Attachment: signature.asc
Description: PGP signature

Reply via email to