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

7786 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
1e4697cef9
Merge 'missing_manifest' into master
* origin/missing_manifest:
  add missing test files
  Drop deleted files from MANIFEST.in
  Sort MANIFEST.in
  Add missing test files for scanner

fdroid/fdroidserver!842
2021-01-04 16:45:09 +01:00
Jochen Sprickerhof
0e312a928b add missing test files
sorted using UNIX `sort`

https://gitlab.com/fdroid/fdroidserver/-/merge_requests/842#note_476969121
2021-01-04 16:24:55 +01:00
Jochen Sprickerhof
ffcf9e7a64 Drop deleted files from MANIFEST.in 2021-01-03 09:04:48 +01:00
Jochen Sprickerhof
e789dc4554 Sort MANIFEST.in 2021-01-03 09:04:13 +01:00
Jochen Sprickerhof
30f1f15814 Add missing test files for scanner 2021-01-03 09:04:04 +01:00
Hans-Christoph Steiner
7b94303760 Merge branch 'master' into 'master'
Update NDK to r22 and add buildtools 30.0.3

See merge request fdroid/fdroidserver!840
2020-12-28 15:52:41 +00:00
TacoTheDank
c88a3f56a1 Update NDK to r22 and add buildtools 30.0.3 2020-12-26 19:51:22 -05:00
Hans-Christoph Steiner
330ca2319c
example plugin for fetching srclibs
This is used in _fdroiddata_'s `fdroid build` CI job, and _issuebot_.
This uses @uniqx's awesome new 'plugin' feature to create a 'fetchsrclibs`
command.  The 'fdroid build' gitlab-ci job uses --on-server, which does not
set up the srclibs.  This plugin does the missing setup.

This is moved from _fdroiddata_ where it was _tools/fdroid_fetchsrclibs.py_.
2020-12-22 16:59:02 +01:00
Hans-Christoph Steiner
03aba988b2 Merge branch 'api-fixes' into 'master'
API fixes to work with plain dicts read by any YAML parser

Closes #851

See merge request fdroid/fdroidserver!838
2020-12-15 16:26:36 +00:00
Hans-Christoph Steiner
21b0a6b463 gitlab-ci: update metadata_v0 test for parsing change
`Builds:` is directly in the .yml metadata, and the internal representation
now uses the same "Builds" name.  Reading in .txt metadata files used the
name "builds" for that.  So this test now uses "Builds" as canonical.
2020-12-15 08:55:05 +01:00
Hans-Christoph Steiner
0b879f18e5 use dict syntax for app instances to allow API usage with plain dicts
Since metadata files are now YAML, programs should be able to just read in
the .yml files, then use them with fdroidserver methods without having to
know about the App class.  The App class just provides syntactic sugar by
allowing dict keys to be accessed as attributes.
2020-12-15 08:55:05 +01:00
Hans-Christoph Steiner
e93acf7964 metadata: work with dicts generated by standard YAML parsers
Now that the mismatch between 'builds' and 'Builds' has been fixed, it is
now possible to read metadata/*.yml files with a standard YAML parser like
PyYAML, then output them using `metadata.write_metadata()`.  Other API
functions in fdroidserver should also work in this case.

I did this as I was working on fdroiddata!7860
2020-12-15 08:55:05 +01:00
Hans-Christoph Steiner
bf25b4ca03 eliminate app.builds everywhere, it should be app['Builds']
The .txt format was the last place where the lowercase "builds" was used,
this converts references everywhere to be "Builds".  This makes it possible
to load metadata YAML files with any YAML parser, then have it possible to
use fdroidserver methods on that data, like metadata.write_metadata().

The test files in tests/metadata/dump/*.yaml were manually edited by cutting
the builds: block and putting it the sort order for Builds: so the contents
should be unchanged.

```
sed -i \
 -e 's/app\.builds/app.get('Builds', \[\])/g' \
 -e "s/app\.get(Builds, \[\]) =/app\['Builds'] =/g" \
 -e "s/app\.get(Builds, \[\]) =/app\['Builds'] =/g" \
 -e "s/app\.get(Builds, \[\])/app.get('Builds', \[\])/g" \
 -e "s/app\.get('Builds', \[\])\.append/app\['Builds'\].append/g" \
 -e "s/app\['builds'\]/app.get('Builds', [])/g" \
 */*.*
```
2020-12-15 08:55:05 +01:00
Hans-Christoph Steiner
877779195f Merge branch 'logging-and-two-bug-fixes' into 'master'
Logging and two bug fixes

Closes #851

See merge request fdroid/fdroidserver!837
2020-12-15 07:53:52 +00:00
Hans-Christoph Steiner
cfec25d33a update: tame androguard debug logs when --verbose is set 2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
40cd51ed59 build: include commit ID in build log 2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
fb628c2cb2 include modified and untracked files in status JSON
Ideally, an fdroid repo should be running from a clean git repo, so that
all changes are tracked in git.  This change is useful in seeing which
changes and/or files are not in git.  If there are modified files, the
dirty flag will be set, so this info can help debugging that.
2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
384922118f index: sanitize fingerprint arg, extract_pubkey() returns with spaces
The key fingerprint should be only hex digits, everything else can be
discarded.  That makes it easy to use this function various fingerprint
formats, including the common, human-readable forms spaces between pairs or
quartets.
2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
d9171f11e0 update: improve logging when exiting due to bad APK file
closes #851
2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
ba854cbc0f index: fix GitLab Raw URLs with gitlab.com and recent versions
GitLab seems to be moving to always having "-" as the first path segment in
all the project URLs.  So the URL without a "-" is now a redirect.
2020-12-15 08:30:48 +01:00
Hans-Christoph Steiner
531c36f310
fix typo in ac3eb0e641 2020-12-14 23:08:32 +01:00
Hans-Christoph Steiner
d1a47e58c3
release v2.0.a4 2020-12-14 20:34:28 +01:00
Hans-Christoph Steiner
ac3eb0e641 tests: fix mirror test setup on macOS
I guess macOS has an ancient version of bash which does not include
support for $RANDOM
2020-12-14 20:33:28 +01:00
Hans-Christoph Steiner
50c98b2f30 Merge branch 'fdroid-build-job' into 'master'
GitLab CI job to test `fdroid build`

See merge request fdroid/fdroidserver!839
2020-12-14 19:31:24 +00:00
Hans-Christoph Steiner
8329be2d22 gitlab-ci: make fdroid build job actually build apps 2020-12-10 10:54:47 +01:00
Hans-Christoph Steiner
9cfd12f9ed tests: include test http.server.log in the test's tmp dir 2020-12-10 10:45:28 +01:00
Hans-Christoph Steiner
54e8867a7e
fix read_metadata in fdroid build
Broken in fdroid/fdroidserver!828
2020-12-09 22:29:51 +01:00
Hans-Christoph Steiner
ac5ed93428 Merge branch 'purge-description-formatting' into 'master'
Purge description formatting

Closes #845 and #678

See merge request fdroid/fdroidserver!828
2020-12-09 18:28:08 +00:00
Hans-Christoph Steiner
adcb484927 Merge branch 'find_sdk' into 'master'
Find sdk

See merge request fdroid/fdroidserver!836
2020-12-09 16:57:23 +00:00
Jochen Sprickerhof
66d0e6b1f9 find_sdk_tools_cmd always raise exception if not found
test_sdk_exists() succeeds on an empty directory so it does not give any
new information. Contrary, test_sdk_exists() succeeds on an empty
directory, so find_sdk_tools_cmd() returned None even though the tools
where not found, before.
2020-12-09 17:37:02 +01:00
Hans-Christoph Steiner
129438fd30 make read_metadata only parse files actually used by lint/rewritemeta
Now that the description formatting is removed, there is no need to load
all of the app metadata before operating on a single one.  This change
makes lint and rewritemeta only load the metadata for the apps it is actually
operating on.  Before, it would always load all metadata files.  #845

closes #678
2020-12-08 09:37:49 +01:00
Hans-Christoph Steiner
c98b15e72a purge code that modifies the repo descriptions
YAML now provides nice ways of handling blocks of text, including removing
indents and newlines.  Remove the custom hack.
2020-12-08 09:37:49 +01:00
Hans-Christoph Steiner
828d6015ef purge code that modifies the app description, including linkifying
closes #845
2020-12-08 09:37:49 +01:00
Jochen Sprickerhof
5df13bcb8c Catch exception when testing find_sdk_tools_cmd
In 1c7df94e find_sdk_tools_cmd was changed to throw an FDroidException
when the sdk tools where not found instead of returning None.
2020-12-05 14:29:45 +01:00
Hans-Christoph Steiner
15a6e2d3a0 gitlab-ci: switch archived ci-images-server to ci-images-base
ci-images-server was created separately from ci-images-base back in the day
when we had to support Debian/stretch without stretch-backports.  Those
days are gone now, so ci-images-server has been archived and should no
longer be used.
2020-12-04 11:25:02 +01:00
Hans-Christoph Steiner
ed0102754a gitlab-ci: remove rules:, they create weird "pipelines" 2020-12-04 11:23:22 +01:00
Hans-Christoph Steiner
e8395b5fe9
release v2.0a3
somehow I messed up and uploaded 2.0a2 that was incomplete, so now 2.0a3
2020-12-03 22:17:07 +01:00
Hans-Christoph Steiner
126b85972d
release v2.0a2 2020-12-03 21:48:43 +01:00
Hans-Christoph Steiner
4b9297dfa6 gitlab-ci: only run arch/pip job on final merged commits
Each of these takes a while to run, and this one rarely catches
issues separately from the main jobs.
2020-12-03 21:48:37 +01:00
Hans-Christoph Steiner
cc5c52791f use smallest possible valid .obf.zip file in tests
Virgin-islands-british_centralamerica_2.obf.zip is 1MB, while
Norway_bouvet_europe_2.obf.zip is 12KB.  This file gets copied a lot in the
test runs so it adds up fast.
2020-12-03 21:48:37 +01:00
Hans-Christoph Steiner
77db3ea709 mirror: if index is verified, save a copy in the local mirror 2020-12-03 21:48:37 +01:00
Hans-Christoph Steiner
00f5ff8762 gitlab-ci: remove workaround, Debian's apksigner now works w/o binfmt 2020-12-03 16:21:08 +01:00
Hans-Christoph Steiner
381190faad Merge branch 'pip_install_test' into 'master'
Pip install test

See merge request fdroid/fdroidserver!833
2020-12-03 13:41:55 +00:00
Jochen Sprickerhof
4b2e323899 Install more test files 2020-12-03 13:34:42 +01:00
Jochen Sprickerhof
df160170ca Run test on sdist 2020-12-03 13:34:42 +01:00
Hans-Christoph Steiner
2a265cbc0b Merge branch 'build_tools_tests' into 'master'
Build tools tests

See merge request fdroid/fdroidserver!834
2020-11-30 08:39:20 +00:00
Marcus
02b3024767 Merge branch 'fix_type_error' into 'master'
Fix type error

See merge request fdroid/fdroidserver!835
2020-11-29 18:27:41 +00:00
Jochen Sprickerhof
25b1f3fe8c Ignore non version number entries in build_tools_path
LooseVersion('debian') stay a string and results in a type error.
2020-11-29 19:04:35 +01:00
Jochen Sprickerhof
4d78d79280 Revert "Ignore non version number entries in build_tools_path"
This reverts commit 5c36f84430.
2020-11-29 19:04:12 +01:00
Jochen Sprickerhof
ce10fcb759 Check if build_tools path exists before listdir 2020-11-29 10:06:39 +01:00