Commit graph

433 commits

Author SHA1 Message Date
Daniel Martí
af692dd3bd Stable clients understand UpstreamNonFree now 2015-06-26 18:00:34 +02:00
Daniel Martí
7b2f7077bc Hotfix for 7b68b90569 - don't cal .split() on None 2015-06-26 17:58:57 +02:00
Daniel Martí
7b68b90569 update: never include empty elements in the index 2015-06-26 17:41:19 +02:00
Daniel Martí
6c85f9d2fa Bump index version to 13: <changelog> added 2015-06-09 23:11:42 +02:00
Daniel Martí
d5f705bd9c update: don't always place the changelog element
It's not that common, so often it'd just be <changelog/>
2015-06-09 23:10:10 +02:00
Ciaran Gultnieks
368a6ae514 Stop fdroid update saying it requires signing keys when it doesn't
Again!
2015-06-04 15:00:31 +01:00
Daniel Martí
4b59f913f1 Merge branch 'changelog' of https://gitlab.com/krt/fdroidserver 2015-06-03 15:52:01 +02:00
Daniel Martí
550d907b8c fix E713 test for membership should be 'not in' 2015-05-22 09:29:51 +02:00
Ciaran Gultnieks
4178b34351 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!)
2015-05-15 21:38:12 +01:00
Ciaran Gultnieks
76332e7c0e 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
2015-05-14 16:12:04 +00: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
Hans-Christoph Steiner
fd0e2ab97e 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
2015-05-14 12:04:46 -04:00
Daniel Martí
255afa3894 ACCESS_SUPERUSER is now deprecated 2015-05-14 12:31:10 +02:00
Hans-Christoph Steiner
de1c80f9b4 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
2015-05-08 16:13:15 -04:00
Hans-Christoph Steiner
86865faa62 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
2015-05-08 16:13:15 -04:00
Ciaran Gultnieks
ad1e936ad7 Failed to update what page? 2015-02-01 20:32:03 +00:00
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