Commit graph

577 commits

Author SHA1 Message Date
linsui
763a2ee80d fix invalid extension of output apk 2021-06-24 13:42:10 +00:00
Hans-Christoph Steiner
78d37bb13b switch to allow/block list terminology throughout code base
allowlist and blocklist are much clearer terms with no cultural baggage.
This changes all "whitelist" references to "allowlist", and all "blacklist"
references to "blocklist".
2021-06-18 18:26:50 +00:00
Hans-Christoph Steiner
1300771bad
'import resource' only where its used, Windows does not have it 2021-06-18 11:12:25 +02:00
Hans-Christoph Steiner
45bd89b3a2
build: missing NDK is now a warning not a critical error 2021-05-28 10:24:56 +02:00
Hans-Christoph Steiner
09fa49a7a3
make get_android_tools_versions() search ndk_paths from config 2021-05-28 09:13:38 +02:00
Hans-Christoph Steiner
9fc2a23713
build: remove default NDK, closes #717 2021-05-25 17:06:26 +02:00
Hans-Christoph Steiner
69fcd6a024
build: auto-download missing NDKS if they're known and can be verified
refs #517 #717
2021-05-25 17:06:24 +02:00
Hans-Christoph Steiner
0b0bc803b7 build: --test now keeps unsigned APKs in tmp/ that fail to reproduce
Before, whenever an unsigned APK failed to reproduce, it was just deleted.
That makes debugging hard.  This makes it keep the unsigned APK, which is
written in tmp/ when using --test.

@jspricke this is related to !864
2021-04-16 09:46:23 +02:00
Hans-Christoph Steiner
6097caef91
build: fix typo in regex for Binaries: verification 2021-04-16 09:40:21 +02:00
Jochen Sprickerhof
df3b6ea65c Create log file for VCSException
In case there is a VCS error (git tag not found), create a log file in
the F-Droid repo so it is shown on the monitor (currently 404).
2021-04-06 12:45:41 +00:00
Hans-Christoph Steiner
dbf80ad771
metadata: remove git repo handling from metadata parsing
This is a vestige of implementing builds from a .fdroid.yml file directly
in the app's source repo.  It was never fully complete and seems to not be
used in any apps in fdroiddata.  This makes `fdroid build --all` runs much
faster since it does not need to do any git handling for apps that do not
have any new builds to run.

4e8e29794
948689281
a4e431080
e37be9b06
e775d330c
2021-03-17 13:44:24 +01:00
Hans-Christoph Steiner
5695993521 build: include useful successful build IDs in status JSON, closes #825 2021-03-11 18:52:31 +01:00
Hans-Christoph Steiner
8bb2c7d4b1 metadata: stop setting up source repo when running lint/rewritemeta
broken in 54e8867a7e
2021-03-09 17:55:07 +01:00
Hans-Christoph Steiner
a2f0356d84 build: include all wiki data in the JSON status output 2021-03-09 15:40:30 +01:00
relan
56b84251f6 build: set overall timeout to 72 hours
Some builds are pending for weeks now because of the global time limit.
Give them a chance to be built.
2021-03-08 11:41:30 +03:00
Hans-Christoph Steiner
63be6f6347 standardize naming in strings and comments on all caps APK 2021-01-29 15:40:59 +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
40cd51ed59 build: include commit ID in build log 2020-12-15 08:30:48 +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
Michael Pöhn
196dc75481 Merge branch 'yaml-config' into 'master'
move config.py to config.yml

