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

8596 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
6cadefbe4e Merge branch 'patch-1' into 'master'
docs: remove one-line requirement for links

See merge request !188
2016-11-24 08:38:04 +00:00
Boris Kraut
d07b88d9f1 docs: remove one-line requirement for links 2016-11-24 07:30:03 +00:00
Hans-Christoph Steiner
28ea33b8d1 if building directly in git repo, use file path for remote
When a git repo has a .fdroid.yml file in it, and `fdroid build` is run
directly in that git repo, then this uses the file path as the remote for
the git repo in build/appid that is actually built.  That makes it possible
to run builds of commits that are only local, and makes things a whole lot
faster.
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
c41daf1e7e ignore files created by tests 2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
a4e4310803 allow metadata to be embedded in source repos via .fdroid.yml
This allows a source repo to include a complete metadata file so that it
can be built directly in place using `fdroid build`.  If that app is then
included in fdroiddata, it will first load the source repo type and URL
from fdroiddata, then read .fdroid.yml if it exists, then include the rest
of the metadata as specified in fdroiddata, so that fdroiddata has
precedence over the metadata in the source code.

This lets `fdroid build` apps without having a whole fdroiddata setup, but
instead just directly in place in the source code.  This also lets devs
optionallu maintain the fdroid metadata as part of their app, rather than
in fdroiddata without loosing any control.  This should make it easier to
spread around the maintenance load.
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
b4a39ee272 switch import test to custom, small test app
The test project should be moved to https://gitlab.com/fdroid/ci-test-app
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
f8dca60a20 convert comments above functions to python docstrings
This is how to write per-function comments.
https://www.python.org/dev/peps/pep-0257/
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
1f55a40caa properly parse build metadata list types like gradle=
Something like `gradle: yes` in YAML will be parsed as a boolean, since
'yes' is officially defined as a boolean true in YAML.  For metadata fields
that need to be lists, this needs to be converted.  Same goes for a single
string like `gradle: customFlavor`.
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
3fb4cba178 include version, commit, and android tools versions in local log
This includes more info to help track down problems with reproducible
builds, like the specific version being built, and which exact versions of
the Android SDK and NDK were used.
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
ad2b9b99c2 log versions of all installed Android SDK/NDK components
Any variation in the Android tools used to build an APK can cause the build
to be unreproducible.  To help troubleshoot these times, this posts the
installed versions of the Android SDK and NDK components to the lastbuild
log, for the long term record.

refs #148
2016-11-16 23:28:03 +01:00
Hans-Christoph Steiner
2237b6f7d3 Merge branch 'makebs' into 'master'
makebs updates

See merge request !185
2016-11-16 21:09:17 +00:00
Daniel Martí
8cdf1b0223 makebs: add gradle 3.2 2016-11-15 21:07:35 +00:00
Daniel Martí
483338843f makebs: update to support repo r40 2016-11-15 20:56:04 +00:00
Daniel Martí
82b1d7ad14 all: make newer pycodestyle happy
Apparently the "two empty lines" rule is now stricter.
2016-11-15 20:55:06 +00:00
Daniel Martí
8ee13a47e4 Merge branch 'node' into 'master'
buildserver: install nodejs

Install nodejs to allow webapps to be build (in the future...). 


Ref: https://gitlab.com/fdroid/fdroidserver/issues/60

See merge request !183
2016-11-08 21:33:38 +00:00
Boris Kraut
c788774d85 buildserver: install nodejs 2016-11-07 22:54:47 +01:00
Daniel Martí
ffb6c97deb Merge branch 'build-FPE-update-zip' into 'master'
Build Privileged Extension OTA update.zip using `fdroid build`

This allows `fdroid build` to build the OTA update ZIP file for F-Droid Privileged Extension, so that the official releases can be built and distributed via the normal F-Droid channels.   This is related to #233 

Ultimately the client will also have to be updated to allow it to handle the non-APK files.

See merge request !181
2016-11-07 15:11:14 +00:00
Hans-Christoph Steiner
fb0c824d3c wp-fdroid: show GPG Signature link for source tarballs
Now that source tarballs can be GPG-signed, the website should also display
a link to fetch them.
2016-11-07 14:53:01 +01:00
Hans-Christoph Steiner
56d51fcd6b gpg-sign all valid files in the repo, including source tarballs
This makes sure there is a GPG signature on any file that is included in
the repo, including APKs, OBB, source tarballs, media files, OTA update
ZIPs, etc.  Having a GPG signature is more important on non-APK files since
they mostly do not have any signature mechanism of their own.

