chiark / gitweb /
fdroidserver.git
6 years agobuildserver: replace custom code with python-vagrant
Hans-Christoph Steiner [Tue, 27 Sep 2016 06:49:32 +0000 (08:49 +0200)]
buildserver: replace custom code with python-vagrant

I ran into some annoying issues with UTF-8 output in the vagrant logs, and
it was hard to solve.  So I switched to using python-vagrant, which handles
it all for us.  Its been around since 2012, has a number of contributors,
and is still actively maintained, so it seems like a good bet. I also
packaged it for Debian, including a backport in jessie-backports.

On Debian/jessie, do `apt-get install python3-vagrant/jessie-backports`

6 years agoinclude class like UNIX `tail -f` for displaying logs
Hans-Christoph Steiner [Fri, 17 Jun 2016 11:03:01 +0000 (13:03 +0200)]
include class like UNIX `tail -f` for displaying logs

This allows fdroidserver to easily log activity while displaying it at the
same time.

6 years agomove bulk of reproducible_fdroid_build_apps.sh to jenkins-build
Hans-Christoph Steiner [Mon, 22 May 2017 15:36:18 +0000 (17:36 +0200)]
move bulk of reproducible_fdroid_build_apps.sh to jenkins-build

This lets us quickly and frequently test things.

6 years agoMerge branch 'exceptions' into 'master'
Hans-Christoph Steiner [Mon, 22 May 2017 20:50:54 +0000 (20:50 +0000)]
Merge branch 'exceptions' into 'master'

Replace sys.exit() in non-main functions by exceptions

See merge request !273

6 years agoReplace sys.exit() in non-main functions by exceptions
Torsten Grote [Mon, 22 May 2017 19:33:52 +0000 (16:33 -0300)]
Replace sys.exit() in non-main functions by exceptions

Also move all exceptions into one module

6 years agofix calling vagrant global-status
Michael Pöhn [Sat, 25 Mar 2017 22:50:10 +0000 (23:50 +0100)]
fix calling vagrant global-status

6 years agouse stable version of priv ext instead of latest when testing in makebuildserver
Michael Pöhn [Mon, 24 Apr 2017 10:19:37 +0000 (12:19 +0200)]
use stable version of priv ext instead of latest when testing in makebuildserver

6 years agojenkins-build-makebuildserver: retry `git fetch` until it works
Hans-Christoph Steiner [Wed, 26 Oct 2016 12:24:14 +0000 (14:24 +0200)]
jenkins-build-makebuildserver: retry `git fetch` until it works

It seems that gitlab gives 500 errors a bit too frequently, so keep
retrying the `git pull` until it works so that there isn't a error email
sent out over failed pulls.

6 years agoMerge branch 'indexing-fixes' into 'master'
Hans-Christoph Steiner [Mon, 22 May 2017 09:32:39 +0000 (09:32 +0000)]
Merge branch 'indexing-fixes' into 'master'

indexing fixes

Closes #303

See merge request !270

6 years agoupdate: find aapt when it is not in the PATH
Hans-Christoph Steiner [Thu, 18 May 2017 15:20:24 +0000 (17:20 +0200)]
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

6 years agoupdate: fix fastlane scraping, it uses a subdir called 'images'
Hans-Christoph Steiner [Tue, 16 May 2017 10:25:42 +0000 (12:25 +0200)]
update: fix fastlane scraping, it uses a subdir called 'images'

https://commons.wikimedia.org/wiki/File:GetChromium_FeatureGraphic_1024x500.png

6 years agoupdate: skip packages without metadata in index V1
Hans-Christoph Steiner [Mon, 15 May 2017 18:11:41 +0000 (20:11 +0200)]
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.

6 years agoupdate: improved logging
Hans-Christoph Steiner [Mon, 15 May 2017 17:48:20 +0000 (19:48 +0200)]
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.

6 years agoupdate: allow repo files to use _ in the file names
Hans-Christoph Steiner [Mon, 15 May 2017 17:47:31 +0000 (19:47 +0200)]
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 _.

6 years agometadata: switch from deprecated cgi.escape to html.escape
Hans-Christoph Steiner [Mon, 15 May 2017 15:27:48 +0000 (17:27 +0200)]
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;'

7 years agoMerge branch 'cdn-git-mirror' into 'master'
Torsten Grote [Wed, 17 May 2017 22:47:56 +0000 (22:47 +0000)]
Merge branch 'cdn-git-mirror' into 'master'

Fix double pushing on remote git-mirror

