mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-10 01:00:29 +03:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
6806e2ff22
35 changed files with 776 additions and 483 deletions
762
build.py
762
build.py
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# build.py - part of the FDroid server tools
|
# build.py - part of the FDroid server tools
|
||||||
|
|
@ -30,6 +30,8 @@ from xml.dom.minidom import Document
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
import common
|
import common
|
||||||
|
from common import BuildException
|
||||||
|
from common import VCSException
|
||||||
|
|
||||||
#Read configuration...
|
#Read configuration...
|
||||||
execfile('config.py')
|
execfile('config.py')
|
||||||
|
|
@ -46,13 +48,23 @@ parser.add_option("-p", "--package", default=None,
|
||||||
# Get all apps...
|
# Get all apps...
|
||||||
apps = common.read_metadata(options.verbose)
|
apps = common.read_metadata(options.verbose)
|
||||||
|
|
||||||
output_dir = "repo"
|
failed_apps = {}
|
||||||
tmp_dir = "tmp"
|
build_succeeded = []
|
||||||
if not os.path.isdir('tmp'):
|
|
||||||
os.makedirs('tmp')
|
|
||||||
|
|
||||||
if not os.path.isdir('build'):
|
output_dir = 'repo'
|
||||||
os.makedirs('build')
|
if not os.path.isdir(output_dir):
|
||||||
|
print "Creating output directory"
|
||||||
|
os.makedirs(output_dir)
|
||||||
|
|
||||||
|
tmp_dir = 'tmp'
|
||||||
|
if not os.path.isdir(tmp_dir):
|
||||||
|
print "Creating temporary directory"
|
||||||
|
os.makedirs(tmp_dir)
|
||||||
|
|
||||||
|
build_dir = 'build'
|
||||||
|
if not os.path.isdir(build_dir):
|
||||||
|
print "Creating build directory"
|
||||||
|
os.makedirs(build_dir)
|
||||||
|
|
||||||
for app in apps:
|
for app in apps:
|
||||||
|
|
||||||
|
|
@ -76,415 +88,413 @@ for app in apps:
|
||||||
|
|
||||||
|
|
||||||
for thisbuild in app['builds']:
|
for thisbuild in app['builds']:
|
||||||
|
try:
|
||||||
|
dest = os.path.join(output_dir, app['id'] + '_' +
|
||||||
|
thisbuild['vercode'] + '.apk')
|
||||||
|
dest_unsigned = os.path.join(tmp_dir, app['id'] + '_' +
|
||||||
|
thisbuild['vercode'] + '_unsigned.apk')
|
||||||
|
|
||||||
dest = os.path.join(output_dir, app['id'] + '_' +
|
if os.path.exists(dest):
|
||||||
thisbuild['vercode'] + '.apk')
|
print "..version " + thisbuild['version'] + " already exists"
|
||||||
dest_unsigned = os.path.join(tmp_dir, app['id'] + '_' +
|
elif thisbuild['commit'].startswith('!'):
|
||||||
thisbuild['vercode'] + '_unsigned.apk')
|
print ("..skipping version " + thisbuild['version'] + " - " +
|
||||||
|
thisbuild['commit'][1:])
|
||||||
if os.path.exists(dest):
|
|
||||||
print "..version " + thisbuild['version'] + " already exists"
|
|
||||||
elif thisbuild['commit'].startswith('!'):
|
|
||||||
print ("..skipping version " + thisbuild['version'] + " - " +
|
|
||||||
thisbuild['commit'][1:])
|
|
||||||
else:
|
|
||||||
print "..building version " + thisbuild['version']
|
|
||||||
|
|
||||||
if not refreshed_source:
|
|
||||||
vcs.refreshlocal()
|
|
||||||
refreshed_source = True
|
|
||||||
|
|
||||||
# Optionally, the actual app source can be in a subdirectory...
|
|
||||||
if thisbuild.has_key('subdir'):
|
|
||||||
root_dir = os.path.join(build_dir, thisbuild['subdir'])
|
|
||||||
else:
|
else:
|
||||||
root_dir = build_dir
|
print "..building version " + thisbuild['version']
|
||||||
|
|
||||||
# Get a working copy of the right revision...
|
if not refreshed_source:
|
||||||
if options.verbose:
|
vcs.refreshlocal()
|
||||||
print "Resetting repository to " + thisbuild['commit']
|
refreshed_source = True
|
||||||
vcs.reset(thisbuild['commit'])
|
|
||||||
|
|
||||||
# Initialise submodules if requred...
|
# Optionally, the actual app source can be in a subdirectory...
|
||||||
if thisbuild.get('submodules', 'no') == 'yes':
|
if thisbuild.has_key('subdir'):
|
||||||
vcs.initsubmodules()
|
root_dir = os.path.join(build_dir, thisbuild['subdir'])
|
||||||
|
else:
|
||||||
|
root_dir = build_dir
|
||||||
|
|
||||||
# Generate (or update) the ant build file, build.xml...
|
# Get a working copy of the right revision...
|
||||||
if (thisbuild.get('update', 'yes') == 'yes' and
|
if options.verbose:
|
||||||
not thisbuild.has_key('maven')):
|
print "Resetting repository to " + thisbuild['commit']
|
||||||
parms = [os.path.join(sdk_path, 'tools', 'android'),
|
vcs.reset(thisbuild['commit'])
|
||||||
'update', 'project', '-p', '.']
|
|
||||||
parms.append('--subprojects')
|
|
||||||
if thisbuild.has_key('target'):
|
|
||||||
parms.append('-t')
|
|
||||||
parms.append(thisbuild['target'])
|
|
||||||
if subprocess.call(parms, cwd=root_dir) != 0:
|
|
||||||
print "Failed to update project"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# If the app has ant set up to sign the release, we need to switch
|
# Initialise submodules if requred...
|
||||||
# that off, because we want the unsigned apk...
|
if thisbuild.get('submodules', 'no') == 'yes':
|
||||||
for propfile in ('build.properties', 'default.properties'):
|
vcs.initsubmodules()
|
||||||
if os.path.exists(os.path.join(root_dir, propfile)):
|
|
||||||
if subprocess.call(['sed','-i','s/^key.store/#/',
|
|
||||||
propfile], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend %s" % propfile
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Update the local.properties file...
|
# Generate (or update) the ant build file, build.xml...
|
||||||
locprops = os.path.join(root_dir, 'local.properties')
|
if (thisbuild.get('update', 'yes') == 'yes' and
|
||||||
if os.path.exists(locprops):
|
not thisbuild.has_key('maven')):
|
||||||
f = open(locprops, 'r')
|
parms = [os.path.join(sdk_path, 'tools', 'android'),
|
||||||
props = f.read()
|
'update', 'project', '-p', '.']
|
||||||
f.close()
|
parms.append('--subprojects')
|
||||||
# Fix old-fashioned 'sdk-location' by copying
|
if thisbuild.has_key('target'):
|
||||||
# from sdk.dir, if necessary...
|
parms.append('-t')
|
||||||
if thisbuild.get('oldsdkloc', 'no') == "yes":
|
parms.append(thisbuild['target'])
|
||||||
sdkloc = re.match(r".*^sdk.dir=(\S+)$.*", props,
|
if subprocess.call(parms, cwd=root_dir) != 0:
|
||||||
re.S|re.M).group(1)
|
raise BuildException("Failed to update project")
|
||||||
props += "\nsdk-location=" + sdkloc + "\n"
|
|
||||||
# Add ndk location...
|
|
||||||
props+= "\nndk.dir=" + ndk_path + "\n"
|
|
||||||
# Add java.encoding if necessary...
|
|
||||||
if thisbuild.has_key('encoding'):
|
|
||||||
props += "\njava.encoding=" + thisbuild['encoding'] + "\n"
|
|
||||||
f = open(locprops, 'w')
|
|
||||||
f.write(props)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
# Insert version code and number into the manifest if necessary...
|
# If the app has ant set up to sign the release, we need to switch
|
||||||
if thisbuild.has_key('insertversion'):
|
# that off, because we want the unsigned apk...
|
||||||
if subprocess.call(['sed','-i','s/' + thisbuild['insertversion'] +
|
for propfile in ('build.properties', 'default.properties'):
|
||||||
'/' + thisbuild['version'] +'/g',
|
if os.path.exists(os.path.join(root_dir, propfile)):
|
||||||
'AndroidManifest.xml'], cwd=root_dir) !=0:
|
if subprocess.call(['sed','-i','s/^key.store/#/',
|
||||||
print "Failed to amend manifest"
|
propfile], cwd=root_dir) !=0:
|
||||||
sys.exit(1)
|
raise BuildException("Failed to amend %s" % propfile)
|
||||||
if thisbuild.has_key('insertvercode'):
|
|
||||||
if subprocess.call(['sed','-i','s/' + thisbuild['insertvercode'] +
|
|
||||||
'/' + thisbuild['vercode'] +'/g',
|
|
||||||
'AndroidManifest.xml'], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend manifest"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Delete unwanted file...
|
# Update the local.properties file...
|
||||||
if thisbuild.has_key('rm'):
|
locprops = os.path.join(root_dir, 'local.properties')
|
||||||
os.remove(os.path.join(build_dir, thisbuild['rm']))
|
if os.path.exists(locprops):
|
||||||
|
f = open(locprops, 'r')
|
||||||
|
props = f.read()
|
||||||
|
f.close()
|
||||||
|
# Fix old-fashioned 'sdk-location' by copying
|
||||||
|
# from sdk.dir, if necessary...
|
||||||
|
if thisbuild.get('oldsdkloc', 'no') == "yes":
|
||||||
|
sdkloc = re.match(r".*^sdk.dir=(\S+)$.*", props,
|
||||||
|
re.S|re.M).group(1)
|
||||||
|
props += "\nsdk-location=" + sdkloc + "\n"
|
||||||
|
# Add ndk location...
|
||||||
|
props+= "\nndk.dir=" + ndk_path + "\n"
|
||||||
|
# Add java.encoding if necessary...
|
||||||
|
if thisbuild.has_key('encoding'):
|
||||||
|
props += "\njava.encoding=" + thisbuild['encoding'] + "\n"
|
||||||
|
f = open(locprops, 'w')
|
||||||
|
f.write(props)
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Fix apostrophes translation files if necessary...
|
# Insert version code and number into the manifest if necessary...
|
||||||
if thisbuild.get('fixapos', 'no') == 'yes':
|
if thisbuild.has_key('insertversion'):
|
||||||
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
|
if subprocess.call(['sed','-i','s/' + thisbuild['insertversion'] +
|
||||||
for filename in files:
|
'/' + thisbuild['version'] +'/g',
|
||||||
if filename.endswith('.xml'):
|
'AndroidManifest.xml'], cwd=root_dir) !=0:
|
||||||
if subprocess.call(['sed','-i','s@' +
|
raise BuildException("Failed to amend manifest")
|
||||||
r"\([^\\]\)'@\1\\'" +
|
if thisbuild.has_key('insertvercode'):
|
||||||
'@g',
|
if subprocess.call(['sed','-i','s/' + thisbuild['insertvercode'] +
|
||||||
os.path.join(root, filename)]) != 0:
|
'/' + thisbuild['vercode'] +'/g',
|
||||||
print "Failed to amend " + filename
|
'AndroidManifest.xml'], cwd=root_dir) !=0:
|
||||||
sys.exit(1)
|
raise BuildException("Failed to amend manifest")
|
||||||
|
|
||||||
# Fix translation files if necessary...
|
# Delete unwanted file...
|
||||||
if thisbuild.get('fixtrans', 'no') == 'yes':
|
if thisbuild.has_key('rm'):
|
||||||
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
|
os.remove(os.path.join(build_dir, thisbuild['rm']))
|
||||||
for filename in files:
|
|
||||||
if filename.endswith('.xml'):
|
# Fix apostrophes translation files if necessary...
|
||||||
f = open(os.path.join(root, filename))
|
if thisbuild.get('fixapos', 'no') == 'yes':
|
||||||
changed = False
|
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
|
||||||
outlines = []
|
for filename in files:
|
||||||
for line in f:
|
if filename.endswith('.xml'):
|
||||||
num = 1
|
if subprocess.call(['sed','-i','s@' +
|
||||||
index = 0
|
r"\([^\\]\)'@\1\\'" +
|
||||||
oldline = line
|
'@g',
|
||||||
while True:
|
os.path.join(root, filename)]) != 0:
|
||||||
index = line.find("%", index)
|
raise BuildException("Failed to amend " + filename)
|
||||||
if index == -1:
|
|
||||||
break
|
# Fix translation files if necessary...
|
||||||
next = line[index+1:index+2]
|
if thisbuild.get('fixtrans', 'no') == 'yes':
|
||||||
if next == "s" or next == "d":
|
for root, dirs, files in os.walk(os.path.join(root_dir,'res')):
|
||||||
line = (line[:index+1] +
|
for filename in files:
|
||||||
str(num) + "$" +
|
if filename.endswith('.xml'):
|
||||||
line[index+1:])
|
f = open(os.path.join(root, filename))
|
||||||
num += 1
|
changed = False
|
||||||
index += 3
|
outlines = []
|
||||||
else:
|
for line in f:
|
||||||
index += 1
|
num = 1
|
||||||
# We only want to insert the positional arguments
|
index = 0
|
||||||
# when there is more than one argument...
|
oldline = line
|
||||||
if oldline != line:
|
while True:
|
||||||
if num > 2:
|
index = line.find("%", index)
|
||||||
changed = True
|
if index == -1:
|
||||||
else:
|
break
|
||||||
line = oldline
|
next = line[index+1:index+2]
|
||||||
outlines.append(line)
|
if next == "s" or next == "d":
|
||||||
f.close()
|
line = (line[:index+1] +
|
||||||
if changed:
|
str(num) + "$" +
|
||||||
f = open(os.path.join(root, filename), 'w')
|
line[index+1:])
|
||||||
f.writelines(outlines)
|
num += 1
|
||||||
|
index += 3
|
||||||
|
else:
|
||||||
|
index += 1
|
||||||
|
# We only want to insert the positional arguments
|
||||||
|
# when there is more than one argument...
|
||||||
|
if oldline != line:
|
||||||
|
if num > 2:
|
||||||
|
changed = True
|
||||||
|
else:
|
||||||
|
line = oldline
|
||||||
|
outlines.append(line)
|
||||||
f.close()
|
f.close()
|
||||||
|
if changed:
|
||||||
|
f = open(os.path.join(root, filename), 'w')
|
||||||
|
f.writelines(outlines)
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Run a pre-build command if one is required...
|
# Run a pre-build command if one is required...
|
||||||
if thisbuild.has_key('prebuild'):
|
if thisbuild.has_key('prebuild'):
|
||||||
if subprocess.call(thisbuild['prebuild'],
|
if subprocess.call(thisbuild['prebuild'],
|
||||||
cwd=root_dir, shell=True) != 0:
|
cwd=root_dir, shell=True) != 0:
|
||||||
print "Error running pre-build command"
|
raise BuildException("Error running pre-build command")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Apply patches if any
|
# Apply patches if any
|
||||||
if 'patch' in thisbuild:
|
if 'patch' in thisbuild:
|
||||||
for patch in thisbuild['patch'].split(';'):
|
for patch in thisbuild['patch'].split(';'):
|
||||||
print "Applying " + patch
|
print "Applying " + patch
|
||||||
patch_path = os.path.join('metadata', app['id'], patch)
|
patch_path = os.path.join('metadata', app['id'], patch)
|
||||||
if subprocess.call(['patch', '-p1',
|
if subprocess.call(['patch', '-p1',
|
||||||
'-i', os.path.abspath(patch_path)], cwd=build_dir) != 0:
|
'-i', os.path.abspath(patch_path)], cwd=build_dir) != 0:
|
||||||
print "Failed to apply patch %s" % patch_path
|
raise BuildException("Failed to apply patch %s" % patch_path)
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Special case init functions for funambol...
|
# Special case init functions for funambol...
|
||||||
if thisbuild.get('initfun', 'no') == "yes":
|
if thisbuild.get('initfun', 'no') == "yes":
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
if subprocess.call(['sed','-i','s@' +
|
||||||
'<taskdef resource="net/sf/antcontrib/antcontrib.properties" />' +
|
'<taskdef resource="net/sf/antcontrib/antcontrib.properties" />' +
|
||||||
'@' +
|
'@' +
|
||||||
'<taskdef resource="net/sf/antcontrib/antcontrib.properties">' +
|
'<taskdef resource="net/sf/antcontrib/antcontrib.properties">' +
|
||||||
'<classpath>' +
|
'<classpath>' +
|
||||||
'<pathelement location="/usr/share/java/ant-contrib.jar"/>' +
|
'<pathelement location="/usr/share/java/ant-contrib.jar"/>' +
|
||||||
'</classpath>' +
|
'</classpath>' +
|
||||||
'</taskdef>' +
|
'</taskdef>' +
|
||||||
'@g',
|
'@g',
|
||||||
'build.xml'], cwd=root_dir) !=0:
|
'build.xml'], cwd=root_dir) !=0:
|
||||||
print "Failed to amend build.xml"
|
raise BuildException("Failed to amend build.xml")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
if subprocess.call(['sed','-i','s@' +
|
||||||
'\${user.home}/funambol/build/android/build.properties' +
|
'\${user.home}/funambol/build/android/build.properties' +
|
||||||
'@' +
|
'@' +
|
||||||
'build.properties' +
|
'build.properties' +
|
||||||
'@g',
|
'@g',
|
||||||
'build.xml'], cwd=root_dir) !=0:
|
'build.xml'], cwd=root_dir) !=0:
|
||||||
print "Failed to amend build.xml"
|
raise BuildException("Failed to amend build.xml")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
buildxml = os.path.join(root_dir, 'build.xml')
|
buildxml = os.path.join(root_dir, 'build.xml')
|
||||||
f = open(buildxml, 'r')
|
f = open(buildxml, 'r')
|
||||||
xml = f.read()
|
xml = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
xmlout = ""
|
xmlout = ""
|
||||||
mode = 0
|
mode = 0
|
||||||
for line in xml.splitlines():
|
for line in xml.splitlines():
|
||||||
if mode == 0:
|
if mode == 0:
|
||||||
if line.find("jarsigner") != -1:
|
if line.find("jarsigner") != -1:
|
||||||
mode = 1
|
mode = 1
|
||||||
|
else:
|
||||||
|
xmlout += line + "\n"
|
||||||
else:
|
else:
|
||||||
xmlout += line + "\n"
|
if line.find("/exec") != -1:
|
||||||
|
mode += 1
|
||||||
|
if mode == 3:
|
||||||
|
mode =0
|
||||||
|
f = open(buildxml, 'w')
|
||||||
|
f.write(xmlout)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
if subprocess.call(['sed','-i','s@' +
|
||||||
|
'platforms/android-2.0' +
|
||||||
|
'@' +
|
||||||
|
'platforms/android-8' +
|
||||||
|
'@g',
|
||||||
|
'build.xml'], cwd=root_dir) !=0:
|
||||||
|
raise BuildException("Failed to amend build.xml")
|
||||||
|
|
||||||
|
shutil.copyfile(
|
||||||
|
os.path.join(root_dir, "build.properties.example"),
|
||||||
|
os.path.join(root_dir, "build.properties"))
|
||||||
|
|
||||||
|
if subprocess.call(['sed','-i','s@' +
|
||||||
|
'javacchome=.*'+
|
||||||
|
'@' +
|
||||||
|
'javacchome=' + javacc_path +
|
||||||
|
'@g',
|
||||||
|
'build.properties'], cwd=root_dir) !=0:
|
||||||
|
raise BuildException("Failed to amend build.properties")
|
||||||
|
|
||||||
|
if subprocess.call(['sed','-i','s@' +
|
||||||
|
'sdk-folder=.*'+
|
||||||
|
'@' +
|
||||||
|
'sdk-folder=' + sdk_path +
|
||||||
|
'@g',
|
||||||
|
'build.properties'], cwd=root_dir) !=0:
|
||||||
|
raise BuildException("Failed to amend build.properties")
|
||||||
|
|
||||||
|
if subprocess.call(['sed','-i','s@' +
|
||||||
|
'android.sdk.version.*'+
|
||||||
|
'@' +
|
||||||
|
'android.sdk.version=2.0' +
|
||||||
|
'@g',
|
||||||
|
'build.properties'], cwd=root_dir) !=0:
|
||||||
|
raise BuildException("Failed to amend build.properties")
|
||||||
|
|
||||||
|
|
||||||
|
# Build the source tarball right before we build the release...
|
||||||
|
tarname = app['id'] + '_' + thisbuild['vercode'] + '_src'
|
||||||
|
tarball = tarfile.open(os.path.join(output_dir,
|
||||||
|
tarname + '.tar.gz'), "w:gz")
|
||||||
|
tarball.add(build_dir, tarname)
|
||||||
|
tarball.close()
|
||||||
|
|
||||||
|
# Build native stuff if required...
|
||||||
|
if thisbuild.get('buildjni', 'no') == 'yes':
|
||||||
|
ndkbuild = os.path.join(ndk_path, "ndk-build")
|
||||||
|
p = subprocess.Popen([ndkbuild], cwd=root_dir,
|
||||||
|
stdout=subprocess.PIPE)
|
||||||
|
output = p.communicate()[0]
|
||||||
|
if p.returncode != 0:
|
||||||
|
print output
|
||||||
|
raise BuildException("NDK build failed for %s:%s" % (app['id'], thisbuild['version']))
|
||||||
|
elif options.verbose:
|
||||||
|
print output
|
||||||
|
|
||||||
|
# Build the release...
|
||||||
|
if thisbuild.has_key('maven'):
|
||||||
|
p = subprocess.Popen(['mvn', 'clean', 'install',
|
||||||
|
'-Dandroid.sdk.path=' + sdk_path],
|
||||||
|
cwd=root_dir, stdout=subprocess.PIPE)
|
||||||
|
else:
|
||||||
|
if thisbuild.has_key('antcommand'):
|
||||||
|
antcommand = thisbuild['antcommand']
|
||||||
else:
|
else:
|
||||||
if line.find("/exec") != -1:
|
antcommand = 'release'
|
||||||
mode += 1
|
p = subprocess.Popen(['ant', antcommand], cwd=root_dir,
|
||||||
if mode == 3:
|
stdout=subprocess.PIPE)
|
||||||
mode =0
|
|
||||||
f = open(buildxml, 'w')
|
|
||||||
f.write(xmlout)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
|
||||||
'platforms/android-2.0' +
|
|
||||||
'@' +
|
|
||||||
'platforms/android-8' +
|
|
||||||
'@g',
|
|
||||||
'build.xml'], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend build.xml"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
shutil.copyfile(
|
|
||||||
os.path.join(root_dir, "build.properties.example"),
|
|
||||||
os.path.join(root_dir, "build.properties"))
|
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
|
||||||
'javacchome=.*'+
|
|
||||||
'@' +
|
|
||||||
'javacchome=' + javacc_path +
|
|
||||||
'@g',
|
|
||||||
'build.properties'], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend build.properties"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
|
||||||
'sdk-folder=.*'+
|
|
||||||
'@' +
|
|
||||||
'sdk-folder=' + sdk_path +
|
|
||||||
'@g',
|
|
||||||
'build.properties'], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend build.properties"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if subprocess.call(['sed','-i','s@' +
|
|
||||||
'android.sdk.version.*'+
|
|
||||||
'@' +
|
|
||||||
'android.sdk.version=2.0' +
|
|
||||||
'@g',
|
|
||||||
'build.properties'], cwd=root_dir) !=0:
|
|
||||||
print "Failed to amend build.properties"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
# Build the source tarball right before we build the release...
|
|
||||||
tarname = app['id'] + '_' + thisbuild['vercode'] + '_src'
|
|
||||||
tarball = tarfile.open(os.path.join(output_dir,
|
|
||||||
tarname + '.tar.gz'), "w:gz")
|
|
||||||
tarball.add(build_dir, tarname)
|
|
||||||
tarball.close()
|
|
||||||
|
|
||||||
# Build native stuff if required...
|
|
||||||
if thisbuild.get('buildjni', 'no') == 'yes':
|
|
||||||
ndkbuild = os.path.join(ndk_path, "ndk-build")
|
|
||||||
p = subprocess.Popen([ndkbuild], cwd=root_dir,
|
|
||||||
stdout=subprocess.PIPE)
|
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
print output
|
print output
|
||||||
print "NDK build failed for %s:%s" % (app['id'], thisbuild['version'])
|
raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']))
|
||||||
sys.exit(1)
|
|
||||||
elif options.verbose:
|
elif options.verbose:
|
||||||
print output
|
print output
|
||||||
|
print "Build successful"
|
||||||
|
|
||||||
# Build the release...
|
# Find the apk name in the output...
|
||||||
if thisbuild.has_key('maven'):
|
if thisbuild.has_key('bindir'):
|
||||||
p = subprocess.Popen(['mvn', 'clean', 'install',
|
bindir = os.path.join(build_dir, thisbuild['bindir'])
|
||||||
'-Dandroid.sdk.path=' + sdk_path],
|
|
||||||
cwd=root_dir, stdout=subprocess.PIPE)
|
|
||||||
else:
|
|
||||||
if thisbuild.has_key('antcommand'):
|
|
||||||
antcommand = thisbuild['antcommand']
|
|
||||||
else:
|
else:
|
||||||
antcommand = 'release'
|
bindir = os.path.join(root_dir, 'bin')
|
||||||
p = subprocess.Popen(['ant', antcommand], cwd=root_dir,
|
if thisbuild.get('initfun', 'no') == "yes":
|
||||||
stdout=subprocess.PIPE)
|
# Special case (again!) for funambol...
|
||||||
output = p.communicate()[0]
|
src = ("funambol-android-sync-client-" +
|
||||||
if p.returncode != 0:
|
thisbuild['version'] + "-unsigned.apk")
|
||||||
print output
|
src = os.path.join(bindir, src)
|
||||||
print "Build failed for %s:%s" % (app['id'], thisbuild['version'])
|
elif thisbuild.has_key('maven'):
|
||||||
sys.exit(1)
|
src = re.match(r".*^\[INFO\] Installing /.*/([^/]*)\.apk",
|
||||||
elif options.verbose:
|
output, re.S|re.M).group(1)
|
||||||
print output
|
src = os.path.join(bindir, src) + '.apk'
|
||||||
print "Build successful"
|
|
||||||
|
|
||||||
# Find the apk name in the output...
|
|
||||||
if thisbuild.has_key('bindir'):
|
|
||||||
bindir = os.path.join(build_dir, thisbuild['bindir'])
|
|
||||||
else:
|
|
||||||
bindir = os.path.join(root_dir, 'bin')
|
|
||||||
if thisbuild.get('initfun', 'no') == "yes":
|
|
||||||
# Special case (again!) for funambol...
|
|
||||||
src = ("funambol-android-sync-client-" +
|
|
||||||
thisbuild['version'] + "-unsigned.apk")
|
|
||||||
src = os.path.join(bindir, src)
|
|
||||||
elif thisbuild.has_key('maven'):
|
|
||||||
src = re.match(r".*^\[INFO\] Installing /.*/([^/]*)\.apk",
|
|
||||||
output, re.S|re.M).group(1)
|
|
||||||
src = os.path.join(bindir, src) + '.apk'
|
|
||||||
#[INFO] Installing /home/ciaran/fdroidserver/tmp/mainline/application/target/callerid-1.0-SNAPSHOT.apk
|
#[INFO] Installing /home/ciaran/fdroidserver/tmp/mainline/application/target/callerid-1.0-SNAPSHOT.apk
|
||||||
else:
|
else:
|
||||||
src = re.match(r".*^.*Creating (\S+) for release.*$.*", output,
|
src = re.match(r".*^.*Creating (\S+) for release.*$.*", output,
|
||||||
re.S|re.M).group(1)
|
re.S|re.M).group(1)
|
||||||
src = os.path.join(bindir, src)
|
src = os.path.join(bindir, src)
|
||||||
|
|
||||||
# By way of a sanity check, make sure the version and version
|
# By way of a sanity check, make sure the version and version
|
||||||
# code in our new apk match what we expect...
|
# code in our new apk match what we expect...
|
||||||
print "Checking " + src
|
print "Checking " + src
|
||||||
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools',
|
p = subprocess.Popen([os.path.join(sdk_path, 'platform-tools',
|
||||||
'aapt'),
|
'aapt'),
|
||||||
'dump', 'badging', src],
|
'dump', 'badging', src],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
if thisbuild.get('novcheck', 'no') == "yes":
|
if thisbuild.get('novcheck', 'no') == "yes":
|
||||||
vercode = thisbuild['vercode']
|
vercode = thisbuild['vercode']
|
||||||
version = thisbuild['version']
|
version = thisbuild['version']
|
||||||
else:
|
else:
|
||||||
vercode = None
|
vercode = None
|
||||||
version = None
|
version = None
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
if line.startswith("package:"):
|
if line.startswith("package:"):
|
||||||
pat = re.compile(".*versionCode='([0-9]*)'.*")
|
pat = re.compile(".*versionCode='([0-9]*)'.*")
|
||||||
vercode = re.match(pat, line).group(1)
|
vercode = re.match(pat, line).group(1)
|
||||||
pat = re.compile(".*versionName='([^']*)'.*")
|
pat = re.compile(".*versionName='([^']*)'.*")
|
||||||
version = re.match(pat, line).group(1)
|
version = re.match(pat, line).group(1)
|
||||||
if version == None or vercode == None:
|
if version == None or vercode == None:
|
||||||
print "Could not find version information in build in output"
|
raise BuildException("Could not find version information in build in output")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Some apps (e.g. Timeriffic) have had the bonkers idea of
|
# Some apps (e.g. Timeriffic) have had the bonkers idea of
|
||||||
# including the entire changelog in the version number. Remove
|
# including the entire changelog in the version number. Remove
|
||||||
# it so we can compare. (TODO: might be better to remove it
|
# it so we can compare. (TODO: might be better to remove it
|
||||||
# before we compile, in fact)
|
# before we compile, in fact)
|
||||||
index = version.find(" //")
|
index = version.find(" //")
|
||||||
if index != -1:
|
if index != -1:
|
||||||
version = version[:index]
|
version = version[:index]
|
||||||
|
|
||||||
if (version != thisbuild['version'] or
|
if (version != thisbuild['version'] or
|
||||||
vercode != thisbuild['vercode']):
|
vercode != thisbuild['vercode']):
|
||||||
print "Unexpected version/version code in output"
|
raise BuildException(("Unexpected version/version code in output"
|
||||||
print "APK:" + version + " / " + str(vercode)
|
"APK: %s / %s"
|
||||||
print ("Expected: " + thisbuild['version'] + " / " +
|
"Expected: %s / %s")
|
||||||
str(thisbuild['vercode']))
|
) % (version, str(vercode), thisbuild['version'], str(thisbuild['vercode']))
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Copy the unsigned apk to our temp directory for further
|
# Copy the unsigned apk to our temp directory for further
|
||||||
# processing...
|
# processing...
|
||||||
shutil.copyfile(src, dest_unsigned)
|
shutil.copyfile(src, dest_unsigned)
|
||||||
|
|
||||||
# Figure out the key alias name we'll use. Only the first 8
|
# Figure out the key alias name we'll use. Only the first 8
|
||||||
# characters are significant, so we'll use the first 8 from
|
# characters are significant, so we'll use the first 8 from
|
||||||
# the MD5 of the app's ID and hope there are no collisions.
|
# the MD5 of the app's ID and hope there are no collisions.
|
||||||
# If a collision does occur later, we're going to have to
|
# If a collision does occur later, we're going to have to
|
||||||
# come up with a new alogrithm, AND rename all existing keys
|
# come up with a new alogrithm, AND rename all existing keys
|
||||||
# in the keystore!
|
# in the keystore!
|
||||||
if keyaliases.has_key(app['id']):
|
if keyaliases.has_key(app['id']):
|
||||||
# For this particular app, the key alias is overridden...
|
# For this particular app, the key alias is overridden...
|
||||||
keyalias = keyaliases[app['id']]
|
keyalias = keyaliases[app['id']]
|
||||||
else:
|
else:
|
||||||
m = md5.new()
|
m = md5.new()
|
||||||
m.update(app['id'])
|
m.update(app['id'])
|
||||||
keyalias = m.hexdigest()[:8]
|
keyalias = m.hexdigest()[:8]
|
||||||
print "Key alias: " + keyalias
|
print "Key alias: " + keyalias
|
||||||
|
|
||||||
# See if we already have a key for this application, and
|
# See if we already have a key for this application, and
|
||||||
# if not generate one...
|
# if not generate one...
|
||||||
p = subprocess.Popen(['keytool', '-list',
|
p = subprocess.Popen(['keytool', '-list',
|
||||||
'-alias', keyalias, '-keystore', keystore,
|
'-alias', keyalias, '-keystore', keystore,
|
||||||
'-storepass', keystorepass], stdout=subprocess.PIPE)
|
'-storepass', keystorepass], stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
if p.returncode !=0:
|
if p.returncode !=0:
|
||||||
print "Key does not exist - generating..."
|
print "Key does not exist - generating..."
|
||||||
p = subprocess.Popen(['keytool', '-genkey',
|
p = subprocess.Popen(['keytool', '-genkey',
|
||||||
'-keystore', keystore, '-alias', keyalias,
|
'-keystore', keystore, '-alias', keyalias,
|
||||||
'-keyalg', 'RSA', '-keysize', '2048',
|
'-keyalg', 'RSA', '-keysize', '2048',
|
||||||
'-validity', '10000',
|
'-validity', '10000',
|
||||||
|
'-storepass', keystorepass, '-keypass', keypass,
|
||||||
|
'-dname', keydname], stdout=subprocess.PIPE)
|
||||||
|
output = p.communicate()[0]
|
||||||
|
print output
|
||||||
|
if p.returncode != 0:
|
||||||
|
raise BuildException("Failed to generate key")
|
||||||
|
|
||||||
|
# Sign the application...
|
||||||
|
p = subprocess.Popen(['jarsigner', '-keystore', keystore,
|
||||||
'-storepass', keystorepass, '-keypass', keypass,
|
'-storepass', keystorepass, '-keypass', keypass,
|
||||||
'-dname', keydname], stdout=subprocess.PIPE)
|
dest_unsigned, keyalias], stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
print output
|
print output
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
print "Failed to generate key"
|
raise BuildException("Failed to sign application")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Sign the application...
|
# Zipalign it...
|
||||||
p = subprocess.Popen(['jarsigner', '-keystore', keystore,
|
p = subprocess.Popen([os.path.join(sdk_path,'tools','zipalign'),
|
||||||
'-storepass', keystorepass, '-keypass', keypass,
|
'-v', '4', dest_unsigned, dest],
|
||||||
dest_unsigned, keyalias], stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
print output
|
print output
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
print "Failed to sign application"
|
raise BuildException("Failed to align application")
|
||||||
sys.exit(1)
|
os.remove(dest_unsigned)
|
||||||
|
except BuildException as be:
|
||||||
|
print "Could not build app %s due to BuildException: %s" % (app['id'], be)
|
||||||
|
failed_apps[app['id']] = be
|
||||||
|
except VCSException as vcse:
|
||||||
|
print "VCS error while building app %s: %s" % (app['id'], vcse)
|
||||||
|
failed_apps[app['id']] = vcse
|
||||||
|
except Exception as e:
|
||||||
|
print "Could not build app %s due to unknown error: %s" % (app['id'], e)
|
||||||
|
failed_apps[app['id']] = e
|
||||||
|
build_succeeded.append(app)
|
||||||
|
|
||||||
# Zipalign it...
|
for app in build_succeeded:
|
||||||
p = subprocess.Popen([os.path.join(sdk_path,'tools','zipalign'),
|
print "success: %s" % (app['id'])
|
||||||
'-v', '4', dest_unsigned, dest],
|
|
||||||
stdout=subprocess.PIPE)
|
for fa in failed_apps:
|
||||||
output = p.communicate()[0]
|
print "Build for app %s failed: %s" % (fa, failed_apps[fa])
|
||||||
print output
|
|
||||||
if p.returncode != 0:
|
|
||||||
print "Failed to align application"
|
|
||||||
sys.exit(1)
|
|
||||||
os.remove(dest_unsigned)
|
|
||||||
|
|
||||||
print "Finished."
|
print "Finished."
|
||||||
|
if len(failed_apps) > 0:
|
||||||
|
print str(len(failed_apps)) + 'builds failed'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# checkmarket.py - part of the FDroid server tools
|
# checkmarket.py - part of the FDroid server tools
|
||||||
|
|
|
||||||
88
checkmarket2.py
Executable file
88
checkmarket2.py
Executable file
|
|
@ -0,0 +1,88 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# checkmarket2.py - part of the FDroid server tools
|
||||||
|
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import re
|
||||||
|
import urllib
|
||||||
|
import time
|
||||||
|
from optparse import OptionParser
|
||||||
|
import HTMLParser
|
||||||
|
import common
|
||||||
|
|
||||||
|
#Read configuration...
|
||||||
|
execfile('config.py')
|
||||||
|
|
||||||
|
|
||||||
|
# Parse command line...
|
||||||
|
parser = OptionParser()
|
||||||
|
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||||
|
help="Spew out even more information than normal")
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
# Get all apps...
|
||||||
|
apps = common.read_metadata(options.verbose)
|
||||||
|
|
||||||
|
html_parser = HTMLParser.HTMLParser()
|
||||||
|
|
||||||
|
for app in apps:
|
||||||
|
|
||||||
|
print "Processing " + app['id']
|
||||||
|
url = 'http://market.android.com/details?id=' + app['id']
|
||||||
|
page = urllib.urlopen(url).read()
|
||||||
|
|
||||||
|
version = None
|
||||||
|
vercode = None
|
||||||
|
|
||||||
|
m = re.search('<dd itemprop="softwareVersion">([^>]+)</dd>', page)
|
||||||
|
if m:
|
||||||
|
version = html_parser.unescape(m.group(1))
|
||||||
|
|
||||||
|
m = re.search('data-paramValue="(\d+)"><div class="goog-menuitem-content">Latest Version<', page)
|
||||||
|
if m:
|
||||||
|
vercode = m.group(1)
|
||||||
|
|
||||||
|
if not vercode:
|
||||||
|
print "...couldn't find version code"
|
||||||
|
elif not version:
|
||||||
|
print "...couldn't find version"
|
||||||
|
elif vercode == app['marketvercode'] and version == app['marketversion']:
|
||||||
|
print "...up to date"
|
||||||
|
else:
|
||||||
|
print '...updating to version:' + version + ' vercode:' + vercode
|
||||||
|
newdata = ''
|
||||||
|
metafile = os.path.join('metadata', app['id'] + '.txt')
|
||||||
|
mf = open(metafile, 'r')
|
||||||
|
for line in mf:
|
||||||
|
if line.startswith('Market Version:'):
|
||||||
|
newdata += 'Market Version:' + version + '\n'
|
||||||
|
elif line.startswith('Market Version Code:'):
|
||||||
|
newdata += 'Market Version Code:' + vercode + '\n'
|
||||||
|
else:
|
||||||
|
newdata += line
|
||||||
|
mf.close()
|
||||||
|
mf = open(metafile, 'w')
|
||||||
|
mf.write(newdata)
|
||||||
|
mf.close()
|
||||||
|
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
print "Finished."
|
||||||
|
|
||||||
104
common.py
104
common.py
|
|
@ -29,8 +29,7 @@ def getvcs(vcstype, remote, local):
|
||||||
return vcs_hg(remote,local)
|
return vcs_hg(remote,local)
|
||||||
elif vcstype == 'bzr':
|
elif vcstype == 'bzr':
|
||||||
return vcs_bzr(remote,local)
|
return vcs_bzr(remote,local)
|
||||||
print "Invalid vcs type " + vcstype
|
raise VCSException("Invalid vcs type " + vcstype)
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
class vcs:
|
class vcs:
|
||||||
def __init__(self, remote, local):
|
def __init__(self, remote, local):
|
||||||
|
|
@ -44,8 +43,7 @@ class vcs:
|
||||||
remote = remote[index+1:]
|
remote = remote[index+1:]
|
||||||
index = self.username.find(':')
|
index = self.username.find(':')
|
||||||
if index == -1:
|
if index == -1:
|
||||||
print "Password required with username"
|
raise VCSException("Password required with username")
|
||||||
sys.exit(1)
|
|
||||||
self.password = self.username[index+1:]
|
self.password = self.username[index+1:]
|
||||||
self.username = self.username[:index]
|
self.username = self.username[:index]
|
||||||
else:
|
else:
|
||||||
|
|
@ -86,41 +84,34 @@ class vcs_git(vcs):
|
||||||
|
|
||||||
def clone(self):
|
def clone(self):
|
||||||
if subprocess.call(['git', 'clone', self.remote, self.local]) != 0:
|
if subprocess.call(['git', 'clone', self.remote, self.local]) != 0:
|
||||||
print "Git clone failed"
|
raise VCSException("Git clone failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def reset(self, rev=None):
|
def reset(self, rev=None):
|
||||||
if rev is None:
|
if rev is None:
|
||||||
rev = 'origin'
|
rev = 'origin'
|
||||||
if subprocess.call(['git', 'reset', '--hard', rev],
|
if subprocess.call(['git', 'reset', '--hard', rev],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git reset failed"
|
raise VCSException("Git reset failed")
|
||||||
sys.exit(1)
|
|
||||||
if subprocess.call(['git', 'clean', '-dfx'],
|
if subprocess.call(['git', 'clean', '-dfx'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git clean failed"
|
raise VCSException("Git clean failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def pull(self):
|
def pull(self):
|
||||||
if subprocess.call(['git', 'pull', 'origin'],
|
if subprocess.call(['git', 'pull', 'origin'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git pull failed"
|
raise VCSException("Git pull failed")
|
||||||
sys.exit(1)
|
|
||||||
# Might need tags that aren't on a branch.
|
# Might need tags that aren't on a branch.
|
||||||
if subprocess.call(['git', 'fetch', '--tags', 'origin'],
|
if subprocess.call(['git', 'fetch', '--tags', 'origin'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git fetch failed"
|
raise VCSException("Git fetch failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def initsubmodules(self):
|
def initsubmodules(self):
|
||||||
if subprocess.call(['git', 'submodule', 'init'],
|
if subprocess.call(['git', 'submodule', 'init'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git submodule init failed"
|
raise VCSException("Git submodule init failed")
|
||||||
sys.exit(1)
|
|
||||||
if subprocess.call(['git', 'submodule', 'update'],
|
if subprocess.call(['git', 'submodule', 'update'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Git submodule update failed"
|
raise VCSException("Git submodule update failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -128,7 +119,7 @@ class vcs_svn(vcs):
|
||||||
|
|
||||||
def userargs(self):
|
def userargs(self):
|
||||||
if self.username is None:
|
if self.username is None:
|
||||||
return []
|
return ['--non-interactive']
|
||||||
return ['--username', self.username,
|
return ['--username', self.username,
|
||||||
'--password', self.password,
|
'--password', self.password,
|
||||||
'--non-interactive']
|
'--non-interactive']
|
||||||
|
|
@ -136,8 +127,7 @@ class vcs_svn(vcs):
|
||||||
def clone(self):
|
def clone(self):
|
||||||
if subprocess.call(['svn', 'checkout', self.remote, self.local] +
|
if subprocess.call(['svn', 'checkout', self.remote, self.local] +
|
||||||
self.userargs()) != 0:
|
self.userargs()) != 0:
|
||||||
print "Svn checkout failed"
|
raise VCSException("Svn checkout failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def reset(self, rev=None):
|
def reset(self, rev=None):
|
||||||
if rev is None:
|
if rev is None:
|
||||||
|
|
@ -149,25 +139,21 @@ class vcs_svn(vcs):
|
||||||
r"svn status | awk '/\?/ {print $2}' | xargs rm -rf"):
|
r"svn status | awk '/\?/ {print $2}' | xargs rm -rf"):
|
||||||
if subprocess.call(svncommand, cwd=self.local,
|
if subprocess.call(svncommand, cwd=self.local,
|
||||||
shell=True) != 0:
|
shell=True) != 0:
|
||||||
print "Svn reset failed"
|
raise VCSException("Svn reset failed")
|
||||||
sys.exit(1)
|
|
||||||
if subprocess.call(['svn', 'update', '--force'] + revargs +
|
if subprocess.call(['svn', 'update', '--force'] + revargs +
|
||||||
self.userargs(), cwd=self.local) != 0:
|
self.userargs(), cwd=self.local) != 0:
|
||||||
print "Svn update failed"
|
raise VCSException("Svn update failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def pull(self):
|
def pull(self):
|
||||||
if subprocess.call(['svn', 'update'] +
|
if subprocess.call(['svn', 'update'] +
|
||||||
self.userargs(), cwd=self.local) != 0:
|
self.userargs(), cwd=self.local) != 0:
|
||||||
print "Svn update failed"
|
raise VCSException("Svn update failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
class vcs_hg(vcs):
|
class vcs_hg(vcs):
|
||||||
|
|
||||||
def clone(self):
|
def clone(self):
|
||||||
if subprocess.call(['hg', 'clone', self.remote, self.local]) !=0:
|
if subprocess.call(['hg', 'clone', self.remote, self.local]) !=0:
|
||||||
print "Hg clone failed"
|
raise VCSException("Hg clone failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def reset(self, rev=None):
|
def reset(self, rev=None):
|
||||||
if rev is None:
|
if rev is None:
|
||||||
|
|
@ -176,25 +162,21 @@ class vcs_hg(vcs):
|
||||||
revargs = [rev]
|
revargs = [rev]
|
||||||
if subprocess.call('hg status -u | xargs rm -rf',
|
if subprocess.call('hg status -u | xargs rm -rf',
|
||||||
cwd=self.local, shell=True) != 0:
|
cwd=self.local, shell=True) != 0:
|
||||||
print "Hg clean failed"
|
raise VCSException("Hg clean failed")
|
||||||
sys.exit(1)
|
|
||||||
if subprocess.call(['hg', 'checkout', '-C'] + revargs,
|
if subprocess.call(['hg', 'checkout', '-C'] + revargs,
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Hg checkout failed"
|
raise VCSException("Hg checkout failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def pull(self):
|
def pull(self):
|
||||||
if subprocess.call(['hg', 'pull'],
|
if subprocess.call(['hg', 'pull'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Hg pull failed"
|
raise VCSException("Hg pull failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
class vcs_bzr(vcs):
|
class vcs_bzr(vcs):
|
||||||
|
|
||||||
def clone(self):
|
def clone(self):
|
||||||
if subprocess.call(['bzr', 'branch', self.remote, self.local]) != 0:
|
if subprocess.call(['bzr', 'branch', self.remote, self.local]) != 0:
|
||||||
print "Bzr branch failed"
|
raise VCSException("Bzr branch failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def reset(self, rev=None):
|
def reset(self, rev=None):
|
||||||
if rev is None:
|
if rev is None:
|
||||||
|
|
@ -203,18 +185,15 @@ class vcs_bzr(vcs):
|
||||||
revargs = ['-r', rev]
|
revargs = ['-r', rev]
|
||||||
if subprocess.call(['bzr', 'clean-tree', '--force',
|
if subprocess.call(['bzr', 'clean-tree', '--force',
|
||||||
'--unknown', '--ignored'], cwd=self.local) != 0:
|
'--unknown', '--ignored'], cwd=self.local) != 0:
|
||||||
print "Bzr revert failed"
|
raise VCSException("Bzr revert failed")
|
||||||
sys.exit(1)
|
|
||||||
if subprocess.call(['bzr', 'revert'] + revargs,
|
if subprocess.call(['bzr', 'revert'] + revargs,
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Bzr revert failed"
|
raise VCSException("Bzr revert failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
def pull(self):
|
def pull(self):
|
||||||
if subprocess.call(['bzr', 'pull'],
|
if subprocess.call(['bzr', 'pull'],
|
||||||
cwd=self.local) != 0:
|
cwd=self.local) != 0:
|
||||||
print "Bzr update failed"
|
raise VCSException("Bzr update failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -224,8 +203,7 @@ def parse_metadata(metafile, **kw):
|
||||||
parts = [p.replace("\\,", ",")
|
parts = [p.replace("\\,", ",")
|
||||||
for p in re.split(r"(?<!\\),", value)]
|
for p in re.split(r"(?<!\\),", value)]
|
||||||
if len(parts) < 3:
|
if len(parts) < 3:
|
||||||
print "Invalid build format: " + value + " in " + metafile.name
|
raise MetaDataException("Invalid build format: " + value + " in " + metafile.name)
|
||||||
sys.exit(1)
|
|
||||||
thisbuild = {}
|
thisbuild = {}
|
||||||
thisbuild['version'] = parts[0]
|
thisbuild['version'] = parts[0]
|
||||||
thisbuild['vercode'] = parts[1]
|
thisbuild['vercode'] = parts[1]
|
||||||
|
|
@ -268,8 +246,7 @@ def parse_metadata(metafile, **kw):
|
||||||
continue
|
continue
|
||||||
index = line.find(':')
|
index = line.find(':')
|
||||||
if index == -1:
|
if index == -1:
|
||||||
print "Invalid metadata in " + metafile.name + " at: " + line
|
raise MetaDataException("Invalid metadata in " + metafile.name + " at: " + line)
|
||||||
sys.exit(1)
|
|
||||||
field = line[:index]
|
field = line[:index]
|
||||||
value = line[index+1:]
|
value = line[index+1:]
|
||||||
if field == 'Description':
|
if field == 'Description':
|
||||||
|
|
@ -302,9 +279,8 @@ def parse_metadata(metafile, **kw):
|
||||||
part != "NonFreeNet" and
|
part != "NonFreeNet" and
|
||||||
part != "NonFreeDep" and
|
part != "NonFreeDep" and
|
||||||
part != "NonFreeAdd"):
|
part != "NonFreeAdd"):
|
||||||
print "Unrecognised antifeature '" + part + "' in " \
|
raise MetaDataException("Unrecognised antifeature '" + part + "' in " \
|
||||||
+ metafile.name
|
+ metafile.name)
|
||||||
sys.exit(1)
|
|
||||||
thisinfo['antifeatures'] = value
|
thisinfo['antifeatures'] = value
|
||||||
elif field == 'Market Version':
|
elif field == 'Market Version':
|
||||||
thisinfo['marketversion'] = value
|
thisinfo['marketversion'] = value
|
||||||
|
|
@ -324,8 +300,7 @@ def parse_metadata(metafile, **kw):
|
||||||
if value == "Yes":
|
if value == "Yes":
|
||||||
thisinfo['requiresroot'] = True
|
thisinfo['requiresroot'] = True
|
||||||
else:
|
else:
|
||||||
print "Unrecognised field " + field + " in " + metafile.name
|
raise MetaDataException("Unrecognised field " + field + " in " + metafile.name)
|
||||||
sys.exit(1)
|
|
||||||
elif mode == 1: # multi-line description
|
elif mode == 1: # multi-line description
|
||||||
if line == '.':
|
if line == '.':
|
||||||
mode = 0
|
mode = 0
|
||||||
|
|
@ -346,8 +321,7 @@ def parse_metadata(metafile, **kw):
|
||||||
parse_buildline("".join(buildline)))
|
parse_buildline("".join(buildline)))
|
||||||
mode = 0
|
mode = 0
|
||||||
if mode == 1:
|
if mode == 1:
|
||||||
print "Description not terminated in " + metafile.name
|
raise MetaDataException("Description not terminated in " + metafile.name)
|
||||||
sys.exit(1)
|
|
||||||
if len(thisinfo['description']) == 0:
|
if len(thisinfo['description']) == 0:
|
||||||
thisinfo['description'] = 'No description available'
|
thisinfo['description'] = 'No description available'
|
||||||
return thisinfo
|
return thisinfo
|
||||||
|
|
@ -359,3 +333,25 @@ def read_metadata(verbose=False):
|
||||||
print "Reading " + metafile
|
print "Reading " + metafile
|
||||||
apps.append(parse_metadata(metafile, verbose=verbose))
|
apps.append(parse_metadata(metafile, verbose=verbose))
|
||||||
return apps
|
return apps
|
||||||
|
|
||||||
|
class BuildException(Exception):
|
||||||
|
def __init__(self, value):
|
||||||
|
self.value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return repr(self.value)
|
||||||
|
|
||||||
|
class VCSException(Exception):
|
||||||
|
def __init__(self, value):
|
||||||
|
self.value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return repr(self.value)
|
||||||
|
|
||||||
|
class MetaDataException(Exception):
|
||||||
|
def __init__(self, value):
|
||||||
|
self.value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return repr(self.value)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ Build Version:1.2.0a,71,e37439e12d11ff17a841,prebuild=rsync -r lib/ libs
|
||||||
Build Version:1.2.1,73,e35fd128c954d41e24abf91b71f301740f6ca483,prebuild=rsync -r lib/ libs
|
Build Version:1.2.1,73,e35fd128c954d41e24abf91b71f301740f6ca483,prebuild=rsync -r lib/ libs
|
||||||
Build Version:1.2.1.2,75,28c98a7,prebuild=rsync -r lib/ libs,target=android-9
|
Build Version:1.2.1.2,75,28c98a7,prebuild=rsync -r lib/ libs,target=android-9
|
||||||
Build Version:1.2.1.3,76,143892b558,prebuild=rsync -r lib/ libs,target=android-9
|
Build Version:1.2.1.3,76,143892b558,prebuild=rsync -r lib/ libs,target=android-9
|
||||||
|
Build Version:1.2.1.5,78,!more dependency shuffling required and watch out for the proguard config
|
||||||
|
|
||||||
Market Version:1.2.1.3
|
Market Version:1.2.1.5
|
||||||
Market Version Code:76
|
Market Version Code:78
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ Build Version:1.9.1,77,v1.9.1-2
|
||||||
Build Version:1.9.2,78,v1.9.2
|
Build Version:1.9.2,78,v1.9.2
|
||||||
Build Version:1.9.3.1,80,v1.9.3.1
|
Build Version:1.9.3.1,80,v1.9.3.1
|
||||||
Build Version:1.9.5,82,v1.9.5
|
Build Version:1.9.5,82,v1.9.5
|
||||||
|
Build Version:1.9.6,83,v1.9.6
|
||||||
|
|
||||||
Market Version:1.9.5
|
Market Version:1.9.6
|
||||||
Market Version Code:82
|
Market Version Code:83
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ An alarm clock.
|
||||||
Repo Type:svn
|
Repo Type:svn
|
||||||
Repo:http://kraigsandroid.googlecode.com/svn/tags/
|
Repo:http://kraigsandroid.googlecode.com/svn/tags/
|
||||||
|
|
||||||
Build Version:1.7,8,378,subdir=alarmclock-1.7/android/alarmclock
|
Build Version:1.7,8,378
|
||||||
|
|
||||||
Market Version:1.7
|
Market Version:1.7
|
||||||
Market Version Code:8
|
Market Version Code:8
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ Repo Type:svn
|
||||||
Repo:http://boardgamegeek.googlecode.com/svn/trunk/
|
Repo:http://boardgamegeek.googlecode.com/svn/trunk/
|
||||||
|
|
||||||
Build Version:3.3,20,r416,subdir=BoardGameGeek,target=android-8
|
Build Version:3.3,20,r416,subdir=BoardGameGeek,target=android-8
|
||||||
|
Build Version:3.4,21,r525,subdir=BoardGameGeek,target=android-8
|
||||||
|
|
||||||
Market Version:3.3
|
Market Version:3.4
|
||||||
Market Version Code:20
|
Market Version Code:21
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ Build Version:2.0.14,100,!No source in repo,target=android-11
|
||||||
Build Version:2.0.16,102,!No source in repo,target=android-11
|
Build Version:2.0.16,102,!No source in repo,target=android-11
|
||||||
#No source added to repo for a long time. Question here....
|
#No source added to repo for a long time. Question here....
|
||||||
#https://answers.launchpad.net/arxivdroid/+question/173825
|
#https://answers.launchpad.net/arxivdroid/+question/173825
|
||||||
|
Build Version:2.0.20,106,!No source in repo
|
||||||
|
|
||||||
Market Version:2.0.16
|
Market Version:2.0.20
|
||||||
Market Version Code:102
|
Market Version Code:106
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ Repo:git://github.com/drodin/TuxRider.git
|
||||||
#Build Version:1.0.4 beta,6,67bce39cda321c225bc5
|
#Build Version:1.0.4 beta,6,67bce39cda321c225bc5
|
||||||
|
|
||||||
|
|
||||||
Market Version:1.0.9 beta
|
Market Version:1.0.9
|
||||||
Market Version Code:11
|
Market Version Code:11
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ Build Version:3.6.1,61,75e2f8328ff9a2602fe1,target=android-9
|
||||||
Build Version:3.6.2,62,da37baecb2c90aa2b306,target=android-9
|
Build Version:3.6.2,62,da37baecb2c90aa2b306,target=android-9
|
||||||
Build Version:3.7,68,514799b45d18cf6dbc42065adf08abbdc9e2f16f,target=android-9
|
Build Version:3.7,68,514799b45d18cf6dbc42065adf08abbdc9e2f16f,target=android-9
|
||||||
Build Version:3.8,69,bb85065cb6045df773cd681ac8bad55a6818d48a,target=android-9
|
Build Version:3.8,69,bb85065cb6045df773cd681ac8bad55a6818d48a,target=android-9
|
||||||
|
Build Version:3.8.1,70,890b6affe8a64,target=android-9
|
||||||
|
|
||||||
Market Version:3.8
|
Market Version:3.8.1
|
||||||
Market Version Code:69
|
Market Version Code:70
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,5 @@ Repo:https://github.com/k9mail/k-9.git
|
||||||
#Note - k9 is currently developer's binary only
|
#Note - k9 is currently developer's binary only
|
||||||
#Build Version:3.906,14006,3.906,oldsdkloc=yes,patch=target9to10.patch,target=android-10
|
#Build Version:3.906,14006,3.906,oldsdkloc=yes,patch=target9to10.patch,target=android-10
|
||||||
|
|
||||||
Market Version:3.802
|
Market Version:4.002
|
||||||
Market Version Code:13022
|
Market Version Code:14020
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,5 @@ prebuild=sed -ri 's/(debuggable)="true"/\1="false"/' AndroidManifest.xml
|
||||||
Build Version:1.36.4,110,161,\
|
Build Version:1.36.4,110,161,\
|
||||||
prebuild=sed -ri 's/(debuggable)="true"/\1="false"/' AndroidManifest.xml
|
prebuild=sed -ri 's/(debuggable)="true"/\1="false"/' AndroidManifest.xml
|
||||||
|
|
||||||
Market Version:1.38.1
|
Market Version:1.39.2
|
||||||
Market Version Code:142
|
Market Version Code:152
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
Disabled:Needs google maps API key, and some build problems resolving
|
||||||
Use Built:Yes
|
Use Built:Yes
|
||||||
License:Apache2
|
License:Apache2
|
||||||
AntiFeatures:NonFreeDep
|
AntiFeatures:NonFreeDep
|
||||||
|
|
@ -21,5 +22,5 @@ Build Version:1.1.3,26,!Doesn't build - needs dependencies building now I think
|
||||||
#Still doesn't build...
|
#Still doesn't build...
|
||||||
#Build Version:1.1.9,22,v1.1.9,subdir=MyTracks,encoding=utf-8,target=android-13
|
#Build Version:1.1.9,22,v1.1.9,subdir=MyTracks,encoding=utf-8,target=android-13
|
||||||
|
|
||||||
Market Version:1.1.11
|
Market Version:1.1.13
|
||||||
Market Version Code:34
|
Market Version Code:36
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ Build Version:1.23,30,fae3e5f0f54fe5a2f46480481b39f9566ee9c67b
|
||||||
Build Version:1.3),32,r1.3,target=android-8
|
Build Version:1.3),32,r1.3,target=android-8
|
||||||
Build Version:1.31,33,r1.31,target=android-8
|
Build Version:1.31,33,r1.31,target=android-8
|
||||||
Build Version:1.32,34,r1.32,target=android-8
|
Build Version:1.32,34,r1.32,target=android-8
|
||||||
|
Build Version:1.33,35,r1.33,target=android-8
|
||||||
|
|
||||||
Market Version:1.32
|
Market Version:1.33
|
||||||
Market Version Code:34
|
Market Version Code:35
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,5 @@ this Android app.
|
||||||
|
|
||||||
Repo Type:git
|
Repo Type:git
|
||||||
Repo:https://github.com/jberkel/gist-it.git
|
Repo:https://github.com/jberkel/gist-it.git
|
||||||
Market Version:0.1.2
|
Market Version:0.1.4
|
||||||
Market Version Code:3
|
Market Version Code:5
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ Summary:Backup SMS and call logs to IMAP
|
||||||
Description:
|
Description:
|
||||||
Backups up SMS and call log data from the device to an IMAP server, or
|
Backups up SMS and call log data from the device to an IMAP server, or
|
||||||
Gmail.
|
Gmail.
|
||||||
|
|
||||||
|
There are newer versions of this application avaiable elsewhere, but
|
||||||
|
these include non-free software components and are not available via
|
||||||
|
F-Droid.
|
||||||
.
|
.
|
||||||
|
|
||||||
Repo Type:git
|
Repo Type:git
|
||||||
|
|
@ -15,6 +19,7 @@ Repo:https://github.com/jberkel/sms-backup-plus.git
|
||||||
|
|
||||||
Build Version:1.4.3,1404,1.4.3
|
Build Version:1.4.3,1404,1.4.3
|
||||||
Build Version:1.4.4,1405,1.4.4,target=android-9,prebuild=mv lib libs
|
Build Version:1.4.4,1405,1.4.4,target=android-9,prebuild=mv lib libs
|
||||||
|
Build Version:1.4.5,1406,!Non-free blob now included
|
||||||
|
|
||||||
Market Version:1.4.4
|
Market Version:1.4.5
|
||||||
Market Version Code:1405
|
Market Version Code:1406
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,5 @@ Summary:Commodore 64 Emulator
|
||||||
Description:
|
Description:
|
||||||
A Commodore 64 (C64) emulator.
|
A Commodore 64 (C64) emulator.
|
||||||
.
|
.
|
||||||
Market Version:1.5.7
|
Market Version:1.5.13
|
||||||
Market Version Code:10507
|
Market Version Code:10513
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ Build Version:1.4.289,289,289
|
||||||
Build Version:1.5.315,315,315
|
Build Version:1.5.315,315,315
|
||||||
Build Version:1.5.317,317,!wrong version code
|
Build Version:1.5.317,317,!wrong version code
|
||||||
Build Version:1.5.324,324,324
|
Build Version:1.5.324,324,324
|
||||||
|
Build Version:1.5.324,324,324
|
||||||
|
|
||||||
Market Version:338
|
Market Version:339
|
||||||
Market Version Code:338
|
Market Version Code:339
|
||||||
|
|
|
||||||
|
|
@ -22,5 +22,5 @@ Build Version:0.2.11,46,614,prebuild=mv lib/ libs/
|
||||||
#Still guessing, see previous comment
|
#Still guessing, see previous comment
|
||||||
Build Version:0.3.1,48,659,prebuild=mv lib/ libs/
|
Build Version:0.3.1,48,659,prebuild=mv lib/ libs/
|
||||||
|
|
||||||
Market Version:0.3.2
|
Market Version:0.4.1
|
||||||
Market Version Code:49
|
Market Version Code:51
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@ Build Version:0.2.2,8,v0.2.2,buildjni=yes,target=android-8
|
||||||
Build Version:0.3.-1,10,v0.3.-1,buildjni=yes,target=android-8
|
Build Version:0.3.-1,10,v0.3.-1,buildjni=yes,target=android-8
|
||||||
Build Version:0.3.2,13,v0.3.2,buildjni=yes,target=android-8
|
Build Version:0.3.2,13,v0.3.2,buildjni=yes,target=android-8
|
||||||
|
|
||||||
Market Version:0.3.2
|
Market Version:0.4.1
|
||||||
Market Version Code:13
|
Market Version Code:15
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ Build Version:3.0.53-18,263,c555ecd66d18b218fb255733c8b33a0825992f76,subdir=andr
|
||||||
Build Version:3.0.53-19,264,cr3.0.53-19,subdir=android,rm=android/build.properties,buildjni=yes
|
Build Version:3.0.53-19,264,cr3.0.53-19,subdir=android,rm=android/build.properties,buildjni=yes
|
||||||
Build Version:3.0.54-5,275,cr3.0.54-5,subdir=android,rm=android/build.properties,buildjni=yes
|
Build Version:3.0.54-5,275,cr3.0.54-5,subdir=android,rm=android/build.properties,buildjni=yes
|
||||||
Build Version:3.0.54-9,279,cr3.0.54-9,subdir=android,rm=android/build.properties,buildjni=yes
|
Build Version:3.0.54-9,279,cr3.0.54-9,subdir=android,rm=android/build.properties,buildjni=yes
|
||||||
|
Build Version:3.0.54-33,303,cr3.0.54-33,subdir=android,rm=android/build.properties,buildjni=yes
|
||||||
|
|
||||||
Market Version:3.0.54-9
|
Market Version:3.0.54-33
|
||||||
Market Version Code:279
|
Market Version Code:303
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@ Build Version:4.4 beta 38,30,android_beta_38,subdir=xwords4/android/XWords4
|
||||||
Build Version:4.4 beta 39,31,android_beta_39,subdir=xwords4/android/XWords4,target=android-8,prebuild=cd .. && ./scripts/genvers.sh >ant_out.txt
|
Build Version:4.4 beta 39,31,android_beta_39,subdir=xwords4/android/XWords4,target=android-8,prebuild=cd .. && ./scripts/genvers.sh >ant_out.txt
|
||||||
|
|
||||||
|
|
||||||
Market Version:4.4 beta 39
|
Market Version:4.4
|
||||||
Market Version Code:31
|
Market Version Code:33
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@ Build Version:2.1.0,15,639549fda2111cb800fabe468b4a64bf4ae27003,\
|
||||||
buildjni=yes,subdir=src/android/project,target=android-8,\
|
buildjni=yes,subdir=src/android/project,target=android-8,\
|
||||||
insertversion=2.1.0[^"]*
|
insertversion=2.1.0[^"]*
|
||||||
|
|
||||||
Market Version:2.3.0
|
Market Version:2.4.0
|
||||||
Market Version Code:19
|
Market Version Code:20
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,6 @@ Description:
|
||||||
Log viewer - an app equivalent of logcat from the Android shell, or
|
Log viewer - an app equivalent of logcat from the Android shell, or
|
||||||
adb logcat from the SDK tools.
|
adb logcat from the SDK tools.
|
||||||
.
|
.
|
||||||
Market Version:2.3.2
|
|
||||||
Market Version Code:38
|
|
||||||
|
|
||||||
Repo Type:svn
|
Repo Type:svn
|
||||||
Repo:http://alogcat.googlecode.com/svn/trunk
|
Repo:http://alogcat.googlecode.com/svn/trunk
|
||||||
|
|
@ -19,3 +17,6 @@ Build Version:2.1.6,34,28
|
||||||
Build Version:2.3,36,30
|
Build Version:2.3,36,30
|
||||||
Build Version:2.3.2,38,31,prebuild=find . -type f -name \*.java -print0 | xargs -0 sed -i "s/^import org\.jtb\.alogcat\.donate\.R;$/import org.jtb.alogcat.R;/g" && sed -i "s/org.jtb.alogcat.donate/org.jtb.alogcat/" AndroidManifest.xml
|
Build Version:2.3.2,38,31,prebuild=find . -type f -name \*.java -print0 | xargs -0 sed -i "s/^import org\.jtb\.alogcat\.donate\.R;$/import org.jtb.alogcat.R;/g" && sed -i "s/org.jtb.alogcat.donate/org.jtb.alogcat/" AndroidManifest.xml
|
||||||
|
|
||||||
|
Market Version:2.4
|
||||||
|
Market Version Code:39
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,5 +19,5 @@ Build Version:v1.18,1018,8298cd8728c2,subdir=java,target=android-11,buildjni=yes
|
||||||
Build Version:v1.20,1020,e703fa82a4c3,subdir=java,target=android-11,buildjni=yes
|
Build Version:v1.20,1020,e703fa82a4c3,subdir=java,target=android-11,buildjni=yes
|
||||||
Build Version:v1.22,1022,154e21230e81,subdir=java,target=android-11,buildjni=yes
|
Build Version:v1.22,1022,154e21230e81,subdir=java,target=android-11,buildjni=yes
|
||||||
|
|
||||||
Market Version:v1.22
|
Market Version:v1.27
|
||||||
Market Version Code:1022
|
Market Version Code:1027
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ Repo:git://github.com/scoutant/blokish.git
|
||||||
Build Version:0.5,1,ca2e9096c6d5140c14e7,target=android-9
|
Build Version:0.5,1,ca2e9096c6d5140c14e7,target=android-9
|
||||||
Build Version:1.4,7,82ca58cdd26797f9ba9519e79c54031282d066af,target=android-9
|
Build Version:1.4,7,82ca58cdd26797f9ba9519e79c54031282d066af,target=android-9
|
||||||
Build Version:1.5,8,e6ab83e8832f03d78bf3f8deae33acb22a7ba520,target=android-9
|
Build Version:1.5,8,e6ab83e8832f03d78bf3f8deae33acb22a7ba520,target=android-9
|
||||||
|
Build Version:1.6,9,ebd1b966b70e,target=android-9
|
||||||
|
|
||||||
Market Version:1.5
|
Market Version:1.6
|
||||||
Market Version Code:8
|
Market Version Code:9
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ Summary:A SIP (VOIP) client
|
||||||
Description:
|
Description:
|
||||||
A SIP (VOIP) client with video calling capabilities.
|
A SIP (VOIP) client with video calling capabilities.
|
||||||
.
|
.
|
||||||
Market Version:2.4 beta
|
Market Version:2.4
|
||||||
Market Version Code:87
|
Market Version Code:87
|
||||||
|
|
|
||||||
18
metadata/org.sparkleshare.android.txt
Normal file
18
metadata/org.sparkleshare.android.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
License:GPLv3
|
||||||
|
Category:System
|
||||||
|
Web Site:http://www.sparkleshare.org
|
||||||
|
Source Code:https://github.com/NewProggie/SparkleShare-Android
|
||||||
|
Issue Tracker:https://github.com/NewProggie/SparkleShare-Android/issues
|
||||||
|
Summary:distributed collaboration and sharing tool
|
||||||
|
Description:
|
||||||
|
SparkleShare is a collaboration and sharing tool that is designed to keep
|
||||||
|
things simple and to stay out of your way.
|
||||||
|
|
||||||
|
Setup your own cloud with SparkleShare (http://sparkleshare.org/) and
|
||||||
|
browse your files right from your Android device.
|
||||||
|
.
|
||||||
|
|
||||||
|
Repo Type:git
|
||||||
|
Repo:https://github.com/NewProggie/SparkleShare-Android.git
|
||||||
|
|
||||||
|
Build Version:1.0,1,a9e23f0f9ae6161a786bf48cb48ab3dec20110c9,prebuild=rm -rf gen/ && rm -rf bin/,target=android-7
|
||||||
20
metadata/org.thoughtcrime.securesms.txt
Normal file
20
metadata/org.thoughtcrime.securesms.txt
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
License:GPLv3
|
||||||
|
Category:Cryptography
|
||||||
|
Web Site:http://www.whispersys.com/
|
||||||
|
Source Code:https://github.com/WhisperSystems/TextSecure
|
||||||
|
Issue Tracker:
|
||||||
|
Donate:
|
||||||
|
Summary:SMS Encryption
|
||||||
|
Description:
|
||||||
|
TextSecure is a drop-in replacement for the standard text messaging application,
|
||||||
|
allowing you to send and receive text messages as normal. All text messages
|
||||||
|
sent or received with TextSecure are stored in an encrypted database on your
|
||||||
|
phone, and text messages are encrypted during transmission when communicating
|
||||||
|
with someone else also using TextSecure.
|
||||||
|
.
|
||||||
|
|
||||||
|
Repo Type:git
|
||||||
|
Repo:https://github.com/WhisperSystems/TextSecure.git
|
||||||
|
|
||||||
|
Build Version:0.5.7,21,6a30867fd481474e8634b508d524863bc8a6b565,target=android-9
|
||||||
|
|
||||||
|
|
@ -4,6 +4,7 @@ Category:Internet
|
||||||
Web Site:http://code.google.com/p/ttrss-reader-fork/
|
Web Site:http://code.google.com/p/ttrss-reader-fork/
|
||||||
Source Code:http://code.google.com/p/ttrss-reader-fork/source/checkout
|
Source Code:http://code.google.com/p/ttrss-reader-fork/source/checkout
|
||||||
Issue Tracker:http://code.google.com/p/ttrss-reader-fork/issues/list
|
Issue Tracker:http://code.google.com/p/ttrss-reader-fork/issues/list
|
||||||
|
Donate:http://code.google.com/p/ttrss-reader-fork/wiki/Donations
|
||||||
Summary:An RSS reader for Tiny Tiny RSS
|
Summary:An RSS reader for Tiny Tiny RSS
|
||||||
Description:
|
Description:
|
||||||
An offline reader that works with the Tiny Tiny RSS web-based feed reader/aggregator..
|
An offline reader that works with the Tiny Tiny RSS web-based feed reader/aggregator..
|
||||||
|
|
@ -38,6 +39,7 @@ Build Version:1.07,1075,1.07 (4),subdir=ttrss-reader,target=android-8
|
||||||
#Build Version:1.08,1080,1.08,subdir=ttrss-reader,target=android-8
|
#Build Version:1.08,1080,1.08,subdir=ttrss-reader,target=android-8
|
||||||
|
|
||||||
Build Version:1.21,1210,1.21,subdir=ttrss-reader,target=android-8
|
Build Version:1.21,1210,1.21,subdir=ttrss-reader,target=android-8
|
||||||
|
Build Version:1.22,1220,1.22,subdir=ttrss-reader,target=android-8
|
||||||
|
|
||||||
Market Version:1.21
|
Market Version:1.22
|
||||||
Market Version Code:1210
|
Market Version Code:1220
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ Build Version:0.8.0.2,760,ff612a31874fc89cb124,subdir=wififixer,target=android-8
|
||||||
Build Version:0.8.0.3.1,770,59b8e66a0409a5d4c6a6,subdir=wififixer,target=android-8
|
Build Version:0.8.0.3.1,770,59b8e66a0409a5d4c6a6,subdir=wififixer,target=android-8
|
||||||
Build Version:0.8.0.5,822,846b5c057e886f8436eb,subdir=wififixer,target=android-8
|
Build Version:0.8.0.5,822,846b5c057e886f8436eb,subdir=wififixer,target=android-8
|
||||||
Build Version:0.8.0.6,838,81e9557f73d8529755cd,subdir=wififixer,target=android-8
|
Build Version:0.8.0.6,838,81e9557f73d8529755cd,subdir=wififixer,target=android-8
|
||||||
|
Build Version:0.9.0.1,915,!commit 7155ca938dc1 but can't compile for some reason
|
||||||
|
|
||||||
Market Version:0.8.0.6
|
Market Version:0.9.0.1
|
||||||
Market Version Code:838
|
Market Version Code:915
|
||||||
|
|
|
||||||
|
|
@ -21,5 +21,5 @@ Repo:http://android.svn.wordpress.org/trunk/
|
||||||
Build Version:1.3.9,31,202,prebuild=mkdir libs && mv *.jar libs && sed -i "s@checkStats(accounts.size());@// MY PRIVACY > YOUR STATS@" src/org/wordpress/android/wpAndroid.java,encoding=utf-8
|
Build Version:1.3.9,31,202,prebuild=mkdir libs && mv *.jar libs && sed -i "s@checkStats(accounts.size());@// MY PRIVACY > YOUR STATS@" src/org/wordpress/android/wpAndroid.java,encoding=utf-8
|
||||||
Build Version:1.4.1,33,228,prebuild=mkdir libs && mv *.jar libs && sed -i "s@checkStats(accounts.size());@// MY PRIVACY > YOUR STATS@" src/org/wordpress/android/wpAndroid.java,encoding=utf-8
|
Build Version:1.4.1,33,228,prebuild=mkdir libs && mv *.jar libs && sed -i "s@checkStats(accounts.size());@// MY PRIVACY > YOUR STATS@" src/org/wordpress/android/wpAndroid.java,encoding=utf-8
|
||||||
|
|
||||||
Market Version:1.5.1
|
Market Version:2.0.1
|
||||||
Market Version Code:36
|
Market Version Code:39
|
||||||
|
|
|
||||||
142
scanner.py
Executable file
142
scanner.py
Executable file
|
|
@ -0,0 +1,142 @@
|
||||||
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# scanner.py - part of the FDroid server tools
|
||||||
|
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import re
|
||||||
|
import urllib
|
||||||
|
import time
|
||||||
|
import subprocess
|
||||||
|
from optparse import OptionParser
|
||||||
|
import HTMLParser
|
||||||
|
import common
|
||||||
|
|
||||||
|
#Read configuration...
|
||||||
|
execfile('config.py')
|
||||||
|
|
||||||
|
|
||||||
|
# Parse command line...
|
||||||
|
parser = OptionParser()
|
||||||
|
parser.add_option("-v", "--verbose", action="store_true", default=False,
|
||||||
|
help="Spew out even more information than normal")
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
# Get all apps...
|
||||||
|
apps = common.read_metadata(options.verbose)
|
||||||
|
|
||||||
|
html_parser = HTMLParser.HTMLParser()
|
||||||
|
|
||||||
|
problems = []
|
||||||
|
|
||||||
|
for app in apps:
|
||||||
|
|
||||||
|
if app['disabled']:
|
||||||
|
print "Skipping %s: disabled" % app['id']
|
||||||
|
elif not app['builds']:
|
||||||
|
print "Skipping %s: no builds specified" % app['id']
|
||||||
|
|
||||||
|
if (app['disabled'] is None and app['repo'] != ''
|
||||||
|
and app['repotype'] != '' and len(app['builds']) > 0):
|
||||||
|
|
||||||
|
print "Processing " + app['id']
|
||||||
|
|
||||||
|
build_dir = 'build/' + app['id']
|
||||||
|
|
||||||
|
# Set up vcs interface and make sure we have the latest code...
|
||||||
|
vcs = common.getvcs(app['repotype'], app['repo'], build_dir)
|
||||||
|
|
||||||
|
refreshed_source = False
|
||||||
|
|
||||||
|
|
||||||
|
for thisbuild in app['builds']:
|
||||||
|
|
||||||
|
if thisbuild['commit'].startswith('!'):
|
||||||
|
print ("..skipping version " + thisbuild['version'] + " - " +
|
||||||
|
thisbuild['commit'][1:])
|
||||||
|
else:
|
||||||
|
print "..scanning version " + thisbuild['version']
|
||||||
|
|
||||||
|
if not refreshed_source:
|
||||||
|
vcs.refreshlocal()
|
||||||
|
refreshed_source = True
|
||||||
|
|
||||||
|
# Optionally, the actual app source can be in a subdirectory...
|
||||||
|
if thisbuild.has_key('subdir'):
|
||||||
|
root_dir = os.path.join(build_dir, thisbuild['subdir'])
|
||||||
|
else:
|
||||||
|
root_dir = build_dir
|
||||||
|
|
||||||
|
# Get a working copy of the right revision...
|
||||||
|
if options.verbose:
|
||||||
|
print "Resetting repository to " + thisbuild['commit']
|
||||||
|
vcs.reset(thisbuild['commit'])
|
||||||
|
|
||||||
|
# Initialise submodules if requred...
|
||||||
|
if thisbuild.get('submodules', 'no') == 'yes':
|
||||||
|
vcs.initsubmodules()
|
||||||
|
|
||||||
|
# Generate (or update) the ant build file, build.xml...
|
||||||
|
if (thisbuild.get('update', 'yes') == 'yes' and
|
||||||
|
not thisbuild.has_key('maven')):
|
||||||
|
parms = [os.path.join(sdk_path, 'tools', 'android'),
|
||||||
|
'update', 'project', '-p', '.']
|
||||||
|
parms.append('--subprojects')
|
||||||
|
if thisbuild.has_key('target'):
|
||||||
|
parms.append('-t')
|
||||||
|
parms.append(thisbuild['target'])
|
||||||
|
if subprocess.call(parms, cwd=root_dir) != 0:
|
||||||
|
print "Failed to update project"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Delete unwanted file...
|
||||||
|
if thisbuild.has_key('rm'):
|
||||||
|
os.remove(os.path.join(build_dir, thisbuild['rm']))
|
||||||
|
|
||||||
|
# Run a pre-build command if one is required...
|
||||||
|
if thisbuild.has_key('prebuild'):
|
||||||
|
if subprocess.call(thisbuild['prebuild'],
|
||||||
|
cwd=root_dir, shell=True) != 0:
|
||||||
|
print "Error running pre-build command"
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Apply patches if any
|
||||||
|
if 'patch' in thisbuild:
|
||||||
|
for patch in thisbuild['patch'].split(';'):
|
||||||
|
print "Applying " + patch
|
||||||
|
patch_path = os.path.join('metadata', app['id'], patch)
|
||||||
|
if subprocess.call(['patch', '-p1',
|
||||||
|
'-i', os.path.abspath(patch_path)], cwd=build_dir) != 0:
|
||||||
|
print "Failed to apply patch %s" % patch_path
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Scan for common known non-free blobs:
|
||||||
|
usual_suspects = ['flurryagent.jar', 'paypal_mpl.jar']
|
||||||
|
for r,d,f in os.walk(build_dir):
|
||||||
|
for curfile in f:
|
||||||
|
if curfile.lower() in usual_suspects:
|
||||||
|
msg = 'Found probable non-free blob ' + os.path.join(r,file)
|
||||||
|
msg += ' in ' + app['id'] + ' ' + thisbuild['version']
|
||||||
|
problems.append(msg)
|
||||||
|
|
||||||
|
print "Finished:"
|
||||||
|
for problem in problems:
|
||||||
|
print problem
|
||||||
|
print str(len(problems)) + ' problems.'
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# update.py - part of the FDroid server tools
|
# update.py - part of the FDroid server tools
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue