Commit graph

517 commits

Author SHA1 Message Date
Ciaran Gultnieks
b5ed40684f Detect apk cache changes to avoid having to blow the whole thing 2015-01-11 18:22:00 +00:00
Ciaran Gultnieks
cad82ad669 Add ability to not sign the indexes when doing fdroid update 2015-01-11 08:20:14 +00:00
Ciaran Gultnieks
4ae896511e Allow repo pubkey to defined directly in config 2015-01-11 08:20:14 +00:00
Boris Kraut
b1ec8cc47a Add "Changelog:" metadata field. 2015-01-11 02:26:41 +01:00
Daniel Martí
cba9f25c49 One remaining dump badging without output=False 2014-12-31 17:18:19 +01:00
Daniel Martí
606cda591d Don't break os.symlink if app names contain '/' 2014-12-14 15:43:22 +01:00
Hans-Christoph Steiner
9244256461 find cmds from SDK build-tools in a more flexible way, on the fly
This is a more flexible approach than testing for the complete SDK and
build-tools up front.  This will only test for the commands that are
actually being run, so that if you only have `aapt` installed, you can do
`fdroid update` without errors, but other commands will still give
appropriate errors.

This also makes the build_tools item in config.py optional, it is only
needed if you want to force a specific version of the build-tools.
2014-12-14 13:25:20 +01:00
Hans-Christoph Steiner
b33cae375a remove url-unsafe characters from "current version" symlink names
This prevents the URL from having ugly %20 stuff in the app name.
2014-11-11 15:06:53 +01:00
Hans-Christoph Steiner
803ec39e23 when symlinking current version of app, include gpg sig if it exists
Let's make it easy for people to also find the GPG signature, and promote
easy verification!
2014-11-11 15:06:52 +01:00
Hans-Christoph Steiner
e826938734 static URLs to "Current Version" of each app
I wrote up the feature to automatically generate symlinks with a constant name
that points to the current release version. I have it on by default, with a
*config.py* option to turn it off. There is also an option to set where the
symlink name comes from which defaults to app['Name'] i.e. F-Droid.apk, but
can easily be set to app['id'], i.e. _org.fdroid.fdroid.apk_. I think the best
place for the symlinks is in the root of the repo, so like
https://f-droid.org/F-Droid.apk or https://guardianproject.info/fdroid/ChatSecure.apk

For the case of the current FDroid static link https://f-droid.org/FDroid.apk
it can just be a symlink to the generated one (https://f-droid.org/F-Droid.apk
or https://f-droid.org/org.fdroid.fdroid.apk). Right now, this feature is all
or nothing, meaning it generates symlinks for all apps in the repo, or none. I
can’t think of any problems that this might cause since its only symlinks, so
the amount of disk space is tiny. Also, I think it would be useful for having
an easy “Download this app” button on each app’s page on the “Browse” view. As
long as this button is less prominent than the “Download F-Droid” button, and
it is clear that it is better to use the FDroid app than doing direct
downloads. For the f-droid.org repo, the symlinks should probably be based on
app['id'] to prevent name conflicts.

more info here:
https://f-droid.org/forums/topic/static-urls-to-current-version-of-each-app/
2014-11-11 15:06:52 +01:00
Hans-Christoph Steiner
d74235564f move apk signature verification into getsig() function
This makes the python replacement behave like an all-in-one replacement
for getsig.java.

fixes #5 https://gitlab.com/fdroid/fdroidserver/issues/5
2014-11-07 09:20:23 +00:00
Daniel Martí
6e2d0a9e1e Replace getsig.java with a pure python implementation
Special thanks to deki for helping out with the certificate encodings:
https://gitlab.com/snippets/1842

fixes #5 https://gitlab.com/fdroid/fdroidserver/issues/5
2014-11-07 09:20:14 +00:00
Hans-Christoph Steiner
c88eff9af7 use jarsigner to verify the APK signature is valid
By using jarsigner here, we can get rid of getsig.java, since the rest of
what getsig.java does can easily be handled in python.  This simplifies
installation and deployment, and makes things work better cross-platform.
This also means that the fdroidserver Debian package no longer needs to
Build-Depends: on default-jdk, which makes builds in pbuilder run a lot
faster. :-)

refs #5 https://gitlab.com/fdroid/fdroidserver/issues/5
2014-11-07 09:20:04 +00:00
Daniel Martí
5798887d53 Try using Auto Name before falling back to appid for Name 2014-09-23 09:56:09 +02:00
Daniel Martí
a1f51ebb4d Fix typo in app link hrefs 2014-08-28 15:36:09 +02:00
Daniel Martí
94c29f9c37 Map apps in memory from appid to appinfo
Instead of storing them in a list and doing linear searches by appinfo['id']
2014-08-16 12:46:02 +02:00
Ciaran Gultnieks
4c7c410d6e Remove gpg sig when removing disabled builds 2014-08-11 12:48:41 +01:00
Daniel Martí
7c0185fab5 Don't assume that Result: will be in the first line
Fixes nasty bugs with _JAVA_OPTIONS
2014-08-10 19:56:45 +02:00
Ciaran Gultnieks
b2f1cedb40 Fix update, broken in 7ac0c5abb2 2014-08-08 12:34:37 +01:00
Ciaran Gultnieks
1c5d5c0bce Improve 'no sdk version found' output 2014-08-08 12:34:16 +01:00
Daniel Martí
7ac0c5abb2 update: use sets for permissions and features to avoid duplicates 2014-08-05 23:04:21 +02:00
Ciaran Gultnieks
f5890646e6 Put lastbuild log on wiki by vercode (with redirect) 2014-07-17 14:05:16 +01:00
Daniel Martí
d110c24eff Find aapt as part of the main config initialisation 2014-07-03 00:31:07 +02:00
Daniel Martí
e8284225c9 Improve some log levels 2014-07-01 20:32:49 +02:00
Daniel Martí
1a1bdfc3d9 Merge branch 'bug-fixes-for-v0.2.1' of https://gitlab.com/eighthave/fdroidserver 2014-07-01 18:13:00 +02:00
Daniel Martí
8888962ace Rename PopenResult.stdout to output since it also contains stderr 2014-07-01 18:04:41 +02:00
Hans-Christoph Steiner
d0c767ce5e only move GPG signature if APK exists
The .asc moving code just needed to be indented so it only runs when
'srcname' exists in apk[], otherwise it just throws a KeyError
2014-06-30 23:01:48 -04:00
Hans-Christoph Steiner
3dbe503071 check repo icons exist now before running through all of fdroid update
Before, if repo_icon or archive_icon pointed to a non-existent file, then
`fdroid update` would run through the whole process of building a repo,
then fail at the very end because of the non-existent file.  On the next
run, `fdroid update` then starts from the beginning.

This just checks for those files at the beginning, and exits with an error
if they are not found.
2014-06-30 23:01:47 -04:00
Ciaran Gultnieks
1a11982897 Move gpg signatures to archive along with the other files 2014-06-30 22:53:02 +01:00
Daniel Martí
c750b02a6c Always run aapt with SilentPopen 2014-06-30 16:15:14 +02:00
Ciaran Gultnieks
95d8f29479 Fix nasty problem caused by 7c2e61a4 2014-06-25 11:43:44 +01:00
Daniel Martí
14f865a5b1 Don't use logging.info with verbose ifs 2014-06-22 21:28:33 +02:00
Hans-Christoph Steiner
13baea9558 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.
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
c81ff764a3 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.
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
d68830418b 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.
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
57a4e03277 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.
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
ed73db65ae 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.
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
c6d946ed54 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
2014-06-04 22:01:25 -04:00
Hans-Christoph Steiner
78d5ebf26c 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
2014-06-04 21:54:56 -04:00
Daniel Martí
3d72c30fe5 Use ordered dicts for defaults in apps and builds 2014-05-31 23:54:50 +02:00
Hans-Christoph Steiner
6839f9a9ed 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
2014-05-29 15:29:57 -04:00
Hans-Christoph Steiner
af22962572 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
2014-05-29 13:40:06 -04:00
Daniel Martí
0f0ccdb1e1 Fix some more pep8 warnings 2014-05-28 09:33:14 +02:00
Daniel Martí
93a56e4f51 Fall back to launchable-activity label if application has none
This fixes apps like MiniZip not having a name
2014-05-23 09:47:11 +02:00
Daniel Martí
17a4f5c00f A few more PEP8 fixes 2014-05-07 16:17:46 +02:00
Hans-Christoph Steiner
37d6d87ff7 fix PEP8 "E226 missing whitespace around arithmetic operator" 2014-05-06 14:36:33 -04:00
Hans-Christoph Steiner
0e00b36db5 fix PEP8 E124/E125/126/127/128 indentation issues
* E124 closing bracket does not match visual indentation
* E125 continuation line does not distinguish itself from next logical line
* E126 continuation line over-indented for hanging indent
* E127 continuation line over-indented for visual indent
* E128 continuation line under-indented for visual indent
2014-05-06 14:36:33 -04:00
Hans-Christoph Steiner
aa5f317c26 fix PEP8 "W391 blank line at end of file" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner
16dc3b27d6 fix PEP8 "E303 too many blank lines (2)" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner
69989d4758 fix PEP8 "E302 expected 1 blank lines, found 0" 2014-05-06 11:45:03 -04:00