1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00
Commit Graph

266 Commits

Author SHA1 Message Date
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
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