See merge request !272

7 years agofix double pushing on remote
thez3ro [Wed, 17 May 2017 21:08:25 +0000 (23:08 +0200)]
fix double pushing on remote

7 years agoMerge branch 'cdn-git-mirror' into 'master'
Hans-Christoph Steiner [Wed, 17 May 2017 20:29:33 +0000 (20:29 +0000)]
Merge branch 'cdn-git-mirror' into 'master'

Use Gitlab Pages as mirror instead of Raw

Closes #293

See merge request !271

7 years agoUse gitlab pages as mirror
thez3ro [Wed, 17 May 2017 18:37:49 +0000 (20:37 +0200)]
Use gitlab pages as mirror

7 years agoMerge branch 'hg39' into 'master'
Hans-Christoph Steiner [Wed, 10 May 2017 17:22:15 +0000 (17:22 +0000)]
Merge branch 'hg39' into 'master'

buildserver: use hg 3.9 from backports

See merge request !266

7 years agobuildserver: use hg 3.9 from backports
Boris Kraut [Wed, 10 May 2017 16:55:38 +0000 (18:55 +0200)]
buildserver: use hg 3.9 from backports

7 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Fri, 5 May 2017 09:10:32 +0000 (09:10 +0000)]
Merge branch 'master' into 'master'

replace aapt with androguard

See merge request !234

7 years agoMerge branch 'yaml' into 'master'
Michael Pöhn [Fri, 5 May 2017 08:35:44 +0000 (08:35 +0000)]
Merge branch 'yaml' into 'master'

basic support for YAMLin `fdroid rewritemeta`

Closes #285 and #169

See merge request !260

7 years agouse androguard if aapt isn't found
thez3ro [Thu, 13 Apr 2017 12:18:48 +0000 (14:18 +0200)]
use androguard if aapt isn't found

7 years agoMerge branch 'download-index-etag' into 'master'
Hans-Christoph Steiner [Tue, 2 May 2017 19:12:41 +0000 (19:12 +0000)]
Merge branch 'download-index-etag' into 'master'

Support ETag when downloading repository index

See merge request !264

7 years agoSupport ETag when downloading repository index
Torsten Grote [Tue, 2 May 2017 15:05:48 +0000 (12:05 -0300)]
Support ETag when downloading repository index

7 years agofix white space trimming when writing .txt format
Hans-Christoph Steiner [Thu, 27 Apr 2017 18:40:08 +0000 (20:40 +0200)]
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

7 years agouse pyyaml for rewriting .yml metadata files
Hans-Christoph Steiner [Fri, 25 Nov 2016 14:20:19 +0000 (15:20 +0100)]
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

7 years agoMerge branch 'libvirt-support' into 'master'
Michael Pöhn [Tue, 2 May 2017 07:39:51 +0000 (07:39 +0000)]
Merge branch 'libvirt-support' into 'master'

Check for libvirt specific shutoff message

See merge request !262

7 years agoMerge branch 'pre-0.103-alpha4-rename' into 'master'
Torsten Grote [Mon, 1 May 2017 17:59:59 +0000 (17:59 +0000)]
Merge branch 'pre-0.103-alpha4-rename' into 'master'

downcase all 'localized' key names to match the rest of index-v1

See merge request !261

7 years agoCheck for libvirt specific shutoff message
Andrew Patrikalakis [Sun, 30 Apr 2017 01:38:44 +0000 (18:38 -0700)]
Check for libvirt specific shutoff message

7 years agodowncase all 'localized' key names to match the rest of index-v1
Hans-Christoph Steiner [Thu, 27 Apr 2017 19:12:49 +0000 (21:12 +0200)]
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.

7 years agoMerge branch 'git-identity-file' into 'master'
Hans-Christoph Steiner [Mon, 24 Apr 2017 21:24:07 +0000 (21:24 +0000)]
Merge branch 'git-identity-file' into 'master'

Make git server mirror upload honor config['identity_file'] option

See merge request !259

7 years agoMake git server mirror upload honor config['identity_file'] option
Torsten Grote [Mon, 24 Apr 2017 19:22:33 +0000 (16:22 -0300)]
Make git server mirror upload honor config['identity_file'] option

7 years agoMerge branch '148-no-verify-logs-on-split-build-publish-infrastructure' into 'master'
Hans-Christoph Steiner [Mon, 24 Apr 2017 18:50:58 +0000 (18:50 +0000)]
Merge branch '148-no-verify-logs-on-split-build-publish-infrastructure' into 'master'

