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

49 Commits

Author SHA1 Message Date
SilentGhost
8e89cf511d Correct traversing cibase
Partly revert d9aab228 and fix bug introduced in 548f73d9:
modifying list that is being iterated over
2024-09-06 15:05:36 +02:00
WrenIX
d1d1eb4c53
chore(nightly): improve log messages 2024-08-29 09:58:27 +02:00
WrenIX
d9aab228e2
fix(nightly): workaround for broken os.walk and more logging 2024-08-29 00:51:30 +02:00
proletarius101
845ed3ef47 Add index only deployment mode 2024-06-11 17:45:59 +00:00
Hans-Christoph Steiner
18f3acc32e split out options from read_config()
There is no longer any reason for these to be intertwined.

This deliberately avoids touching some files as much as possible because
they are super tangled and due to be replaced.  Those files are:

* fdroidserver/build.py
* fdroidserver/update.py

# Conflicts:
#	tests/testcommon.py

# Conflicts:
#	fdroidserver/btlog.py
#	fdroidserver/import_subcommand.py
2024-05-08 16:26:46 +02:00
Gregor Düster
97346a2cba [nightly] Add more docstrings 2024-05-08 15:31:32 +02:00
Torsten Grote
be673c56cf Use fdroid.link for nightly README 2024-04-03 13:54:48 +00:00
proletarius101
947217549a feat: add servergitmirrors as a dict support 2024-02-14 16:50:39 +00:00
Hans-Christoph Steiner
b92e280eab fix code format for new black rule 2023-03-20 14:47:48 +01:00
Hans-Christoph Steiner
83335437b9
nightly: if repo is too large, set archive_older to 3
If the user has not manually set --archive-older, then this will auto-switch
it from 20 to 3 to shrink the repo down so it fits into GitLab Pages.
2022-11-16 20:16:23 +01:00
Hans-Christoph Steiner
c2567d71d1
nightly: fail if *-nightly git repo is not publicly available 2022-11-16 20:16:21 +01:00
Hans-Christoph Steiner
15bd7057f0 nightly: add tests 2022-11-16 16:50:14 +01:00
Hans-Christoph Steiner
9c0eaac121 nightly: convert to config.yml 2022-11-16 14:40:08 +01:00
Hans-Christoph Steiner
1c5506ae05 nightly: support OpenSSL 3.0 with Paramiko
OpenSSL 3.0 changed the default output format from PKCS#1 to PKCS#8,
which paramiko does not support.

https://www.openssl.org/docs/man3.0/man1/openssl-rsa.html#traditional
https://github.com/paramiko/paramiko/issues/1015
2022-11-16 14:40:08 +01:00
Hans-Christoph Steiner
bf945a3062 nightly: only write SSH key files if ~/.ssh exists on dev's machine 2022-11-16 14:40:08 +01:00
Hans-Christoph Steiner
c6cf0468ed nightly: update Raw URLs to fix breakage and avoid redirects 2022-08-26 07:18:19 +00:00
Hans-Christoph Steiner
d1fd58681e
nightly: stop stripping APKs before signing, apksigner does it
* https://gitlab.com/fdroid/fdroidserver/-/merge_requests/1033#note_742563869
* https://github.com/wardvl/f-droid-nightly-action/issues/3
2022-02-22 22:29:09 +01:00
Hans-Christoph Steiner
01d1869d59
nightly: fix "deploy key URL" that is printed to log output
GitLab now uses the "/-/" form as the canonical.
2022-02-22 13:34:01 +01:00
Ward Vanlerberghe
1c65fd8496 Added Github actions/workflow to the nightly CI 2021-11-24 07:54:57 +00:00
Hans-Christoph Steiner
307cf8958c
run black to reformat code that does not have WIP merge requests 2021-06-28 18:57:56 +02:00
Hans-Christoph Steiner
5ae2703477 init: no error if examples/ dir cannot be found; overhaul repo_icon
There are so many possible installation paths for Python modules, it has
been very hard to even find and test them all.  This adds a fallback option
if the examples dir cannot be found.  A repo can work without an icon or
the example config.py.

This removes the fake assumption that the icon can be a full path in the
config.py.  While the path was being properly passed through to the index
file, the file was never copied properly into place nor rsynced to the web
server.
2021-01-18 14:07:20 +01:00
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