Commit Graph

284 Commits

Author SHA1 Message Date
proletarius101 cf74ca5f56
update docker image tag 2024-03-14 13:14:41 +01:00
Licaon_Kter f30dcf5069
Upgrade Buildserver VM to latest Debian (Bookworm) 2024-03-14 13:14:34 +01:00
Hans-Christoph Steiner 3560a2522a
gitlab-ci: docker:git has become stable, so switch to stable tag
When this job was implemented, it needed the "git" tag.  Now that it works,
still with the stable tag.
2024-03-06 14:51:19 +01:00
Hans-Christoph Steiner 7b45ea7898
gitlab-ci: always use HTTPS for apt repos
This has been in place in a number of other places and has proven stable,
so I'm introducing it here, since the "docker" job actually publishes
docker images that are publicly used.  So little painless security fixes
are worthwhile.
2024-03-06 14:50:51 +01:00
Hans-Christoph Steiner 3c77ac66b1
gitlab-ci: revert to old config.py for servergitmirrors: job 2024-02-14 18:31:25 +01:00
Hans-Christoph Steiner 4e0c721b04 fixups from "feat: add servergitmirrors as a dict support"
These slipped by in reviewing fdroidserver!1438
https://gitlab.com/fdroid/fdroidserver/-/jobs/6173435409
2024-02-14 18:10:29 +01:00
proletarius101 947217549a feat: add servergitmirrors as a dict support 2024-02-14 16:50:39 +00:00
Hans-Christoph Steiner dc7170e709 gitlab-ci: install biplist if available, otherwise skip test_parse_ipa
Fedora does not have a biplist package.
2024-01-11 16:02:06 +01:00
Michael Pöhn 881943a0db 🥔 install biplist for ci tests
biplist is an optional python dependency required for processing iOS
apps. (.ipa files)
2024-01-11 12:02:52 +01:00
Hans-Christoph Steiner 11d21d6b18
gitlab-ci: bump base commit in metadata_v0 job to get rev-parse fix
!1427
2024-01-11 11:33:00 +01:00
Hans-Christoph Steiner 69ccce0644
gitlab-ci: include pycountry in all master-only jobs
follow up from !1418
2024-01-09 16:53:25 +01:00
Jochen Sprickerhof d3abb74c88
Use git rev-parse instead of describe
We only want the hash.
2024-01-09 13:15:23 +01:00
Hans-Christoph Steiner 96fc49d7fc lint: check syntax of countryCode: fields for mirrors 2024-01-09 09:32:37 +00:00
Hans-Christoph Steiner d9288c8613 gitlab-ci: add macOS job based on only Travis job 2023-12-15 09:14:50 +01:00
Hans-Christoph Steiner 865673964e gitlab-ci: enable shellcheck on tests/run-tests 2023-12-15 08:40:01 +01:00
Hans-Christoph Steiner 9d8c098f74 gitlab-ci: add shellcheck to gradlew-fdroid checks 2023-12-15 08:39:13 +01:00
Hans-Christoph Steiner 4b208e438e gitlab-ci: gradle job needs python3-packaging now 2023-12-08 10:42:29 +01:00
Hans-Christoph Steiner a1a88d39cf download looseversion to vendor
e1a5a176a9/src/looseversion/__init__.py
2023-12-08 10:42:27 +01:00
Hans-Christoph Steiner f13d9235ce remove jq dependency in the tests, port to GNU sed
This avoids spreading the jq dependency to more places, like:

https://gitlab.com/eighthave/ansible-role-install-fdroidserver-dependencies/-/jobs/5559798360

And is helpful when porting to non-Debian platforms.
2023-11-23 12:24:49 +00:00
linsui 5ae15532f0 fetch_srclib: fetch source code 2023-11-17 10:45:53 +00:00
Hans-Christoph Steiner 3db90b65fb gitlab-ci: switch archlinux job to virtualenv
https://gitlab.com/fdroid/fdroidserver/-/jobs/4466370098

$ pip install -e .[test]
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.

    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.

    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
2023-07-03 16:17:08 +02:00
Jochen Sprickerhof 7af95fc660
gitlab-ci: bump version to compare in metadata_v0 job 2023-06-02 10:38:16 +02:00
Gregor Düster 337974cbed
metadata: Make ArchivePolicy an interger internally 2023-05-30 23:02:34 +02:00
Hans-Christoph Steiner 2efc9437ab gitlab-ci: purge stale removals from metadata_v0 job. 2023-05-29 16:50:28 +00:00
Hans-Christoph Steiner 8374842faa metadata: normalize TYPE_BOOL to YAML 1.2 booleans
This makes the internal representation always be a boolean, and that also
means that YAML 1.2 booleans will be written out, e.g. rewritemeta.
2023-05-25 16:53:02 +02:00
Hans-Christoph Steiner fc9afc83b8 gitlab-ci: update metadata_v0 job for RequiresRoot: as TYPE_BOOL
b0c05842d8
!1350
2023-05-24 22:36:11 +02:00
Hans-Christoph Steiner b2fc59ef9a gitlab-ci: bump version to compare in metadata_v0 job
The previous commit changes the internal representation of
antiFeatures from a list to dict.
https://gitlab.com/eighthave/fdroidserver/-/jobs/4260622978
2023-05-23 10:47:03 +02:00
Hans-Christoph Steiner af5b067396 gitlab-ci: bump version to compare in metadata_v0 job
The relevant change comes from !1332
2023-05-11 10:37:45 +02:00
Hans-Christoph Steiner 3efe797bf8 gitlab-ci: CI_BUILD_* vars were renamed to other things
https://web.archive.org/web/20190110134948/https://docs.gitlab.com/ee/ci/variables/#gitlab-90-renaming

Looks like GitLab v16 is finally removing the old names.

sed -i \
  -e s,CI_BUILD_TOKEN,CI_JOB_TOKEN,g \
  -e s,CI_BUILD_REF_SLUG,CI_COMMIT_REF_SLUG,g \
  -e s,CI_BUILD_REF_NAME,CI_COMMIT_REF_NAME,g \
  -e s,CI_BUILD_REPO,CI_REPOSITORY_URL,g \
  .gitlab-ci.yml
2023-05-10 09:21:14 +02:00
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