compare apk with Binaries from metadata right after building

Closes #148

See merge request !247

7 years agoremove build output when not reproducible
Michael Pöhn [Sun, 23 Apr 2017 09:33:51 +0000 (11:33 +0200)]
remove build output when not reproducible

7 years agounified method for naming build output
Michael Pöhn [Sat, 22 Apr 2017 10:04:32 +0000 (12:04 +0200)]
unified method for naming build output

7 years agocheck meld config for manual apk diffs
Michael Pöhn [Thu, 20 Apr 2017 10:44:22 +0000 (12:44 +0200)]
check meld config for manual apk diffs

7 years agouse verify_apks for checking build output
Michael Pöhn [Thu, 20 Apr 2017 10:38:50 +0000 (12:38 +0200)]
use verify_apks for checking build output

7 years agofix java architecture in buildserver config
Michael Pöhn [Thu, 20 Apr 2017 10:27:04 +0000 (12:27 +0200)]
fix java architecture in buildserver config

7 years agocompare apk with Binaries from metadata right after building
Michael Pöhn [Tue, 4 Apr 2017 16:58:16 +0000 (18:58 +0200)]
compare apk with Binaries from metadata right after building

7 years agoMerge branch '273-invalid-apk-gets-through-to-publish-stage' into 'master'
Hans-Christoph Steiner [Fri, 21 Apr 2017 07:56:55 +0000 (07:56 +0000)]
Merge branch '273-invalid-apk-gets-through-to-publish-stage' into 'master'

throw proper error when download of apks fail

Closes #273

See merge request !258

7 years agothrow proper error when download of apks fail
Michael Pöhn [Thu, 20 Apr 2017 15:48:38 +0000 (17:48 +0200)]
throw proper error when download of apks fail

7 years agoMerge branch 'gradleplugin' into 'master'
Daniel Martí [Wed, 19 Apr 2017 09:27:42 +0000 (09:27 +0000)]
Merge branch 'gradleplugin' into 'master'

bs: use only prefixes for gradle kv pairs

See merge request !257

7 years agoMerge branch 'full-app-store-metadata-scraping' into 'master'
Hans-Christoph Steiner [Wed, 19 Apr 2017 08:25:56 +0000 (08:25 +0000)]
Merge branch 'full-app-store-metadata-scraping' into 'master'

Full app store metadata scraping

Closes #204 and #143

See merge request !253

7 years agoadd basic test for Triple-T Gradle Play Publisher scraping
Hans-Christoph Steiner [Wed, 19 Apr 2017 08:04:32 +0000 (10:04 +0200)]
add basic test for Triple-T Gradle Play Publisher scraping

7 years agoupdate: fix glob to actually match all locales
Hans-Christoph Steiner [Fri, 14 Apr 2017 22:17:09 +0000 (00:17 +0200)]
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.

7 years agosupport "Author Web Site" as metadata field
Hans-Christoph Steiner [Fri, 14 Apr 2017 12:23:07 +0000 (14:23 +0200)]
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

7 years agoinclude Author/Contact info from Triple-T Gradle Play Publisher
Hans-Christoph Steiner [Fri, 14 Apr 2017 10:06:12 +0000 (12:06 +0200)]
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

7 years agoupdate: include "What's New" texts when they are available
Hans-Christoph Steiner [Thu, 13 Apr 2017 21:36:46 +0000 (23:36 +0200)]
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

7 years agoupdate: app store metadata from Triple-T gradle play publisher
Hans-Christoph Steiner [Thu, 13 Apr 2017 16:42:30 +0000 (18:42 +0200)]
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

7 years agoupdate: include localized app store metadata from fastlane
Hans-Christoph Steiner [Thu, 13 Apr 2017 11:08:03 +0000 (13:08 +0200)]
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

7 years agoadd char limits for text: Name=30, Video=256, WhatsNew=500
Hans-Christoph Steiner [Wed, 12 Apr 2017 15:53:49 +0000 (17:53 +0200)]
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

7 years agobs: use only prefixes for gradle kv pairs
Boris Kraut [Tue, 18 Apr 2017 21:36:01 +0000 (23:36 +0200)]
bs: use only prefixes for gradle kv pairs

7 years agoMerge branch 'gradleplugin' into 'master'
Hans-Christoph Steiner [Tue, 18 Apr 2017 19:35:11 +0000 (19:35 +0000)]
Merge branch 'gradleplugin' into 'master'

bs: update gradle plugin/version pairs

See merge request !256