This also adds basic tests of adding non-APK/OBB files to a repo with
`fdroid update`.

closes #232
2016-11-07 14:53:01 +01:00
Hans-Christoph Steiner
84e09cd2a2 allow arbitrary build products, not only APKs
This makes it so that the final build product can be specified in output=
and it'll work no matter if its an APK or not.  This was developed around
the case of building the OTA update.zip for the Privileged Extension. It
should work for any build process in theory but it has not yet been tested.

https://gitlab.com/fdroid/privileged-extension/issues/9
2016-11-07 14:53:01 +01:00
Hans-Christoph Steiner
8ecff5bd61 get_release_filename() to handle any file type, not just APKs
In order to support non-APK files that are built by `fdroid build`, this
function that names the file releases needs to be generic.
2016-11-03 08:07:11 +01:00
Hans-Christoph Steiner
ab8d51012d use versionName unmodified as specified
The versionName is defined as a string or string resource that can be any
arbitrary data.  fdroid should not second guess the developer here, and
should just use the versionName unmodified.  For anything that needs to
compare different versions of apps, versionCode should always be used since
that's what Android uses.

https://developer.android.com/guide/topics/manifest/manifest-element.html#vname
2016-11-03 08:07:11 +01:00
Hans-Christoph Steiner
a8a1333b80 update buildserver scripts in sdist tarball manifest
This was overlooked in previous work on ./makebuildserver
2016-11-03 08:07:11 +01:00
Daniel Martí
7dde16dd11 Merge branch 'support-media-files' into 'master'
Support media files

This is the first step in supporting adding artibitrary files to fdroid repos, targeted add supporting media files and flashable _update.zip_ files like used to install the Privileged Extension.  This reuses the existing metadata fields to keep compatibilty with older versions, but that means that lots of names are confusingly named since they refer to aspects of an APK rather than a generic file.  We can address that later when we refactor the whole index metadata.

See merge request !177
2016-11-02 21:11:05 +00:00
Hans-Christoph Steiner
7d0bd345d1 Merge branch 'master' into 'master'
Scanner: handle utf8 errors more gracefully

Don't throw an error without any info which file caused it.

Fixes #226

See merge request !180
2016-11-02 17:18:02 +00:00
Hans-Christoph Steiner
8e45d30020 reuse os.stat() result when checking for non-APK files
This should make things a bit more efficient when running on lots of files,
unless python was already caching the result...
2016-11-02 18:10:13 +01:00
Hans-Christoph Steiner
07ce948809 support adding arbitrary files to a repo
This adds the most basic level of support for including arbitrary files in
an F-Droid repository.  This is useful for things like including videos,
ebooks, update.zip files for ROM updates, and more.  The aim is to have
this as generic as possible to keep it flexible for unforeseen uses.

Code-wise, this is really just a first effort.  This area of code has not
been touched in a very long time, and the repo parsing is done in a giant
function that is not easy to break apart.  It should be broken up to more
cleanly support arbitrary files.

Also remove the TODO line, we've decided to keep the old permission
format for now, at least until there is a major overhaul of the index
data format.  And the issue tracker the proper place for TODOs.
2016-11-02 18:10:13 +01:00
Hans-Christoph Steiner
36a585c2fc create addElementIfInApk() function for clean up common operation
There are currently a couple different ways this is done in the code, this
commit changes all of them to be like addElementNonEmpty().
2016-11-02 18:10:13 +01:00
est31
af22f18296 Scanner: handle utf8 errors more gracefully
Fixes #226
2016-11-02 16:58:59 +01:00
Hans-Christoph Steiner
47d9fd330d remove unused 'apps' argument from update.scan_apks() 2016-11-02 16:11:52 +01:00
Hans-Christoph Steiner
5faef55d67 support all valid versionCode values, i.e. Java Integer values
versionCode can be any Java Integer value, from Integer.MAX_VALUE
(2147483648) to Integer.MIN_VALUE (-2147483647)
2016-11-02 16:11:46 +01:00
Hans-Christoph Steiner
f90adcc912 Merge branch 'texinfo' into 'master'
CI: use new docker image with texinfo

