1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 02:50:12 +01:00
Commit Graph

255 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
f7830a41f1 deploy: ensure mirrors and binary transparency always create 'master'
If there was a global default on a machine that was something other than
'master', these things would crash with:

Traceback (most recent call last):
  File "/home/hans/code/fdroid/server/fdroid", line 22, in <module>
    fdroidserver.__main__.main()
  File "/home/hans/code/fdroid/server/fdroidserver/__main__.py", line 230, in main
    raise e
  File "/home/hans/code/fdroid/server/fdroidserver/__main__.py", line 211, in main
    mod.main()
  File "/home/hans/code/fdroid/server/fdroidserver/deploy.py", line 833, in main
    push_binary_transparency(BINARY_TRANSPARENCY_DIR,
  File "/home/hans/code/fdroid/server/fdroidserver/deploy.py", line 705, in push_binary_transparency
    local.pull('master')
  File "/usr/lib/python3/dist-packages/git/remote.py", line 1045, in pull
    res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/git/remote.py", line 848, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/usr/lib/python3/dist-packages/git/cmd.py", line 604, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git pull -v -- local master
  stderr: 'fatal: couldn't find remote ref master'
2023-05-10 09:21:14 +02:00
Hans-Christoph Steiner
572819dbc8 gitlab-ci: use bookworm for "Build documentation" job
I think most fdroidserver core devs are working on bookworm these days, and
the bullseye version is erroring on things that the bookworm version does
not.

fdroidserver/metadata.py:777 in public function `post_parse_yaml_metadata`:
        D202: No blank lines allowed after function docstring (found 1)
2023-04-28 10:55:21 +02:00
Hans-Christoph Steiner
2b81a66b79 App.comments is no more since !772 2023-04-28 10:44:19 +02:00
Hans-Christoph Steiner
6dcdadd0e3
config black exceptions in pyproject.toml
This means that anyone can run `black .` and it won't break things. Plus it
gives us a roadmap for fully enabling black.
2023-04-27 11:34:19 +02:00
Hans-Christoph Steiner
2273d8203b
enable black on fdroidserver/signatures.py 2023-04-27 11:34:16 +02:00
Hans-Christoph Steiner
6620bf0208
enable black on tests: api, gpgsign, main, net, vcs 2023-04-27 11:34:14 +02:00
Hans-Christoph Steiner
77f9ac9fa8
enable black on fdroidserver/rewritemeta.py 2023-04-27 11:34:12 +02:00
Hans-Christoph Steiner
eb81af57bb
enable black on fdroidserver/init.py 2023-04-27 11:34:10 +02:00
Hans-Christoph Steiner
c7070b2799
index.TestCase: manually convert to black code format
* switch to `from fdroidserver import common, index, signindex...`
2023-04-27 11:34:07 +02:00
Hans-Christoph Steiner
ad960c6ecd
remove last maven: quirks and make it always a string
It turns out that the maven: field was originally declared as a TYPE_STRING,
given that it was not given a different type in metadata.py's 	flagtypes.
The code was confused because it was given a default value of `False` rather
than `None` as the rest of the TYPE_STRING fields have.

This construct in build.py means maven: should always be a string:

        if '@' in build.maven:
            maven_dir = os.path.join(root_dir, build.maven.split('@', 1)[1])
        else:
            maven_dir = root_dir
2023-04-24 11:08:48 +02:00
Hans-Christoph Steiner
3b0a6575de gitlab-ci: ubuntu_lts_ppa & debian_testing jobs need sdkmanager 2023-04-13 12:32:47 +00:00
Hans-Christoph Steiner
0dd5a7db64
remove NDK download handling in favor of fdroid/sdkmanager 2023-04-11 13:54:05 +02:00
Jochen Sprickerhof
d59a88f844 Strip ipfsCIDv1 before testing index-v2 2023-04-11 10:29:27 +00:00
Hans-Christoph Steiner
202ecc858c gitlab-ci: break out locale tests into job that fails on errors 2023-03-09 13:42:33 +01:00
FestplattenSchnitzel
2dda9db1f1
Remove support for Buildozer 2023-03-09 12:03:57 +01:00
Hans-Christoph Steiner
4282d34343 gitlab-ci: port lint_* job to Debian/bookworm for stability
This saves us from being surprised by new rules in pylint, pyflakes, etc
like:
https://gitlab.com/FestplattenSchnitzel/fdroidserver/-/jobs/3895256515
2023-03-09 11:45:02 +01:00
Hans-Christoph Steiner
98448e0481 purge all references to zipalign, that is delegated to other things
Things like apksigner and @obfusk's tools handle this now.
jarsigner is used in the test, since that's the most common use of
`common.find_sdk_tools_cmd()`.

closes #1100
2023-02-22 14:45:51 +01:00
Hans-Christoph Steiner
f1f1a873ad gitlab-ci: bump RELEASE_COMMIT_ID to 2.2 beta
This avoid having to write a complicated regex for postbuild:
2023-02-19 15:48:16 +01:00
Hans-Christoph Steiner
5cebb839d4 gitlab-ci: only run Windows job in branches called "windows 2023-02-17 09:34:30 +00:00
FestplattenSchnitzel
ac9b20f6ab gitlab-ci: check that localization works when installed with pip 2023-02-16 21:07:36 +00:00
linsui
58f167b7e5 Add build.binary 2023-02-16 20:16:52 +08:00
linsui
33def096f5 Add postbuild 2023-02-16 12:11:26 +00:00
Jochen Sprickerhof
6118925387 Skip nightly test on Fedora with pip in $HOME 2023-02-08 18:32:13 +01:00
Jochen Sprickerhof
702f84e920 CI: fix permissions for git diff --cached
fdroid build runs git diff --cached for git_repo.is_dirty(). This does
no longer work without these permissions.
2023-02-04 10:12:48 +00:00
Hans-Christoph Steiner
98aa39a597 gitlab-ci: sanitize git ref names for use as docker tags
git ref names can contain many chars that are not allowed in docker tags.

https://docs.docker.com/engine/reference/commandline/tag/
A tag name must be valid ASCII and may contain lowercase and uppercase
letters, digits, underscores, periods and dashes. A tag name may not start
with a period or a dash and may contain a maximum of 128 characters.

https://gitlab.com/brandsimon/fdroidserver/-/jobs/3705004274
2023-02-03 09:50:31 +00:00
Hans-Christoph Steiner
a27cf3d42d gitlab-ci: use black from Debian for a stable code format
This avoids surprise code format CI breakage when black pushes new rules:
https://gitlab.com/fdroid-bot/fdroidserver/-/jobs/3703868702
2023-02-02 15:49:19 +01:00
linsui
5858d8fcb4 remove liberapayID 2023-01-16 17:02:56 +00:00
Jochen Sprickerhof
37dd416aeb
CI: Use Debian packages for documenation build 2023-01-05 19:19:28 +01:00
Hans-Christoph Steiner
052c753075 examples/fdroid_clean_repos.py: black code format
!1227
2022-11-22 20:43:19 +01:00
Hans-Christoph Steiner
09b0405eb0
gitlab-ci: apksigner from current build-tools in ubuntu_jammy_pip 2022-11-16 20:16:36 +01:00
Hans-Christoph Steiner
15bd7057f0 nightly: add tests 2022-11-16 16:50:14 +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
034735a81d
gitlab-ci: fix Windows job by installing Python 3.10, which has wheels
It seems that 3.11 whl packages are not yet always available.  We have other
jobs for testing new Python versions.
2022-11-04 13:34:14 +01:00
Hans-Christoph Steiner
d6008cdb2a
convert examples/makebuildserver.config.py to Vagrantfile.yaml
Also, tests/androguard_test.py was removed long ago
2022-11-03 13:27:18 +01:00
Hans-Christoph Steiner
ca13325913
gitlab-ci: simplify ubuntu_jammy_pip job, babel is not needed
Babel runs on install now, before it was used to pre-generated the
compiled gettext files.
2022-10-31 12:56:32 +01:00
linsui
618e2c7d72 change VercodeOperation to TYPE_LIST 2022-10-27 19:11:37 +08:00
FestplattenSchnitzel
625dc11930 Require Python 3.9 2022-10-24 09:17:27 +00:00
Hans-Christoph Steiner
2bde06a60f gitlab-ci: port ubuntu_bionic_pip to Ubuntu/jammy
This job is here to test using fdroidserver with only depends from pip
and sdkmanager (e.g. not apt-get).  Production is now on bullseye #1038
2022-10-19 14:10:46 +02:00
Hans-Christoph Steiner
eafa7f5e70 gitlab-ci: delete buster_backports job, prod signing is on bullseye
Via private email with @CiaranG
2022-10-19 14:06:59 +02:00
Hans-Christoph Steiner
81f02b8279 gitlab-ci: fix apt.conf syntax for Acquire::Retries 2022-10-19 13:56:28 +02:00
linsui
5a28f20301 make versionCode/build.timeout an integer
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2022-10-14 08:42:26 +00:00
Jochen Sprickerhof
dfdd29131f
Write build/running.json only on build
This should reduce the runtime.

Also test if it was written.
2022-10-12 15:25:17 +02:00
Hans-Christoph Steiner
29838a8bae gitlab-ci: update alpine to supported version 2022-10-11 16:27:05 +02:00
Hans-Christoph Steiner
d33907606e
gitlab-ci: install sdkmanager from bullseye-backports 2022-10-11 13:57:38 +02:00
Hans-Christoph Steiner
b4720d9201
gitlab-ci: fix reversed logic in docker push
I got it backwards in 66d8b783f0 from !1183
2022-10-11 09:53:42 +02:00
Hans-Christoph Steiner
4eb189ad2e gitlab-ci: plugin_fetchsrclibs runs in same base OS as fdroiddata 2022-10-10 21:22:59 +02:00
FestplattenSchnitzel
df46eb86c3 Upgrade Buildserver VM
Use Vagrant boxes built with cloud-team/debian-vagrant-images instead of fdroid/basebox,
Use Debian Bullseye (11) instead of Debian Stretch (9)
2022-10-10 21:22:59 +02:00
Hans-Christoph Steiner
aa190d532f scanner.TestCase: manually convert to black code format
I manually changed some code structures to give a decent code format.
2022-09-30 17:56:15 +00:00
FestplattenSchnitzel
e4d16ec1e8 Move lint tools configuration to pyproject.toml
This commit removes the mypy CI job, since there are no or few type
hints in the codebase and it failed on unrelated changes in the past.
It might be reintroduced when type hints get added.
2022-09-30 17:53:31 +00:00
Jochen Sprickerhof
cf228d35a3 Work around old apksigner on f-droid.org publish server 2022-09-20 13:58:41 +00:00