7 years agobs: update gradle plugin/version pairs
Boris Kraut [Tue, 18 Apr 2017 17:42:52 +0000 (19:42 +0200)]
bs: update gradle plugin/version pairs

7 years agoMerge branch 'patch-1' into 'master'
Hans-Christoph Steiner [Tue, 18 Apr 2017 07:13:34 +0000 (07:13 +0000)]
Merge branch 'patch-1' into 'master'

Properly add gradle3.5

See merge request !255

7 years agoAdd gradle 3.5 to the list of available versions
Ruslan Boitsov [Tue, 18 Apr 2017 06:41:09 +0000 (06:41 +0000)]
Add gradle 3.5 to the list of available versions

7 years agoMerge branch 'gradle35' into 'master'
Hans-Christoph Steiner [Mon, 17 Apr 2017 12:01:01 +0000 (12:01 +0000)]
Merge branch 'gradle35' into 'master'

makebs: add gradle 3.5

See merge request !254

7 years agomakebs: add gradle 3.5
Boris Kraut [Sat, 15 Apr 2017 13:08:13 +0000 (15:08 +0200)]
makebs: add gradle 3.5

7 years agoMerge branch 'support-new-features-with-offline' into 'master'
TheZ3ro [Thu, 13 Apr 2017 15:21:01 +0000 (15:21 +0000)]
Merge branch 'support-new-features-with-offline' into 'master'

Support new features with offline signing

See merge request !250

7 years agoPEP8 E305 expected 2 blank lines after class or function definition
Hans-Christoph Steiner [Thu, 13 Apr 2017 08:55:07 +0000 (10:55 +0200)]
PEP8 E305 expected 2 blank lines after class or function definition

7 years agoMerge branch 'bs_dependency_pyasn1' into 'master'
Hans-Christoph Steiner [Wed, 12 Apr 2017 23:02:02 +0000 (23:02 +0000)]
Merge branch 'bs_dependency_pyasn1' into 'master'

provision missing pyasn1 dependency to build server

See merge request !251

7 years agogit mirror test requires git >= 2.3
Hans-Christoph Steiner [Wed, 12 Apr 2017 13:26:51 +0000 (15:26 +0200)]
git mirror test requires git >= 2.3

7 years agoserver: store virustotal JSON locally as reusable data cache
Hans-Christoph Steiner [Wed, 12 Apr 2017 13:01:21 +0000 (15:01 +0200)]
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.

7 years agoprovision missing pyasn1 dependency to build server
Michael Pöhn [Wed, 12 Apr 2017 22:44:53 +0000 (00:44 +0200)]
provision missing pyasn1 dependency to build server

7 years agoserver: check virustotal has APK before uploading it
Hans-Christoph Steiner [Tue, 11 Apr 2017 22:23:41 +0000 (00:23 +0200)]
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.

7 years agoserver: show progress bar when pushing git mirrors
Hans-Christoph Steiner [Tue, 11 Apr 2017 21:49:10 +0000 (23:49 +0200)]
server: show progress bar when pushing git mirrors

The git mirrors can be really slow to upload, so they need a progress bar.