docs/gendocs.sh uses makeinfo.

See merge request !179
2016-10-31 17:51:16 +00:00
Daniel Martí
2e96fc1cd9 CI: use new docker image with texinfo
docs/gendocs.sh uses makeinfo.
2016-10-31 14:02:39 +00:00
Daniel Martí
559f38cd21 Merge branch 'updates' into 'master'
makebs and CI updates

See merge request !178
2016-10-25 11:06:47 +00:00
Daniel Martí
148f077ad8 Bump ci images and default build-tools 2016-10-23 17:04:58 +01:00
Daniel Martí
98b7538789 makebs: bump m2repo, add api25 and build-tools 25 2016-10-23 16:47:19 +01:00
Ciaran Gultnieks
aa4aa45703 Merge branch 'build-tools' into 'master'
makebs: add build-tools 24.0.3



See merge request !175
2016-10-05 18:09:46 +00:00
Ciaran Gultnieks
749c04c66a Merge branch 'fixes-on-the-way-to-kvm' into 'master'
buildserver fixes on the way to KVM

Here are a couple of relatively basic fixes I found while working on the KVM support (merge request coming soon).

See merge request !174
2016-10-05 18:09:18 +00:00
Daniel Martí
b34cef8776 makebs: add build-tools 24.0.3 2016-10-03 09:10:41 +01:00
Hans-Christoph Steiner
764b99acd6 buildserver: only auto-detect KVM in ./makebuildserver
Having a second, different KVM auto-detect routine in Vagrantfile will only
confuse things.  This also removes the direct call to the systemd utility.
2016-09-28 10:16:30 +02:00
Hans-Christoph Steiner
1b09ab5a79 buildserver: run dir check as very first thing
No point in running any other code if the script is just going to bail
out with an error.  This assumes that ./makebuildserver is only ever
run from a git clone of fdroidserver.git.
2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
a3d32c65a4 buildserver: use py3's pathlib to generate cache file URL
This should handle edge cases better, like odd characters in the path, etc.
2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
97be5a1d00 jenkins-build-makebuildserver: remove errant blank line 2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
84500b0049 Merge branch 'master' into 'master'
Add qt sdk support

Qt SDK extraction on the VM

See merge request !172
2016-09-27 12:54:02 +00:00
est31
91c5fb567a Add qt sdk support 2016-09-27 14:36:12 +02:00
Ciaran Gultnieks
d3a215c12b Merge branch 'checkupdates-crash' into 'master'
checkupdates: avoid crash with --auto and None CVC

As reported by @CiaranG.

See merge request !173
2016-09-26 21:46:16 +00:00
Daniel Martí
bcd31401ac checkupdates: avoid crash with --auto and None CVC
Reproducible via `fdroid checkupdates --auto subreddit.android.appstore`
at fdroiddata HEAD (e76449ab).

WARNING: ...subreddit.android.appstore : Couldn't find package ID
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/home/mvdan/.bin/fdroid", line 147, in <module>
    main()
  File "/home/mvdan/.bin/fdroid", line 124, in main
    mod.main()
  File "/home/mvdan/git/fsr/fdroidserver/checkupdates.py", line 571, in main
    checkupdates_app(app)
  File "/home/mvdan/git/fsr/fdroidserver/checkupdates.py", line 469, in checkupdates_app
    if int(build.vercode) >= int(app.CurrentVersionCode):
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2016-09-26 21:07:55 +01:00
Ciaran Gultnieks
7cbdaedf2e Merge branch 'fix-post-kvm' into 'master'
Fix post KVM

A couple of fixes to the KVM support that was just merged, as reported by @CiaranG

See merge request !171
2016-09-23 16:33:52 +00:00
Hans-Christoph Steiner
1001e5e9b9 buildserver: bochs can also be used with KVM
jenkins.debian.net is being detected as 'bochs' rather than 'qemu'.
2016-09-23 17:41:41 +02:00
Hans-Christoph Steiner
1e8fd01c1e buildserver: only check cache permissions when using libvirt
VirtualBox runs as the same user as `fdroid`, so the cache does not need to
be accessible by the world.  On libvirt, libvirtd runs the VMs as its own
user, so in that case, the cache dirs must have permissions to let that
user access them.
2016-09-23 15:20:05 +02:00