1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-08-17 03:40:11 +02:00
Commit Graph

219 Commits

Author SHA1 Message Date
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
pmmayero
0ad45a94a8 Addition of IPFS CIDv1 to Index
IPFS CIDv1 is only generated for APKs and "repo files"
2022-09-14 09:28:02 +00:00
Jochen Sprickerhof
483d6da51c
Cleanup tests/dump_internal_metadata_format.py
- Update usage documentation.
- Use argparse.
- Simplify config handling (similar to readmeta.py).
- Drop code for fdroidserver before 0.7.0.
- Reformat with black.
2022-09-08 21:40:26 +02:00
Hans-Christoph Steiner
66d8b783f0 gitlab-ci: only display message if not running docker push 2022-09-08 18:55:32 +02:00
Jochen Sprickerhof
da9a12bf5a
CI: Bump RELEASE_COMMIT_ID for new release
Drop old sed hacks.
2022-09-08 17:58:59 +02:00
Hans-Christoph Steiner
2d5d98fe32 gitlab-ci: stop tags/branches overwriting buildserver docker image
https://gitlab.com/fdroid/fdroidserver/-/jobs/2988110595
https://gitlab.com/eighthave/fdroidserver/-/jobs/2997738047
2022-09-08 17:51:23 +02:00
Hans-Christoph Steiner
dbe4af7951 gitlab-ci: make push in "docker" job opt-in
gitlab.com has added pretty small quotas to free tier accounts, and this
job pushes a docker image that is nearly 1GB.  And those rarely get used,
so this makes it opt in via a variable that can be set when manually
running a job, or globally in the "CI/CD Variables" Settings.
2022-09-08 11:28:59 +02:00
Hans-Christoph Steiner
b352e9a9cc
gitlab-ci: fix Windows job after import rename !1142 2022-08-25 11:10:45 +02:00
FestplattenSchnitzel
7b7f863c65 [import] Rename to import_subcommand internally
This enables normal import of the module without the need for
workarounds.
2022-08-24 22:21:35 +02:00
Hans-Christoph Steiner
22ce23ebe0 gitlab-ci: paramiko from Debian to avoid crypto libs from source
Before it was cryptography, now bcrypt requires a Rust compiler:
https://gitlab.com/fdroid/fdroidserver/-/jobs/2929483724
2022-08-24 19:53:54 +02:00
Hans-Christoph Steiner
ed3622ffff
convert verify.py and verify.TestCase to black code format 2022-08-24 19:16:36 +02:00
Hans-Christoph Steiner
3b1ab74354
gitlab-ci: 'Safety' now needs git to run
Unhandled exception happened: [Errno 2] No such file or directory: 'git'
https://gitlab.com/fdroid/fdroidserver/-/jobs/2724632572
2022-07-14 16:09:28 -07:00
Hans-Christoph Steiner
f04af445dd gitlab-ci: upgrade 'servergitmirrors' job to Debian/bullseye-backports
apksigner is now a requirement !1134
2022-06-08 20:39:44 +02:00
Hans-Christoph Steiner
09e2c37404 gitlab-ci: port fedora job to fdroid/sdkmanager and Java 17
This is also needed to support _apksigner_ as in !1134
2022-06-08 19:37:29 +02:00
Hans-Christoph Steiner
3182b77d18
use apksigner to sign index-v2 with modern, supported algorithms
The current signing method uses apksigner to sign the JAR so that it
will automatically select algorithms that are compatible with Android
SDK 23, which added the most recent algorithms:
https://developer.android.com/reference/java/security/Signature

This signing method uses then inherits the default signing algothim
settings, since Java and Android both maintain those.  That helps
avoid a repeat of being stuck on an old signing algorithm.  That means
specifically that this call to apksigner does not specify any of the
algorithms.

The old indexes must be signed by SHA1withRSA otherwise they will no
longer be compatible with old Androids.

apksigner 30.0.0+ is available in Debian/bullseye, Debian/buster-backports,
Ubuntu 21.10, and Ubuntu 20.04 from the fdroid PPA.  Here's a quick way to
test:

for f in `ls -1 /opt/android-sdk/build-tools/*/apksigner | sort ` /usr/bin/apksigner; do printf "$f : "; $f sign --v4-signing-enabled false; done

closes #1005
2022-06-07 16:56:23 +02:00
Hans-Christoph Steiner
4ce3da476d
btlog: run black to format code 2022-05-23 23:17:40 +02:00
Hans-Christoph Steiner
e6944ea4c2
gitlab-ci: run test suite in the buildserver environment
Run the whole test suite in an environment that is like the
buildserver guest VM.  This installs python3-babel because that is
only used by the test suite, and not needed in the buildserver.

Some extra packages are required for this test run that are not
provided by the buildserver since they are not needed there:

 * gnupg-agent for the full signing setup
 * python3-babel for compiling localization files
 * python3-clint for fancy progress bars for users

fdroid/ci-images-base is deprecated and archived.
2022-05-23 14:12:06 +02:00
Jochen Sprickerhof
d70e5c2cd9 Index v2 2022-05-23 10:39:17 +00:00
Hans-Christoph Steiner
cea192b9fb
gitlab-ci: fix debian_testing and ubuntu_lts_ppa jobs
!1110
These setups did not have dexdump at all.
2022-05-03 22:05:39 +02:00
Jochen Sprickerhof
9c8e128064 [scanner] replace apkanalyzer by dexdump 2022-05-03 14:59:52 +00:00
Hans-Christoph Steiner
9f477dee56
signindex: added simple test case 2022-04-25 22:38:34 +02:00
Jochen Sprickerhof
483bbecf3e [CI] Bump client build to fix CI failure 2022-04-22 14:26:55 +02:00
Hans-Christoph Steiner
65cd3e3b0a
gitlab-ci: tag docker buildserver image with "stretch"
This should make the migration to bullseye easier because we'll have a
fallback stretch image available as needed.

