chiark / gitweb /
Hans-Christoph Steiner [Fri, 31 Jul 2015 13:50:20 +0000 (15:50 +0200)]
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.
Hans-Christoph Steiner [Fri, 31 Jul 2015 12:47:48 +0000 (14:47 +0200)]
fix installing via OSX's easy_install
Hans-Christoph Steiner [Fri, 31 Jul 2015 10:27:57 +0000 (12:27 +0200)]
remove non-existant files from the MANIFEST.in
Hans-Christoph Steiner [Thu, 30 Jul 2015 20:13:36 +0000 (22:13 +0200)]
test new common.regsub_file() method that replaces sed calls
Hans-Christoph Steiner [Thu, 30 Jul 2015 20:13:12 +0000 (22:13 +0200)]
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.
Alex Burka [Mon, 27 Jul 2015 18:34:01 +0000 (11:34 -0700)]
tests: short args for mktemp to support BSD
*BSD and OSX do not have compatible long args
Hans-Christoph Steiner [Fri, 24 Jul 2015 23:27:45 +0000 (16:27 -0700)]
show commented out examples for setting sdk_path and ndk_paths
Instead of just mirroring the defaults in the example config.py, show a
useful example of how they might be set.
Hans-Christoph Steiner [Fri, 24 Jul 2015 22:52:13 +0000 (15:52 -0700)]
run-tests: fix copying of urzip.apk into new repo
Hans-Christoph Steiner [Fri, 24 Jul 2015 22:39:00 +0000 (15:39 -0700)]
run-tests: run `fdroid readmeta` after each --create-metadata
Just another basic check, this time for `fdroid readmeta`.
Daniel Martí [Thu, 30 Jul 2015 19:46:42 +0000 (12:46 -0700)]
lint: exit with an error code if any errors are found
Daniel Martí [Thu, 30 Jul 2015 18:35:25 +0000 (11:35 -0700)]
Also use OptionParser in readmeta to add -h/--help
Daniel Martí [Mon, 27 Jul 2015 17:41:23 +0000 (10:41 -0700)]
Merge branch 'some-compatibility-fixes' of https://gitlab.com/eighthave/fdroidserver
Daniel Martí [Sat, 25 Jul 2015 01:15:39 +0000 (18:15 -0700)]
Add --no-refresh to the completion
Daniel Martí [Sat, 25 Jul 2015 01:11:15 +0000 (18:11 -0700)]
Merge branch 'no-refresh' of https://gitlab.com/aelmahmoudy/fdroidserver
Daniel Martí [Sat, 25 Jul 2015 01:08:48 +0000 (18:08 -0700)]
Be more specific about empty build flags
Hans-Christoph Steiner [Fri, 24 Jul 2015 04:42:21 +0000 (21:42 -0700)]
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.
Hans-Christoph Steiner [Mon, 20 Jul 2015 23:42:40 +0000 (16:42 -0700)]
update: warn if APK has a date that is newer than the system clock
If the date in an APK is in the future, that could cause confusion. If the
system clock is wrong, then the APK will also have a date in the future.
This is most likely on offline signing machines, since they do not have a
time source to sync to.
Hans-Christoph Steiner [Wed, 15 Jul 2015 21:43:38 +0000 (14:43 -0700)]
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
Ciaran Gultnieks [Tue, 21 Jul 2015 20:12:52 +0000 (22:12 +0200)]
Update recommended base box
أحمد المحمودي (Ahmed El-Mahmoudy) [Tue, 14 Jul 2015 10:32:39 +0000 (12:32 +0200)]
Add an option to disable repository refresh
This is useful for testing builds with no internet connection, and the
repositories were already fetched previously
Daniel Martí [Sun, 5 Jul 2015 21:26:41 +0000 (14:26 -0700)]
Also find usual suspects in gradle files
Ciaran Gultnieks [Mon, 29 Jun 2015 09:17:59 +0000 (11:17 +0200)]
Fix update fail when icons are missing
Introduced yesterday, I believe.
Daniel Martí [Mon, 29 Jun 2015 02:37:28 +0000 (19:37 -0700)]
Always clean and reset all submodules
Daniel Martí [Sun, 28 Jun 2015 18:45:06 +0000 (11:45 -0700)]
Hotfix: Client 0.92 breaks if web/source/tracker are missing
Revert this commit after a few stable releases
Daniel Martí [Fri, 26 Jun 2015 16:00:34 +0000 (18:00 +0200)]
Stable clients understand UpstreamNonFree now
Daniel Martí [Fri, 26 Jun 2015 15:58:57 +0000 (17:58 +0200)]
Hotfix for
7b68b90569 - don't cal .split() on None
Daniel Martí [Fri, 26 Jun 2015 15:41:19 +0000 (17:41 +0200)]
update: never include empty elements in the index
Ciaran Gultnieks [Thu, 25 Jun 2015 20:53:11 +0000 (22:53 +0200)]
Fix imagemagick (broken in
d9bbb507)
Daniel Martí [Sun, 21 Jun 2015 11:51:23 +0000 (13:51 +0200)]
Replace some FDroid strings with F-Droid
Daniel Martí [Fri, 19 Jun 2015 19:17:43 +0000 (21:17 +0200)]
Update the Android SDK to 24.3.3
Daniel Martí [Thu, 18 Jun 2015 15:54:56 +0000 (17:54 +0200)]
Improve xml string extracting support
* Shield ourselves from newlines that would break metadata files
* Properly use string resources for version names
Daniel Martí [Thu, 18 Jun 2015 15:05:48 +0000 (17:05 +0200)]
Replace NDK r10d with r10e
Daniel Martí [Thu, 18 Jun 2015 14:57:00 +0000 (16:57 +0200)]
Add gradle 2.4
Daniel Martí [Thu, 18 Jun 2015 14:56:08 +0000 (16:56 +0200)]
Bump build-tools to 22.0.1
Daniel Martí [Wed, 17 Jun 2015 17:55:30 +0000 (19:55 +0200)]
lint: start warning about invalid categories
Daniel Martí [Tue, 9 Jun 2015 21:11:42 +0000 (23:11 +0200)]
Bump index version to 13: <changelog> added
Daniel Martí [Tue, 9 Jun 2015 21:10:10 +0000 (23:10 +0200)]
update: don't always place the changelog element
It's not that common, so often it'd just be <changelog/>
Daniel Martí [Sun, 7 Jun 2015 12:14:56 +0000 (14:14 +0200)]
lint: take forcevercode into account for UCM warnings
Daniel Martí [Sun, 7 Jun 2015 12:05:29 +0000 (14:05 +0200)]
lint: get rid of -p/--pedantic
Only one check was left, and it's of little use anyway.
Daniel Martí [Sun, 7 Jun 2015 12:03:15 +0000 (14:03 +0200)]
lint: complain about useless Name: fields
Daniel Martí [Sun, 7 Jun 2015 12:02:50 +0000 (14:02 +0200)]
Always make sure that we don't encode None
Apparently, we can have a non-nil element that has a nil text.
Daniel Martí [Fri, 5 Jun 2015 15:15:13 +0000 (17:15 +0200)]
lint: Move the UCM:Tags warning out of pedantic
It's much more reliable now
Daniel Martí [Fri, 5 Jun 2015 15:04:05 +0000 (17:04 +0200)]
lint: Improve UCM:Tags warning
If the vercode is higher than CVC, then we're probably only following stable
versions or something like that
Daniel Martí [Fri, 5 Jun 2015 14:59:01 +0000 (16:59 +0200)]
lint: don't be pedantic about downloading code
We don't really control this if run via a script, which happens more often.
Daniel Martí [Fri, 5 Jun 2015 14:56:25 +0000 (16:56 +0200)]
lint: don't assume trailing slashes in urls are redundant
Daniel Martí [Fri, 5 Jun 2015 14:52:35 +0000 (14:52 +0000)]
Merge branch 'graphviz' into 'master'
Add graphviz to buildserver
Add graphviz to buildserver. Like inkscape and imagemagick it is used to "build" images from "source code".
See merge request !53
Boris Kraut [Fri, 5 Jun 2015 13:41:21 +0000 (15:41 +0200)]
Add graphviz to buildserver
Ciaran Gultnieks [Thu, 4 Jun 2015 14:00:31 +0000 (15:00 +0100)]
Stop fdroid update saying it requires signing keys when it doesn't
Again!
Daniel Martí [Thu, 4 Jun 2015 13:56:20 +0000 (15:56 +0200)]
Properly support escaped strings
See:
https://developer.android.com/guide/topics/resources/string-resource.html
Daniel Martí [Thu, 4 Jun 2015 13:49:00 +0000 (15:49 +0200)]
Remove now unnecessary regex_pedantic
Daniel Martí [Thu, 4 Jun 2015 13:47:25 +0000 (15:47 +0200)]
lint: enforce https on gitlab too
Daniel Martí [Thu, 4 Jun 2015 13:46:54 +0000 (15:46 +0200)]
lint: Remove duplicate code.google.com TODO
Daniel Martí [Thu, 4 Jun 2015 13:45:33 +0000 (15:45 +0200)]
lint: move punctuation warnings out of pedantic
Daniel Martí [Wed, 3 Jun 2015 23:01:52 +0000 (01:01 +0200)]
"Changelog:" will be empty often, so only put it if present
Daniel Martí [Wed, 3 Jun 2015 20:51:05 +0000 (22:51 +0200)]
Move github .git lint warning to http_warnings
Daniel Martí [Wed, 3 Jun 2015 20:17:35 +0000 (22:17 +0200)]
Re-add https enforcings to Repo:
Daniel Martí [Wed, 3 Jun 2015 19:00:15 +0000 (21:00 +0200)]
Enforce https uniformly in all http links
Daniel Martí [Wed, 3 Jun 2015 18:55:08 +0000 (20:55 +0200)]
Simplify lint http warnings
Daniel Martí [Wed, 3 Jun 2015 17:40:43 +0000 (19:40 +0200)]
Don't accept non-integer vercodes
Daniel Martí [Wed, 3 Jun 2015 16:42:24 +0000 (18:42 +0200)]
Work around encoding issues when using xml files
The xml package returns "unicode" objects instead of strings in utf-8.
Daniel Martí [Wed, 3 Jun 2015 16:30:31 +0000 (18:30 +0200)]
Don't crash if an <application> has no android:label
Daniel Martí [Wed, 3 Jun 2015 16:05:17 +0000 (18:05 +0200)]
Fix PEP8 E225
Daniel Martí [Wed, 3 Jun 2015 13:52:46 +0000 (15:52 +0200)]
Don't use the commits feed as a changelog link in import
If it's often not a replacement for a proper changelog, do not advise its
usage.
Daniel Martí [Wed, 3 Jun 2015 13:52:01 +0000 (15:52 +0200)]
Merge branch 'changelog' of https://gitlab.com/krt/fdroidserver
Daniel Martí [Wed, 3 Jun 2015 13:43:55 +0000 (15:43 +0200)]
No need to walk the entire src/main subtree in gradle apps
Daniel Martí [Wed, 3 Jun 2015 13:42:45 +0000 (15:42 +0200)]
Also use proper xml parsing when retrieving string resources - #58
Daniel Martí [Wed, 3 Jun 2015 13:23:18 +0000 (15:23 +0200)]
Also use xml parsing to obtain version from AM.xml - #58
Daniel Martí [Wed, 3 Jun 2015 12:35:50 +0000 (14:35 +0200)]
Use proper AndroidManifest.xml parsing for labels - #58
Daniel Martí [Wed, 3 Jun 2015 12:35:31 +0000 (14:35 +0200)]
Revert back to always updating Auto Name
Daniel Martí [Wed, 3 Jun 2015 11:51:41 +0000 (13:51 +0200)]
Remove "Srclibs:" from srclib metadata files
They are handled per build, this feature is of little help and practically
unused in master.
Ciaran Gultnieks [Tue, 2 Jun 2015 08:16:29 +0000 (09:16 +0100)]
Allow gpg home directory to be overridden
Daniel Martí [Tue, 26 May 2015 13:35:13 +0000 (13:35 +0000)]
Merge branch 'pandoc' into 'master'
Add pandoc to buildserver
Closes #64.
See merge request !52
Boris Kraut [Sat, 23 May 2015 15:48:05 +0000 (17:48 +0200)]
Add pandoc to buildserver
Daniel Martí [Fri, 22 May 2015 07:33:15 +0000 (09:33 +0200)]
lint: be more strict about redundant summaries
Daniel Martí [Fri, 22 May 2015 07:29:51 +0000 (09:29 +0200)]
fix E713 test for membership should be 'not in'
Ciaran Gultnieks [Fri, 15 May 2015 20:55:20 +0000 (21:55 +0100)]
Formatting fix for
f345b24
Ciaran Gultnieks [Fri, 15 May 2015 20:36:12 +0000 (21:36 +0100)]
Fix 'fdroid update' regression
This is from MR !48. It refuses to update because there is no 'keypass'
or 'keystorepass' in the config. These shouldn't be in the config of any
properly set up existing repo in the first place. They certainly aren't
in any of mine (as a result of which, it refused to work on any of
them!)
Daniel Martí [Fri, 15 May 2015 15:09:00 +0000 (17:09 +0200)]
lint: warn about extra empty lines
Daniel Martí [Fri, 15 May 2015 14:54:41 +0000 (16:54 +0200)]
Warn about empty categs
Daniel Martí [Fri, 15 May 2015 14:51:58 +0000 (16:51 +0200)]
Make comma-separated list parsing code common
Ciaran Gultnieks [Thu, 14 May 2015 16:12:04 +0000 (16:12 +0000)]
Merge branch 'support-all-signing-key-types' into 'master'
support all APK signing key types: DSA, EC, RSA
The lovely python getsig replacement was only looking for .RSA files, but the signing key is defined as: "A signature block file with a .DSA, .RSA, or .EC extension"
https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html
For more info:
https://f-droid.org/forums/topic/binary-repo-whatsapp-error
See merge request !51
Ciaran Gultnieks [Thu, 14 May 2015 16:11:32 +0000 (16:11 +0000)]
Merge branch 'debug-builds' into 'master'
support plain paths as a serverwebroot
For use cases where there is a web server running on the same machine where the `fdroid update` is being run, allow plain paths in the serverwebroot list. This is useful for debug repos from build servers, like:
https://dev.guardianproject.info/fdroid
This also includes small change in the `fdroid server update` delete behavior: it delays the delete phase until after the new APKs are uploaded. This is keep things working for a long as possible while the repo is being updated.
See merge request !49
Ciaran Gultnieks [Thu, 14 May 2015 16:09:40 +0000 (16:09 +0000)]
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
Hans-Christoph Steiner [Wed, 13 May 2015 21:50:08 +0000 (17:50 -0400)]
support all APK signing key types: DSA, EC, RSA
"A signature block file with a .DSA, .RSA, or .EC extension"
https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html
Daniel Martí [Thu, 14 May 2015 10:31:10 +0000 (12:31 +0200)]
ACCESS_SUPERUSER is now deprecated
Daniel Martí [Wed, 13 May 2015 11:05:42 +0000 (13:05 +0200)]
Detect most bad URLs
Also [appid] links that should really be [[appid]]
Daniel Martí [Sun, 10 May 2015 13:42:07 +0000 (13:42 +0000)]
Merge branch 'vars' into 'master'
Update documentation to cover COMMIT, VERSION and VERCODE vars
See merge request !50
Boris Kraut [Sun, 10 May 2015 13:29:41 +0000 (15:29 +0200)]
Update documentation to cover COMMIT, VERSION and VERCODE vars
Daniel Martí [Sun, 10 May 2015 11:53:06 +0000 (13:53 +0200)]
Add COMMIT, VERSION and VERCODE recipe vars. Fixes #69
Hans-Christoph Steiner [Tue, 21 Apr 2015 02:27:31 +0000 (22:27 -0400)]
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
Hans-Christoph Steiner [Tue, 21 Apr 2015 01:52:41 +0000 (21:52 -0400)]
tests: no need to dump the index.xml to the build log
This should make the build log a lot shorter.
Hans-Christoph Steiner [Tue, 21 Apr 2015 01:38:52 +0000 (21:38 -0400)]
`fdroid update --create-key` to create a keystore/key
This provides the final option in this series, allowing the user to just
add --create-key to `fdroid update, and thereby upgrade an unsigned repo to
a proper signed repo. It also might be useful
closes #13 https://gitlab.com/fdroid/fdroidserver/issues/13
Hans-Christoph Steiner [Tue, 21 Apr 2015 00:27:38 +0000 (20:27 -0400)]
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.
Hans-Christoph Steiner [Mon, 20 Apr 2015 23:29:50 +0000 (19:29 -0400)]
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.
Hans-Christoph Steiner [Mon, 20 Apr 2015 23:14:58 +0000 (19:14 -0400)]
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
Hans-Christoph Steiner [Mon, 20 Apr 2015 23:09:50 +0000 (19:09 -0400)]
make `fdroid update` check that it can sign the repo, or exit with error
There is no good reason to run unsigned repos any more. It is trivially
easy to create and use a signed repo, and having to support unsigned repos
in the client makes some security-critical parts of the code a lot more
complicated.
refs #13 https://gitlab.com/fdroid/fdroidserver/issues/13
https://gitlab.com/fdroid/fdroidclient/issues/12
Hans-Christoph Steiner [Wed, 11 Mar 2015 21:40:26 +0000 (17:40 -0400)]
jenkins-build: always use speced dir for APK source
Otherwise, the test process can pick up lots and lots of APKs from various
places like a ~/fdroid folder or various ~/workspace/fdroidserver Jenkins
projects.
Hans-Christoph Steiner [Fri, 1 May 2015 03:39:58 +0000 (23:39 -0400)]
server: support plain paths as a serverwebroot
For use cases where there is a web server running on the same machine where
the `fdroid update` is being run, allow plain paths in the serverwebroot
list. This is useful for debug repos from build servers, like:
https://dev.guardianproject.info/fdroid
Hans-Christoph Steiner [Fri, 1 May 2015 03:36:10 +0000 (23:36 -0400)]
server: delay deleting on the server for as long as possible
In order to keep things working as much as possible during the update, the
rsync should only delete the obsolete APKs after it has finished uploading
the new APKs.
Ciaran Gultnieks [Tue, 28 Apr 2015 16:23:42 +0000 (17:23 +0100)]
Use --safe-links with rsync