Commit Graph

28 Commits

Author SHA1 Message Date
Martchus 9acd10fa4c Catch `boost::exception`s 2022-03-05 12:34:05 +01:00
Martchus 79123e4cd9 Improve error handling of server
* Return with non-zero exit code when an exception occurred
* Handle exceptions when terminating the service
2022-03-01 00:39:50 +01:00
Martchus 67fa8def0b Name additional threads 2022-02-25 23:09:46 +01:00
Martchus 90ff9678fe Limit results returned by the API for better scalability 2022-02-25 00:29:43 +01:00
Martchus 8ea2f5fd62 Reintroduce cache file as it is still required for "lastUpdate" for DBs
Maybe it makes more sense to use LMDB for this as well. On the other hand
it is an easy way of keeping the remaining state persistent.
2022-02-20 20:17:42 +01:00
Martchus 8949b5f3c1 Fix resetting running build actions on server startup 2022-02-16 19:17:29 +01:00
Martchus 557fd1a738 lmdb: Use lmdb to store build actions 2022-02-13 21:04:54 +01:00
Martchus 45922b47ec lmdb: Allow configuring cache limit 2022-01-26 00:41:53 +01:00
Martchus 218dfecf56 Avoid loading databases when modification date is <= last update
* Do HTTP head request first when loading database from mirror to avoid
  downloading the full database all the time
* Use the last modification date of the local database file because with
  the persistent storage even local database reloads became a bit expensive
2022-01-25 00:13:10 +01:00
Martchus 300f74fb10 lmdb: Open LMDB file after restoring cache so DBs added from cache have the storage initialized 2022-01-25 00:01:59 +01:00
Martchus 1c820fc2f6 lmdb: Fix storage initialization when config file cannot be loaded 2022-01-23 19:47:50 +01:00
Martchus f088e54c61 lmdb: Use package cache when querying packages for dependencies
* Use package cache when querying packages for dependencies or library
  names
* Avoid manual instantiations of `std::shared_ptr<Package>`
2022-01-21 20:35:43 +01:00
Martchus 2ffa6629c8 lmdb: Use lmdb to store packages and dependency indices 2022-01-18 21:50:53 +01:00
Martchus 95ae827c74 Fix applying relative working directory multiple times 2021-07-31 14:55:49 +02:00
Martchus f3ec908bcc Hold lock for named lock table not while acquiring named lock
Otherwise all other attempts to acquire named locks are blocked. It should
be ok because references are not invalidated when inserting/accessing
elements of an `std::unique_map`. When cleaning locks up elements are
erased, though. Hence an additional cleanup lock is required to prevent
acquiring a named lock which has already been cleaned up.
2021-07-25 00:40:39 +02:00
Martchus bc8a0549b2 Log package download limit 2021-07-14 15:27:49 +02:00
Martchus c05a581322 Increase the max. download size for packages and allow configuring it 2021-07-12 15:00:43 +02:00
Martchus 49aebdd8a5 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:59:57 +02:00
Martchus 7f0ec081c6 Allow specifying build tasks with more complicated build actions
The new data structures (e.g. concurrent flag) aren't actually used yet.
2021-04-02 00:14:00 +02:00
Martchus fa969270c1 Fix warnings 2021-03-22 15:08:41 +01:00
Martchus 1c75e8f957 Allow signing packages manually after the build
Simply adding `--sign` to the `makepkg` flags doesn't work because it would
require setting up GPG within the chroot environment (of `makechrootpkg`).

When debugging it is anyways annoying that `makepkg` sends the `gpg` output
to `/dev/null`. This way the logs are preserved.
2021-03-14 21:53:51 +01:00
Martchus 4416922397 Fix clearing locks 2021-03-02 18:30:15 +01:00
Martchus 0760860c6d Log lock acquisitions/releases 2021-02-25 22:12:56 +01:00
Martchus b7f27cb0a0 Use locks to prevent multiple actions accessing the same db files and chroot dirs 2021-02-22 23:44:06 +01:00
Martchus bc993f1d78 Add locking system so build actions can acquire named locks 2021-02-20 23:25:31 +01:00
Martchus ab6b940d8e Acknowledge restoring config from cache file correctly 2021-02-09 14:59:40 +01:00
Martchus 6b274ccc88 Improve log messages 2021-02-08 23:54:03 +01:00
Martchus c1554f4c87 Initial import 2021-02-08 23:53:56 +01:00