chiark / gitweb /
Michael Pöhn [Sat, 25 Mar 2017 01:48:00 +0000 (02:48 +0100)]
makebuildserver more robust codepath for vagrant destroy
Michael Pöhn [Sat, 25 Mar 2017 01:37:08 +0000 (02:37 +0100)]
makebuildserver added failsafe when destroy vagrant vm
Michael Pöhn [Sat, 25 Mar 2017 01:19:15 +0000 (02:19 +0100)]
makebuildserver use virsh instead of libvirt for forcing domain off
Michael Pöhn [Sat, 25 Mar 2017 00:56:20 +0000 (01:56 +0100)]
makebuildserver debug logging when initial provisioning fails
Michael Pöhn [Sat, 25 Mar 2017 00:40:41 +0000 (01:40 +0100)]
overhauled makebuildserver libvirt vm cleanup
Michael Pöhn [Fri, 24 Mar 2017 19:04:50 +0000 (20:04 +0100)]
makebuildserver debugging log details
Michael Pöhn [Fri, 24 Mar 2017 03:16:30 +0000 (04:16 +0100)]
makebuildserver prune gloabal vagrant status when purging broken VMs
Michael Pöhn [Fri, 24 Mar 2017 02:15:35 +0000 (03:15 +0100)]
delete .vagrant dir when cleaning up buildserver vm
Michael Pöhn [Thu, 23 Mar 2017 23:49:02 +0000 (00:49 +0100)]
jenkins makebuildserver fail if vagrant box was not created
Hans-Christoph Steiner [Mon, 22 May 2017 14:57:47 +0000 (16:57 +0200)]
calculate correct size for buildserver-box in makebuildserver
https://gitlab.com/fdroid/fdroidserver/issues/238#note_24000153
"Our hard-coded image size meta-data (1000) is for some interpreted as less
than the size of the box-image by my kvm setup. This makes grub/initrd
refuse to boot. So I've changed the metadata size to 9999 which resulted in
an actually booting vm. I can log in on the builder-vm via virt-manager
and virsh.
Michael Pöhn [Tue, 14 Mar 2017 23:12:01 +0000 (00:12 +0100)]
auto-reset broken builder vm
Michael Pöhn [Thu, 9 Mar 2017 12:30:30 +0000 (13:30 +0100)]
scan vm provider again after re-creating builder vm
Michael Pöhn [Wed, 8 Mar 2017 11:29:18 +0000 (12:29 +0100)]
added some debug listings to jenkins makebuildserver script
Michael Pöhn [Tue, 7 Mar 2017 14:14:10 +0000 (15:14 +0100)]
delete associated libvirt domain/image when destroying builder vm
Michael Pöhn [Mon, 6 Mar 2017 01:57:07 +0000 (02:57 +0100)]
build: fixed kvm snapshot support; makebuildserver: setup kvm ssh credentials
Michael Pöhn [Thu, 23 Feb 2017 04:51:05 +0000 (05:51 +0100)]
added libvirt vm-provider support to build.py
Hans-Christoph Steiner [Tue, 14 Feb 2017 21:58:35 +0000 (22:58 +0100)]
makebuildserver: package up KVM VM as a vagrant box
`vagrant package` does not work with KVM, so we have to hack together our
own until someone implements it (suppose we should do it). This is a hacked
up version based on:
https://github.com/vagrant-libvirt/vagrant-libvirt/blob/
d7d440ea8f24f698a93a4c5b9a5149acef469579/tools/create_box.sh
#238
Hans-Christoph Steiner [Tue, 27 Sep 2016 06:26:33 +0000 (02:26 -0400)]
buildserver: make --clean destroy reliably
This prevents v.destroy() from running if Vagrantfile.yaml does not exist,
since that is required for vagrant to run: is the core config including the
name of the box, etc. Otherwise, it would exit with an error.
This also does complete cleanup when using libvirt.
Hans-Christoph Steiner [Mon, 26 Sep 2016 09:22:05 +0000 (05:22 -0400)]
buildserver: consolidate boxfile export code into one block
This is just for clarity, and moving more code into the main() function.
Hans-Christoph Steiner [Thu, 23 Jun 2016 15:12:06 +0000 (17:12 +0200)]
buildserver: add copy_caches_from_host config option
For people using slow, expensive, and/or flaky internet, liberal use of
caching can make a huge difference. The restricted environment of the
gpjenkins box has been a good test environment for this (Tor-only,
whitelist of allowed IPs to visit, home internet connection).
Hans-Christoph Steiner [Thu, 23 Jun 2016 14:38:39 +0000 (16:38 +0200)]
buildserver: run_via_vagrant_ssh() to run cmds via python-vagrant
This moves the last vagrant call in a subprocess.
Hans-Christoph Steiner [Sun, 25 Sep 2016 16:55:29 +0000 (18:55 +0200)]
buildserver: move code into main() method to always stop thread
By running the whole program in a main() function, it can be wrapped in
try/finally in order to stop the background display thread. This is also
done in ./fdroid, its standard practice for Python CLI utilities.
Hans-Christoph Steiner [Mon, 20 Jun 2016 09:33:46 +0000 (11:33 +0200)]
buildserver: display verbose logging in a background tail
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`
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.
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.
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
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
Michael Pöhn [Sat, 25 Mar 2017 22:50:10 +0000 (23:50 +0100)]
fix calling vagrant global-status
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
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.
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
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
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
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.
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.
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 _.
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 = '& < " ' >'
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
thez3ro [Wed, 17 May 2017 21:08:25 +0000 (23:08 +0200)]
fix double pushing on remote
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
thez3ro [Wed, 17 May 2017 18:37:49 +0000 (20:37 +0200)]
Use gitlab pages as mirror
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
Boris Kraut [Wed, 10 May 2017 16:55:38 +0000 (18:55 +0200)]
buildserver: use hg 3.9 from backports
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
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
thez3ro [Thu, 13 Apr 2017 12:18:48 +0000 (14:18 +0200)]
use androguard if aapt isn't found
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
Torsten Grote [Tue, 2 May 2017 15:05:48 +0000 (12:05 -0300)]
Support ETag when downloading repository index
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
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
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
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
Andrew Patrikalakis [Sun, 30 Apr 2017 01:38:44 +0000 (18:38 -0700)]
Check for libvirt specific shutoff message
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.
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
Torsten Grote [Mon, 24 Apr 2017 19:22:33 +0000 (16:22 -0300)]
Make git server mirror upload honor config['identity_file'] option
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
Michael Pöhn [Sun, 23 Apr 2017 09:33:51 +0000 (11:33 +0200)]
remove build output when not reproducible
Michael Pöhn [Sat, 22 Apr 2017 10:04:32 +0000 (12:04 +0200)]
unified method for naming build output
Michael Pöhn [Thu, 20 Apr 2017 10:44:22 +0000 (12:44 +0200)]
check meld config for manual apk diffs
Michael Pöhn [Thu, 20 Apr 2017 10:38:50 +0000 (12:38 +0200)]
use verify_apks for checking build output
Michael Pöhn [Thu, 20 Apr 2017 10:27:04 +0000 (12:27 +0200)]
fix java architecture in buildserver config
Michael Pöhn [Tue, 4 Apr 2017 16:58:16 +0000 (18:58 +0200)]
compare apk with Binaries from metadata right after building
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
Michael Pöhn [Thu, 20 Apr 2017 15:48:38 +0000 (17:48 +0200)]
throw proper error when download of apks fail
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
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
Hans-Christoph Steiner [Wed, 19 Apr 2017 08:04:32 +0000 (10:04 +0200)]
add basic test for Triple-T Gradle Play Publisher scraping
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.
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
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
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
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
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
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
Boris Kraut [Tue, 18 Apr 2017 21:36:01 +0000 (23:36 +0200)]
bs: use only prefixes for gradle kv pairs
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
Boris Kraut [Tue, 18 Apr 2017 17:42:52 +0000 (19:42 +0200)]
bs: update gradle plugin/version pairs
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
Ruslan Boitsov [Tue, 18 Apr 2017 06:41:09 +0000 (06:41 +0000)]
Add gradle 3.5 to the list of available versions
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
Boris Kraut [Sat, 15 Apr 2017 13:08:13 +0000 (15:08 +0200)]
makebs: add gradle 3.5
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
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
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
Hans-Christoph Steiner [Wed, 12 Apr 2017 13:26:51 +0000 (15:26 +0200)]
git mirror test requires git >= 2.3
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.
Michael Pöhn [Wed, 12 Apr 2017 22:44:53 +0000 (00:44 +0200)]
provision missing pyasn1 dependency to build server
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.
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.
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`.
Hans-Christoph Steiner [Tue, 11 Apr 2017 21:46:14 +0000 (23:46 +0200)]
server: support git mirrors with the offline signing setup
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.
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.
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.
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.
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
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.
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