1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00
Commit Graph

2928 Commits

Author SHA1 Message Date
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
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
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
Hans-Christoph Steiner
1c7df94e76 purge unneeded 'build_tools' config option
Back when fdroidserver was built around aapt, that was needed to
guarantee that a compatible version of aapt was used. Now, aapt is
only optionally used for getting the APK ID, so this was just
complicating maintenance.
2020-11-29 10:06:39 +01:00
Hans-Christoph Steiner
1a736c2314 Merge branch 'versionCode_underscore' into 'master'
Support underscore (_) in versionCode

See merge request fdroid/fdroidserver!830
2020-11-27 10:30:44 +00:00
Jochen Sprickerhof
5c36f84430 Ignore non version number entries in build_tools_path 2020-11-26 23:31:20 +01:00
Jochen Sprickerhof
2cb0ff4578 Support underscore (_) in versionCode
Example:

https://github.com/ubergeek42/weechat-android/blob/v1.3.1/app/build.gradle.kts#L67
2020-11-26 21:03:51 +01:00
Hans-Christoph Steiner
d530733290 fix stacktrace crash when env vars are badly set in config.yml
This was trying to delete from a dict that was being iterated through.
Python doesn't like that!
2020-11-12 17:00:03 +01:00
Hans-Christoph Steiner
9442a9e614 do not assume app is an App instance, support API usage
When using fdroidserver methods as an API, the full setup might not
have taken place.  `app` instances can always just be a dict, the App
class is mostly just a typing shortcut.  This is incremental, it only
affects a couple of functions in fdroidserver/update.py.
2020-11-10 17:02:15 +01:00
Hans-Christoph Steiner
767573f2ec
init: fix init with Debian Android SDK packages
If the auto-detected SDK path passes test_sdk_exists(), then just use
it without prompting.

fixes !821
2020-11-10 10:20:43 +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
Michael Pöhn
9f11495934 Merge branch 'purge-aapt' into 'master'
purge aapt requirements and elevate apksigner

Closes #627

See merge request fdroid/fdroidserver!821
2020-11-04 15:18:40 +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
4bbbf35511 support both config.py and config.yml in common.write_to_config() 2020-10-23 14:18:55 +02:00
Hans-Christoph Steiner
2d115135f7 support env vars in config.yml: awsaccesskeyid: {env: AWS_KEY} 2020-10-23 14:18:55 +02:00
Hans-Christoph Steiner
d3d48dba5e add config.yml as default config file format
None of the config options in config.py require Python code.  YAML is a
common config data format, and it is also used for build metadata.  It is
also much safer to use since it can be pure data, without anything
executable in it.  This also reduces the attack surface of the fdroid
process by eliminating a guaranteed place to write to get code executed.
With config.py, any exploit that can get local write access can turn that
into execute access by writing to the config.py, then cleaning up after
itself once it has what it needs.  Switching to YAML removes that vector
entirely.

Also, this removes the config_file argument.  It is not used in either
fdroidserver or repomaker.  Also, it probably wouldn't work since so
much of the code assumes that the current working dir is the root of the
repo.
2020-10-23 14:18:55 +02:00
Hans-Christoph Steiner
fd41b70e27 purge common.use_androguard, it is now used by default
Up until now, the buildserver has not included androguard.  Since a
good version of androguard (v3.3.3+) is included in stretch-backports
and the buildserver is already setup to use stretch-backports, this
sets up the buildserver with androguard.

