Commit graph

882 commits

Author SHA1 Message Date
Daniel Martí
5aa9e2289d Improve xml string extracting support
* Shield ourselves from newlines that would break metadata files
* Properly use string resources for version names
2015-06-18 17:54:56 +02:00
Daniel Martí
52c2ca1fe7 Replace NDK r10d with r10e 2015-06-18 17:05:48 +02:00
Daniel Martí
e608975f78 Bump build-tools to 22.0.1 2015-06-18 16:56:56 +02:00
Daniel Martí
4db4a86420 Always make sure that we don't encode None
Apparently, we can have a non-nil element that has a nil text.
2015-06-07 14:02:50 +02:00
Daniel Martí
d0b5e60369 Properly support escaped strings
See:
https://developer.android.com/guide/topics/resources/string-resource.html
2015-06-04 15:56:20 +02:00
Daniel Martí
5cab5956e3 Don't accept non-integer vercodes 2015-06-03 19:40:43 +02:00
Daniel Martí
cd93d23062 Work around encoding issues when using xml files
The xml package returns "unicode" objects instead of strings in utf-8.
2015-06-03 18:42:24 +02:00
Daniel Martí
dd37061b41 Don't crash if an <application> has no android:label 2015-06-03 18:30:31 +02:00
Daniel Martí
1b2354858b Fix PEP8 E225 2015-06-03 18:05:17 +02:00
Daniel Martí
9be9b7e919 No need to walk the entire src/main subtree in gradle apps 2015-06-03 15:43:55 +02:00
Daniel Martí
50a3564989 Also use proper xml parsing when retrieving string resources - #58 2015-06-03 15:42:45 +02:00
Daniel Martí
7ab4712892 Also use xml parsing to obtain version from AM.xml - #58 2015-06-03 15:23:18 +02:00
Daniel Martí
7c2bd34c49 Use proper AndroidManifest.xml parsing for labels - #58 2015-06-03 14:35:50 +02:00
Daniel Martí
439cabb7f3 Remove "Srclibs:" from srclib metadata files
They are handled per build, this feature is of little help and practically
unused in master.
2015-06-03 13:52:47 +02:00
Daniel Martí
ac004264f0 Make comma-separated list parsing code common 2015-05-15 17:09:21 +02:00
Ciaran Gultnieks
afa7254a83 Merge branch 'master' into 'master'
make it really easy to upgrade unsigned repos to signed

