chiark / gitweb /
Daniel Martí [Sat, 28 Jun 2014 23:29:31 +0000 (01:29 +0200)]
git-svn: use 'origin/' when passing a treeish (branches) to find-rev
This fixes the builds of de.blau.android. This worked before for some reason.
Git-svn probably changed in some way.
Daniel Martí [Sat, 28 Jun 2014 17:57:45 +0000 (19:57 +0200)]
Merge branch 'fix-and-test-source-tarball-process' of https://gitlab.com/eighthave/fdroidserver
Daniel Martí [Sat, 28 Jun 2014 17:57:14 +0000 (19:57 +0200)]
Place more examples/config.py stuff into the defaults
Hans-Christoph Steiner [Fri, 27 Jun 2014 21:06:52 +0000 (17:06 -0400)]
tests: create a source tarball and use that to build a repo
This tests that setup.py is in working order and creating a functional
source tarball.
Hans-Christoph Steiner [Fri, 27 Jun 2014 21:06:18 +0000 (17:06 -0400)]
tests: by default, run on included urzip.apk
This means you can just do `cd tests/ && ./run-tests` to run the tests now.
You can still override the APK source with the first argument, like:
cd tests/ && ./run-tests /path/to/lots/of/apks/dir
Daniel Martí [Fri, 27 Jun 2014 19:11:52 +0000 (21:11 +0200)]
Merge branch 'add-local_copy_dir-and-v0.2-fixes' of https://gitlab.com/eighthave/fdroidserver
Hans-Christoph Steiner [Thu, 26 Jun 2014 23:52:19 +0000 (19:52 -0400)]
set version to v0.2
Hans-Christoph Steiner [Thu, 26 Jun 2014 23:52:11 +0000 (19:52 -0400)]
include getsig.java and opensc-fdroid.cfg in the source tarball
Hans-Christoph Steiner [Thu, 26 Jun 2014 19:46:47 +0000 (15:46 -0400)]
server update: mkdir 'archive' if it does not exist
If `fdroid server update` is run with config that includes an archive, but
the 'archive' subdir does not exist, create it. This mirrors the code that
is in `fdroid update`. Seems to trivial to move to common.py.
Hans-Christoph Steiner [Thu, 26 Jun 2014 18:18:29 +0000 (14:18 -0400)]
server: --sync-from-local-copy-dir for updating from offline signing repo
To support a fully offline build/signing machine, there is the "local copy
dir". The repo is generated on the offline machine and then copied to a
local dir where a thumb drive or SD Card is mounted. Then on the online
machine, using `fdroid server update --sync-from-local-copy-dir` allows
the whole server update process to happen in a single command:
0. read config.py on online machine's repo
1. rsync from the local_copy_dir to the current dir
2. copy to serverwebroot, awsbucket, etc.
Hans-Christoph Steiner [Thu, 26 Jun 2014 17:05:24 +0000 (13:05 -0400)]
switch serverwebroot rsync to --archive for guaranteed full sync
In `fdroid server update`, the rsync command used --update, which
`man rsync` says: "skip files that are newer on the receiver". That could
cause issues of the public repo getting out of sync with the private,
master repo. --archive is a better sync method since it aims to exactly
reproduce the sending dir to the receiving dir.
Hans-Christoph Steiner [Thu, 26 Jun 2014 15:57:40 +0000 (11:57 -0400)]
server: 'local_copy_dir' config/options to automate offline repo signing
This allows a dir to be specified in config.py that `fdroid server update`
will automatically rsync the repo to. The idea is that the path would
point to an SD card on a fully offline machine that serves as the secure
repo signing machine.
Daniel Martí [Thu, 26 Jun 2014 11:07:49 +0000 (13:07 +0200)]
Raise gotorevision exceptions with more useful info
Daniel Martí [Thu, 26 Jun 2014 11:03:51 +0000 (13:03 +0200)]
Always try to recover origin/HEAD in case it's not there
Daniel Martí [Thu, 26 Jun 2014 10:52:16 +0000 (12:52 +0200)]
Easier multiline strings
Daniel Martí [Thu, 26 Jun 2014 10:41:50 +0000 (12:41 +0200)]
Error if UCM:Tags is used with git-svn without tags set up
Daniel Martí [Thu, 26 Jun 2014 10:39:42 +0000 (12:39 +0200)]
Simplify check_metadata
Ciaran Gultnieks [Wed, 25 Jun 2014 11:38:25 +0000 (12:38 +0100)]
Fix pep8 error in previous commit
Ciaran Gultnieks [Wed, 25 Jun 2014 10:43:23 +0000 (11:43 +0100)]
Fix nasty problem caused by
7c2e61a4
Daniel Martí [Wed, 25 Jun 2014 09:12:53 +0000 (11:12 +0200)]
Use origin/HEAD as the default checkout for git
This should fix many RepoManifest UCMs where 'master' is not the default
branch
Ciaran Gultnieks [Wed, 25 Jun 2014 08:54:14 +0000 (09:54 +0100)]
Be more specific when logging repository deletes
Ciaran Gultnieks [Wed, 25 Jun 2014 08:25:47 +0000 (09:25 +0100)]
Fix popen command logging
Daniel Martí [Tue, 24 Jun 2014 20:31:39 +0000 (22:31 +0200)]
Small buildjni= fixes
Daniel Martí [Tue, 24 Jun 2014 20:09:05 +0000 (22:09 +0200)]
Don't error about native code if buildjni=no
Daniel Martí [Sun, 22 Jun 2014 19:34:14 +0000 (21:34 +0200)]
Only report files that were actually cleaned of signing stuff
Daniel Martí [Sun, 22 Jun 2014 19:29:07 +0000 (21:29 +0200)]
Set the FDroidOpen output default back to true
Having it at False just makes SilentPopen useless.
Daniel Martí [Sun, 22 Jun 2014 19:28:33 +0000 (21:28 +0200)]
Don't use logging.info with verbose ifs
Daniel Martí [Sun, 22 Jun 2014 19:24:05 +0000 (21:24 +0200)]
Warn about config permissions before loading the defaults
Now, configs that don't contain passwords don't trigger the warning.
Daniel Martí [Sun, 22 Jun 2014 15:36:00 +0000 (17:36 +0200)]
A bit more None magic to fix some UCMs
Daniel Martí [Sat, 21 Jun 2014 21:03:36 +0000 (23:03 +0200)]
Don't output everything when using --verbose
This is especially painful when using stuff like aapt to obtain data
Daniel Martí [Fri, 20 Jun 2014 09:10:52 +0000 (11:10 +0200)]
Revert "Keep version names even if found separate from the code"
This reverts commit
75381ef14718f3821acefaa64a4f7d5243ba15df.
Daniel Martí [Thu, 19 Jun 2014 10:41:34 +0000 (12:41 +0200)]
Better support for gradle plugin versions
Daniel Martí [Thu, 19 Jun 2014 10:32:21 +0000 (12:32 +0200)]
Use gradle_dir, not root_dir, to fetch the plugin version
Daniel Martí [Tue, 17 Jun 2014 08:48:28 +0000 (08:48 +0000)]
Merge branch 'master' into 'master'
run-tests: find current version of aapt in folder rather than in PATH
The Jenkins server did not yet have 19.1.0 build-tools installed yet, so your fixed commits failed to build. This commit fixes the build:
Not everyone adds the build-tools to their PATH, so this makes it so this script will find aapt in the most recent build-tools version that is installed on the local system.
Hans-Christoph Steiner [Mon, 16 Jun 2014 23:18:28 +0000 (19:18 -0400)]
run-tests: find current version of aapt in folder rather than in PATH
Not everyone adds the build-tools to their PATH, so this makes it so this
script will find aapt in the most recent build-tools version that is
installed on the local system.
Daniel Martí [Mon, 16 Jun 2014 21:12:47 +0000 (23:12 +0200)]
Current build-tools is 19.1.0, not 19.1
Daniel Martí [Mon, 16 Jun 2014 11:09:28 +0000 (13:09 +0200)]
Fix create_fake_android_home with the new build-tools
Daniel Martí [Mon, 16 Jun 2014 10:42:43 +0000 (12:42 +0200)]
Bump default build_tools, small fixes
Daniel Martí [Mon, 16 Jun 2014 10:40:04 +0000 (12:40 +0200)]
Warn if build_tools is not set up properly
Daniel Martí [Mon, 16 Jun 2014 10:30:33 +0000 (12:30 +0200)]
Keep version names even if found separate from the code
Daniel Martí [Sun, 15 Jun 2014 11:34:41 +0000 (13:34 +0200)]
Avoiding lintVital is no longer necessary in 0.11
Daniel Martí [Sun, 15 Jun 2014 10:30:03 +0000 (12:30 +0200)]
Fix crash in 'fdroid import'
Daniel Martí [Sun, 15 Jun 2014 10:16:10 +0000 (12:16 +0200)]
Fix bug in reading old recipes
Daniel Martí [Thu, 12 Jun 2014 19:51:33 +0000 (21:51 +0200)]
Update fdroid init completion
Daniel Martí [Thu, 12 Jun 2014 19:48:45 +0000 (21:48 +0200)]
Install and lint were missing -q
Daniel Martí [Thu, 12 Jun 2014 08:04:20 +0000 (10:04 +0200)]
Apk output path is build/outputs/apk/*.apk since 0.11
Daniel Martí [Thu, 12 Jun 2014 08:00:46 +0000 (10:00 +0200)]
lintVital was added in 0.8, only exclude it then
Daniel Martí [Thu, 12 Jun 2014 08:00:29 +0000 (10:00 +0200)]
Add support for plugin version 0.11
Daniel Martí [Wed, 11 Jun 2014 20:47:54 +0000 (22:47 +0200)]
Update sdk and build-tools
Daniel Martí [Sun, 8 Jun 2014 19:36:22 +0000 (21:36 +0200)]
Fix small issue in import.py
Ciaran Gultnieks [Mon, 9 Jun 2014 22:14:34 +0000 (22:14 +0000)]
Merge branch 'rsync-improvements-for-fdroid-server-update' into 'master'
rsync improvements for fdroid server update
This is a couple of improvements to how `fdroid server update` uses `rsync`.
(also, please remove the branch when accepting any of my merge requests)
Daniel Martí [Sun, 8 Jun 2014 08:24:37 +0000 (10:24 +0200)]
Add faketime, needed by lildebi
Daniel Martí [Sat, 7 Jun 2014 22:48:35 +0000 (00:48 +0200)]
Exclude lint from gradle build tasks
Daniel Martí [Sat, 7 Jun 2014 22:38:11 +0000 (00:38 +0200)]
jni problem is critical, so make it an error
Hans-Christoph Steiner [Thu, 5 Jun 2014 20:55:52 +0000 (16:55 -0400)]
tests: turn off unneeded debug logging during APK copying
The whole process of finding and copying APKs can be very verbose, so turn
of the bash verbose logging during that process.
Hans-Christoph Steiner [Thu, 5 Jun 2014 20:21:12 +0000 (16:21 -0400)]
server: specify an identity file for SSH when rsyncing
This allows the SSH key used to sync with the server to be specified via
the config.py or the command line. I need it for running automated tests
and setups.
Hans-Christoph Steiner [Thu, 5 Jun 2014 19:50:21 +0000 (15:50 -0400)]
update: add stricter checking when updating repo index using rsync
rsync uses the modification time and size of the file when deciding whether
to update a file. These are relatively easy to control in malicious code,
so instead make rsync use a full MD5 checksum when decided whether the
index needs to be updated. I suppose we could add an option to use
checksum checking on all files, but since the signed repo already provides
a checksum check, it seems not worth the added load on the process.
Also, renamed 'index' to 'indexxml' to make it clear what is the XML and
what is the JAR.
Ciaran Gultnieks [Thu, 5 Jun 2014 15:51:24 +0000 (15:51 +0000)]
Merge branch 'test-updates-and-related-bug-fixes' into 'master'
Test updates and related bug fixes
I just set up some big tests of generating repos based on feeding as many random APKs into `fdroid update` as possible. On our jenkins server, the tests copy all of the APKs that the jenkins server has generated and builds a repo from them. This process caught lots of little glitches in the whole process. While these little glitches are usually caused by problematic APKs, `fdroid update` should handle them gracefully. Hopefully this set of fixes accomplishes that.
Daniel Martí [Thu, 5 Jun 2014 08:02:30 +0000 (10:02 +0200)]
Be less clumsy when removing signingConfigs
Hans-Christoph Steiner [Wed, 4 Jun 2014 22:45:06 +0000 (18:45 -0400)]
tests: fix --android-home test to actually work
In this case, ANDROID_HOME is set to a fake, non-working version that will
be detected by fdroid as an Android SDK install. It should use the path
set by --android-home over the one in ANDROID_HOME, therefore if it uses
the one in ANDROID_HOME, it won't work because it is a fake one. Only
--android-home provides a working one.
Hans-Christoph Steiner [Wed, 4 Jun 2014 19:47:54 +0000 (15:47 -0400)]
update name/description in examples/config.py
It was confusing that by default, repos created with `fdroid init` had the
same name/description as f-droid.org/repo
Hans-Christoph Steiner [Tue, 3 Jun 2014 18:18:08 +0000 (14:18 -0400)]
some APKs do not have a name, like system APKs
It is not necessarily a good idea to try to distribute system APKs via
FDroid, but `fdroid update` should just ignore APKs it cannot handle rather
than die and prevent a repo from being fully created. This is necessary to
handle the automatic creation of repos, like for debug builds from a
Jenkins server.
Hans-Christoph Steiner [Tue, 3 Jun 2014 17:39:11 +0000 (13:39 -0400)]
update: improve warning about APKs set to be debuggable
This uses the actual XML code used to set this flag making the warning
message easily searchable on the interwebs.
Hans-Christoph Steiner [Tue, 3 Jun 2014 17:28:35 +0000 (13:28 -0400)]
apps with no <uses-sdk> get strange values of minSdkVersion
Using this example app which does not have <uses-sdk>:
https://android.googlesource.com/platform/development/+log/master/samples/ApiDemos/assets/HelloActivity.apk
aapt then returns "sdkVersion:'IceCreamSandwich'". minSdkVersion is only
ever supposed to be an integer, so this is a bizarre APK. It is included
only as a binary in the git repo for Android sample code. But who knows
what else is out there, so report and error and carry on with the update
process.
Hans-Christoph Steiner [Mon, 2 Jun 2014 20:18:12 +0000 (16:18 -0400)]
update: skip APKs that cannot be parsed instead of exiting
Some APKs can be corrupt or some system APKs do not have all the normal
info. Instead of quitting, `fdroid update` skips the non-parsable APKs and
optionally deletes them if --delete-unknown is specified.
Hans-Christoph Steiner [Mon, 2 Jun 2014 20:12:50 +0000 (16:12 -0400)]
make FDroidPopen output based on --verbose
FDroidPopen outputs by default, this should be controlled by the --verbose
flag so that most of the time, only meaningful messages are shown like
errors and such. For command output that should be shown everytime,
output=True can be set.
Hans-Christoph Steiner [Mon, 2 Jun 2014 17:46:00 +0000 (13:46 -0400)]
update: remove overly verbose message about icon sizing being correct
This seems like purely a debug message, I can't see why its useful in general
Hans-Christoph Steiner [Mon, 2 Jun 2014 17:24:24 +0000 (13:24 -0400)]
jenkins: run git pre-commit hook for pep8, pyflakes, etc
This provides a central script for running certain checks at commit time,
and in jenkins automated builds.
Hans-Christoph Steiner [Mon, 2 Jun 2014 17:21:54 +0000 (13:21 -0400)]
tests: specify dir for APKs as cmd line arg, and set jenkins to ~
This lets people easily set whatever dir they want, while letting jenkins
search through its whole workspace for any APKs that have been built. Also,
only include the latest version of a given packageName+versionCode.
Hans-Christoph Steiner [Fri, 30 May 2014 21:07:19 +0000 (17:07 -0400)]
use 'metadata' name throughout: --createmeta to --create-metadata
To keep the naming used within fdroid consistent, I renamed this long flag
to use the whole word 'metadata' since that is what is used everywhere else
Hans-Christoph Steiner [Fri, 30 May 2014 20:50:32 +0000 (16:50 -0400)]
tests: try `fdroid update` after adding an APK to an existing repo
Yes, this includes a binary file, but it is only for the tests, and it is
free software since I wrote it. The source is here:
https://github.com/eighthave/urzip
Hans-Christoph Steiner [Fri, 30 May 2014 19:53:11 +0000 (15:53 -0400)]
test: make sure `fdroid update -c` creates a full index.xml
Previously, `fdroid update -c` would only create the new metadata, but
would not add the new apps/apks to the repo. That required a second run of
`fdroid update`. This has been fixes, so this test makes sure it stays
fixed, in a very generic way.
Hans-Christoph Steiner [Fri, 30 May 2014 15:41:02 +0000 (11:41 -0400)]
init: make prompt for SDK path exit cleanly on Ctrl-C
This just makes a clean exit rather than showing a python stacktrace.
Hans-Christoph Steiner [Fri, 30 May 2014 01:43:16 +0000 (21:43 -0400)]
add more SDK checks: build-tools/19.0.3 and presense of aapt
Make sure that fdroid can find aapt in the current config, otherwise exit
with an error. Some users don't have build_tools set, and their SDK does
not include the build-tools in the default versioned dir, so this should
warn them of what is wrong.
Daniel Martí [Wed, 4 Jun 2014 11:29:01 +0000 (13:29 +0200)]
Fix crash in checkupdates with auto-updates
Daniel Martí [Sun, 1 Jun 2014 17:12:00 +0000 (19:12 +0200)]
Add warnings for repo clonings in build recipes
Daniel Martí [Sun, 1 Jun 2014 17:11:49 +0000 (19:11 +0200)]
Fix the script defaults
Daniel Martí [Sun, 1 Jun 2014 17:05:18 +0000 (19:05 +0200)]
No need to check for non-default build items
Daniel Martí [Sun, 1 Jun 2014 17:05:10 +0000 (19:05 +0200)]
Remove dead mvnflags code
Daniel Martí [Sun, 1 Jun 2014 14:37:33 +0000 (16:37 +0200)]
Add support for gitlab.com repos to import
Daniel Martí [Sun, 1 Jun 2014 13:40:33 +0000 (15:40 +0200)]
Store build comments by vercode, not version
vercodes are unique, versions aren't
Daniel Martí [Sun, 1 Jun 2014 13:38:11 +0000 (15:38 +0200)]
Don't allow for duplicate build entries
Daniel Martí [Sat, 31 May 2014 21:10:16 +0000 (23:10 +0200)]
Use ordered dicts for defaults in apps and builds
Daniel Martí [Sat, 31 May 2014 21:09:58 +0000 (23:09 +0200)]
Enable pep8 in pre-commit
Daniel Martí [Sat, 31 May 2014 21:00:27 +0000 (23:00 +0200)]
Fix pep8 warnings in makebuildserver
Daniel Martí [Fri, 30 May 2014 17:49:38 +0000 (19:49 +0200)]
Re-order app_defaults to match the writing order
Also fix a couple of issues:
* Update Check Name was never written to disk
* Maintainer Notes had no default and was used differently
Daniel Martí [Fri, 30 May 2014 16:51:59 +0000 (18:51 +0200)]
Simplify field/flag checking and bool flag usage
Daniel Martí [Fri, 30 May 2014 16:48:35 +0000 (18:48 +0200)]
Make unspecified license use regex
Daniel Martí [Thu, 29 May 2014 20:24:39 +0000 (20:24 +0000)]
Merge branch 'recent-bug-fixes' into 'master'
Recent bug fixes
Fix a couple of bugs from the tracker.
Hans-Christoph Steiner [Thu, 29 May 2014 19:29:57 +0000 (15:29 -0400)]
fixes #12: make `fdroid update -c` do complete update like `fdroid update`
Since the new metadata created by -c is added after the existing metadata
was already parsed, `fdroid update -c` was not doing a complete update of
the repo. This moves the metadata creation as early as possible, then
reruns the metadata parsing if new metadata was created.
refs #12 https://gitlab.com/fdroid/fdroidserver/issues/12
Hans-Christoph Steiner [Thu, 29 May 2014 17:40:06 +0000 (13:40 -0400)]
Fixes #8: if unknown APKs found, prompt to use -c or use --delete-unknown
This adds the option --delete-unknown for the current default behavior of
`fdroid update`: to delete any unknown APKs. Instead, it just outputs a
warning about the unknown APKs and suggests -c for adding it.
Fixes #8 https://gitlab.com/fdroid/fdroidserver/issues/8
Hans-Christoph Steiner [Thu, 29 May 2014 17:10:28 +0000 (13:10 -0400)]
fix PEP8 E128 continuation line under-indented for visual indent
Daniel Martí [Wed, 28 May 2014 07:33:14 +0000 (09:33 +0200)]
Fix some more pep8 warnings
Daniel Martí [Wed, 28 May 2014 07:30:55 +0000 (09:30 +0200)]
Fix E265 in config.py
Daniel Martí [Wed, 28 May 2014 07:28:28 +0000 (09:28 +0200)]
Add pre-commit hook with installer
Will enable pep8 once all the problems are gone
Daniel Martí [Tue, 27 May 2014 13:56:57 +0000 (15:56 +0200)]
Fix pyflakes errors in readmeta
Daniel Martí [Tue, 27 May 2014 13:17:37 +0000 (15:17 +0200)]
Make readmeta use srclibs and check for config.py too
Daniel Martí [Tue, 27 May 2014 08:10:15 +0000 (10:10 +0200)]
More strict string search regex
Daniel Martí [Tue, 27 May 2014 07:53:58 +0000 (09:53 +0200)]
Also use srclibs in checkupdates
Needed when Repo Type is srclib
Daniel Martí [Mon, 26 May 2014 06:09:22 +0000 (08:09 +0200)]
Warn about summaries that are not capitalized