config.py 13.5 KB
Newer Older
Daniel Martí's avatar
Daniel Martí committed
1
#!/usr/bin/env python3
2

3 4
# Copy this file to config.py, then amend the settings below according to
# your system configuration.
Ciaran Gultnieks's avatar
Ciaran Gultnieks committed
5

6
# Custom path to the Android SDK, defaults to $ANDROID_HOME
Daniel Martí's avatar
Daniel Martí committed
7
# sdk_path = "$ANDROID_HOME"
8

Boris Kraut's avatar
Boris Kraut committed
9
# Custom paths to various versions of the Android NDK, defaults to 'r12b' set
10 11
# to $ANDROID_NDK. Most users will have the latest at $ANDROID_NDK, which is
# used by default. If a version is missing or assigned to None, it is assumed
12 13
# not installed.
# ndk_paths = {
Daniel Martí's avatar
Daniel Martí committed
14
#     'r10e': None,
Boris Kraut's avatar
Boris Kraut committed
15
#     'r11c': None,
Daniel Martí's avatar
Daniel Martí committed
16
#     'r12b': "$ANDROID_NDK",
est's avatar
est committed
17
#     'r13b': None,
18
#     'r14b': None,
19
#     'r15c': None,
20
#     'r16b': None,
21
#     'r17c': None,
Licaon_Kter's avatar
Licaon_Kter committed
22
#     'r18b': None,
23
#     'r19c': None,
Licaon_Kter's avatar
Licaon_Kter committed
24
#     'r20b': None,
25
# }
26

Marcus's avatar
Marcus committed
27 28 29 30
# Directory to store downloaded tools in (i.e. gradle versions)
# By default, these are stored in ~/.cache/fdroidserver
# cachedir = cache

31
# java_paths = {
Gio's avatar
Gio committed
32
#     '8': "/usr/lib/jvm/java-8-openjdk",
33 34
# }

35
# Build tools version to be used
36
# build_tools = "28.0.3"
37

38 39 40 41
# Force all build to use the above version of build -tools, good for testing
# builds without having all of the possible build-tools installed.
# force_build_tools = True

42
# Command or path to binary for running Ant
43
# ant = "ant"
44

45
# Command or path to binary for running maven 3
46
# mvn3 = "mvn"
Daniel Martí's avatar
Daniel Martí committed
47

48
# Command or path to binary for running Gradle
Marcus's avatar
Marcus committed
49
# Defaults to using an internal gradle wrapper (gradlew-fdroid).
50
# gradle = "gradle"
51

52 53 54 55 56
# Set the maximum age (in days) of an index that a client should accept from
# this repo. Setting it to 0 or not setting it at all disables this
# functionality. If you do set this to a non-zero value, you need to ensure
# that your index is updated much more frequently than the specified interval.
# The same policy is applied to the archive repo, if there is one.
57
# repo_maxage = 0
58

59
repo_url = "https://MyFirstFDroidRepo.org/fdroid/repo"
60
repo_name = "My First F-Droid Repo Demo"
Ciaran Gultnieks's avatar
Ciaran Gultnieks committed
61
repo_icon = "fdroid-icon.png"
62
repo_description = """
63
This is a repository of apps to be used with F-Droid. Applications in this
64 65 66 67
repository are either official binaries built by the original application
developers, or are binaries built from source by the admin of f-droid.org
using the tools on https://gitlab.com/u/fdroid.
"""
Ciaran Gultnieks's avatar
Ciaran Gultnieks committed
68

69 70 71 72 73 74
# As above, but for the archive repo.
# archive_older sets the number of versions kept in the main repo, with all
# older ones going to the archive. Set it to 0, and there will be no archive
# repository, and no need to define the other archive_ values.
archive_older = 3
archive_url = "https://f-droid.org/archive"
75
archive_name = "My First F-Droid Archive Demo"
76
archive_icon = "fdroid-icon.png"
77 78 79
archive_description = """
The repository of older versions of applications from the main demo repository.
"""
80

