Commit Graph

37 Commits

Author SHA1 Message Date
Martchus 141d8fa3f5 Allow dumping package databases 2023-12-16 22:13:44 +01:00
Martchus ec493b3454 Remove unused includes 2023-12-09 23:28:02 +01:00
Martchus edd78667c5 Allow configuring retention for build actions 2023-11-23 18:49:43 +01:00
Martchus f0d9b684df Make default arch configurable 2023-11-08 14:02:47 +01:00
Martchus 30a80e7aca Add pkgctl tool 2023-05-28 22:05:02 +02:00
Martchus 9702d4f207 Add paths for pacman/paccache to server setup 2023-04-07 17:52:52 +02:00
Martchus 8dfa948e03 Implement helper functions for async global locks 2023-01-17 18:40:05 +01:00
Martchus 218e1f6b17 Add simple cleanup of old build actions 2022-11-24 21:33:42 +01:00
Martchus df2b5ba9f6 Allow secrets stored in encrypted files to be loaded from route handlers 2022-07-10 19:47:41 +02:00
Martchus 3b150428ae Allow building with `makecontainerpkg` 2022-06-12 20:42:14 +02:00
Martchus 294dba0e2a Fix URL and show it in the about dialog 2022-06-09 19:50:43 +02:00
Martchus 55c7c62c7c Speed up returning build actions table by avoiding deserializing whole obj 2022-05-31 20:54:02 +02:00
Martchus 645bb0fe54 Use arch-specific sub-directory within cache dir when conducting build 2022-05-31 20:27:42 +02:00
Martchus 68d67f543f Refactor to optimize deserialization of base-data
* Break backwards compatibility
* Allow to deserialize only base-data of packages and build
  actions to potentially speed up showing tables
* Speed up package search in many cases by only deserializing
  base-data (unless details are actually wanted)
2022-05-31 19:04:57 +02:00
Martchus e343b3ca44 Split `ResourceUsage` into `MemoryUsage` and setup specific stats 2022-04-24 18:25:22 +02:00
Martchus 142f6466ae Show resource usage in UI 2022-04-23 19:56:22 +02:00
Martchus d163f56abf Log whether `io_uring` is used/configured 2022-03-20 17:37:33 +01:00
Martchus 55f081153e Add command to delete invalid build actions from DB 2022-03-07 23:36:48 +01:00
Martchus 8fdf7bfb04 Print certain resource limits on server startup 2022-03-05 12:34:26 +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 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 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 1c820fc2f6 lmdb: Fix storage initialization when config file cannot be loaded 2022-01-23 19:47:50 +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 c05a581322 Increase the max. download size for packages and allow configuring it 2021-07-12 15:00:43 +02: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 f147dc3179 Fix locks for global resources by implementing a mutex not tied to a thread
* Can not use a normal mutex because we don't want to tie the resources to
  a specific thread (and instead e.g. to a build action which might not be
  executed by a single thread)
* A semaphore would do that but libstdc++ only supports it as of GCC 11 and
  besides it wouldn't distinguish between shared and exclusive locking
2021-02-26 01:39:21 +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 c1554f4c87 Initial import 2021-02-08 23:53:56 +01:00