diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml new file mode 100644 index 0000000..2a7f496 --- /dev/null +++ b/debian/.gitlab-ci.yml @@ -0,0 +1,10 @@ +build: + image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest + artifacts: + paths: + - "*.deb" + expire_in: 1 day + except: + - tags + script: + - gitlab-ci-git-buildpackage-all diff --git a/debian/build.gradle b/debian/build.gradle index 6e7d1a2..3c6c652 100644 --- a/debian/build.gradle +++ b/debian/build.gradle @@ -5,10 +5,7 @@ subprojects { * src:android-platform-build. */ group = 'com.android' - sourceCompatibility = 1.7 - targetCompatibility = 1.7 version = '23' - compileJava.options.encoding = 'UTF-8' configurations { doclava /* Classpaths for executing Doclava */ @@ -44,7 +41,8 @@ subprojects { "-stubs $stubsDir " + '-XDignore.symbol.file ' + "-api ${temporaryDir}/current.txt " + - "-removedApi ${temporaryDir}/removed.txt " + "-removedApi ${temporaryDir}/removed.txt " + + '--release 8 ' if (classpath.size() > 0) doclavaFlags += "-classpath $classpath " copy { from apiListLocation @@ -224,3 +222,14 @@ project(':uiautomator') { } } } + +allprojects { + gradle.projectsEvaluated { + tasks.withType(JavaCompile) { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + options.encoding = 'UTF-8' + options.compilerArgs.addAll(['--release', '8']) + } + } +} diff --git a/debian/changelog b/debian/changelog index 57765dd..96c7711 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +android-framework-23 (6.0.1+r72-5) unstable; urgency=medium + + * Fix FTBFS with Java 9+ (Closes: #894285) + * add basic autopkgtest to check that class files are in the JAR + + -- Hans-Christoph Steiner <h...@eds.org> Wed, 06 Mar 2019 12:10:58 +0000 + android-framework-23 (6.0.1+r72-4) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index 8a59ae4..bbc2cd4 100644 --- a/debian/control +++ b/debian/control @@ -15,11 +15,11 @@ Build-Depends: aapt, gradle-debian-helper (>= 1.4~), maven-repo-helper, p7zip-full, - proguard + proguard-cli, Standards-Version: 4.1.3 Homepage: https://android.googlesource.com -Vcs-Git: https://anonscm.debian.org/git/android-tools/android-framework-23.git -Vcs-Browser: https://anonscm.debian.org/cgit/android-tools/android-framework-23.git +Vcs-Git: https://salsa.debian.org/android-tools-team/android-framework-23.git +Vcs-Browser: https://salsa.debian.org/android-tools-team/android-framework-23 Package: libandroid-23-java Architecture: all diff --git a/debian/patches/remove-use-of-_-variable-name.patch b/debian/patches/remove-use-of-_-variable-name.patch new file mode 100644 index 0000000..84d24f2 --- /dev/null +++ b/debian/patches/remove-use-of-_-variable-name.patch @@ -0,0 +1,28 @@ +Subject: Remove use of '_' variable name + +To build with Java 9 and newer. + +Forwarded: https://android.googlesource.com/platform/frameworks/base/+/00d6b601e6257d86b173f743d76396ec3183a5e8%5E%21/#F0 + +diff --git a/frameworks/base/media/java/android/media/SRTRenderer.java b/frameworks/base/media/java/android/media/SRTRenderer.java +index ee4edee..a3e2abd 100644 +--- a/frameworks/base/media/java/android/media/SRTRenderer.java ++++ b/frameworks/base/media/java/android/media/SRTRenderer.java +@@ -165,7 +165,6 @@ + return; + } + +- final int _ = 0; + for (Cue cue : activeCues) { + TextTrackCue ttc = (TextTrackCue) cue; + +@@ -184,7 +183,8 @@ + parcel.writeInt(buf.length); + parcel.writeByteArray(buf); + +- Message msg = mEventHandler.obtainMessage(MEDIA_TIMED_TEXT, _, _, parcel); ++ Message msg = mEventHandler.obtainMessage(MEDIA_TIMED_TEXT, 0 /* arg1 */, 0 /* arg2 */, ++ parcel); + mEventHandler.sendMessage(msg); + } + activeCues.clear(); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ac1d795 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +remove-use-of-_-variable-name.patch diff --git a/debian/tests/build-against-android-jar.sh b/debian/tests/build-against-android-jar.sh new file mode 100644 index 0000000..914f417 --- /dev/null +++ b/debian/tests/build-against-android-jar.sh @@ -0,0 +1,14 @@ +#!/bin/bash -e + +echo > Test.java <<EOF +import android.content.res.AssetManager; +import org.xmlpull.v1.XmlPullParser; +public class Test { + public static void main() { + int i = AssetManager.ACCESS_UNKNOWN; + i = XmlPullParser.START_DOCUMENT; + } +} +EOF + +javac -classpath /usr/share/java/com.android.android-23.jar Test.java diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..2671fbd --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: build-against-android-jar.sh +Depends: @, default-jdk-headless
commit 923730398f8c75667bda56bdcc431d6577d60150 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 13:53:02 2019 +0100
update debian/changelog for upload commit 45ef165b85868baf54ae2926d3c0a01344994994 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 14:48:48 2019 +0100 add basic autopkgtest to check that class files are in the JAR commit a54bfa906afc9b139f1f6c1a99f76effec301a3e Author: Hans-Christoph Steiner <h...@eds.org> Date: Sun Jan 27 22:15:37 2019 +0100 build with Java9+ "--release 8" option to force Java8 commit 7d5ab8132b88143deeadafc85ed9d243ad3be624 Author: Hans-Christoph Steiner <h...@eds.org> Date: Thu Jan 24 23:02:46 2019 +0100 update setting javac settings to apply to all subprojects commit 20359590bbd2cc93772d71e584809de15b764455 Author: Hans-Christoph Steiner <h...@eds.org> Date: Thu Jan 24 22:21:21 2019 +0100 patch to remove use of '_' variable name commit fb1343ae917afe443f09b277e2fa388fbd59f776 Author: Hans-Christoph Steiner <h...@eds.org> Date: Thu Jan 24 12:28:58 2019 +0100 update VCS tags to point to salsa.debian.org commit 92e20afc107ce6d55d40b7805588911a0ea29f28 Author: Hans-Christoph Steiner <h...@eds.org> Date: Thu Jan 24 12:09:26 2019 +0100 add debian/.gitlab-ci.yml commit e8c06b7983d8c4cc908d318aa588a9af9f465b53 Author: Hans-Christoph Steiner <h...@eds.org> Date: Fri Mar 10 22:22:11 2017 +0100 depend on proguard-cli to avoid including 140 GUI deps
diff --git a/.gitignore b/.gitignore index eeb0cfd..7f495f1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ debian/*.substvars debian/android-sdk*/ debian/debhelper-build-stamp debian/files -debian/source.properties -debian/tmp/ \ No newline at end of file +debian/tmp/ +source.properties \ No newline at end of file diff --git a/51-android.rules b/51-android.rules index 47e2025..8961bcd 100644 --- a/51-android.rules +++ b/51-android.rules @@ -70,10 +70,10 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="109b", ENV{adb_user}="yes" #HTC SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ENV{adb_user}="yes" #Huawei -SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="", ENV{adb_user}="yes" -SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="", ENV{adb_user}="yes" -SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="", ENV{adb_user}="yes" -SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="", ENV{adb_user}="yes" +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1038", ENV{adb_user}="yes" +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1021", ENV{adb_user}="yes" +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1057", ENV{adb_user}="yes" +SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1050", ENV{adb_user}="yes" #Intel SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="09ef", ENV{adb_user}="yes" SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0a16", ENV{adb_user}="yes" diff --git a/build-tools/package.xml b/build-tools/package.xml index 5cbbc4a..44dcff1 100644 --- a/build-tools/package.xml +++ b/build-tools/package.xml @@ -4,13 +4,13 @@ xmlns:ns5="http://schemas.android.com/repository/android/generic/01" xmlns:ns6="http://schemas.android.com/sdk/android/repo/repository2/01"> <license id="apache-2.0" type="text">Please refer to Apache v2.0 license</license> - <localPackage path="build-tools;24.0.0" obsolete="false"> + <localPackage path="build-tools;debian" obsolete="false"> <type-details xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns5:genericDetailsType"/> <revision> - <major>24</major> + <major>27</major> <minor>0</minor> - <micro>0</micro> + <micro>1</micro> </revision> <display-name>Android SDK Build-Tools</display-name> <uses-license ref="apache-2.0"/> diff --git a/build-tools/source.properties b/build-tools/source.properties deleted file mode 100644 index e432fd7..0000000 --- a/build-tools/source.properties +++ /dev/null @@ -1,2 +0,0 @@ -Pkg.UserSrc=false -Pkg.Revision=24.0.0 \ No newline at end of file diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml new file mode 100644 index 0000000..d9acd28 --- /dev/null +++ b/debian/.gitlab-ci.yml @@ -0,0 +1,9 @@ +image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest + +build: + artifacts: + paths: + - "*.deb" + expire_in: 1 day + script: + - gitlab-ci-git-buildpackage-all diff --git a/debian/android-sdk-platform-tools.links b/debian/android-sdk-platform-tools.links index 2b2284a..333767a 100644 --- a/debian/android-sdk-platform-tools.links +++ b/debian/android-sdk-platform-tools.links @@ -1 +1,5 @@ +etc/mke2fs.conf usr/lib/android-sdk/platform-tools/mke2fs.conf +sbin/mke2fs usr/lib/android-sdk/platform-tools/mke2fs +sbin/mkfs.f2fs usr/lib/android-sdk/platform-tools/make_f2fs +sbin/sload.f2fs usr/lib/android-sdk/platform-tools/sload_f2fs usr/bin/sqlite3 usr/lib/android-sdk/platform-tools/sqlite3 \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 02a8b91..7da8adb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +android-sdk-meta (25.0.0+9) UNRELEASED; urgency=medium + + [ Jeremy Bicha ] + * android-sdk-platform-tools: Don't require adb or fastboot on mips* + + [ 殷啟聰 | Kai-Chung Yan ] + * Update versions of SDK components to match upstream + + [ Hans-Christoph Steiner ] + * fix missing idProduct values in udev rules + * add autopkgtest for udev rules + * add autopkgtest for `apt-get install android-tools-adb` + * add debian/.gitlab-ci.yml to run tests on GitLab CI + * update alternative Depends: for current Java versions (Closes: #922555) + + -- Hans-Christoph Steiner <h...@eds.org> Wed, 06 Mar 2019 16:21:32 +0000 + android-sdk-meta (25.0.0+8) unstable; urgency=medium * include /usr/bin/screenshot2 as symlink diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..6999eb3 --- /dev/null +++ b/debian/clean @@ -0,0 +1,2 @@ +build-tools/source.properties +platform-tools/source.properties \ No newline at end of file diff --git a/debian/control b/debian/control index 37e79fb..9ab09b8 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: android-sdk-meta Section: metapackages Priority: optional Maintainer: Android Tools Maintainers <android-tools-de...@lists.alioth.debian.org> -Uploaders: Kai-Chung Yan <seamli...@gmail.com>, +Uploaders: Kai-Chung Yan <seam...@debian.org>, Chirayu Desai <chirayudes...@gmail.com>, Hans-Christoph Steiner <h...@eds.org> Build-Depends: debhelper (>= 10), dh-exec @@ -16,7 +16,7 @@ Depends: android-sdk-build-tools, android-sdk-common (>= ${source:Version}), android-sdk-platform-tools (>= 20), android-platform-tools-base (>= 2.2.2-3), - default-jdk-headless (>= 2:1.8) | default-jdk (>= 2:1.8) | oracle-java8-jdk | oracle-java9-jdk | oracle-java8-installer | oracle-java9-installer, + default-jdk-headless (>= 2:1.8) | default-jdk (>= 2:1.8) | oracle-java8-jdk | oracle-java9-jdk | oracle-java10-jdk | oracle-java11-jdk | oracle-java12-jdk | oracle-java8-installer | oracle-java9-installer | oracle-java10-installer | oracle-java11-installer | oracle-java12-installer, proguard-cli, ${misc:Depends} Recommends: gradle, default-jdk-headless @@ -47,12 +47,14 @@ Description: Common files of Android SDK base toolset Package: android-sdk-platform-tools Architecture: amd64 i386 armel armhf arm64 mips mipsel mips64el -Depends: adb (>= 1:7.0.0+r1), - android-sdk-platform-tools-common (>= 24.0.0~), - dmtracedump (>= 7.0.0+r1), - etc1tool (>= 7.0.0+r1), - fastboot (>= 1:7.0.0+r1), - hprof-conv (>= 7.0.0+r1), +Depends: adb (>= 1:8.1.0+r23~) [amd64 i386 armel armhf arm64], + android-sdk-platform-tools-common (>= 27.0.0~), + e2fsprogs, + f2fs-tools, + dmtracedump (>= 8.1.0+r23~), + etc1tool (>= 8.1.0+r23~), + fastboot (>= 1:8.1.0+r23~) [amd64 i386 armel armhf arm64], + hprof-conv (>= 8.1.0+r23~), sqlite3, ${misc:Depends} Description: Tools for interacting with an Android platform @@ -83,13 +85,14 @@ Description: Tools for interacting with an Android platform - Common files Package: android-sdk-build-tools Architecture: amd64 i386 armel armhf arm64 mips mipsel mips64el -Depends: android-sdk-build-tools-common (>= 24.0.0~), - aapt (>= 1:7.0.0+r1), - aidl (>= 1:7.0.0+r1), - dalvik-exchange (>= 7.0.0+r1), - dexdump (>= 7.0.0+r1), - split-select (>= 1:7.0.0+r1), - zipalign (>= 1:7.0.0+r1), +Depends: android-sdk-build-tools-common (>= 27.0.1~), + aapt (>= 1:8.1.0+r23~), + aidl (>= 1:8.1.0+r23~), + apksigner, + dalvik-exchange (>= 8.1.0+r23~), + dexdump (>= 8.1.0+r23~), + split-select (>= 1:8.1.0+r23~), + zipalign (>= 1:8.1.0+r23~), ${misc:Depends} Description: Tools for building Android applications The Android SDK includes a variety of tools that help you develop mobile diff --git a/debian/rules b/debian/rules index 39c9d3b..5dc1d18 100755 --- a/debian/rules +++ b/debian/rules @@ -2,13 +2,17 @@ include /usr/share/dpkg/pkg-info.mk -export BUILD_TOOLS_VERSION = 24.0.0 -PLATFORM_TOOLS_VERSION = 24.0.0 +export BUILD_TOOLS_VERSION = 27.0.1 +PLATFORM_TOOLS_VERSION = 27.0.0 DEB_REVISION = $(shell echo $(DEB_VERSION) | sed 's,.*\+\([0-9][0-9]*\).*,\1,') %: dh $@ +override_dh_auto_build: + echo $(BUILD_TOOLS_VERSION) > build-tools/source.properties + echo $(PLATFORM_TOOLS_VERSION) > platform-tools/source.properties + override_dh_gencontrol: dh_gencontrol dh_gencontrol -pandroid-sdk-platform-tools -- -v$(PLATFORM_TOOLS_VERSION)+$(DEB_REVISION) diff --git a/debian/tests/apt-get-install-adb b/debian/tests/apt-get-install-adb new file mode 100755 index 0000000..4fb38a1 --- /dev/null +++ b/debian/tests/apt-get-install-adb @@ -0,0 +1,9 @@ +#!/bin/sh -e +# +# Google officially recommends `apt-get install adb` for installing +# the udev rules, so we should keep it working: +# https://developer.android.com/studio/run/device.html + +apt-get update +apt-get -qy install --install-recommends android-tools-adb +test -e /lib/udev/rules.d/51-android.rules diff --git a/debian/tests/apt-get-install-android-tools-adb b/debian/tests/apt-get-install-android-tools-adb new file mode 100755 index 0000000..d0f0581 --- /dev/null +++ b/debian/tests/apt-get-install-android-tools-adb @@ -0,0 +1,8 @@ +#!/bin/sh -e +# +# For a long time, Google recommended android-tools-adb for installing +# the udev rules: https://developer.android.com/studio/run/device.html + +apt-get update +apt-get -qy install --install-recommends adb +test -e /lib/udev/rules.d/51-android.rules diff --git a/debian/tests/check-syntax b/debian/tests/check-syntax new file mode 100755 index 0000000..c42b2b7 --- /dev/null +++ b/debian/tests/check-syntax @@ -0,0 +1,23 @@ +#!/bin/sh -e +# +# all lines in the file should be one of: +# - a comment +# - blank +# - a udev rule matching a vendor/product pair +# - a udev rule matching a vendor +# - four specific static udev lines +# +# If there is no output from the final grep, it will exit with a value +# of 1, since there is no output. But for this test, that is what we +# want. Any output to stderr should count as a failed run. + +grep -v '^#' 51-android.rules \ + | grep -Ev '^$' \ + | grep -Ev '^SUBSYSTEM=="usb", ATTR{idVendor}=="[0-9a-f]{4}", ATTR{idProduct}=="[0-9a-f]{4}", ENV{adb_user}="yes"$' \ + | grep -Ev '^SUBSYSTEM=="usb", ATTR{idVendor}=="[0-9a-f]{4}", ENV{adb_user}="yes"$' \ + | grep -Ev '^SUBSYSTEM!="usb", GOTO="android_usb_rules_end"$' \ + | grep -Ev '^LABEL="android_usb_rules_begin"$' \ + | grep -Ev '^ENV{adb_user}=="yes", MODE="0660", GROUP="plugdev", TAG\+="uaccess"$' \ + | grep -Ev '^LABEL="android_usb_rules_end"$' || exit 0 + +exit 1 diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..7076a63 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,7 @@ +Tests: check-syntax + +Tests: apt-get-install-adb +Restrictions: allow-stderr, needs-root + +Tests: apt-get-install-android-tools-adb +Restrictions: allow-stderr, needs-root diff --git a/platform-tools/package.xml b/platform-tools/package.xml index b74e2d9..5668d63 100644 --- a/platform-tools/package.xml +++ b/platform-tools/package.xml @@ -8,7 +8,7 @@ <type-details xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns5:genericDetailsType"/> <revision> - <major>24</major> + <major>27</major> <minor>0</minor> <micro>0</micro> </revision> diff --git a/platform-tools/source.properties b/platform-tools/source.properties deleted file mode 100644 index e432fd7..0000000 --- a/platform-tools/source.properties +++ /dev/null @@ -1,2 +0,0 @@ -Pkg.UserSrc=false -Pkg.Revision=24.0.0 \ No newline at end of file
commit ed52630891be52cc8a1b9a8f82175464af871e9b Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 18:07:42 2019 +0100 fix lintian debian-changelog-line-too-long commit 70a8fec6b12d6ba64718816b3a87c23c661c32b2 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 17:46:57 2019 +0100 update debian/changelog for upload commit 6ade5950d975e262da2b585a31f756f6a93e6d73 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 17:35:48 2019 +0100 fix missing idProduct values in udev rules commit 4a665c7e06c583a8174f8d9bb7c785e17f789e49 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 17:32:17 2019 +0100 update alternative Depends: list for newer current Java versions commit f4caee14eaed1004984c97a7d98d3af5277e320b Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 17:18:09 2019 +0100 add autopkgtest for `apt-get install android-tools-adb` commit ebbc01ed0ef059f56599e3d961f679b2161ad8cb Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 17:10:57 2019 +0100 add autopkgtest for udev rules commit 8d58a42deaaf3ed141205bd014a484343a205c1c Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 14:29:41 2019 +0100 add debian/.gitlab-ci.yml commit c2f2957e5faca271c44cd21042e71cb388cf7781 Author: Hans-Christoph Steiner <h...@eds.org> Date: Wed Mar 6 14:29:04 2019 +0100 update depends versions to match the whole suite commit c6fc354248efc931f0355274f969be4897bdf6d6 Author: æ®·åè° | Kai-Chung Yan <seam...@debian.org> Date: Tue Dec 4 15:06:18 2018 +0800 Update SDK components: * build-tools => 27.0.1 * Add `apksigner` * platform-tools => 27.0.0 * Add tools from `f2fs-tools` and `e2fsprogs` Without Kotlin we could not update `android-platform-tools-base`. commit d1ee87ca2de152b01db069494806a4f0b85906fe Author: æ®·åè° | Kai-Chung Yan <seam...@debian.org> Date: Tue Dec 4 15:05:34 2018 +0800 Generate source.properties during build-time. Thus we can save some more time from updating the version strings. commit 1cee704311a83d0085f5a884afd135ae269b0820 Author: æ®·åè° | Kai-Chung Yan <seam...@debian.org> Date: Tue Dec 4 15:03:31 2018 +0800 Use my DD account in Uploaders commit 518bd3cb451c2f5f0373eddd5e6b749becfb5d7b Author: Jeremy Bicha <jbi...@debian.org> Date: Sat Nov 10 19:06:53 2018 -0500 android-sdk-platform-tools: Don't require adb or fastboot on mips*
signature.asc
Description: OpenPGP digital signature