Merge branch 'master' into 'master'

py3 fixes for the buildserver

some fixes to get the buildserver working with the new py3 changes.  I'm assigning it to @mvdan since he did most of the py3 stuff, but @CiaranG will probably be the user of these changes.

See merge request !113
This commit is contained in:
Daniel Martí 2016-03-16 13:06:31 +00:00
commit f57e61821c
5 changed files with 25 additions and 15 deletions

View file

@ -56,12 +56,12 @@ end
pandoc pandoc
perlmagick perlmagick
pkg-config pkg-config
python
python-gnupg python-gnupg
python-magic python-magic
python-setuptools python-setuptools
python-yaml
python3-gnupg python3-gnupg
python3-requests
python3-yaml
qt5-default qt5-default
qtbase5-dev qtbase5-dev
quilt quilt

View file

@ -389,7 +389,7 @@ def build_server(app, build, vcs, build_dir, output_dir, force):
cmdline += ' --verbose' cmdline += ' --verbose'
cmdline += " %s:%s" % (app.id, build.vercode) cmdline += " %s:%s" % (app.id, build.vercode)
chan.exec_command('bash -c ". ~/.bsenv && ' + cmdline + '"') chan.exec_command('bash -c ". ~/.bsenv && ' + cmdline + '"')
output = '' output = bytes()
while not chan.exit_status_ready(): while not chan.exit_status_ready():
while chan.recv_ready(): while chan.recv_ready():
output += chan.recv(1024) output += chan.recv(1024)
@ -404,7 +404,7 @@ def build_server(app, build, vcs, build_dir, output_dir, force):
if returncode != 0: if returncode != 0:
raise BuildException( raise BuildException(
"Build.py failed on server for {0}:{1}".format( "Build.py failed on server for {0}:{1}".format(
app.id, build.version), output) app.id, build.version), str(output, 'utf-8'))
# Retrieve the built files... # Retrieve the built files...
logging.info("Retrieving build output...") logging.info("Retrieving build output...")

View file

@ -128,10 +128,16 @@ def fill_config_defaults(thisconfig):
# find all installed JDKs for keytool, jarsigner, and JAVA[6-9]_HOME env vars # find all installed JDKs for keytool, jarsigner, and JAVA[6-9]_HOME env vars
if thisconfig['java_paths'] is None: if thisconfig['java_paths'] is None:
thisconfig['java_paths'] = dict() thisconfig['java_paths'] = dict()
for d in sorted(glob.glob('/usr/lib/jvm/j*[6-9]*') pathlist = []
+ glob.glob('/usr/java/jdk1.[6-9]*') pathlist += glob.glob('/usr/lib/jvm/j*[6-9]*')
+ glob.glob('/System/Library/Java/JavaVirtualMachines/1.[6-9].0.jdk') pathlist += glob.glob('/usr/java/jdk1.[6-9]*')
+ glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[6-9]*')): pathlist += glob.glob('/System/Library/Java/JavaVirtualMachines/1.[6-9].0.jdk')
pathlist += glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[6-9]*')
if os.getenv('JAVA_HOME') is not None:
pathlist += os.getenv('JAVA_HOME')
if os.getenv('PROGRAMFILES') is not None:
pathlist += glob.glob(os.path.join(os.getenv('PROGRAMFILES'), 'Java', 'jdk1.[6-9].*'))
for d in sorted(pathlist):
if os.path.islink(d): if os.path.islink(d):
continue continue
j = os.path.basename(d) j = os.path.basename(d)
@ -139,6 +145,7 @@ def fill_config_defaults(thisconfig):
for regex in [ for regex in [
r'^1\.([6-9])\.0\.jdk$', # OSX r'^1\.([6-9])\.0\.jdk$', # OSX
r'^jdk1\.([6-9])\.0_[0-9]+.jdk$', # OSX and Oracle tarball r'^jdk1\.([6-9])\.0_[0-9]+.jdk$', # OSX and Oracle tarball
r'^jdk1\.([6-9])\.0_[0-9]+$', # Oracle Windows
r'^jdk([6-9])-openjdk$', # Arch r'^jdk([6-9])-openjdk$', # Arch
r'^java-([6-9])-openjdk$', # Arch r'^java-([6-9])-openjdk$', # Arch
r'^java-([6-9])-jdk$', # Arch (oracle) r'^java-([6-9])-jdk$', # Arch (oracle)

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# #
# update.py - part of the FDroid server tools # init.py - part of the FDroid server tools
# Copyright (C) 2010-2013, Ciaran Gultnieks, ciaran@ciarang.com # Copyright (C) 2010-2013, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc> # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013 Hans-Christoph Steiner <hans@eds.org> # Copyright (C) 2013 Hans-Christoph Steiner <hans@eds.org>
@ -100,6 +100,9 @@ def main():
else: else:
# if neither --android-home nor the default sdk_path exist, prompt the user # if neither --android-home nor the default sdk_path exist, prompt the user
default_sdk_path = '/opt/android-sdk' default_sdk_path = '/opt/android-sdk'
if sys.platform == 'win32' or sys.platform == 'cygwin':
default_sdk_path = os.path.join(os.getenv('USERPROFILE'),
'AppData', 'Local', 'Android', 'android-sdk')
while not options.no_prompt: while not options.no_prompt:
try: try:
s = input('Enter the path to the Android SDK (' s = input('Enter the path to the Android SDK ('

View file

@ -61,14 +61,14 @@ fi
cd fdroiddata cd fdroiddata
echo "build_server_always = True" > config.py echo "build_server_always = True" > config.py
# Gradle, JNI, preassemble # Gradle, JNI, preassemble
../fdroid build org.adaway:55 ../fdroid build --stop org.adaway:55
# Maven # Maven
../fdroid build org.quantumbadger.redreader:55 ../fdroid build --stop org.quantumbadger.redreader:55
# Ant, submodules and custom prebuild/build # Ant, submodules and custom prebuild/build
../fdroid build app.openconnect:959 ../fdroid build --stop app.openconnect:959
# Custom build (make) # Custom build (make)
../fdroid build org.xcsoar:101 ../fdroid build --stop com.amaze.filemanager:29
# Uses verification # Uses verification
../fdroid build info.guardianproject.checkey:101 ../fdroid build --stop info.guardianproject.checkey:101
# Gradle with retrolambda (JDK7 and JDK8) # Gradle with retrolambda (JDK7 and JDK8)
../fdroid build com.moez.QKSMS:124 ../fdroid build --stop com.moez.QKSMS:124