1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00
Commit Graph

2468 Commits

Author SHA1 Message Date
Marcus Hoffmann
c790f43bf3 common: use python instead of calling out to 'rm'
Be platform agnostic by not calling other utilities.
2017-11-25 13:49:33 +01:00
Marcus Hoffmann
b9b262422f vmtools: remove old vagrant workaround
This was introduced in cd23bb933c
apparently to work around problems in vagrant 1.3.5.

This seems not to be necessary any more, I have never had a problem with
those sleeps removed.
2017-11-25 00:38:00 +01:00
Hans-Christoph Steiner
09828f4a73 never wait for SSH prompts when running git commands
We never allow git via SSH or password/key access, and right now, this
causes things to hang forever.  This sets things up to fail quickly
with invalid ssh connections.

BatchMode=yes - passphrase/password querying will be disabled.

StrictHostKeyChecking=yes - never automatically prompt, or add host keys to
the ~/.ssh/known_hosts file, and refuse to connect to hosts whose host key
has changed.
2017-11-23 23:31:38 +01:00
Hans-Christoph Steiner
fdbfb4d1a2 build: stop git from waiting forever at username/password prompts
If a git fetch/clone/submodule URL points to gitlab, github, bitbucket, etc
and that repo does not exist any more, those services will prompt the user
for a username/password so that the service can check if its a private
repo.  Private repos show up the same as non-existent repos.  This employs
two techniques for making sure that git never waits at those prompts.  It
instead should just fail immediately.  The buildserver has been hanging on
these prompts forever, until manually killed.  This change will apply to
updates both on the buildserver host, and the buildserver guest vm.

This uses the "insteadOf" git config option to rewrite URLs to always use
HTTPS and then include a fake username/password so that git will use those
in the prompts and fail immediately.  This trick has been in use on the
verification server for a long while and has been working well.  It has
also been used on jenkins.debian.net in the host.
https://f-droid.org/en/docs/Verification_Server/

It also includes GIT_TERMINAL_PROMPT, which also prevents the bad behavior,
which was added in git 2.3.
https://github.com/blog/1957-git-2-3-has-been-released
2017-11-23 23:31:37 +01:00
Hans-Christoph Steiner
f670634450 nightly: new command to setup nightly builds in CI systems
This lets people using CI systems easily setup a nightly build repo hosted
for free in github or gitlab.

https://github.com/zom/Zom-Android/pull/355
https://gitlab.com/fdroid/fdroidclient/merge_requests/594

environment variables:
* https://docs.gitlab.com/ce/ci/variables/README.html
* https://docs.travis-ci.com/user/environment-variables
* https://circleci.com/docs/1.0/environment-variables
2017-11-22 23:27:07 +01:00
Hans-Christoph Steiner
8bf70338e4 make common.local_rsync() method for pre-configured local rsyncs 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
ed80391bb5 common.get_examples_dir() to get path to fdroidserver examples 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
9ade09349b update: improve help strings 2017-11-08 14:05:17 +01:00
relan
cd8a86a2a2 build: raise VCS client version logging level
Debug logging is not saved in buildserver logs. Also move this line into
build.py's main() to avoid duplication: common.setup_vcs(app) may be
called from parse_metadata() too.
2017-11-02 08:52:02 +03:00
Hans-Christoph Steiner
7be46d53c7 sort Anti-Features before writing them to the wiki
This avoids silly updates to the wiki where the sort order of the Anti-
Features is the only change:

−{{AntiFeature|KnownVuln}}
 {{AntiFeature|DisabledAlgorithm}}
+{{AntiFeature|KnownVuln}}