!1012
2022-04-20 15:14:36 +02:00
Hans-Christoph Steiner
3027dc014e
gitlab-ci: fix sudo test in "fdroid build" job 2022-04-18 14:48:16 +02:00
FestplattenSchnitzel
9721b60d7c
Use buildserver image from fdroidserver
This is derived from the "fdroid build" job in fdroiddata
2022-04-18 13:46:10 +02:00
FestplattenSchnitzel
14ab546365
Fix CI for users with uppercase letters in username 2022-02-26 18:15:58 +01:00
Hans-Christoph Steiner
55b3905951 gitlab-ci: fix servergitmirrors by using Debian packages
this is like:
* ca5ebcb30f
* 972bfe346f
* 23bd62c31c
* !1035
* !1034
* !1029
* !1028
2022-02-03 16:41:57 +01:00
Hans-Christoph Steiner
ca5ebcb30f
gitlab-ci: fix plugin_fetchsrclibs by using Debian packages
* https://gitlab.com/eighthave/fdroidserver/-/jobs/1961701458

Collecting pynacl>=1.0.1 (from paramiko->fdroidserver==2.1a0)
  Downloading 27582568be/PyNaCl-1.5.0.tar.gz (3.4MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'":
  Collecting setuptools>=40.8.0
    Using cached 0dd4c79605/setuptools-60.5.0-py3-none-any.whl
  Collecting wheel
    Using cached 003e593296/wheel-0.37.1-py2.py3-none-any.whl
  Collecting cffi>=1.4.1
    Downloading 92de7e1217/cffi-1.15.0.tar.gz (484kB)
  Collecting pycparser (from cffi>=1.4.1)
    Downloading 5f610ebe42/pycparser-2.21-py2.py3-none-any.whl (118kB)
  Building wheels for collected packages: cffi
    Running setup.py bdist_wheel for cffi: started
    Running setup.py bdist_wheel for cffi: finished with status 'error'
    Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-d1knhl7l --python-tag cp37:
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.libera.chat.)

        Trying to continue anyway.  If you are trying to install CFFI from
        a build done in a different context, you can ignore this warning.

    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
    copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/c
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
    Failed building wheel for cffi
    Running setup.py clean for cffi
  Failed to build cffi
  Installing collected packages: setuptools, wheel, pycparser, cffi
    Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      Complete output from command /builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi:
      unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
      unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

          No working compiler found, or bogus compiler options passed to
          the compiler from Python's standard "distutils" module.  See
          the error messages above.  Likely, the problem is not related
          to CFFI but generic to the setup.py of any Python package that
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/
          Otherwise, see https://wiki.python.org/moin/CompLangPython or
          the IRC channel #python on irc.libera.chat.)

          Trying to continue anyway.  If you are trying to install CFFI from
          a build done in a different context, you can ignore this warning.

      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/lock.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/recompiler.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/__init__.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/cparser.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/verifier.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/api.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/commontypes.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/error.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/model.py -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/_embedding.h -> build/lib.linux-x86_64-3.7/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.7/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/c
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/builds/eighthave/fdroidserver/env/include -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.7/c/_cffi_backend.o
      unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

      ----------------------------------------
  Command "/builds/eighthave/fdroidserver/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-djg9jc8p/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ek80c81s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-xokvr6uk --compile --install-headers /builds/eighthave/fdroidserver/env/include/site/python3.7/cffi" failed with error code 1 in /tmp/pip-install-djg9jc8p/cffi/

  ----------------------------------------
Command "/builds/eighthave/fdroidserver/env/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xokvr6uk --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.8.0 wheel "cffi>=1.4.1; python_implementation != 'PyPy'"" failed with error code 1 in None
2022-01-13 21:22:25 +01:00
Hans-Christoph Steiner
839f5b109a
gitlab-ci: publish buildserver image to Docker Registry 2022-01-13 21:21:26 +01:00
FestplattenSchnitzel
565d9e4994
Format setup.py with Black 2021-12-16 20:34:38 +01:00
FestplattenSchnitzel
23a4135ccd
Compile translation files on install
Solution based on https://stackoverflow.com/questions/40051076/compile-translation-files-when-calling-setup-py-install
2021-12-16 20:13:24 +01:00
Hans-Christoph Steiner
778e600269 gitlab-ci: enable pyjks in lint_mypy job now that it is in backports 2021-12-07 10:24:27 +01:00
Jochen Sprickerhof
6756f842e4 [CI] install python3-matplotlib from apt 2021-11-19 18:17:36 +01:00
Jochen Sprickerhof
46abffa0fa [CI] install python3-pil from apt in servergitmirrors
New version would need to be compiled, otherwise.
2021-10-23 15:02:57 +02:00
Jochen Sprickerhof
b8285ebd0e [CI] Install python3-pil from apt
New version would need to be compiled, otherwise.
2021-10-23 14:33:06 +02:00
Jochen Sprickerhof
972bfe346f Fix servergitmirrors ci 2021-10-14 14:40:31 +02:00
Jochen Sprickerhof
23bd62c31c [CI] fetchsrclibs use apt cffi 2021-10-14 13:55:51 +02:00