Your message dated Wed, 17 Dec 2014 21:19:50 +0000 with message-id <20141217211950.GM11902@lupin.home.powdarrmonkey.net> and subject line Re: Bug#773166: unblock fdroidserver/0.2.1-4 has caused the Debian Bug report #773166, regarding unblock fdroidserver/0.2.1-4 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 773166: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773166 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: unblock fdroidserver/0.2.1-4
- From: Hans-Christoph Steiner <hans@eds.org>
- Date: Mon, 15 Dec 2014 10:09:00 +0100
- Message-id: <[🔎] 548EA52C.9070907@eds.org>
Package: release.debian.org User: release.debian.org@packages.debian.org Usertags: unblock Severity: normal unblock fdroidserver/0.2.1-4 Fix RC bug to keep this package in testing, its related to all these: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769912 It turned out to be non-trivial to change fdroidserver to also be able to use the system provided Android SDK utils (i.e. /usr/bin/aapt vs. ~/Documents/android-sdk/build-tools/21.1.2/aapt) so the debdiff isn't super short. But these are literally only changes needed for this functionality to work. It is still important that fdroidserver be able to use a user-installed Android SDK because lots of the SDK is not yet in Debian. The 0.2.1-4 update means that a user can maintain an app repo using only packages in Debian, but in order to build Android apps, they still need to install the Android SDK. $ debdiff fdroidserver_0.2.1-3.dsc fdroidserver_0.2.1-4.dsc diff -Nru fdroidserver-0.2.1/debian/changelog fdroidserver-0.2.1/debian/changelog --- fdroidserver-0.2.1/debian/changelog 2014-10-10 04:43:45.000000000 +0200 +++ fdroidserver-0.2.1/debian/changelog 2014-12-14 22:23:11.000000000 +0100 @@ -1,3 +1,11 @@ +fdroidserver (0.2.1-4) unstable; urgency=medium + + * Recommend android-tools-adb, aapt, zipalign to provide essential utilities + * include upstream commits that allow use of system-provided SDK utilities + (Closes: #769912) + + -- Hans-Christoph Steiner <hans@eds.org> Sun, 14 Dec 2014 20:22:07 +0100 + fdroidserver (0.2.1-3) unstable; urgency=low * fix local sync perms diff -Nru fdroidserver-0.2.1/debian/control fdroidserver-0.2.1/debian/control --- fdroidserver-0.2.1/debian/control 2014-10-10 04:12:19.000000000 +0200 +++ fdroidserver-0.2.1/debian/control 2014-12-14 22:06:17.000000000 +0100 @@ -18,11 +18,14 @@ Architecture: all Depends: ${python:Depends}, ${misc:Depends} -Recommends: openjdk-7-jre-headless, +Recommends: android-tools-adb, + aapt, + openjdk-7-jre-headless, openjdk-7-jdk, opensc, rsync, - wget + wget, + zipalign Suggests: bzr, git, gradle, diff -Nru fdroidserver-0.2.1/debian/patches/do-not-set-sdk_path-in-config.py-if-using-system-pro.patch fdroidserver-0.2.1/debian/patches/do-not-set-sdk_path-in-config.py-if-using-system-pro.patch --- fdroidserver-0.2.1/debian/patches/do-not-set-sdk_path-in-config.py-if-using-system-pro.patch 1970-01-01 01:00:00.000000000 +0100 +++ fdroidserver-0.2.1/debian/patches/do-not-set-sdk_path-in-config.py-if-using-system-pro.patch 2014-12-14 22:23:11.000000000 +0100 @@ -0,0 +1,139 @@ +From 5f5bcd2e11f45277b865400de14ea8e820318804 Mon Sep 17 00:00:00 2001 +From: Hans-Christoph Steiner <hans@eds.org> +Date: Tue, 9 Dec 2014 15:20:29 +0100 +Forwarded: not-needed +Origin: upstream, https://gitlab.com/fdroid/fdroidserver/merge_requests/31 +Subject: [PATCH 7/7] do not set sdk_path in config.py if using system-provided + aapt + +By not setting sdk_path when /usr/bin/aapt is found, sdk_path then defaults +to $ANDROID_HOME when its used. Since in this case, aapt will be used from +the system path, using aapt entirely ignores sdk_path. If the user runs +`fdroid build` in this setup, sdk_path will be $ANDROID_HOME, so it should +check the env vars for it, but maybe that doesn't actually work like that +yet. +--- + examples/config.py | 2 +- + fdroidserver/common.py | 9 ++++++--- + fdroidserver/init.py | 49 ++++++++++++++++++++++++++++--------------------- + 3 files changed, 35 insertions(+), 25 deletions(-) + +--- a/examples/config.py ++++ b/examples/config.py +@@ -9,7 +9,7 @@ + # Override the path to the Android NDK, $ANDROID_NDK by default + # ndk_path = "/path/to/android-ndk" + # Build tools version to be used +-build_tools = "20.0.0" ++# build_tools = "20.0.0" + + # Command for running Ant + # ant = "/path/to/ant" +--- a/fdroidserver/common.py ++++ b/fdroidserver/common.py +@@ -161,7 +161,7 @@ def find_sdk_tools_cmd(cmd): + '''find a working path to a tool from the Android SDK''' + + tooldirs = [] +- if 'sdk_path' in config and os.path.exists(config['sdk_path']): ++ if config is not None and 'sdk_path' in config and os.path.exists(config['sdk_path']): + # try to find a working path to this command, in all the recent possible paths + if 'build_tools' in config: + build_tools = os.path.join(config['sdk_path'], 'build-tools') +@@ -192,7 +192,11 @@ def find_sdk_tools_cmd(cmd): + def test_sdk_exists(c): + if 'sdk_path' not in c: + logging.error("'sdk_path' not set in config.py!") +- return False ++ if 'aapt' in c and os.path.isfile(c['aapt']): ++ return True ++ else: ++ logging.error("'sdk_path' not set in config.py!") ++ return False + if c['sdk_path'] is None: + # c['sdk_path'] is set to the value of ANDROID_HOME by default + logging.error('No Android SDK found! ANDROID_HOME is not set and sdk_path is not in config.py!') +--- a/fdroidserver/init.py ++++ b/fdroidserver/init.py +@@ -121,6 +121,7 @@ def main(): + prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) + examplesdir = prefix + '/examples' + ++ aapt = None + fdroiddir = os.getcwd() + test_config = common.get_default_config() + +@@ -129,21 +130,28 @@ def main(): + if options.android_home is not None: + test_config['sdk_path'] = options.android_home + elif not common.test_sdk_exists(test_config): +- # if neither --android-home nor the default sdk_path exist, prompt the user +- default_sdk_path = '/opt/android-sdk' +- while not options.no_prompt: +- try: +- s = raw_input('Enter the path to the Android SDK (' +- + default_sdk_path + ') here:\n> ') +- except KeyboardInterrupt: +- print('') +- sys.exit(1) +- if re.match('^\s*$', s) is not None: +- test_config['sdk_path'] = default_sdk_path +- else: +- test_config['sdk_path'] = s +- if common.test_sdk_exists(test_config): +- break ++ if os.path.isfile('/usr/bin/aapt'): ++ # remove sdk_path and build_tools, they are not required ++ test_config.pop('sdk_path', None) ++ test_config.pop('build_tools', None) ++ # make sure at least aapt is found, since this can't do anything without it ++ test_config['aapt'] = common.find_sdk_tools_cmd('aapt') ++ else: ++ # if neither --android-home nor the default sdk_path exist, prompt the user ++ default_sdk_path = '/opt/android-sdk' ++ while not options.no_prompt: ++ try: ++ s = raw_input('Enter the path to the Android SDK (' ++ + default_sdk_path + ') here:\n> ') ++ except KeyboardInterrupt: ++ print('') ++ sys.exit(1) ++ if re.match('^\s*$', s) is not None: ++ test_config['sdk_path'] = default_sdk_path ++ else: ++ test_config['sdk_path'] = s ++ if common.test_sdk_exists(test_config): ++ break + if not common.test_sdk_exists(test_config): + sys.exit(3) + +@@ -154,16 +162,14 @@ def main(): + shutil.copy(os.path.join(examplesdir, 'fdroid-icon.png'), fdroiddir) + shutil.copyfile(os.path.join(examplesdir, 'config.py'), 'config.py') + os.chmod('config.py', 0o0600) +- write_to_config('sdk_path', test_config['sdk_path']) ++ if 'sdk_path' in test_config: ++ write_to_config('sdk_path', test_config['sdk_path']) + else: + logging.warn('Looks like this is already an F-Droid repo, cowardly refusing to overwrite it...') + logging.info('Try running `fdroid init` in an empty directory.') + sys.exit() + +- if os.path.exists('/usr/bin/aapt'): +- # make sure at least aapt is found, since this can't do anything without it +- config['aapt'] = common.find_sdk_tools_cmd('aapt') +- else: ++ if not 'aapt' in test_config or not os.path.isfile(test_config['aapt']): + # try to find a working aapt, in all the recent possible paths + build_tools = os.path.join(test_config['sdk_path'], 'build-tools') + aaptdirs = [] +@@ -270,7 +276,8 @@ def main(): + logging.info('Built repo based in "' + fdroiddir + '"') + logging.info('with this config:') + logging.info(' Android SDK:\t\t\t' + config['sdk_path']) +- logging.info(' Android SDK Build Tools:\t' + os.path.dirname(aapt)) ++ if aapt: ++ logging.info(' Android SDK Build Tools:\t' + os.path.dirname(aapt)) + logging.info(' Android NDK (optional):\t' + ndk_path) + logging.info(' Keystore for signing key:\t' + keystore) + if repo_keyalias is not None: diff -Nru fdroidserver-0.2.1/debian/patches/find-cmds-from-SDK-build-tools-in-a-more-flexible-wa.patch fdroidserver-0.2.1/debian/patches/find-cmds-from-SDK-build-tools-in-a-more-flexible-wa.patch --- fdroidserver-0.2.1/debian/patches/find-cmds-from-SDK-build-tools-in-a-more-flexible-wa.patch 1970-01-01 01:00:00.000000000 +0100 +++ fdroidserver-0.2.1/debian/patches/find-cmds-from-SDK-build-tools-in-a-more-flexible-wa.patch 2014-12-14 22:23:11.000000000 +0100 @@ -0,0 +1,218 @@ +From 924425646166673d930cd2b9d93825087646952d Mon Sep 17 00:00:00 2001 +From: Hans-Christoph Steiner <hans@eds.org> +Date: Tue, 9 Dec 2014 14:12:41 +0100 +Forwarded: not-needed +Origin: upstream, https://gitlab.com/fdroid/fdroidserver/merge_requests/31 +Subject: [PATCH 5/7] find cmds from SDK build-tools in a more flexible way, on + the fly + +This is a more flexible approach than testing for the complete SDK and +build-tools up front. This will only test for the commands that are +actually being run, so that if you only have `aapt` installed, you can do +`fdroid update` without errors, but other commands will still give +appropriate errors. + +This also makes the build_tools item in config.py optional, it is only +needed if you want to force a specific version of the build-tools. +--- + fdroidserver/build.py | 4 ++-- + fdroidserver/common.py | 56 ++++++++++++++++++++++++++++++++++++++++++-------- + fdroidserver/init.py | 47 ++++++++++++++++++++++-------------------- + fdroidserver/update.py | 4 ++-- + +--- a/fdroidserver/build.py ++++ b/fdroidserver/build.py +@@ -35,7 +35,7 @@ import logging + + import common + import metadata +-from common import FDroidException, BuildException, VCSException, FDroidPopen, SilentPopen ++from common import FDroidException, BuildException, VCSException, FDroidPopen, SdkToolsPopen + + try: + import paramiko +@@ -769,7 +769,7 @@ def build_local(app, thisbuild, vcs, bui + if not os.path.exists(src): + raise BuildException("Unsigned apk is not at expected location of " + src) + +- p = SilentPopen([config['aapt'], 'dump', 'badging', src]) ++ p = SdkToolsPopen(['aapt', 'dump', 'badging', src]) + + vercode = None + version = None +--- a/fdroidserver/common.py ++++ b/fdroidserver/common.py +@@ -122,9 +122,6 @@ def read_config(opts, config_file='confi + v = os.path.expanduser(v) + config[k] = os.path.expandvars(v) + +- if not test_build_tools_exists(config): +- sys.exit(3) +- + bin_paths = { + 'aapt': [ + os.path.join(config['sdk_path'], 'build-tools', config['build_tools'], 'aapt'), +@@ -186,7 +183,42 @@ def read_config(opts, config_file='confi + return config + + ++def find_sdk_tools_cmd(cmd): ++ '''find a working path to a tool from the Android SDK''' ++ ++ tooldirs = [] ++ if 'sdk_path' in config and os.path.exists(config['sdk_path']): ++ # try to find a working path to this command, in all the recent possible paths ++ if 'build_tools' in config: ++ build_tools = os.path.join(config['sdk_path'], 'build-tools') ++ # if 'build_tools' was manually set and exists, check only that one ++ configed_build_tools = os.path.join(build_tools, config['build_tools']) ++ if os.path.exists(configed_build_tools): ++ tooldirs.append(configed_build_tools) ++ else: ++ # no configed version, so hunt known paths for it ++ for f in sorted(os.listdir(build_tools), reverse=True): ++ if os.path.isdir(os.path.join(build_tools, f)): ++ tooldirs.append(os.path.join(build_tools, f)) ++ tooldirs.append(build_tools) ++ sdk_tools = os.path.join(config['sdk_path'], 'tools') ++ if os.path.exists(sdk_tools): ++ tooldirs.append(sdk_tools) ++ sdk_platform_tools = os.path.join(config['sdk_path'], 'platform-tools') ++ if os.path.exists(sdk_platform_tools): ++ tooldirs.append(sdk_platform_tools) ++ tooldirs.append('/usr/bin') ++ for d in tooldirs: ++ if os.path.isfile(os.path.join(d, cmd)): ++ return os.path.join(d, cmd) ++ # did not find the command, exit with error message ++ ensure_build_tools_exists(config) ++ ++ + def test_sdk_exists(c): ++ if 'sdk_path' not in c: ++ logging.error("'sdk_path' not set in config.py!") ++ return False + if c['sdk_path'] is None: + # c['sdk_path'] is set to the value of ANDROID_HOME by default + logging.error('No Android SDK found! ANDROID_HOME is not set and sdk_path is not in config.py!') +@@ -207,16 +239,15 @@ def test_sdk_exists(c): + return True + + +-def test_build_tools_exists(c): ++def ensure_build_tools_exists(c): + if not test_sdk_exists(c): +- return False ++ sys.exit(3) + build_tools = os.path.join(c['sdk_path'], 'build-tools') + versioned_build_tools = os.path.join(build_tools, c['build_tools']) + if not os.path.isdir(versioned_build_tools): + logging.critical('Android Build Tools path "' + + versioned_build_tools + '" does not exist!') +- return False +- return True ++ sys.exit(3) + + + def write_password_file(pwtype, password=None): +@@ -1588,8 +1619,7 @@ def isApkDebuggable(apkfile, config): + + :param apkfile: full path to the apk to check""" + +- p = SilentPopen([config['aapt'], +- 'dump', 'xmltree', apkfile, 'AndroidManifest.xml']) ++ p = SdkToolsPopen(['aapt', 'dump', 'xmltree', apkfile, 'AndroidManifest.xml']) + if p.returncode != 0: + logging.critical("Failed to get apk manifest information") + sys.exit(1) +@@ -1628,6 +1658,14 @@ class PopenResult: + output = '' + + ++def SdkToolsPopen(commands, cwd=None, shell=False): ++ cmd = commands[0] ++ if cmd not in config: ++ config[cmd] = find_sdk_tools_cmd(commands[0]) ++ return FDroidPopen([config[cmd]] + commands[1:], ++ cwd=cwd, shell=shell, output=False) ++ ++ + def SilentPopen(commands, cwd=None, shell=False): + return FDroidPopen(commands, cwd=cwd, shell=shell, output=False) + +--- a/fdroidserver/init.py ++++ b/fdroidserver/init.py +@@ -160,28 +160,31 @@ def main(): + logging.info('Try running `fdroid init` in an empty directory.') + sys.exit() + +- # try to find a working aapt, in all the recent possible paths +- build_tools = os.path.join(test_config['sdk_path'], 'build-tools') +- aaptdirs = [] +- aaptdirs.append(os.path.join(build_tools, test_config['build_tools'])) +- aaptdirs.append(build_tools) +- for f in os.listdir(build_tools): +- if os.path.isdir(os.path.join(build_tools, f)): +- aaptdirs.append(os.path.join(build_tools, f)) +- for d in sorted(aaptdirs, reverse=True): +- if os.path.isfile(os.path.join(d, 'aapt')): +- aapt = os.path.join(d, 'aapt') +- break +- if os.path.isfile(aapt): +- dirname = os.path.basename(os.path.dirname(aapt)) +- if dirname == 'build-tools': +- # this is the old layout, before versioned build-tools +- test_config['build_tools'] = '' +- else: +- test_config['build_tools'] = dirname +- write_to_config('build_tools', test_config['build_tools']) +- if not common.test_build_tools_exists(test_config): +- sys.exit(3) ++ if os.path.exists('/usr/bin/aapt'): ++ # make sure at least aapt is found, since this can't do anything without it ++ config['aapt'] = common.find_sdk_tools_cmd('aapt') ++ else: ++ # try to find a working aapt, in all the recent possible paths ++ build_tools = os.path.join(test_config['sdk_path'], 'build-tools') ++ aaptdirs = [] ++ aaptdirs.append(os.path.join(build_tools, test_config['build_tools'])) ++ aaptdirs.append(build_tools) ++ for f in os.listdir(build_tools): ++ if os.path.isdir(os.path.join(build_tools, f)): ++ aaptdirs.append(os.path.join(build_tools, f)) ++ for d in sorted(aaptdirs, reverse=True): ++ if os.path.isfile(os.path.join(d, 'aapt')): ++ aapt = os.path.join(d, 'aapt') ++ break ++ if os.path.isfile(aapt): ++ dirname = os.path.basename(os.path.dirname(aapt)) ++ if dirname == 'build-tools': ++ # this is the old layout, before versioned build-tools ++ test_config['build_tools'] = '' ++ else: ++ test_config['build_tools'] = dirname ++ write_to_config('build_tools', test_config['build_tools']) ++ common.ensure_build_tools_exists(test_config) + + # now that we have a local config.py, read configuration... + config = common.read_config(options) +--- a/fdroidserver/update.py ++++ b/fdroidserver/update.py +@@ -34,7 +34,7 @@ import logging + + import common + import metadata +-from common import FDroidPopen, SilentPopen ++from common import FDroidPopen, SdkToolsPopen + from metadata import MetaDataException + + +@@ -374,7 +374,7 @@ def scan_apks(apps, apkcache, repodir, k + thisinfo['features'] = [] + thisinfo['icons_src'] = {} + thisinfo['icons'] = {} +- p = SilentPopen([config['aapt'], 'dump', 'badging', apkfile]) ++ p = SdkToolsPopen(['aapt', 'dump', 'badging', apkfile]) + if p.returncode != 0: + if options.delete_unknown: + if os.path.exists(apkfile): diff -Nru fdroidserver-0.2.1/debian/patches/remove-redundant-test_sdk_exists-call-its-called-by-.patch fdroidserver-0.2.1/debian/patches/remove-redundant-test_sdk_exists-call-its-called-by-.patch --- fdroidserver-0.2.1/debian/patches/remove-redundant-test_sdk_exists-call-its-called-by-.patch 1970-01-01 01:00:00.000000000 +0100 +++ fdroidserver-0.2.1/debian/patches/remove-redundant-test_sdk_exists-call-its-called-by-.patch 2014-12-14 22:23:11.000000000 +0100 @@ -0,0 +1,27 @@ +From 0f71929e71d5b57562d6a9c2f73851139e68b0bb Mon Sep 17 00:00:00 2001 +From: Hans-Christoph Steiner <hans@eds.org> +Date: Mon, 8 Dec 2014 22:02:17 +0100 +Forwarded: not-needed +Origin: upstream, https://gitlab.com/fdroid/fdroidserver/merge_requests/31 +Subject: [PATCH 2/7] remove redundant test_sdk_exists() call, its called by + test_build_tools_exists() + +No need to call test_sdk_exists() before test_build_tools_exists() since +test_build_tools_exists() calls test_sdk_exists() as the first thing it +does. +--- + fdroidserver/common.py | 3 --- + 1 file changed, 3 deletions(-) + +--- a/fdroidserver/common.py ++++ b/fdroidserver/common.py +@@ -122,9 +122,6 @@ def read_config(opts, config_file='confi + v = os.path.expanduser(v) + config[k] = os.path.expandvars(v) + +- if not test_sdk_exists(config): +- sys.exit(3) +- + if not test_build_tools_exists(config): + sys.exit(3) + diff -Nru fdroidserver-0.2.1/debian/patches/run-all-SDK-tools-commands-using-SdkToolsPopen.patch fdroidserver-0.2.1/debian/patches/run-all-SDK-tools-commands-using-SdkToolsPopen.patch --- fdroidserver-0.2.1/debian/patches/run-all-SDK-tools-commands-using-SdkToolsPopen.patch 1970-01-01 01:00:00.000000000 +0100 +++ fdroidserver-0.2.1/debian/patches/run-all-SDK-tools-commands-using-SdkToolsPopen.patch 2014-12-14 22:23:11.000000000 +0100 @@ -0,0 +1,117 @@ +From fa1cc48d57a3b9b4a46ec814df819dd8c4fc057a Mon Sep 17 00:00:00 2001 +From: Hans-Christoph Steiner <hans@eds.org> +Date: Tue, 9 Dec 2014 15:15:36 +0100 +Forwarded: not-needed +Origin: upstream, https://gitlab.com/fdroid/fdroidserver/merge_requests/31 +Subject: [PATCH 6/7] run all SDK tools commands using SdkToolsPopen + +--- + fdroidserver/common.py | 32 +++----------------------------- + fdroidserver/install.py | 6 +++--- + fdroidserver/publish.py | 6 +++--- + +--- a/fdroidserver/common.py ++++ b/fdroidserver/common.py +@@ -122,32 +122,6 @@ def read_config(opts, config_file='confi + v = os.path.expanduser(v) + config[k] = os.path.expandvars(v) + +- bin_paths = { +- 'aapt': [ +- os.path.join(config['sdk_path'], 'build-tools', config['build_tools'], 'aapt'), +- ], +- 'zipalign': [ +- os.path.join(config['sdk_path'], 'tools', 'zipalign'), +- os.path.join(config['sdk_path'], 'build-tools', config['build_tools'], 'zipalign'), +- ], +- 'android': [ +- os.path.join(config['sdk_path'], 'tools', 'android'), +- ], +- 'adb': [ +- os.path.join(config['sdk_path'], 'platform-tools', 'adb'), +- ], +- } +- +- for b, paths in bin_paths.items(): +- config[b] = None +- for path in paths: +- if os.path.isfile(path): +- config[b] = path +- break +- if config[b] is None: +- logging.warn("Could not find %s in any of the following paths:\n%s" % ( +- b, '\n'.join(paths))) +- + # There is no standard, so just set up the most common environment + # variables + env = os.environ +@@ -1367,8 +1341,8 @@ def prepare_source(vcs, app, build, buil + + # Generate (or update) the ant build file, build.xml... + if build['update'] and build['update'] != ['no'] and build['type'] == 'ant': +- parms = [config['android'], 'update', 'lib-project'] +- lparms = [config['android'], 'update', 'project'] ++ parms = ['android', 'update', 'lib-project'] ++ lparms = ['android', 'update', 'project'] + + if build['target']: + parms += ['-t', build['target']] +@@ -1386,7 +1360,7 @@ def prepare_source(vcs, app, build, buil + else: + logging.debug("Updating subproject %s" % d) + cmd = lparms + ['-p', d] +- p = FDroidPopen(cmd, cwd=root_dir) ++ p = SdkToolsPopen(cmd, cwd=root_dir) + # Check to see whether an error was returned without a proper exit + # code (this is the case for the 'no target set or target invalid' + # error) +--- a/fdroidserver/install.py ++++ b/fdroidserver/install.py +@@ -25,14 +25,14 @@ from optparse import OptionParser, Optio + import logging + + import common +-from common import FDroidPopen, FDroidException ++from common import SdkToolsPopen, FDroidException + + options = None + config = None + + + def devices(): +- p = FDroidPopen([config['adb'], "devices"]) ++ p = SdkToolsPopen(['adb', "devices"]) + if p.returncode != 0: + raise FDroidException("An error occured when finding devices: %s" % p.output) + lines = p.output.splitlines() +@@ -100,7 +100,7 @@ def main(): + logging.info("Installing %s..." % apk) + for dev in devs: + logging.info("Installing %s on %s..." % (apk, dev)) +- p = FDroidPopen([config['adb'], "-s", dev, "install", apk]) ++ p = SdkToolsPopen(['adb', "-s", dev, "install", apk]) + fail = "" + for line in p.output.splitlines(): + if line.startswith("Failure"): +--- a/fdroidserver/publish.py ++++ b/fdroidserver/publish.py +@@ -28,7 +28,7 @@ import logging + + import common + import metadata +-from common import FDroidPopen, BuildException ++from common import FDroidPopen, SdkToolsPopen, BuildException + + config = None + options = None +@@ -160,8 +160,8 @@ def main(): + raise BuildException("Failed to sign application") + + # Zipalign it... +- p = FDroidPopen([config['zipalign'], '-v', '4', apkfile, +- os.path.join(output_dir, apkfilename)]) ++ p = SdkToolsPopen(['zipalign', '-v', '4', apkfile, ++ os.path.join(output_dir, apkfilename)]) + if p.returncode != 0: + raise BuildException("Failed to align application") + os.remove(apkfile) diff -Nru fdroidserver-0.2.1/debian/patches/series fdroidserver-0.2.1/debian/patches/series --- fdroidserver-0.2.1/debian/patches/series 2014-10-10 04:24:29.000000000 +0200 +++ fdroidserver-0.2.1/debian/patches/series 2014-12-14 22:06:17.000000000 +0100 @@ -2,3 +2,8 @@ hard-code-path-to-openjdk-7.patch fix-local-sync-perms.patch do-not-include-timestamps-in-.gz-files-of-docs.patch +remove-redundant-test_sdk_exists-call-its-called-by-.patch +switched-last-aapt-call-to-use-central-config-aapt.patch +find-cmds-from-SDK-build-tools-in-a-more-flexible-wa.patch +run-all-SDK-tools-commands-using-SdkToolsPopen.patch +do-not-set-sdk_path-in-config.py-if-using-system-pro.patch diff -Nru fdroidserver-0.2.1/debian/patches/switched-last-aapt-call-to-use-central-config-aapt.patch fdroidserver-0.2.1/debian/patches/switched-last-aapt-call-to-use-central-config-aapt.patch --- fdroidserver-0.2.1/debian/patches/switched-last-aapt-call-to-use-central-config-aapt.patch 1970-01-01 01:00:00.000000000 +0100 +++ fdroidserver-0.2.1/debian/patches/switched-last-aapt-call-to-use-central-config-aapt.patch 2014-12-14 22:23:11.000000000 +0100 @@ -0,0 +1,23 @@ +From f7c9eccc1f44f149692d0c6aaa3eecb29661e197 Mon Sep 17 00:00:00 2001 +From: Hans-Christoph Steiner <hans@eds.org> +Date: Mon, 8 Dec 2014 22:53:25 +0100 +Forwarded: not-needed +Origin: upstream, https://gitlab.com/fdroid/fdroidserver/merge_requests/31 +Subject: [PATCH 3/7] switched last aapt call to use central config['aapt'] + +--- + fdroidserver/common.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/fdroidserver/common.py ++++ b/fdroidserver/common.py +@@ -1588,8 +1588,7 @@ def isApkDebuggable(apkfile, config): + + :param apkfile: full path to the apk to check""" + +- p = SilentPopen([os.path.join(config['sdk_path'], 'build-tools', +- config['build_tools'], 'aapt'), ++ p = SilentPopen([config['aapt'], + 'dump', 'xmltree', apkfile, 'AndroidManifest.xml']) + if p.returncode != 0: + logging.critical("Failed to get apk manifest information")Attachment: signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
- To: Hans-Christoph Steiner <hans@eds.org>, 773166-done@bugs.debian.org
- Subject: Re: Bug#773166: unblock fdroidserver/0.2.1-4
- From: Jonathan Wiltshire <jmw@debian.org>
- Date: Wed, 17 Dec 2014 21:19:50 +0000
- Message-id: <20141217211950.GM11902@lupin.home.powdarrmonkey.net>
- In-reply-to: <[🔎] 548EA52C.9070907@eds.org>
- References: <[🔎] 548EA52C.9070907@eds.org>
On Mon, Dec 15, 2014 at 10:09:00AM +0100, Hans-Christoph Steiner wrote: > Fix RC bug to keep this package in testing, its related to all these: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769912 > > > It turned out to be non-trivial to change fdroidserver to also be able to use > the system provided Android SDK utils (i.e. /usr/bin/aapt vs. > ~/Documents/android-sdk/build-tools/21.1.2/aapt) so the debdiff isn't super > short. But these are literally only changes needed for this functionality to > work. It is still important that fdroidserver be able to use a user-installed > Android SDK because lots of the SDK is not yet in Debian. The 0.2.1-4 update > means that a user can maintain an app repo using only packages in Debian, but > in order to build Android apps, they still need to install the Android SDK. I'm not keen on it, but ok. Unblocked. -- Jonathan Wiltshire jmw@debian.org Debian Developer http://people.debian.org/~jmw 4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC 74C3 5394 479D D352 4C51Attachment: signature.asc
Description: Digital signature
--- End Message ---