https://f-droid.org/wiki/index.php?title=info.guardianproject.browser&curid=517&diff=189655&oldid=188037
2017-10-27 09:15:22 +02:00
Ciaran Gultnieks
505d2c1325 update bombs out when no icons (closes #402) 2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
230d8971ba metadata: make all strings translatable 2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
ac69d5b17d update: make all strings translatable 2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
ffc91e301a make _ always be the gettext function, nothing else
This avoids hard bugs where the _() function gets overidden by a str or
something else.
2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
dd6d4b2012 preserve metadata when copying APK signatures
Since this code was not setting the "create system" and "compress type",
Python uses it's defaults.  Those will be different than what the Android
tools produces if this is run on UNIX.  The Android tools uses the bare
bones "Windows" ZIP format, e.g. no permissions, etc.

For example:
https://verification.f-droid.org/eu.siacs.conversations_234.apk.diffoscope.html
2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
e0df6d2479 choose the most recent available version of Java
This came about testing on OSX, where there are often multiple versions of
the JDK installed.  This was choosing the oldest version.  It should
choose the most recent version.
2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
ab02a6fcc3 Revert "scanner: promote jar and aar files present in the repo to errors"
This reverts commit 5f5d3ea896.

These new scanner rules for JARs causes most builds on fdroiddata to
break.  For example, at least the past 20 releases of
org.fdroid.fdroid.  fdroiddata needs to be cleaned up and prepared for
this before we can include 5f5d3ea896

I'm running fdroid scanner on the whole archive now, I'll post the log
to an issue once its done.  Ignoring test files would eliminate some
of these build failures, at least for most org.fdroid.fdroid builds.

refs #!325
2017-10-25 22:55:47 +02:00
Hans-Christoph Steiner
23265e3290 Merge branch 'patch-1' into 'master'
HTTP, HTTPS

See merge request fdroid/fdroidserver!360
2017-10-24 13:40:53 +00:00
Marcus Hoffmann
e307cdec59 common: check file existence before opening manifest
This fixes a problem when there is a broken symlink with the name
AndroidManifest.xml which will then lead to a crash when trying to open
it for trying to remove the debuggable flag.
2017-10-24 15:19:38 +02:00
Allan Nordhøy
6daeb88ab9 HTTP, HTTPS 2017-10-22 06:43:18 +00:00
Hans-Christoph Steiner
4ff50e9099 fix egg-link and easy_install support for Python3
Wow, this is hacky and weird, but its been there for a long time. I
don't know if its even relevant anymore, but is isolated so it
shouldn't hurt anything.  Plus there is a test for it in
tests/complete-ci-tests, so it seems worth fixing.
2017-10-19 23:28:13 +02:00
Hans-Christoph Steiner
cc6d867423 fix finding translation files when installed 2017-10-19 23:28:13 +02:00
Hans-Christoph Steiner
f227af817f standardize on "build-tools" as the name of that Android SDK component 2017-10-19 23:28:13 +02:00
Hans-Christoph Steiner
927104a4e3 update: make strings translatable 2017-10-19 23:16:58 +02:00
Hans-Christoph Steiner
7d4e354f25 FDroidException handle Exceptions that return things other than str
This is related to a4c4a16ed9
2017-10-19 20:38:43 +02:00
Michael Pöhn
788c8f97fd better error message in publish when repo_key is not set 2017-10-17 22:10:39 +02:00
Hans-Christoph Steiner
460c4185bb update: support Fastlane's official location for screenshots
fastlane/android/metadata/locale/images/*Screenshots

https://github.com/fastlane/fastlane/blob/2.61.0/screengrab/lib/screengrab/runner.rb#L324

closes #357
2017-10-13 14:58:15 +02:00
Hans-Christoph Steiner
a4169484fd update: fix detection of Triple-T screenshots
* https://github.com/westnordost/StreetComplete/issues/489
* https://forum.f-droid.org/t/screenshots-dont-show-up-in-client-using-gradle-play-publisher/881/2

#357
2017-10-13 14:58:15 +02:00
Hans-Christoph Steiner
b6067e6a1f server: automatically create S3 bucket when using s3cmd 2017-10-13 14:58:15 +02:00
Hans-Christoph Steiner
0c4dc9779e server: move strings to be gettext translatable 2017-10-13 14:58:15 +02:00
Hans-Christoph Steiner
a4c4a16ed9 handle exceptions that send a tuple for the error message
Running `fdroid verify` I was seeing FDroidExceptions from verify.py:98
that had a tuple rather than a string.


Traceback (most recent call last):
  File "/home/hans/code/fdroid/server/fdroid", line 152, in <module>
    main()
  File "/home/hans/code/fdroid/server/fdroid", line 128, in main
    mod.main()
  File "/home/hans/code/fdroid/server/fdroidserver/verify.py", line 98, in main
    logging.info("...NOT verified - {0}".format(e))
  File "/home/hans/code/fdroid/server/fdroidserver/exception.py", line 22, in __str__
    ret += "\n==== detail begin ====\n%s\n==== detail end ====" % ''.join(self.detail).strip()
TypeError: sequence item 1: expected str instance, HTTPError found
2017-10-13 14:58:15 +02:00
Hans-Christoph Steiner
53ce81179c Merge branch 'error_on_jars' into 'master'
RFC: Error on jars

See merge request fdroid/fdroidserver!325
2017-10-12 11:46:59 +00:00
Michael Pöhn
4b35f19480 Merge branch '334-make-index-generation-fully-reproducible' into 'master'
Resolve "make index generation fully reproducible"

Closes #334

See merge request fdroid/fdroidserver!343
2017-10-06 17:18:10 +00:00
relan
0ab0b03648 common: print VCS client version
This may help to debug issues with too old VCS clients.
2017-10-06 09:41:24 +03:00
Marcus Hoffmann
50ba108093 fix bare except to satisfy newer pycodestyle 2017-10-04 19:23:53 +02:00
Marcus Hoffmann
1c5dccb413 import: fix bitbucket import
repo type can be found on main url, not under /src
2017-10-04 18:54:47 +02:00
Hans-Christoph Steiner
5567182629 Merge branch 'fix-dot-gradle-removal' into 'master'
build: fix build/ and .gradle/ removal after cleaning

Closes #384

See merge request fdroid/fdroidserver!346
2017-10-03 13:19:47 +00:00
relan
aad4bd89d8 build: fix build/ and .gradle/ removal after cleaning
An app may not have a top-level build.gradle file, while Gradle still
creates top-level .gradle/ directory. When build.gradle is absent,
fdroidserver will not remove .gradle/, scanner will find binaries in it
and fail the whole build.

Fix this by also checking for settings.gradle file (should always exist
in the top-level directory) in addition to build.gradle.
2017-10-01 10:11:37 +03:00
Michael Pöhn
89d9d0c45b use OrderedDict for localization data in index-v1 2017-09-26 14:15:48 +02:00
Michael Pöhn
26192a00e2 make sure all timestamps in index-v1 are utc 2017-09-26 14:15:27 +02:00
Michael Pöhn
290b9050e0 convert apk timestamp from filesystem to utc before storing 2017-09-26 14:13:08 +02:00
Michael Pöhn
50c17f99d1 make sure apk-added datetime only gets returned rounded to days 2017-09-26 14:13:04 +02:00
Michael Pöhn
dfc6261ccb sort antiFeatures list in index-v1.json 2017-09-26 14:12:53 +02:00
Michael Pöhn
75c5fa6355 added some docstrings and error messages 2017-09-26 14:11:09 +02:00
Michael Pöhn
6fc968f7cd choose best apk version vor index v0 2017-09-26 14:11:09 +02:00
Michael Pöhn
6930edf889 sort index-v1; publish now creates and stores a list of signature fingerprints 2017-09-26 14:11:09 +02:00
Michael Pöhn
bca07f794f added functions for storing/loading signer fingerprints to stats 2017-09-26 14:11:09 +02:00
Michael Pöhn
ba3844e97e function for finding developer signature in metadata 2017-09-26 14:11:09 +02:00
Michael Pöhn
6a4a78429f add signer to index v1 2017-09-26 14:11:09 +02:00
Michael Pöhn
7c4b8bcac4 added parse release filename function 2017-09-26 14:11:09 +02:00
Michael Pöhn
b993d93395 skip singing apks which ar not validating with signatures from metadata 2017-09-26 14:11:09 +02:00
Michael Pöhn
91369dacfb try injecting signatures for metadata when publishing 2017-09-26 14:11:09 +02:00
Michael Pöhn
08627d70a7 check file existance before trying to verify apks; use centext manager for zips when verifying apk 2017-09-26 14:11:09 +02:00
Michael Pöhn
efb0bf6ee5 add common functions for dealing with apk signatures 2017-09-26 14:11:09 +02:00
Michael Pöhn
45688bfe42 refactored publishing source tarball into a function 2017-09-26 14:11:09 +02:00
Michael Pöhn
c196f7dd7a common function for fetching sha256 signing-key fingerprint 2017-09-26 14:11:09 +02:00
Hans-Christoph Steiner
d44d48285b Merge branch 'build-drozer-syntax-error' into 'master'
building with --dscanner now exits gracefully when repo dir not present

See merge request fdroid/fdroidserver!344
2017-09-26 08:49:51 +00:00
Hans-Christoph Steiner
beb79d613d move lots of comments to function doc strings 2017-09-25 16:35:18 +02:00
Michael Pöhn
d8485f7123 build+drozer: error message instead of crash when repo-folder missing 2017-09-25 16:09:57 +02:00
Hans-Christoph Steiner
176f539647 allow spaces in filenames
This fixes all the bugs I could find that prevented fdroid from
handling files with spaces in them.  This is more important now that
fdroid supports random media files, and Repomaker
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
5dcb48831f index: always use jarsigner for verifying JAR signatures
apksigner v0.7 (build-tools 26.0.1), Google made it require that the
AndroidManifest.xml was present in the archive before it verifies the
signature.  So this needs to stick with the jarsigner hack for JARs.
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
535f2afe90 init: prompt user for Android SDK path using platform-specific default 2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
1d4e3a254d create blank config.py using cross-platform technique
os.mknod() fails on OSX with:

Traceback (most recent call last):

  File "/Users/travis/build/fdroidtravis/fdroidserver/tests/../fdroid", line 154, in <module>
    main()
  File "/Users/travis/build/fdroidtravis/fdroidserver/tests/../fdroid", line 130, in main
    mod.main()
  File "/Users/travis/build/fdroidtravis/fdroidserver/fdroidserver/update.py", line 1768, in main
    common.write_to_config(config, 'repo_keyalias', config['repo_keyalias'])
  File "/Users/travis/build/fdroidtravis/fdroidserver/fdroidserver/common.py", line 2328, in write_to_config
    os.mknod(cfg)
PermissionError: [Errno 1] Operation not permitted
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
6c7b987239 fix string formats that are ambiguous for translators 2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
255932453c ensure _ is used only for gettext strings
_ is often used for variables that are ignored, this makes that a bit more
explicit
!338
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
53e4ec47a7 English source string corrections
From @monolifed <monolifed@gmail.com>
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
9712fac011 "No config.py found" should warning level, until people get use to it
Since !335 changed the long standing behavior, now allowing `fdroid` to
work without a config.py being present, this message should be quite
visible in case people are expecting `fdroid` to fail when there is no
config.py present.
2017-09-16 11:11:49 +02:00
Hans-Christoph Steiner
c7d45b9515 Merge branch 'plural' into 'master'
Correct plurals

See merge request fdroid/fdroidserver!334
2017-09-16 08:11:06 +00:00
Hans-Christoph Steiner
acac15f74d Merge branch 'newcomers' into 'master'
allow starting without config.py

See merge request fdroid/fdroidserver!335
2017-09-16 08:07:56 +00:00
Jan Berkel
4723cff0c8 Correct plurals 2017-09-15 14:16:30 +02:00
Hans-Christoph Steiner
fa0d618d2f rename 'app-id' to standard Android 'applicationId'
* https://developer.android.com/studio/build/application-id.html
* https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/applicationid-vs-packagename

This only changes the term in the human texts, not var names or CLI flags.
2017-09-15 11:41:51 +02:00
Hans-Christoph Steiner
278d67d960 implement gettext localization
This allows all the text to be localized via Weblate.  This is a quick
overview of all the strings, but there are certainly some that were left
out.

closes #342
2017-09-15 11:39:00 +02:00
Hans-Christoph Steiner
cb10f0df09 standardize os.walk() var names based on Python 3.5 docs
There were multiple conventions used in the code, but mostly it was already
using the convention from the docs, so this converts things to using that
convention:

https://docs.python.org/3/library/os.html#os.walk
2017-09-15 11:37:21 +02:00
Marcus Hoffmann
190a2fde81 common: allow starting without a config file
There is no reason this should be disallowed as the default config often
works well when building simple apps.
2017-09-14 02:15:57 +02:00
Marcus Hoffmann
feadc6a565 make sure config exists before writing to it 2017-09-14 02:15:57 +02:00
Michael Pöhn
5770e1d3ef log build-server output when verbose flag is set 2017-09-14 01:38:34 +02:00
Marcus Hoffmann
5ebde251b1 checkupdates: use html.unescape instead of HTMLParser.unescape
HTMLParser.unescape is only an internal method and deprecated.
This requires Pyhton 3.4.
2017-09-13 01:42:15 +02:00
Marcus Hoffmann
921524081c checkupdates: fix google play check method
This has never worked with python3 and was also not properly adapted to
apps as objects. So we fix both of these issues.
2017-09-13 01:40:09 +02:00
Hans-Christoph Steiner
253bd92df3 Merge branch 'refuse-publishing-duplicate-apks' into 'master'
proper error message when publishing with the same app in repo and unsigned

See merge request !329
2017-09-12 15:33:51 +00:00
Marcus Hoffmann
5f5d3ea896 scanner: promote jar and aar files present in the repo to errors
This makes sure we we don't include any prebuilt code in the build process.
2017-09-11 17:05:24 +02:00
Marcus Hoffmann
15c4492625 remove gradle-wrapper.jar during scan
We make sure to not use the gradle wrapper anyway so this should have no
impact.
2017-09-11 17:05:21 +02:00
Marcus Hoffmann
af2eb2bd50 scanner: warn on aar files 2017-09-11 17:05:16 +02:00
Marcus Hoffmann
5d9eb9b295 scanner: rename variables, use os.path.relpath
* rename fd -> path_in_build_dir
* rename fp -> filepath
* use os.path.reldir instead of string manipulation
2017-09-11 16:49:39 +02:00
Marcus Hoffmann
1ee3f9aad5 scanner: more descriptive variable names from os.walk
This uses the names from python documentation of os.walk().
2017-09-11 16:49:30 +02:00
Michael Pöhn
328c1ad0c7 proper error message when publishing with the same app in repo and unsigned 2017-09-07 12:19:48 +02:00
Hans-Christoph Steiner
3aee9b3f11 Merge branch 'close-subprocess-file-handles' into 'master'
make sure file-streams of subprocesses get closed

See merge request !328
2017-09-07 09:49:51 +00:00
Michael Pöhn
a718c75b05 make sure file-streams of subprocesses get closed 2017-09-07 02:36:58 +02:00
Michael Pöhn
3e6dfacf6c added signatures subcommand 2017-09-07 00:03:35 +02:00
Marcus Hoffmann
b148b82f83 add comments to gradle output directories 2017-08-26 17:03:13 +02:00
Marcus Hoffmann
b114b44020 handle gradle-plugin 3.0 output apk location
This commit adds support for new gradle plugin 3.0 output directories.
The new structure looks like this:

build/outputs/apk/<flavour1><Flavour2>/release/*.apk

Note the capitalization on the different flavour components.
So if we build a specific flavour combination we add this combination to
the path where we look for an output .apk.

Closes #363

Based on !320 by: Michel Le Bihan <michel@lebihan.pl>
Signed-off-by: Marcus Hoffmann <bubuiic@aol.com>
2017-08-26 16:03:31 +02:00
Marcus Hoffmann
a9a19527c7 metadata: also read .fdroid.txt metadata
This is documented as working here:
https://f-droid.org/docs/Building_Applications/
(second to last paragraph)

fixes #364
2017-08-22 00:03:43 +02:00
relan
6f05cf85f9 makebuildserver: upgrade NDK r15b to r15c 2017-08-11 10:19:40 +03:00
Hans-Christoph Steiner
c67f8e349c metadata: handle empty YAML files without crashing
!311
2017-07-26 18:21:28 -07:00
Hans-Christoph Steiner
7bd171480f update: test metadata creation using internal and external templates
There is a hardcoded template in update.py, and there is also the
possibility for the user to create a template.yml.  This tests both of them
and cleans up the related code a bit.

#352 !310
2017-07-26 15:34:13 -07:00
Izzy
cbd420e490 preserve order and formatting on creating Metadata from Yaml template (closes #352) 2017-07-26 09:22:01 +02:00
Izzy
b787ec9e34 Updating syntax check for Flattr (see #284) 2017-07-20 20:26:25 +02:00
Hans-Christoph Steiner
c1e9379f67 remove errant trailing slash added in 7613c18dd8 2017-07-20 00:00:08 +02:00
Hans-Christoph Steiner
0a953814e2 update: always include name/summary/desc in index.xml if available
With the new localization support, the name/summary/description in the
metadata file becomes the global override.  So most apps are not going to
have those fields present in their metadata file.  This fixes the index.xml
generation to fall back to the localized versions of those fields when they
are not set in the metadata field.

https://forum.f-droid.org/t/what-has-happend-to-osmand
2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
7613c18dd8 verify: if downloading from /repo/ fails, try /archive/
The Builds entries in metadata/ files do not easily say whether a
given APK is in the repo/ or the archive/.  So it should also try to
download the official APK from the archive/ when verifying.
2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
67d98c5a36 keep .apk file ext when diffoscope'ing Binaries: 2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
2ecaf6ef8d rewritemeta: only print file type if its changing 2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
1f7f9d403c server: report errors pushing to git mirrors
This makes `fdroid server update` fail if pushing to one of the git mirrors
fails.  This is what happens if the other methods fail, e.g. rsync or S3.

closes #347
2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
93caf27319 server: include gitlab raw URLs as git mirrors
gitlab serves raw files from a CDN, so its appropriate to use the raw URL.
@pserwylo @grote and I discussed it and found a reference, but I can't find
that reference now.

Since the client will try the next mirror if one fails, it makes sense to
include both the gitlab raw and gitlab pages URLs to the mirror.  The
gitlab pages deploy process is still a bit flaky anyway.
2017-07-19 15:07:50 +02:00
Hans-Christoph Steiner
6d8e916491 server: only rm git mirror if the git history is getting too large
git hosts like github, gitlab, bitbucket usually allow 1 gig repos. This
changes the git mirroring behavior to keep the history until the repo hits
1 gig.  Keeping history makes updates a lot faster, since the whole repo
does not need to be pushed on each update.
2017-07-19 13:03:17 +02:00
Hans-Christoph Steiner
d8954fc033 update: force checkout .gitlab-ci.yml when updating git mirrors
closes #309
2017-07-17 11:38:15 +02:00
Hans-Christoph Steiner
523b5f4777 server: smooth out btlog transfer for offline signing setups
It turns out it is error prone to `git push` to a non-bare git repo. For
the offline signing machine, the git remote needs to be a regular git repo
in a directory on a thumbdrive so that once the thumbdrive is plugged into
an online machine, that git repo can be transferred to the online machine.
2017-07-17 11:38:15 +02:00
Izzy
54a646bd93 have fallback for XML icons also consider res/mipmap*
several apps (e.g.
[FastHub](http://apt.qumran.org/fdroid/index/apk/com.fastaccess.github)
and [Monety](http://apt.qumran.org/fdroid/index/apk/open.currency)) have
their ic_launcher.png files not in res/drawable*dpi/, but in
res/mipmap*/ -- so the regex has been adjusted by this patch.

Additionally: if the only icon for a given resolution was an XML without
existing fallback-PNG, it should be considered "non existent" (ie.
"empty_density").
2017-07-17 00:54:33 +02:00
Hans-Christoph Steiner
830e788401 Merge branch 'metadata' into 'master'
--create-metadata: use yaml.dump() and (if exists) template.yml

See merge request !305
2017-07-10 09:08:45 +00:00
Izzy
dd69490821 --create-metadata: only set default empty values if not using template.py 2017-07-08 14:41:19 +02:00
Izzy
4d375a585d enable user to have presets for metadata by using a template.yml (see #345) 2017-07-08 14:21:49 +02:00
Izzy
732de91aa7 make --create-metadata use yaml.dump instead of ruamel (solves #345) 2017-07-08 14:07:11 +02:00
Hans-Christoph Steiner
25f96e1911 ensure that mirror URLs always include the repodir
Since the mirror URLs are per repo section (repo/archive), the mirror URLs
must include the repodir at the end.  This was missing for servergitmirrors

found by @cde when working on fdroidclient#35
2017-07-07 15:50:11 +02:00
mimi89999
a427bb7b56
Also search for apk in build/outputs/apk/release 2017-07-07 12:21:09 +02:00
Hans-Christoph Steiner
b0a8d4163d Merge branch 'metadata' into 'master'
--create-metadata: make sure apk[name] is not empty

See merge request !302
2017-07-06 22:49:26 +00:00
Izzy
8ea06ce83e --create-metadata: make sure apk[name] is not empty 2017-07-07 00:18:08 +02:00
Hans-Christoph Steiner
dfb07808d3 support configing buildserver VM per-build with sudo=
This adds the 'sudo' build field, which is just a script that is run as
root.  For more info, see the issue that this closes:

refs #318
closes #317
2017-07-06 17:29:23 +02:00
Hans-Christoph Steiner
abe422fd7a handle App instance with no Builds when writing YAML 2017-07-06 16:00:44 +02:00
Hans-Christoph Steiner
3e6b7062b6 update: remove ruamel requirement, and improve '--create-metadata'
If ruamel.yaml is not available, this will fallback to using PyYAML. This
also adds some blank fields to the newly created template to make it easy
for human editors to fill in.

closes #343
2017-07-06 13:31:42 +02:00
Hans-Christoph Steiner
4a15208b84 update: update openssl KnownVuln scan to handle all recent versions
Thanks to @bubu for reporting!
2017-07-06 13:31:42 +02:00
Hans-Christoph Steiner
10a607ede3 update: find PNG when recommended icon is an XML file
APKs can now use XML files for vector graphics like the app icon. `aapt`
returns the XML file by default, and perhaps also androguard.  This
checks if the icon is an XML file, and if so, it tries to find a PNG in
the APK with the same name and density to use instead

closes #322

This should also ultimately make the XML file available as an icon source
as well fdroidclient#1091
2017-07-06 12:25:48 +02:00
Hans-Christoph Steiner
c14cbeb0a5 update: normalize var name to apkzip 2017-07-06 12:25:48 +02:00
Hans-Christoph Steiner
df99c85ca6 support manually adding per-build antiFeatures in metadata
For cases like the OpenVPN vuln that was recently announced, it is useful
for fdroiddata maintainers to be able to mark builds that have known
vulnerabilities.
2017-07-06 12:25:48 +02:00
Michael Pöhn
20afa0e861 lint: check all build fields against accepted list
This makes sure there are no typoed or wrong build fields in all metadata
files.
2017-07-06 12:25:48 +02:00
Hans-Christoph Steiner
b34d5c83b9 Merge branch '343-ruamel-yaml-version-check' into 'master'
check version of ruamel.yaml and raise according error message

See merge request !301
2017-07-06 08:10:14 +00:00
Michael Pöhn
4ca57ebfbb check version of ruamel.yaml and raise according error message 2017-07-06 09:07:54 +02:00
Hans-Christoph Steiner
ebef1ae57d Merge branch 'antifeature' into 'master'
added new AntiFeature: ApplicationDebuggable

See merge request !298
2017-07-05 20:34:35 +00:00
Izzy
2c8bacde42 create_metadata: do not skip APK files having no name 2017-07-05 20:31:21 +00:00
Izzy
4d9c60d352 added new AntiFeature: ApplicationDebuggable
Useful e.g. for "test repositories" to indicate an app was compiled with
"application-debuggable"
2017-07-04 21:15:04 +02:00
Hans-Christoph Steiner
6d7fd5f07c Merge branch 'ndk' into 'master'
NDK r14b and r15b

See merge request !293
2017-07-04 14:34:42 +02:00
Michael Pöhn
1b362c2183 correct yaml-rewriting for buildozer flag 2017-07-04 13:27:45 +02:00
Michael Pöhn
0980fb4df8 import ruamel.ymal only when re-writing yaml metadata 2017-07-04 11:51:08 +02:00
Michael Pöhn
19d422da86 rewritemeta yaml: fixed boolen mapping for build flags 2017-07-04 11:51:08 +02:00
Michael Pöhn
cfd3e84250 use stored metadatapath instead of guessing it 2017-07-04 11:51:08 +02:00
Michael Pöhn
056a28f897 fix indentation 2017-07-04 11:51:08 +02:00
Hans-Christoph Steiner
3cb936ae92 fdroid update --create-metadata now outputs YAML format
As part of the push towards using YAML as the main metadata format, this
makes the blank template be a .yml file.
2017-07-04 11:51:08 +02:00
Michael Pöhn
75ebb6e8cc fix building with yml metadata 2017-07-04 11:51:08 +02:00
Michael Pöhn
7ab197be2e completed ordered yaml field list 2017-07-04 11:51:08 +02:00
Michael Pöhn
f1e0089931 prettify write_yaml metadata 2017-07-04 11:51:08 +02:00
Michael Pöhn
7aa92abebc yaml rewrite version code as int 2017-07-04 11:51:08 +02:00
Michael Pöhn
f9d4007ea6 rewrite metadata builds list to yaml 2017-07-04 11:51:08 +02:00
Michael Pöhn
fbd5e8772c yaml metadata rewrite: correct blank line 2017-07-04 11:51:08 +02:00
Michael Pöhn
735b7d0f33 fixed pyflakes/pep warings 2017-07-04 11:51:08 +02:00
Michael Pöhn
0f90ab9aac rewrite to yaml works for app data now (builds still missing) 2017-07-04 11:51:08 +02:00
relan
86b403b599 makebuildserver: add NDK r15b 2017-07-04 11:44:25 +03:00
relan
ecdb2c685a makebuildserver: fix NDK r14b provisioning
Replace r14 with r14b after a57bff7.
2017-07-04 10:46:52 +03:00
Torsten Grote
0bbe0c5db0
Break up the scan_apk() method and rename it to process_apk() 2017-07-03 18:37:01 -03:00
Hans-Christoph Steiner
56ee5de2bd update: invalidate cache if allow_disabled_algorithms changes
Since the cache contains implicitly the result of the jarsigner verify,
if the allow_disabled_algorithms config changes, then the apkcache is
invalid.
2017-07-03 10:02:51 +02:00
Hans-Christoph Steiner
e75cabfe77 update: write cache file if anything has changed it
This fixes a bug introduced in 04db6870 where cachechanged for scan_apks()
was set only by the last call to scan_apk().
2017-07-03 10:02:51 +02:00
Hans-Christoph Steiner
39fd664778 update: create 'archive/' if needed when moving APKs
Normally, just 'repo/' is created by default, e.g. `fdroid init`. If APKs
are dumped into 'repo/', then have invalid signatures, then they'll be
automatically moved to 'archive/', which therefore needs to exist.
2017-07-03 10:02:51 +02:00
Hans-Christoph Steiner
746d4bd4cf update: allow_disabled_algorithms option to keep MD5 sigs in repo
The new policy is to move APKs with invalid signatures to the archive,
and only add those APKs to the archive's index if they have valid MD5
signatures.

closes #323
closes #292
2017-07-03 10:02:51 +02:00
Hans-Christoph Steiner
b7260ea854 update: allow deprecated signatures only in the archive
In April 2017, Oracle's jarsigner and Google's apksigner both switched to
considering any APK signature that uses MD5 as unsigned.  Any old build
is likely to have a MD5 signature.  This sets up the archive as the only
place where these "disabled algorithms" are allowed in the repo, and
marks any APK signed by a "disabled algorithm" as having a "known
vulnerability"

This also now automatically moves APKs with invalid signatures to the
archive section.

#323
2017-06-28 23:53:42 +02:00
Hans-Christoph Steiner
0047f19d56 update: move duplicated code into move_apk_between_sections() 2017-06-28 23:53:42 +02:00
Hans-Christoph Steiner
e1492148fa fix "Archive Policy:" field, APKs can move in/out of archive
The original logic was checking keepversions against the len() of ALL the
APKs in the repo/archive.  The correct thing is to check against the
number of APKs available for the given packageName/appid.

closes #166
2017-06-28 23:53:42 +02:00
Hans-Christoph Steiner
7de6e4dfed init: update docs links for next steps 2017-06-28 23:14:57 +02:00
Hans-Christoph Steiner
214c9f7a2b lint: check file extension for metadata
This helps keep fdroiddata clean, on @krt's request.

closes #222
2017-06-28 23:14:57 +02:00
Hans-Christoph Steiner
9886e539d3 scan APKs for signs of "Master Key" exploit
This exploit is old, and was fixed in 4.4.  But it was easy to exploit,
so it is still worth scanning for it.  It is also easy to scan for, since
valid APKs should not have files with duplicate names.  In theory, this
could look for duplicate file names for any file, but this limits the
false positives by only checking names of files related to executing code.

fdroidclient#40
2017-06-28 23:14:57 +02:00
Hans-Christoph Steiner
5fd014a852 update: move btlog import since btlog.py requires python3-git
To keep the dependencies limited to where they are needed.
2017-06-28 23:14:57 +02:00
lb@lb520
0672a6f1ec build.py corrected 2017-06-20 15:56:15 +02:00
lb@lb520
230286786f Added a method to build python/kivy projects using buildozer. 2017-06-20 14:16:31 +02:00
Hans-Christoph Steiner
26a4e33a7a Merge branch 'vagrantfile-box' into 'master'
Copy initial buildserver CPU/memory configuration to final box Vagrantfile

See merge request !279
2017-06-19 09:36:21 +00:00
Hans-Christoph Steiner
ee1b7ccea2 Merge branch 'googlemaven' into 'master'
Add Google's maven repo to allowed list

See merge request !275
2017-06-17 11:00:57 +00:00
Hans-Christoph Steiner
d06f05e9c8 update: do not crash on screenshots without texts/graphics
`fdroid update` crashed for apps that only had screenshots but no graphics
or localized texts because destdir was not being set in that case.  This
fixes that and adds a test case.

closes #320
!286
2017-06-12 21:25:54 +02:00
Rui Zhao (renyuneyun)
b5b463a5ec fix !320 due to unintentionally reusing the same variable name 2017-06-12 18:09:00 +01:00
Hans-Christoph Steiner
30ff777897 rewritemeta: do not include empty Summary: or Description:
Since the Summary: and Description: in the metadata file has the highest
priority of all the localized texts, adding blank versions means that
apps would always have blank Summary and Description even if the app has
those fields in the localized sections of fdroiddata and/or in the app's
source repo itself.

fdroiddata!2262
2017-06-07 22:10:25 +02:00
Hans-Christoph Steiner
18c3bfa5fb lint can no longer properly detect unset Summary/Description
Since the Summary/Description can now be set in the app's source code, or
in fdroiddata/metadata/<packageName>/<locale>/*.txt, this lint check is
no longer valid.  It is important to check whether these texts are empty,
but it'll require some thinking about how and where to best to that.
`fdroid update` will have access to all that data, but perhaps at that
point it is too late.

Also, the current text prioritization puts Summary/Description in the
.txt/.yml file at the highest priority, overriding every other copy,
including in fdroiddata/metadata/<packageName>/<locale> and in the app's
source code.
2017-06-07 22:10:25 +02:00
Hans-Christoph Steiner
37c3bf304c support fdroid names in filenames for localized texts
* "full description" is just "description"
* "short description" is "summary"
* "title" is "name"
2017-06-07 22:10:25 +02:00
Hans-Christoph Steiner
43d3a9c7a5 support fastlane simplified metadata dir
Running `fastlane init` gave me a much simpler directory layout, which
turns out to be the same as what is used for fdroiddata.
2017-06-07 22:10:25 +02:00
Hans-Christoph Steiner
8776221988 check signature and OpenSSL after APK has proven valid
If working with a random grabbag of APKs, there can be all sorts of
issues like corrupt entries in the ZIP, bad signatures, signatures that
are invalid since they use MD5, etc.  Moving these two checks later means
that the APKs can be renamed still.

This does change how common.getsig() works.  For years, it returned
None if the signature check failed.  Now that I've started working
with giant APK collections gathered from the wild, I can see that
`fdroid update` needs to be able to first index what's there, then
make decisions based on that information.  So that means separating
the getsig() fingerprint fetching from the APK signature verification.

This is not hugely security sensitive, since the APKs still have to
get past the Android checks, e.g. update signature checks.  Plus the
APK hash is already included in the signed index.
2017-06-01 17:45:29 +02:00
Hans-Christoph Steiner
372c8b418d strip file extension from generated name for non-APKs
With a generic file, the file name is the only guaranteed name metadata
field.  So if the name is not specified in the metadata, then the name
is set to the filename.  This changes that so that the file extension is
stripped from that generated name.
2017-06-01 16:01:05 +02:00
Hans-Christoph Steiner
6105f8a184 use var naming scheme in KnownApks (apk --> apkName)
Everywhere else, the file name of the APK is called apkName.
2017-06-01 16:01:05 +02:00
Hans-Christoph Steiner
9471bf2731 regexs for getting packageName and versionCode from filenames
This is useful for parsing APK files, which can include packageName,
versionCode, and optionally 7 char signing key ID (i.e. <sig>).
This also can set the packageName and versionCoe for non APK files, so
that it is easy to assign them to metadata files, and to allow for
upgrades by setting the versionCode in the filename.
2017-06-01 16:01:05 +02:00
Hans-Christoph Steiner
ceac6d25cb index.xml cannot handle APKs with the same packageName/versionCode
Really, it is the fdroidclient parser of index.xml that fails, due to the
hardcoded expectation that there will only ever be a single APK for any
given versionCode.  We keep index.xml backwards compatible for old
clients, and use index-v1.json to support new things.  Having multiple
APKs that have the same packageName and versionCode will break the client
v0.103.* since that version uses index-v1.json, but still has the hard-
coded database parsing stuff.

#153
2017-06-01 16:01:05 +02:00
Hans-Christoph Steiner
4053f03d77 update: add --rename-apks to force APK filenames to fdroid standard
uses the standard package.name_123.apk.  If that exists, it appends the
shasum.  If that exists, then its a duplicate, so its deleted. This should
help @SergeWinters with his 12,000 APKs.
2017-06-01 16:01:05 +02:00
Andrew Patrikalakis
5a0c201fab Copy initial buildserver CPU/memory configuration to final box Vagrantfile 2017-06-01 09:53:33 -04:00
Hans-Christoph Steiner
0f4cbc7224 allow APKs with same packageName/versionCode but different signer
There are many APKs out in the wild that claim to be the same app and
version and each other, but they are signed by different keys.  fdroid
should be able to index these, and work with them.   This supports having
the developer's signature via reproducible builds, random collections of
APKs like repomaker, etc.
2017-06-01 10:30:41 +02:00
Alexey Krasilnikov
a3a34cdbd3 Add support for the new Bitbucket look 2017-05-30 18:33:55 +03:00
Hans-Christoph Steiner
4570d9dc8a lint: use only license tags from https://spdx.org/license-list
closes #234
2017-05-26 21:03:38 +02:00
Hans-Christoph Steiner
1178d032f3 lint: support new per-package subdirs for l18n and dev signatures
Graphics and localized text can now be stored in the package folders,
always in a folder that is named for the locale.  The upstream developer
signature is also now stored, so that the upstream APK can be reproduced
even if they remove their APKs.

#291
fdroiddata!2229
fdroiddata!2224
fdroidclient#15
fdroidserver#174
2017-05-26 21:03:38 +02:00
Hans-Christoph Steiner
3dbd74262f lint: add popular URL shorteners to the banned list 2017-05-26 21:03:38 +02:00
Boris Kraut
c056b95fd5 scanner: allow google maven 2017-05-26 15:51:38 +02:00
mimi89999
2626858450
Don't pass root_dir to scan_source 2017-05-25 20:11:14 +02:00
Hans-Christoph Steiner
9ad457c16f fix pylink 'dict' has no member 'keystore' 2017-05-23 22:34:16 +02:00
Hans-Christoph Steiner
17cd07f1a7 fix pylint unused-argument 2017-05-23 22:34:16 +02:00
Michael Pöhn
c8234919df refactored vm related code from build.py to vmtools.py 2017-05-23 20:08:29 +02:00
Michael Pöhn
fc660048eb removed unused buildserver code 2017-05-23 20:08:08 +02:00
Hans-Christoph Steiner
9ef936c21a leave VirtualBox vagrant package as it was originally
We only need Vagrantfile hacks for KVM.
2017-05-23 20:06:47 +02:00
Michael Pöhn
8f1fabfed6 restart builder vm when ssh connection fails 2017-05-23 20:06:47 +02:00
Hans-Christoph Steiner
6106b962a2 build: delete bad builder/ symlinks
If builder/ is a symlink but is not detected as a directory by
os.path.isdir(), then it is a broken symlink.
2017-05-23 20:06:06 +02:00
Michael Pöhn
4546929d7f wait a sec after suspending 2017-05-23 20:06:06 +02:00
Michael Pöhn
48159f005a reset buildserver vm if vagrant uuid not present 2017-05-23 20:06:06 +02:00
Michael Pöhn
0ec5422952 use uuid for vbox snapshots again 2017-05-23 20:06:06 +02:00
Michael Pöhn
358b00d7aa removed useless vm validity check; attempted to fix vbox support 2017-05-23 20:06:06 +02:00
Michael Pöhn
1b1d6b7d96 deal with outdated box images in libvirt storage pool 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
acf25a3999 build server use up instead or resume; logging 2017-05-23 20:06:06 +02:00
Michael Pöhn
3187d2cbcf revised build server creation 2017-05-23 20:06:06 +02:00
Michael Pöhn
8abd3f1cbc auto-lookup vm provider based on available executables; more fault tolerant vagrant package 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
bba6b8ab0a fixed reading libvirt box image size 2017-05-23 20:06:06 +02:00
Michael Pöhn
1bd51966b8 vmtools debug logging for check_output calls 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
5dbcd0e9bd added box handling to vmtools 2017-05-23 20:06:06 +02:00
Hans-Christoph Steiner
01b6473823 refactored kvm_package to vmtools 2017-05-23 20:06:06 +02:00
Michael Pöhn
d180aa2658 fix virsh destroy parameters 2017-05-23 20:06:06 +02:00
Michael Pöhn
4347c10d9d use configured vm provider in when calling destroy in makebuildserver 2017-05-23 20:06:06 +02:00
Michael Pöhn
a414aa00ff use overhauled mv destroy code in build.py 2017-05-23 20:06:06 +02:00
Michael Pöhn
92fada803e overhauled and moved destroying builder vm to vmtools.py 2017-05-23 20:04:08 +02:00
Michael Pöhn
fb03e17849 fdroid build: added sleep after destroy/undefine 2017-05-23 20:04:08 +02:00
Michael Pöhn
413c3836d5 auto-reset broken builder vm 2017-05-23 20:04:08 +02:00
Michael Pöhn
ce3c959ce5 scan vm provider again after re-creating builder vm 2017-05-23 20:04:08 +02:00
Michael Pöhn
34cddd3be8 delete associated libvirt domain/image when destroying builder vm 2017-05-23 20:04:08 +02:00
Michael Pöhn
fad98eeb7f build: fixed kvm snapshot support; makebuildserver: setup kvm ssh credentials 2017-05-23 20:04:08 +02:00
Michael Pöhn
fa2d44ee94 added libvirt vm-provider support to build.py 2017-05-23 20:04:08 +02:00
Hans-Christoph Steiner
7ef0d5dfd8 include class like UNIX tail -f for displaying logs
This allows fdroidserver to easily log activity while displaying it at the
same time.
2017-05-23 20:04:08 +02:00
Torsten Grote
1fcd8e63a3
Replace sys.exit() in non-main functions by exceptions
Also move all exceptions into one module
2017-05-22 16:51:11 -03:00
Hans-Christoph Steiner
0345d2c79f update: find aapt when it is not in the PATH
This is some very messy logic built up since 2010.  This will all go away
once we have a python3 version of androguard available.

The removed imports and `dir(APK)` is to silence pyflakes

closes #303
2017-05-18 17:21:05 +02:00
Hans-Christoph Steiner
c348186ad6 update: fix fastlane scraping, it uses a subdir called 'images'
https://commons.wikimedia.org/wiki/File:GetChromium_FeatureGraphic_1024x500.png
2017-05-18 16:13:17 +02:00
Hans-Christoph Steiner
77a65be9db update: skip packages without metadata in index V1
If a package does not have a matching "app" metadata file, then it should
not be added to the index. index V0 already does this properly.
2017-05-18 16:13:17 +02:00
Hans-Christoph Steiner
a17b95a860 update: improved logging
the aapt warnings were very verbose, and the other now includes the
file name type for screenshots, rather than the filename twice.
2017-05-18 16:13:17 +02:00
Hans-Christoph Steiner
5d705452f5 update: allow repo files to use _ in the file names
_ is a valid character for Java package names, so it should also work in
the repo file naming scheme. This makes it so it only splits the file
name based on the last _.
2017-05-18 16:13:17 +02:00
Hans-Christoph Steiner
84bb41a91f metadata: switch from deprecated cgi.escape to html.escape
cgi.escape is deprecated in Python 3.x and has security issues:
https://bugs.python.org/issue26398

html.escape() differs from cgi.escape() by its defaults to quote=True:

 s = html.escape( """& < " ' >""" )   # s = '&amp; &lt; &quot; &#x27; &gt;'
2017-05-18 16:13:17 +02:00
thez3ro
ec30d73f13
fix double pushing on remote 2017-05-17 23:08:25 +02:00
thez3ro
846f5422fd
Use gitlab pages as mirror 2017-05-17 21:08:34 +02:00
Hans-Christoph Steiner
eb49c9e8f3 Merge branch 'master' into 'master'
replace aapt with androguard

See merge request !234
2017-05-05 09:10:32 +00:00
Michael Pöhn
ff3baefbed Merge branch 'yaml' into 'master'
basic support for YAMLin `fdroid rewritemeta`

Closes #285 and #169

See merge request !260
2017-05-05 08:35:44 +00:00
thez3ro
06598ae406
use androguard if aapt isn't found 2017-05-04 23:35:17 +02:00
Torsten Grote
8d424f19ec
Support ETag when downloading repository index 2017-05-02 15:37:02 -03:00
Hans-Christoph Steiner
4f758f5c78 fix white space trimming when writing .txt format
Some of the internal data format changes somehow broke the white space
trimming when writing out .txt.

closes #285
2017-05-02 14:55:23 +02:00
Hans-Christoph Steiner
0d00705aed use pyyaml for rewriting .yml metadata files
This replaces the broken, custom code with the standard YAML lib.

In rewritemeta, do not call app.metadatapath since it will be deleted when
the dict is cleaned up for outputing. metadatapath is only used internally
and should not be written out.

closes #169
refs #290
2017-05-02 14:55:23 +02:00
Hans-Christoph Steiner
cdef5bcd92 downcase all 'localized' key names to match the rest of index-v1
This is a little omission.  keys that are used in metadata/*.yml all start
with an UpperCase letter, but in fdroidserver, index-v1.json, and
fdroidclient, it is all camelCase with lowercase first letter. The keys
from the 'localized' section are currently never in metadata/*.yml, so
these keys never get downcase.  This change will break fdroidclient
versions that do not also have this change, but since we're in alpha, that
should be fine.

If support for a 'localized' section is added to metadata/*.yml, then the
keys there should probably be UpperCase CamelCase to match the other keys.
2017-04-27 21:12:49 +02:00
Hans-Christoph Steiner
9f9f0d1a16 Merge branch 'git-identity-file' into 'master'
Make git server mirror upload honor config['identity_file'] option

See merge request !259
2017-04-24 21:24:07 +00:00
Torsten Grote
c137231d8b
Make git server mirror upload honor config['identity_file'] option 2017-04-24 16:22:33 -03:00
Michael Pöhn
fc4e40255d remove build output when not reproducible 2017-04-23 11:33:51 +02:00
Michael Pöhn
5b7209d882 unified method for naming build output 2017-04-22 12:04:32 +02:00
Michael Pöhn
62af9b8e3d check meld config for manual apk diffs 2017-04-22 10:48:50 +02:00
Michael Pöhn
4044e06e7b use verify_apks for checking build output 2017-04-22 10:48:50 +02:00
Michael Pöhn
a3e7eacc9b compare apk with Binaries from metadata right after building 2017-04-22 10:48:50 +02:00
Michael Pöhn
abe04272b1 throw proper error when download of apks fail 2017-04-20 17:48:38 +02:00
Hans-Christoph Steiner
fd21d68bc1 update: fix glob to actually match all locales
glob != regexp, [A-Z-.@] means one of those chars is required in that
position, so the glob pattern was requiring a least 3 chars.  Locales are
usually just two lower case letters, e.g. vi, de, ar.
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
cb49f57c06 support "Author Web Site" as metadata field
Fastlane Supply, Triple-T Gradle Play Publisher, and many app stores
include the possibility to specify a website for the author, as distinct
from the website for the app.

closes #204
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
18f949c62b include Author/Contact info from Triple-T Gradle Play Publisher
This is just the bare minimum, it adds it to the index, but AuthorPhone
and AuthorWebsite are not yet supported by fdroidclient.  AuthorName is.

#204
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
9589d13ef2 update: include "What's New" texts when they are available
This uses the "What's New" entry for the CurrentVersionCode and includes it
as the current WhatsNew metadata for the App class.

Things like fastlane supply and Google Play support a "What's New" entry
per-APK, but fdroidclient does not current use anything but the current
version of this data.  Right now, it seems we probably only want to have
the latest WhatsNew in the index to save space.

In theory, we could make the WhatsNew data structure follow the structure
of fastlane/Play, but that would quite a bit of complexity for something
that might never be used.

fdroidclient#910
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
822c2d3992 update: app store metadata from Triple-T gradle play publisher
Since f-droid.org has the source repos, `fdroid update` can just grab files
from the source repo.  This makes `fdroid update` use the metadata that is
laid out in the Triple-T gradle play publisher filesystem layout:

https://github.com/Triple-T/gradle-play-publisher#upload-images
https://github.com/Triple-T/gradle-play-publisher#play-store-metadata

closes #143
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
89c480181c update: include localized app store metadata from fastlane
This includes all metadata from the app's source repo following the path
layout specified for the fastlane supply tool:
https://github.com/fastlane/fastlane/blob/1.109.0/supply/README.md#images-and-screenshots

refs #35
closes #143
2017-04-19 10:05:24 +02:00
Hans-Christoph Steiner
a7daec7c36 add char limits for text: Name=30, Video=256, WhatsNew=500
Since this info can come from automated sources, this prevents giant blobs
from being mistakenly stuck in these fields.  It also brings it inline with
the standard lengths other popular app stores use.

https://support.google.com/googleplay/android-developer/answer/113469?hl=en
https://stackoverflow.com/a/20276565
2017-04-19 10:05:24 +02:00
TheZ3ro
89b0dea2fa Merge branch 'support-new-features-with-offline' into 'master'
Support new features with offline signing

See merge request !250
2017-04-13 15:21:01 +00:00
Hans-Christoph Steiner
489b129dd8 PEP8 E305 expected 2 blank lines after class or function definition 2017-04-13 10:55:07 +02:00
Hans-Christoph Steiner
fcb0634eaa server: store virustotal JSON locally as reusable data cache
This helps with uploading faster when hitting the public API rating
limiting since it will not hit the API if there is already a matching
response on the local filesystem.  This also provides a source of data for
things like repomaker to diplay to users.
2017-04-13 00:49:36 +02:00
Hans-Christoph Steiner
d74d6160dd server: check virustotal has APK before uploading it
This restructures the virustotal uploading so that first checks whether
virustotal already has the file, and only if not does it upload it.  This
also handles the public API rate limiting, which returns an HTTP 204. This
will now try again until it succeeds, even when rate limited.   Instead of
just getting the list of files from the filesystem, this reads the index-v1
which also already has the SHA256 in there.  virustotal also uses SHA256 as
a unique ID for files.
2017-04-12 15:04:05 +02:00
Hans-Christoph Steiner
8dd9d63e8f server: show progress bar when pushing git mirrors
The git mirrors can be really slow to upload, so they need a progress bar.
2017-04-12 15:04:05 +02:00
Hans-Christoph Steiner
f94ef29271 server: prefer s3cmd over libcloud for syncing
libcloud has been flaky for years, but it is also widely available and is
more pythonic.  So this adds the option for using `s3cmd sync` if it is
available.  `s3cmd sync` acts like rsync for uploading to S3.  So this code
emulates the rsync uploading code in `fdroid server update`.
2017-04-12 15:04:05 +02:00
Hans-Christoph Steiner
17219d56f4 server: support git mirrors with the offline signing setup 2017-04-12 15:04:04 +02:00
Hans-Christoph Steiner
d3b9dbece9 server: rely on rsync to delete files from git-mirror
Instead of each time deleting the whole local git-mirror repo, and
recreating it, this just deletes the .git/ dir, then lets the rsync in
_local_sync() handle deleting anything that should no longer be in the repo.
2017-04-12 15:04:04 +02:00