As a key step to removing support for unsigned repos from fdroidclient (https://gitlab.com/fdroid/fdroidclient/issues/12), this merge request makes `fdroid update` require a signing key.  If there is no keystore, it'll prompt the user to create one using `fdroid update --create-key`.

This closes #13

See merge request !48
2015-05-14 16:09:40 +00:00
Daniel Martí
e916e5df4e Add COMMIT, VERSION and VERCODE recipe vars. Fixes #69 2015-05-10 13:55:16 +02:00
Hans-Christoph Steiner
cc0908bdbb common.write_to_config(): if key doesn't exist in config.py, append it
This lets `fdroid update --create-key` add key/value pairs to config.py
2015-05-08 16:13:15 -04:00
Hans-Christoph Steiner
276123856c move keystore gen logic to common function
This moves the method for generating a new keystore for the repo signing
key to a common function so that it can be used in more subcommands beyond
`fdroid init`.  The immediate idea is to make `fdroid update --create-key`
upgrade unsigned repos to signed ones so we can make fdroidclient only use
signed repos.
2015-05-08 16:13:15 -04:00
Hans-Christoph Steiner
af360199f1 move default keystore location to keystore.jks, i.e. in the fdroid repo
This makes `fdroid init` create a complete, self-contained repo in a single
folder.  That makes it easily transferable, backupable, etc.  It also means
that `fdroid update` can add a keystore to an existing unsigned repo
without having to worry about finding the right folder or overwriting any
other existing files.
2015-05-08 16:13:15 -04:00
Hans-Christoph Steiner
4861595288 move genkey() and genpassword() to common.py for use in multiple sections
genkey() and genpassword() are now going to be used by `fdroid update` as
well as `fdroid init`, so they should be in common.py
2015-05-08 16:13:15 -04:00
Daniel Martí
ce48e8f78d Don't match gradle plugin import lines which are commented 2015-05-08 00:58:52 +02:00
Daniel Martí
1af774811d Merge branch 'projectproperties' into 'master'
Fix project.properties dependency issue

Correctly place scrlib references also
in the case there is no project.properties file
present in the original repository.

This commit fixes a problem, which was introduced with
021df3c424: If no
project.properties file exists in the original
project's source repo, place_srclib will not place
a dependency --- even if there should be one:

>    if not os.path.isfile(proppath):
>        return

Example app: fdroiddata/metadata/org.berlin_vegan.bvapp.txt

See merge request !47
2015-04-17 17:28:35 +00:00
Daniel Martí
3f9d6b2947 Don't try reading lines from directories 2015-04-17 13:05:12 +02:00
micu
96e4062bcf Fix project.properties dependency issue
Correctly place scrlib references also
in the case there is no project.properties file
present in the original repository.

This commit fixes a problem, which was introduced with
021df3c424: If no
project.properties file exists in the original
project's source repo, place_srclib will not place
a dependency --- even if there should be one:

>    if not os.path.isfile(proppath):
>        return

Example app: fdroiddata/metadata/org.berlin_vegan.bvapp.txt
2015-04-17 01:10:23 +02:00
Daniel Martí
acd49c6e4d When patching or checking plugin versions, use *.gradle
Apparently all *.gradle files are valid, e.g. global.gradle.
2015-04-06 17:42:26 +02:00
Daniel Martí
021df3c424 Other minor file reading fixes 2015-04-03 00:14:32 +02:00
Daniel Martí
241a3f02ac Always check that files actually are files before reading
This fixes crashes with e.g. broken symlinks
2015-04-03 00:05:22 +02:00
Daniel Martí
45925c6816 Forgot to bump build_tools in the configs 2015-03-24 21:36:42 +01:00
Ciaran Gultnieks
d3f8a9f276 Signature file names are not fixed 2015-01-31 16:16:21 +00:00
Ciaran Gultnieks
94edef3b34 Need the information about what's different from verify_apks 2015-01-31 15:58:08 +00:00
Parménides GV
f26a908dab Add function to verify apks via jarsigner 2015-01-31 15:55:18 +00:00
Ciaran Gultnieks
e26ad377a6 Handle not-found package name gracefully 2015-01-31 12:07:42 +00:00
Ciaran Gultnieks
384f97e998 Ensure package names are valid 2015-01-26 18:30:01 +00:00
Ciaran Gultnieks
fe7f6cfe50 Remove shell option from FDroidPopen 2015-01-26 18:30:01 +00:00
Hans-Christoph Steiner
e3628b2d74 fix PEP8 E124 closing bracket missing visual indentation 2015-01-21 10:21:54 +01:00
Daniel Martí
3b3704710e Fix adding paths to the PATH env variable 2015-01-13 16:37:10 +01:00
Daniel Martí
ff2b061351 Fix issue introduced in 49549f4cad (fixes #62) 2015-01-13 16:15:11 +01:00
Ciaran Gultnieks
24aaa568da Fix PEP8 issues from latest pull request 2015-01-13 08:26:30 +00:00
Daniel Martí
c60cca57cf Don't limit gradle's forceversion to string literals 2015-01-13 00:28:19 +01:00
Hans-Christoph Steiner
4e68655437 if a build did verify against Binaries:, delete the comparison dirs
If the comparison between the provided APK and the built APK is verified,
then there is no need to keep the old comparison files around. On big build
servers like f-droid.org, there will be thousands of leftover dirs from all
the builds, so this is necessary.
2015-01-12 10:51:54 +01:00
Hans-Christoph Steiner
2458577209 if meld is available, use it to show differences on failed APK compare
meld is much easier to browse when comparing directory trees.
2015-01-12 10:46:04 +01:00
Hans-Christoph Steiner
fc4679cebb if apktool is available, use it to decompress APKs when verifying
apktool decompiles the binary XML to regular XML, so it is much easier to
read for differences.
2015-01-12 10:46:04 +01:00
Hans-Christoph Steiner
74a785a888 uncompress using jar xf in a folder with the same name
This makes it easier to compare the whole APK folders when there are
multiple methods of uncompressing the APK.
2015-01-12 10:46:04 +01:00
Hans-Christoph Steiner
b53746dc7b make resulting dirs of compare_apks() have clearer dir names
This makes it a lot easier to remember which APK is which when trying to
make sense of the differences.
2015-01-12 10:46:04 +01:00
Ciaran Gultnieks
49549f4cad Remove support for git-svn with authentication 2015-01-11 17:46:10 +00:00
Ciaran Gultnieks
1cc1ee32ee Extra debug logging when parsing manifests 2015-01-11 08:20:14 +00:00
Ciaran Gultnieks
1fa6ecc1eb Sanitise tags at point of reading 2015-01-11 08:20:14 +00:00
Daniel Martí
6819e3c30e Set up the ndk in $PATH before each build 2015-01-06 19:41:55 +01:00
Daniel Martí
347ff7b876 Error if any scanignore/delete paths are useless 2015-01-06 14:37:13 +01:00