81 82 83 84 85 86 87 88 89
# This allows a specific kind of insecure APK to be included in the
# 'repo' section.  Since April 2017, APK signatures that use MD5 are
# no longer considered valid, jarsigner and apksigner will return an
# error when verifying.  `fdroid update` will move APKs with these
# disabled signatures to the archive.  This option stops that
# behavior, and lets those APKs stay part of 'repo'.
#
# allow_disabled_algorithms = True

90
# Normally, all apps are collected into a single app repository, like on
91 92
# https://f-droid.org. For certain situations, it is better to make a repo
# that is made up of APKs only from a single app. For example, an automated
93 94 95
# build server that publishes nightly builds.
# per_app_repos = True

96
# `fdroid update` will create a link to the current version of a given app.
97
# This provides a static path to the current APK. To disable the creation of
98 99 100 101
# this link, uncomment this:
# make_current_version_link = False

# By default, the "current version" link will be based on the "Name" of the
102
# app from the metadata. You can change it to use a different field from the
103
# metadata here:
104
# current_version_name_source = 'packageName'
105

106
# Optionally, override home directory for gpg
107
# gpghome = '/home/fdroid/somewhere/else/.gnupg'
108

109
# The ID of a GPG key for making detached signatures for apks. Optional.
Daniel Martí's avatar
Daniel Martí committed
110
# gpgkey = '1DBA2E89'
111

112
# The key (from the keystore defined below) to be used for signing the
113 114
# repository itself. This is the same name you would give to keytool or
# jarsigner using -alias. (Not needed in an unsigned repository).
Daniel Martí's avatar
Daniel Martí committed
115
# repo_keyalias = "fdroidrepo"
116

117 118 119 120 121 122 123
# Optionally, the public key for the key defined by repo_keyalias above can
# be specified here. There is no need to do this, as the public key can and
# will be retrieved from the keystore when needed. However, specifying it
# manually can allow some processing to take place without access to the
# keystore.
# repo_pubkey = "..."

124 125 126
# The keystore to use for release keys when building. This needs to be
# somewhere safe and secure, and backed up!  The best way to manage these
# sensitive keys is to use a "smartcard" (aka Hardware Security Module). To
127
# configure F-Droid to use a smartcard, set the keystore file using the keyword
128
# "NONE" (i.e. keystore = "NONE"). That makes Java find the keystore on the
129
# smartcard based on 'smartcardoptions' below.
Daniel Martí's avatar
Daniel Martí committed
130
# keystore = "~/.local/share/fdroidserver/keystore.jks"
131 132 133

# You should not need to change these at all, unless you have a very
# customized setup for using smartcards in Java with keytool/jarsigner
Daniel Martí's avatar
Daniel Martí committed
134
# smartcardoptions = "-storetype PKCS11 -providerName SunPKCS11-OpenSC \
135 136
#    -providerClass sun.security.pkcs11.SunPKCS11 \
#    -providerArg opensc-fdroid.cfg"
137

138
# The password for the keystore (at least 6 characters). If this password is
139
# different than the keypass below, it can be OK to store the password in this
140
# file for real use. But in general, sensitive passwords should not be stored
141
# in text files!
Daniel Martí's avatar
Daniel Martí committed
142
# keystorepass = "password1"
143 144

# The password for keys - the same is used for each auto-generated key as well
145
# as for the repository key. You should not normally store this password in a
146
# file since it is a sensitive password.
Daniel Martí's avatar
Daniel Martí committed
147
# keypass = "password2"
148

Daniel Martí's avatar
Daniel Martí committed
149
# The distinguished name used for all keys.
150
# keydname = "CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=California, C=US"
151

Daniel Martí's avatar
Daniel Martí committed
152 153
# Use this to override the auto-generated key aliases with specific ones
# for particular applications. Normally, just leave it empty.
154 155
# keyaliases = {}
# keyaliases['com.example.app'] = 'example'
Daniel Martí's avatar
Daniel Martí committed
156 157
# You can also force an app to use the same key alias as another one, using
# the @ prefix.
158
# keyaliases['com.example.another.plugin'] = '@com.example.another'
159

160