See merge request fdroid/fdroidserver!571
2020-11-05 23:00:32 +00:00
mimi89999
5485869e3f
build: destroy vm after each build 2020-10-31 10:55:14 +01:00
Hans-Christoph Steiner
a9fdb5b401 init: switch to config.yml as the default format 2020-10-23 14:20:49 +02:00
Hans-Christoph Steiner
5e1377c77a standardize on "Application ID" in UI text 2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
08f724651e remove "force_build_tools" config option, closes #738
The `force_build_tools` config option was added a long time ago to
brute force the _build-tools_ version by trying to replace the value
in `build.gradle` files. This is never something that should be used
in production, since the app's build metadata should specify this kind
of thing. And now that we're moving towards _androguard_ for
everything except fdroid build and fdroid publish, _build-tools_ will
no longer even be used in the other commands.
2020-09-16 16:30:49 +02:00
Hans-Christoph Steiner
da31120b5a build: refactor missing srclibs error reporting for only .yml 2020-08-24 17:05:49 +02:00
Michael Pöhn
fd2cfb0c7d remove code for copying txt srclibs to buildserver 2020-08-20 20:40:15 +02:00
Hans-Christoph Steiner
d0f426e076
replace $$srclib$$ with an absolute path
closes #725
2020-06-24 22:40:26 +02:00
Marcus
f84818c15e scanner: add a simple scan for blacklisted classes after build step
add com.android.billing to blacklist, see
https://gitlab.com/fdroid/fdroiddata/-/issues/2070#note_360611289
2020-06-15 18:03:19 +00:00
Hans-Christoph Steiner
d7b3bca1e7 build: pass --verbose flag through to scanner 2020-06-10 19:42:23 +02:00
Hans-Christoph Steiner
6030445be0 logging.warn() was deprecated in Python 3.3, use logging.warning()
sed -i 's,logging\.warn(,logging.warning(,g' fdroid */*.*

https://docs.python.org/3.3/library/logging.html#logging.Logger.warning
2020-05-27 08:35:14 +02:00
relan
9ff77cfd1a build: clean buildSrc/build
The buildSrc directory contains custom build logic written in Kotlin.
Before this change we had to 'scandelete' buildSrc/build in the build
recipes becase 'gradle clean' leaves binary artifacts there.
2020-05-26 07:37:20 +00:00
relan
ddfbd1cc47 build: fix directories removal
The 'dirs' array contains a single-level listing of a directory, e. g.
['app', 'build', 'build.gradle', 'gradle', '.gradle']. Multi-component
paths like 'build/tmp' could never be found in this array and thus were
never removed.

Call shutil.rmtree() without checking that the argument is in 'dirs'. If
it exists and is a directory, it'll be removed. Otherwise shutil.rmtree()
will do nothing.
2020-05-26 07:37:20 +00:00
Michael Pöhn
911e86fc87 support copying yml srclibs to buildserver vm during builds 2020-04-16 11:32:37 +02:00
Hans-Christoph Steiner
b5bce9f178
build: do not write/rsync status JSON when running --on-server
!717 !716
2020-02-20 16:40:19 +01:00
Hans-Christoph Steiner
b6e6ce87cb
build: has no pretty option (closes #742) 2020-02-19 20:29:54 +01:00
Hans-Christoph Steiner
21f5bd73a7
build: fix logging failed builds to the status JSON (closes #741) 2020-02-19 20:29:51 +01:00
Hans-Christoph Steiner
c19ef45fd5
build: write status JSON 2020-02-19 14:50:32 +01:00
Marcus Hoffmann
9ae41cc1ff add support for gradle kotlin scripts
https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/
Closes fdroid/fdroidserver#613

cherry-picked from Bubu/fdroidserver@7d2e9f9c
2020-02-13 22:32:51 +01:00
Hans-Christoph Steiner
697a0641f1
fix sudo syntax from 7a1fa6e857
fdroid/fdroidserver!713
2020-02-11 19:44:18 +01:00
Hans-Christoph Steiner
7a1fa6e857 build: keep DEBIAN_FRONTEND env var when running sudo: script
closes #636
2020-02-05 20:36:25 +01:00
Marcus Hoffmann
8961485125 remove dscanner subcommand
It's unused and unmaintained. It could  potentially be revived as a
plugin at a later point.
2020-01-31 14:17:12 +01:00
Michael Pöhn
35e67295e9 Merge branch 'mvglasow-master-patch-68763' into 'master'
Clarify warning message about skipped sudo commands

See merge request fdroid/fdroidserver!608
2019-02-09 18:08:23 +00:00
Marcus Hoffmann
94c6b776fe build: log buildserver guest ram + cpu 2019-02-07 19:48:03 +01:00
Michael Pöhn
a787d123a2 fdroid build: hide --on-server cli flag 2019-01-29 11:23:45 +01:00
Michael von Glasow
f8f17a430d Reword warning message about sudo commands being skipped 2019-01-15 14:14:09 +00:00
Michael von Glasow
868516f3fd Clarify warning message about skipped sudo commands 2019-01-15 12:36:17 +00:00
Hans-Christoph Steiner
1f346b3149 force_exit() to make exit work with all fdroid build conditions
The build command has to use some threading stuff to handle the timeout and
locks.  This seems to prevent the command from exiting, unless this hack is
used.
2018-11-14 14:27:32 +01:00
Hans-Christoph Steiner
807bf3d26b build: reuse common methods for getting metadata from APKs
This splits out the code that gets the list of native ABIs supported, then
uses the standard methods for the rest.
2018-09-18 10:55:51 +02:00
Michael Pöhn
c005d8c5f4 more detailed error message and handling when fetching buildserverid in build.py 2018-09-13 11:11:18 +02:00
Hans-Christoph Steiner
b254472a99 Merge branch 'exclude-filter' into 'master'
build: replace exclude with filter during source tar creation

Closes #531

See merge request fdroid/fdroidserver!538
2018-09-05 12:39:23 +00:00