Commit graph

898 commits

Author SHA1 Message Date
Hans-Christoph Steiner
b5cbb4382f new config option: per-app repos to support nightly build repos
For devs that want to build and distribute nightly builds of their apps
using the fdroid tools.  The core idea here is to make the fdroidserver
tool suite the single set of tools for all types of builds and releases.
That will hopefully drive more free software developers to make f-droid.org
an core channel for official releases.
2015-08-25 16:55:52 +02:00
Daniel Martí
f44a1c89f1 config: bump default build_tools after update in BS 2015-08-20 09:48:12 -07:00
Daniel Martí
46b1f09de3 Only do the magic import/except dance once
No need to do it for every file, once per app is enough
2015-08-18 23:46:35 -07:00
Daniel Martí
c813ad0594 Fix type issue 2015-08-17 22:04:20 -07:00
Daniel Martí
6cc91e2ded Line numbers start at 1, not 0 2015-08-14 10:30:27 -07:00
Ciaran Gultnieks
47032cb4e9 Fix multiple errors in get_mime_type
Closes #111
2015-08-13 19:16:28 +02:00
Daniel Martí
bad611ce5a Properly default to NDK r10e 2015-08-05 10:33:42 -07:00
Hans-Christoph Steiner
f38619ef5f chmod keystore after checking whether it was created
On OSX, when Java is not installed, it'll fail to create the keystore, but
then give an error from chmod failing.  This changes things so that the
missing Java is reported instead.
2015-08-01 00:38:41 +02:00
Hans-Christoph Steiner
752b258ba7 get MIME types without strictly requiring python-magic
There are two forms of python-magic, one included in libmagic that is
default on Debian, and another Python wrapper for libmagic that is
called 'python-magic' on pypi.  Those both rely on the compiled binary
library libmagic.  For platforms without good package management, fallback
to using the built-in 'mimetypes' library if 'magic' is not available.

This supports OSX, Windows, and BSD.
2015-08-01 00:38:41 +02:00
Hans-Christoph Steiner
85febd40d1 use common.regsub_file() instead of Popen(sed)
Python libraries work better in Python than running external commands, and
it also makes the code much more portable.  For example, the GNU and BSD
sed commands have different, and sometimes conflicting, flags.

This also reworks the regexp patterns to be more tightly focused, and not
change the same variable name in comments or elsewhere.
2015-08-01 00:38:41 +02:00
Daniel Martí
b4d768b225 Merge branch 'some-compatibility-fixes' of https://gitlab.com/eighthave/fdroidserver 2015-07-27 10:41:23 -07:00
Hans-Christoph Steiner
f625005ec3 remove dependency on wget for 'build' and 'verify'
To make the core tools portable to platforms like Mac OS X and Windows,
remove the dependency on wget and instead use Python Requests, which
probably has better performance anyway.
2015-07-24 11:53:14 -07:00
Hans-Christoph Steiner
bd3ae88608 extend text char limits to match other app stores
We should be compatible with other apps stores unless there is a specific
reason not to be.

* Google Play, Amazon, and iTunes all have 4000 char descriptions

For the summary, we can just bump it up to the same as what Play has
* Google Play allows an 80 char "Short Description"
  https://support.google.com/googleplay/android-developer/answer/113469?hl=en
* Amazon allows a 1200 char "Short Description"
  https://developer.amazon.com/public/support/submitting-your-app/tech-docs/submitting-your-app#Add Metadata and Image Assets
2015-07-23 10:39:30 -07:00
أحمد المحمودي (Ahmed El-Mahmoudy)
44335b64be Add an option to disable repository refresh
This is useful for testing builds with no internet connection, and the
repositories were already fetched previously
2015-07-14 17:43:07 +02:00
Daniel Martí
09a0aa2eb9 Also find usual suspects in gradle files 2015-07-05 14:26:41 -07:00
Daniel Martí
b848b99bab Always clean and reset all submodules 2015-06-28 19:37:28 -07:00
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