161
# The full path to the root of the repository. It must be specified in
162
# rsync/ssh format for a remote host/path. This is used for syncing a locally
163
# generated repo to the server that is it hosted on. It must end in the
164
# standard public repo name of "/fdroid", but can be in up to three levels of
165
# sub-directories (i.e. /var/www/packagerepos/fdroid). You can include
166 167
# multiple servers to sync to by wrapping the whole thing in {} or [], and
# including the serverwebroot strings in a comma-separated list.
168
#
Daniel Martí's avatar
Daniel Martí committed
169
# serverwebroot = '[email protected]:/var/www/fdroid'
170 171 172 173
# serverwebroot = {
#     'foo.com:/usr/share/nginx/www/fdroid',
#     'bar.info:/var/www/fdroid',
#     }
174

175 176
# Uncomment this option if you want to logs of builds and other processes to
# your repository server(s). Logs get published to all servers configured in
177 178
# 'serverwebroot'. The name scheme is: .../repo/$APPID_$VERCODE.log.gz
# Only logs from build-jobs running inside a buildserver VM are supported.
179
#
180
# deploy_process_logs = True
181

TheZ3ro's avatar
TheZ3ro committed
182 183 184 185 186 187 188 189 190 191 192
# The full URL to a git remote repository. You can include
# multiple servers to mirror to by wrapping the whole thing in {} or [], and
# including the servergitmirrors strings in a comma-separated list.
# Servers listed here will also be automatically inserted in the mirrors list.
#
# servergitmirrors = 'https://github.com/user/repo'
# servergitmirrors = {
#     'https://github.com/user/repo',
#     'https://gitlab.com/user/repo',
#     }

193
# Any mirrors of this repo, for example all of the servers declared in
TheZ3ro's avatar
TheZ3ro committed
194 195
# serverwebroot and all the servers declared in servergitmirrors,
# will automatically be used by the client.  If one
196 197 198 199 200 201
# mirror is not working, then the client will try another.  If the
# client has Tor enabled, then the client will prefer mirrors with
# .onion addresses. This base URL will be used for both the main repo
# and the archive, if it is enabled.  So these URLs should end in the
# 'fdroid' base of the F-Droid part of the web server like serverwebroot.
#
202
# mirrors = (
203 204
#     'https://foo.bar/fdroid',
#     'http://foobarfoobarfoobar.onion/fdroid',
205
# )
206

207
# optionally specify which identity file to use when using rsync or git over SSH
208
#
209 210
# identity_file = '~/.ssh/fdroid_id_rsa'

211 212 213

# If you are running the repo signing process on a completely offline machine,
# which provides the best security, then you can specify a folder to sync the
214 215 216
# repo to when running `fdroid server update`. This is most likely going to
# be a USB thumb drive, SD Card, or some other kind of removable media. Make
# sure it is mounted before running `fdroid server update`. Using the
217 218 219 220 221 222
# standard folder called 'fdroid' as the specified folder is recommended, like
# with serverwebroot.
#
# local_copy_dir = '/media/MyUSBThumbDrive/fdroid'


223 224
# If you are using local_copy_dir on an offline build/signing server, once the
# thumb drive has been plugged into the online machine, it will need to be
225
# synced to the copy on the online machine. To make that happen
226 227 228 229 230
# automatically, set sync_from_local_copy_dir to True:
#
# sync_from_local_copy_dir = True


231 232 233 234 235 236
# To upload the repo to an Amazon S3 bucket using `fdroid server
# update`.  Warning, this deletes and recreates the whole fdroid/
# directory each time. This prefers s3cmd, but can also use
# apache-libcloud.  To customize how s3cmd interacts with the cloud
# provider, create a 's3cfg' file next to this file (config.py), and
# those settings will be used instead of any 'aws' variable below.
237
#
Daniel Martí's avatar
Daniel Martí committed
238 239 240
# awsbucket = 'myawsfdroid'
# awsaccesskeyid = 'SEE0CHAITHEIMAUR2USA'
# awssecretkey = 'yourverysecretkeywordpassphraserighthere'
241

242

243 244 245 246
# If you want to force 'fdroid server' to use a non-standard serverwebroot.
# This will allow you to have 'serverwebroot' entries which do not end in
# '/fdroid'. (Please note that some client features expect repository URLs
# to end in '/fdroid/repo'.)
247
#
Daniel Martí's avatar
Daniel Martí committed
248
# nonstandardwebroot = False
249