closes #627
2020-10-22 11:58:55 +02:00
Hans-Christoph Steiner
aa80662642 init: enable apksigner by default so v2/v3 APK signatures validate
Ultimately we want to get to using apksigner by default everywhere,
this gets us closer to that by setting up all new repos to use
apksigner by default in the config.py
2020-10-22 09:53:51 +02:00
Hans-Christoph Steiner
989159ef09 require build-tools that fully supports apksigner 2020-10-22 09:53:51 +02:00
Hans-Christoph Steiner
08931f4524 purge update.scan_apk_aapt()
androguard v3.3.3+ properly extracts the app name, so this adds the
names to the tests.
2020-10-22 09:53:51 +02:00
Hans-Christoph Steiner
8fd7dcd425 always use androguard version of common.get_apk_id() first
This removes the need for common.use_androguard()
2020-10-22 09:51:12 +02:00
Hans-Christoph Steiner
27b90a13bf remove aapt version of common.is_apk_and_debuggable() 2020-10-22 09:51:12 +02:00
Hans-Christoph Steiner
b5cd850abe apksigner search should use MINIMUM_APKSIGNER_BUILD_TOOLS_VERSION 2020-10-22 09:51:12 +02:00
Hans-Christoph Steiner
17f6a778ba deploy: move server.py to deploy.py and remove aliases
closes #832
2020-10-21 11:38:49 +02:00
Hans-Christoph Steiner
8daf273843 server: purge fdroid server init command, it is totally unneeded
The existing rsync command used to deploy via SSH will create all the dirs
that `fdroid server init` does.
2020-10-21 10:29:21 +02:00
Marcus Hoffmann
03b1adbe2b don't include .idsig files into the index
.idsig files contain an apksig v4 (https://source.android.com/security/apksigning/v4)
new versions of apksigner make this signature by default and it ends up
in /repo. Without this patch it would be included into the index as a
file to be downloaded by users. F-Droid Client crashes when it
encounters such an apk entry.

It's fine to have these signature files in the repo though, maybe
fdroidclient can make use of them at some point in the future (they are
intended to support streaming app installations).
2020-10-16 22:50:29 +02:00
Michael Pöhn
e63eb7cd2f Merge branch '2.0-deprecations' into 'master'
2.0 deprecations in `fdroid update`

See merge request fdroid/fdroidserver!813
2020-10-14 13:14:49 +00:00
Izzy
261a5cca44
add framagit.org to known git repo locations 2020-10-13 17:07:37 +02:00
Michael Pöhn
daadcdd12a log vm status when vagrant up fails 2020-10-08 16:37:25 +02:00
Hans-Christoph Steiner
ae3c9c0552 change make_current_version_link to default to False
This is semi-broken and barely used, it should be off by default for 2.0.
2020-10-08 08:10:36 +02:00
Hans-Christoph Steiner
00c2cc969a update: deprecate --wiki option, the wiki is going away 2020-10-08 08:10:36 +02:00
Hans-Christoph Steiner
75cdb1fd97 update: remove -b / --buildreport which has done nothing since 2013
The functionality was removed in 48296df5b0
2020-10-08 08:10:36 +02:00
Hans-Christoph Steiner
602cf30c1e update: fix bug where only last appid was added to antiFeatures status
appid will never be present in `antiFeatures[af]`, so the entry was being
reinitalized each time.
2020-10-07 18:57:59 +02:00
Hans-Christoph Steiner
05cd8c6810 scanner: expose "usual suspects" patterns for use in an API 2020-10-07 18:56:17 +02:00
Hans-Christoph Steiner
3c64996089 update: test if options is instantated before using attributes
This makes it possible to use process_apks(), get_cache(), and anything
calling disabled_algorithms_allowed() as an API without having to set
options up beforehand.
2020-10-07 18:56:17 +02:00
Hans-Christoph Steiner
790b5a2888 update: use "app" as dict not App instance in apply_info_from_latest_apk
This allows update.apply_info_from_latest_apk() to be used as part of the
API.  This way "app" can be a dict or an App instance.
2020-10-07 18:56:17 +02:00
Hans-Christoph Steiner
283f10dec1 index: generate repo icon if missing, and add tests 2020-10-07 18:56:17 +02:00
Hans-Christoph Steiner
7adba093e4 Merge branch 'keytool_smartcardoptions' into 'master'
fix keytool not working with default smartcardoptions

See merge request fdroid/fdroidserver!812
2020-10-07 16:53:49 +00:00
Marcus Hoffmann
0d5fde334d fix keytool not working with default smartcardoptions
This broke in 74af61f255.
Keytool has still a different opinion from both apksigner and jarsigner
about the providerName argument. apksigner doesn't support it at all,
jarsigner ignores it but keytool fails without it. :-/

So we add it back to the default argument list but filter it out before
calling apksigner.
2020-10-07 16:12:21 +02:00
Hans-Christoph Steiner
fede58a710 use ArgumentParser's own "usage" line in help output 2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
b23cf9f8ad use YAML names for referring to metadata fields in messages 2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
5e1377c77a standardize on "Application ID" in UI text 2020-10-01 23:01:55 +02:00
akwizgran
896ffed703 Use jarsigner to verify reproducible APKs 2020-09-29 12:18:56 +00:00
Michael Pöhn
1baa5fd895 Merge branch 'signing-2.0-fixes-with-build-tweaks' into 'master'
Signing 2.0 fixes with build tweaks

See merge request fdroid/fdroidserver!801
2020-09-23 15:03:30 +00:00
Hans-Christoph Steiner
d6d5ad6b7c Merge branch 'public-api' into 'master'
expose public api in fdroidserver module

Closes #831

See merge request fdroid/fdroidserver!798
2020-09-23 14:57:47 +00:00
Hans-Christoph Steiner
29965a1598 Merge branch 'metadata-refactoring' into 'master'
refactor metadata.warn_or_exception to private func

See merge request fdroid/fdroidserver!796
2020-09-23 14:57:28 +00:00
Hans-Christoph Steiner
8c1cf724e1 init: force keystore to PKCS12 format
Java 8 supports PKCS12, Java 9+ uses PKCS12 by default, which should have
a .p12 file extension.  `fdroid init` has always just added .jks which is
the old default format.

* https://docs.oracle.com/en/java/javase/12/tools/keytool.html#GUID-5990A2E4-78E3-47B7-AE75-6D1826259549__GUID-A8B9E662-C1C2-4A0E-9307-A8464F0E95D4
* https://openjdk.java.net/jeps/229
2020-09-23 16:40:37 +02:00