Commit Graph

28 Commits

Author SHA1 Message Date
Hans-Christoph Steiner 17f6a778ba deploy: move server.py to deploy.py and remove aliases
closes #832
2020-10-21 11:38:49 +02:00
Hans-Christoph Steiner fede58a710 use ArgumentParser's own "usage" line in help output 2020-10-01 23:01:55 +02:00
Marcus Hoffmann 768a91370c publish: use apksigner for signing apks with targetSDK>=30
This makes apksigner a hard requirement of the signing procedure.
We'll first try to find a globally installed version from PATH and if
that's not available fall back to using a version from build-tools.

Future TODO: always sign with apksigner, blocked on signature transplant
support for apksigv2/v3

Closes fdroid/fdroidserver#634
Closes fdroid/fdroidserver#827
2020-09-09 18:09:28 +02:00
Michael Pöhn f5a5fffb10 purge accepted_formats from config 2020-08-20 20:40:15 +02:00
Michael Pöhn f8bc51399e remove txt from nightly default supported metadata formats 2020-08-20 20:40:15 +02:00
Allan Nordhøy df7bc77465 Spelling: Deploy key, stripping, SSH 2020-08-10 10:53:23 +00:00
Torsten Grote db96753902
Fix nightly --archive-older command line option 2020-05-11 10:23:26 -03:00
Torsten Grote 14208a6761
Add stats support to nightly repo
This will keep track of when APKs were added
and show these dates properly in the client
instead of always resetting all dates to the latest update.
2020-03-02 14:17:42 -03:00
Hans-Christoph Steiner 492f12a7a8
nightly: set descriptions for repo and archive 2019-12-03 00:24:37 +01:00
Hans-Christoph Steiner 7381a94b47
gitlab-ci: disable bandit fail on standard debug keystore password 2019-06-30 22:48:52 +02:00
Hans-Christoph Steiner 5959a395c4 nightly: archive older versions; remove archive if git mirror is full 2019-05-01 21:16:15 +02:00
Hans-Christoph Steiner 548f73d988 nightly: search subdirs called 'fdroid' for APKs
@MTRNord tracked down this bug while working on his app
https://gitlab.com/Nordgedanken/simplematrix
2019-02-22 21:32:33 +01:00
Hans-Christoph Steiner d2216b756b fix typos in strings 2018-09-24 17:09:15 +02:00
Michael Pöhn 74ae6a6a3b set locale explicitly when using keytool 2018-08-03 04:36:00 +02:00
Hans-Christoph Steiner deccd013c9 nightly: --no-deploy option to skip rsyncing repo 2018-06-19 15:40:48 +02:00
Hans-Christoph Steiner 881074b2aa nightly: --keep-private-keys option to allow further processing
This makes it possible to run `fdroid server update` after `fdroid nightly`
has completed.  It also actually deletes all private key files.
2018-06-19 15:40:48 +02:00
Hans-Christoph Steiner 01f3d071ee nightly: support arbitrary keystore files for setup
GitHub only allows an SSH key to be used as a Deploy Key for a single repo.
That means, each nightly build repo on GitHub/Travis must have its own
debug keystore.
2017-12-28 23:07:26 +01:00
Hans-Christoph Steiner 7b52722d12 nightly: replace / from fingerprint in SSH key filename, fixes #423
The SSH key fingerprint is used in the filename.  The base64 used for SSH
key fingerprints includes /.  Not all keys will end up having a / in them.
For those that do, this will crash since the ssh key filename ends up being
non-existent dirs:

$ fdroid nightly
Importing keystore /home/mhoffmann/.android/debug.keystore to /tmp/.cqswaeo8/.keystore.p12...
MAC verified OK
writing RSA key
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/usr/lib/python3.6/shutil.py", line 544, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.cqswaeo8/.privkey' -> '/tmp/.cqswaeo8/debug_keystore_PZtS/4Tzk4dpzKiX9AAf1GrhAVi9U7UE1aYEHr6evKo_id_rsa'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroid", line 156, in <module>
    main()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroid", line 132, in main
    mod.main()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroidserver/nightly.py", line 284, in main
    privkey = _ssh_key_from_debug_keystore()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroidserver/nightly.py", line 73, in _ssh_key_from_debug_keystore
    shutil.move(privkey, ssh_private_key_file)
  File "/usr/lib/python3.6/shutil.py", line 558, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.6/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.cqswaeo8/debug_keystore_PZtS/4Tzk4dpzKiX9AAf1GrhAVi9U7UE1aYEHr6evKo_id_rsa'
2017-12-07 22:39:32 +01:00
Hans-Christoph Steiner 5d56841f8a nightly: prompt user to create a debug.keystore if its not there
#423
2017-12-07 22:39:32 +01:00
Hans-Christoph Steiner c823d4c4a8 nightly: fix QR icon.png generation 2017-12-07 22:39:32 +01:00
Hans-Christoph Steiner 4afe5aefd5 nightly: create app metadata using template of parsed data 2017-12-07 22:39:32 +01:00
Hans-Christoph Steiner 4561ea59a6 nightly: use shutil.move() only so all ops work across filesystems
https://gitlab.com/fdroid/fdroidserver/merge_requests/377#note_49998712
2017-12-05 09:13:19 +01:00
Hans-Christoph Steiner bf913703c5 nightly: only use read_config to load final, generated config.py
This needs to use the config loading routine to find Java `keytool`, but
since it doesn't need to fully load the config, isolate that usage in the
function.  Then read_config() is only ever called once, as is it meant to
be used, once the config.py is generated.

Using `from . import common; common.config = foo` will not always work,
due to some oddities to how the `from` imports work. So the full module
has to be imported in order to make sure its always properly set.
2017-12-04 22:52:41 +01:00
Hans-Christoph Steiner 8a61b0b945 nightly: resign APKs with provided debug.keystore
Rather than needing to run a command before and after the build, in order
to first install the debug.keystore, then after to fetch and publish the
APK, this makes `fdroid nightly` just resign the APK with the provided
debug.keystore.  Then `fdroid nightly` can be run as the final step in a CI
build, and still ensure that the APKs are always signed by the provided
debug.keystore.
2017-12-04 22:52:41 +01:00
Hans-Christoph Steiner f01b6af57f nightly: automatically create and manage app metadata
This also allows the developer to edit the metadata in the *-nightly git
repo to customize it.

closes #421
2017-11-29 21:06:02 +01:00
Hans-Christoph Steiner 6f97be128f nightly: fix QR code repo icon generation 2017-11-29 21:06:02 +01:00
Hans-Christoph Steiner ec453eac8a nightly: fix PEP8 E722 do not use bare except 2017-11-27 10:42:31 +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