250

251 252
# If you want to upload the release apk file to androidobservatory.org
#
253
# androidobservatory = False
254 255


TheZ3ro's avatar
TheZ3ro committed
256 257 258 259 260 261
# If you want to upload the release apk file to virustotal.com
# You have to enter your profile apikey to enable the upload.
#
# virustotal_apikey = "virustotal_apikey"


262 263 264 265 266 267
# The build logs can be posted to a mediawiki instance, like on f-droid.org.
# wiki_protocol = "http"
# wiki_server = "server"
# wiki_path = "/wiki/"
# wiki_user = "login"
# wiki_password = "1234"
Ciaran Gultnieks's avatar
Ciaran Gultnieks committed
268

269 270 271 272 273 274 275
# Keep a log of all generated index files in a git repo to provide a
# "binary transparency" log for anyone to check the history of the
# binaries that are published.  This is in the form of a "git remote",
# which this machine where `fdroid update` is run has already been
# configured to allow push access (e.g. ssh key, username/password, etc)
# binary_transparency_remote = "[email protected]:fdroid/binary-transparency-log.git"

Daniel Martí's avatar
Daniel Martí committed
276 277
# Only set this to true when running a repository where you want to generate
# stats, and only then on the master build servers, not a development
278 279
# machine. If you want to keep the "added" and "last updated" dates for each
# app and APK in your repo, then you should enable this.
280
# update_stats = True
281

282 283
# When used with stats, this is a list of IP addresses that are ignored for
# calculation purposes.
284
# stats_ignore = []
285

286
# Server stats logs are retrieved from. Required when update_stats is True.
287
# stats_server = "example.com"
288 289

# User stats logs are retrieved from. Required when update_stats is True.
290
# stats_user = "bob"
291

Daniel Martí's avatar
Daniel Martí committed
292
# Use the following to push stats to a Carbon instance:
293 294 295
# stats_to_carbon = False
# carbon_host = '0.0.0.0'
# carbon_port = 2003
296

Daniel Martí's avatar
Daniel Martí committed
297 298
# Set this to true to always use a build server. This saves specifying the
# --server option on dedicated secure build server hosts.
299
# build_server_always = True
300

301
# By default, fdroid will use YAML .yml and the custom .txt metadata formats. It
302
# is also possible to have metadata in JSON by adding 'json'.
303
# accepted_formats = ('txt', 'yml')
304

305 306
# Limit in number of characters that fields can take up
# Only the fields listed here are supported, defaults shown
307
# char_limits = {
308 309 310 311 312 313
#     'author': 256,
#     'name': 30,
#     'summary': 80,
#     'description': 4000,
#     'video': 256,
#     'whatsNew': 500,
314
# }
315 316

# It is possible for the server operator to specify lists of apps that
317 318 319
# must be installed or uninstalled on the client (aka "push installs).
# If the user has opted in, or the device is already setup to respond
# to these requests, then F-Droid will automatically install/uninstall
320 321 322
# the packageNames listed.  This is protected by the same signing key
# as the app index metadata.
#
323
# install_list = (
324 325 326
#     'at.bitfire.davdroid',
#     'com.fsck.k9',
#     'us.replicant',
327
# )
328
#
329
# uninstall_list = (
330 331
#     'com.facebook.orca',
#     'com.android.vending',
332
# )
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349

# `fdroid lint` checks licenses in metadata against a built white list.  By
# default we will require license metadata to be present and only allow
# licenses approved either by FSF or OSI.  We're using the standardized SPDX
# license IDs.  (https://spdx.org/licenses/)
#
# We use `python3 -m spdx-license-list print --filter-fsf-or-osi` for
# generating our default list.  (https://pypi.org/project/spdx-license-list)
#
# You can override our default list of allowed licenes by setting this option.
# Just supply a custom list of licene names you would like to allow. Setting
# this to `None` disables this lint check.
#
# lint_licenses = (
#     'Custom-License-A',
#     'Another-License',
# )