7 years agoserver: prefer s3cmd over libcloud for syncing
Hans-Christoph Steiner [Tue, 11 Apr 2017 18:16:49 +0000 (20:16 +0200)]
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`.

7 years agoserver: support git mirrors with the offline signing setup
Hans-Christoph Steiner [Tue, 11 Apr 2017 21:46:14 +0000 (23:46 +0200)]
server: support git mirrors with the offline signing setup

7 years agoserver: rely on rsync to delete files from git-mirror
Hans-Christoph Steiner [Tue, 11 Apr 2017 19:29:55 +0000 (21:29 +0200)]
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.

7 years agosupport git@gitlab.com: style URLs in servergitmirrors
Hans-Christoph Steiner [Tue, 11 Apr 2017 10:28:36 +0000 (12:28 +0200)]
support git@gitlab.com: style URLs in servergitmirrors

This converts the git@gitlab.com SSH URLs to the proper HTTPS URLs that
fdroidclient can directly use.

7 years agoserver: support btlog on offline signing setups
Hans-Christoph Steiner [Tue, 11 Apr 2017 08:25:38 +0000 (10:25 +0200)]
server: support btlog on offline signing setups

This is necessary to shuttle the binary transparency log from the offline
machine to the thumb drive, then from the thumb drive to the online box.

7 years agoserver: remove unused --sync-from-local-copy-dir
Hans-Christoph Steiner [Mon, 10 Apr 2017 23:05:53 +0000 (01:05 +0200)]
server: remove unused --sync-from-local-copy-dir

This option was not hooked up at all, and does not make sense as a command
line argument.  It should just be a config.py item.  In that case, the
presence of config.py marks the current dir as a repo, so there is no
longer a need to test for a dir called repo/ as a safety.  This makes the
setup easier, since sync_from_localcopy() now creates repo/ for the user.

7 years agoMerge branch 'elimitate-password-files' into 'master'
Hans-Christoph Steiner [Tue, 11 Apr 2017 21:37:46 +0000 (21:37 +0000)]
Merge branch 'elimitate-password-files' into 'master'

Eliminate the need for password files

See merge request !249

7 years agoEliminate the need for password files
Torsten Grote [Tue, 11 Apr 2017 19:34:49 +0000 (16:34 -0300)]
Eliminate the need for password files

The passwords are now passed as private environment variables to the
processes that need them.

7 years agoMerge branch 'nail-down-btlog-and-bugfix' into 'master'
Torsten Grote [Mon, 10 Apr 2017 21:21:52 +0000 (21:21 +0000)]
Merge branch 'nail-down-btlog-and-bugfix' into 'master'

Nail down btlog and key bugfix

See merge request !248

7 years agoserver: git push for binary transparency in `fdroid server update`
Hans-Christoph Steiner [Mon, 10 Apr 2017 18:28:43 +0000 (20:28 +0200)]
server: git push for binary transparency in `fdroid server update`

Since `fdroid server update` is the place where all uploads to servers
happens, it makes sense to also handle the git push for the binary
transparency log here instead of `fdroid btlog`

7 years agosimplify Android Observatory config
Hans-Christoph Steiner [Mon, 10 Apr 2017 18:14:18 +0000 (20:14 +0200)]
simplify Android Observatory config

This just keeps the config key name simple and direct.

7 years agofix mistake: lists use .append() not .add()
Hans-Christoph Steiner [Mon, 10 Apr 2017 18:02:54 +0000 (20:02 +0200)]
fix mistake: lists use .append() not .add()

This was a mistake in 5ad3486741cee7d76d251cc27a49e1b4fa7310b9

7 years agobtlog: fix bug with first run, the etag variable needs to exist
Hans-Christoph Steiner [Thu, 6 Apr 2017 21:36:31 +0000 (23:36 +0200)]
btlog: fix bug with first run, the etag variable needs to exist

7 years agoMerge branch 'morebintrans' into 'master'
Torsten Grote [Wed, 5 Apr 2017 12:45:40 +0000 (12:45 +0000)]
Merge branch 'morebintrans' into 'master'

`fdroid btlog` for anyone to setup a binary transparency log for any repo

See merge request !243

7 years agoMerge branch 'miscfixes' into 'master'
Torsten Grote [Tue, 4 Apr 2017 21:28:08 +0000 (21:28 +0000)]
Merge branch 'miscfixes' into 'master'

misc fixes

Closes #268

See merge request !245

7 years agobtlog: test with `fdroid update` without requiring ssh access
Hans-Christoph Steiner [Mon, 3 Apr 2017 21:16:39 +0000 (23:16 +0200)]
btlog: test with `fdroid update` without requiring ssh access

Yay git!  Just use a filesystem git remote instead of ssh.

7 years agobtlog: if git remote is specified, push commits to that remote
Hans-Christoph Steiner [Mon, 3 Apr 2017 18:31:25 +0000 (20:31 +0200)]
btlog: if git remote is specified, push commits to that remote

This makes fdroid automatically push the new binary transparency commits if
there is a git_remote specified in either config.py or from a CLI arg.

7 years agoallow index.TestCase to work when run using any path
Hans-Christoph Steiner [Mon, 3 Apr 2017 17:19:37 +0000 (19:19 +0200)]
allow index.TestCase to work when run using any path

7 years agomove make_binary_transparency_log to btlog
Hans-Christoph Steiner [Mon, 3 Apr 2017 14:02:07 +0000 (16:02 +0200)]
move make_binary_transparency_log to btlog

This keeps the code more organized, and reduces the number of things that
are loaded for every command via common.

7 years agoremove setting git name/email for binary transparency logs
Hans-Christoph Steiner [Sun, 2 Apr 2017 21:07:05 +0000 (23:07 +0200)]
remove setting git name/email for binary transparency logs

The machine running the steps should include the git config, so that it is
specific to that machines.

7 years agosupport pretty output in JSON and for binary transparency logs
Hans-Christoph Steiner [Sun, 2 Apr 2017 19:58:34 +0000 (21:58 +0200)]
support pretty output in JSON and for binary transparency logs

This makes make_index_v1() support `fdroid update --pretty`, then also uses
pretty output for the binary transparency logs, so that the git history has
nice, readable diffs between commits.

7 years ago`fdroid btlog` external binary transparency logger
Hans-Christoph Steiner [Mon, 27 Mar 2017 19:52:15 +0000 (21:52 +0200)]
`fdroid btlog` external binary transparency logger

This complements the binary transparency logging that happens on the
server side !226.  Anyone can set up an efficient tracker of any
F-Droid repo which stores all index files that it sees.  It uses HEAD
requests and ETag checking to be as efficient as possible, so that
this can be automatically run at a frequent pace.

7 years agomove make_binary_transparency_log to common for easy reuse
Hans-Christoph Steiner [Mon, 27 Mar 2017 07:58:09 +0000 (09:58 +0200)]
move make_binary_transparency_log to common for easy reuse

7 years agoencode filenames as bytes to handle all locale setups
Hans-Christoph Steiner [Mon, 3 Apr 2017 18:24:00 +0000 (20:24 +0200)]
encode filenames as bytes to handle all locale setups

This was failing on environments that did not have any LANG or LC_* locale
variables set.  This is a valid setup, and is common in headless setups, so
it needs to be handled.

This also adds a new pass of the test suite without the locale env vars set
so that this situation is also tests on gitlab-ci, not only gpjenkins.

The error this caused was:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-18: ordinal not in range(128)

7 years agoignore cache on key name change, instead of crashing
Hans-Christoph Steiner [Mon, 3 Apr 2017 14:52:17 +0000 (16:52 +0200)]
ignore cache on key name change, instead of crashing

In 6c2cf2ccdd7130a034e50f9bea481351d475a272, the names of some essential
data bits changed.  If those names are not in the tmp/apkcache, then
`fdroid update` shouldn't crash but instead just ignore that cache entry.
tmp/apkcache should be deleted since the metadata version was bumped, but
I guess that does not always happen.

7 years agomake sure indexes are sorted to minimize diffs between copies
Hans-Christoph Steiner [Mon, 3 Apr 2017 09:29:21 +0000 (11:29 +0200)]
make sure indexes are sorted to minimize diffs between copies

With the binary transparency log stored in git, it makes that more readable
and as small as possible if the index files are fully sorted.  That will
reduce the differences between two copies of an index file to a bare
minimum.

If in the future we implement some kind of binary diff transfer, this will
also help there.

7 years agometadata: don't crash if metadata includes blank Categories list
Hans-Christoph Steiner [Thu, 23 Mar 2017 22:13:37 +0000 (23:13 +0100)]
metadata: don't crash if metadata includes blank Categories list

If someone includes just 'Categories:', it shouldn't crash.

7 years agobuildserver: allow gradle to install new components
Hans-Christoph Steiner [Wed, 22 Mar 2017 09:59:44 +0000 (10:59 +0100)]
buildserver: allow gradle to install new components

Google is making gradle automatically download Android SDK components that
are needed by the build, but not already present.  We need to support that
since it would be a lot of work to fight it.  Plus, since each build starts
from the fresh snapshot, it should not be such a big deal to let each
build install stuff during the process.

closes #268

7 years agoMerge branch 'invalid-apk-fix' into 'master'
Hans-Christoph Steiner [Mon, 3 Apr 2017 17:38:51 +0000 (17:38 +0000)]
Merge branch 'invalid-apk-fix' into 'master'

Fix bug when scanning invalid APKs and add a test for it

See merge request !246

7 years agoFix bug when scanning invalid APKs and add a test for it
Torsten Grote [Mon, 3 Apr 2017 16:07:49 +0000 (13:07 -0300)]
Fix bug when scanning invalid APKs and add a test for it

7 years agoMerge branch 'index-parsing' into 'master'
Hans-Christoph Steiner [Mon, 3 Apr 2017 16:04:35 +0000 (16:04 +0000)]
Merge branch 'index-parsing' into 'master'

Download and return repository index

See merge request !240

7 years agoMerge branch 'local-install' into 'master'
Hans-Christoph Steiner [Mon, 3 Apr 2017 14:45:45 +0000 (14:45 +0000)]
Merge branch 'local-install' into 'master'

Fix installs with pip --user

See merge request !244