]>
git.ipfire.org Git - people/ms/pakfire.git/log
Michael Tremer [Fri, 27 May 2022 10:04:40 +0000 (10:04 +0000)]
daemon: Block main loop more intelligently
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:44:02 +0000 (09:44 +0000)]
daemon: Fork new worker process when we receive a build job
The previous system was that the worker processes would have been
pre-forked and waiting for a job which was randomly allocated.
This model is now changing since we no longer poll, but push build jobs
from the hub to the builders.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:42:38 +0000 (09:42 +0000)]
daemon: Store configuration parameters
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:41:39 +0000 (09:41 +0000)]
hub: Avoid any crashes when we received no message
The on_message callback can be called when the connection is closed
which made the JSON decoder crash.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:41:17 +0000 (09:41 +0000)]
configure: Depend on "cpuinfo" Python module
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:40:57 +0000 (09:40 +0000)]
logger: Add newline to the end if none already
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 09:40:36 +0000 (09:40 +0000)]
logger: Clear any previously configured handlers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 08:57:45 +0000 (08:57 +0000)]
daemon: Close queue connection immediately when shutting down
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 08:51:26 +0000 (08:51 +0000)]
daemon: Add flags to be more verbose
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 08:37:44 +0000 (08:37 +0000)]
logger: Use new logger setup in builder, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 27 May 2022 08:35:29 +0000 (08:35 +0000)]
logger: Create a simple logger and use it in daemon
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 15:14:45 +0000 (15:14 +0000)]
daemon: Join the job queue and call a function when a job is assigned
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 15:14:03 +0000 (15:14 +0000)]
hub: Add websocket capability
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 12:15:27 +0000 (12:15 +0000)]
Drop distro.py
This has been replaced with a much simpler implemenation.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 12:14:53 +0000 (12:14 +0000)]
util: Add a simple function to read the distro name
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 12:06:16 +0000 (12:06 +0000)]
Drop system.py
This has been replaced by cpuinfo and psutil.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 12:04:44 +0000 (12:04 +0000)]
daemon: Remove max_running/max_waiting configuration parameters
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 12:03:49 +0000 (12:03 +0000)]
daemon: Use Python socket module to get hostname
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 11:58:23 +0000 (11:58 +0000)]
daemon: Drop keepalive process
The old companion process which sent keepalive messages to the hub has
been dropped and the main daemon process is now conducting this task.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 11:57:15 +0000 (11:57 +0000)]
hub: Add support for POST requests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 11:56:47 +0000 (11:56 +0000)]
daemon: Make it async
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 11:56:10 +0000 (11:56 +0000)]
Makefile: Install distro.py
This module has been around all the time but was somehow not installed.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 10:10:55 +0000 (10:10 +0000)]
daemon: Cosmetic changes when connecting to the hub
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 09:57:02 +0000 (09:57 +0000)]
hub: Show progress bar on file uploads
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 09:03:04 +0000 (09:03 +0000)]
Drop legacy HTTP client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 08:59:58 +0000 (08:59 +0000)]
client: Make all functions async
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 26 May 2022 08:59:32 +0000 (08:59 +0000)]
client: Refactor hub communication based on tornado HTTP client
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 May 2022 12:06:11 +0000 (12:06 +0000)]
execute: Add a simple wrapper for clone3
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 May 2022 12:04:13 +0000 (12:04 +0000)]
execute: Make CLONE_INTO_CGROUP non-optional
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 25 May 2022 12:00:19 +0000 (12:00 +0000)]
execute: List all mountpoints after mount
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 15:55:25 +0000 (15:55 +0000)]
mount: Don't list everything after each mount operation
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 15:54:08 +0000 (15:54 +0000)]
mount: Don't mess with the helpers
For some reason, this umounts practically everything on my Debian box.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 15:51:58 +0000 (15:51 +0000)]
execute: Fix typo in comment
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 14:45:28 +0000 (14:45 +0000)]
mount: Use libmount to iterate over any mountpoints
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 14:18:12 +0000 (14:18 +0000)]
libpakfire: Move mount operations into a new file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 24 May 2022 14:16:39 +0000 (14:16 +0000)]
configure: Link against libmount
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 21 May 2022 14:15:05 +0000 (14:15 +0000)]
execute: Use pivot_root instead of chroot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 21 May 2022 14:14:48 +0000 (14:14 +0000)]
configure: Link against libcap
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 21 May 2022 12:50:10 +0000 (12:50 +0000)]
execute: Filter syscalls in container
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 21 May 2022 12:32:01 +0000 (12:32 +0000)]
configure: Depend on libseccomp
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 18:43:33 +0000 (18:43 +0000)]
execute: Drop capabilities
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 18:06:25 +0000 (18:06 +0000)]
execute: Launch any containers in a new PID namespace
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 18:01:44 +0000 (18:01 +0000)]
archive: Fix compression selection
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 17:52:53 +0000 (17:52 +0000)]
shell: Allow passing extra packages to install
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 17:34:28 +0000 (17:34 +0000)]
package: Don't return void
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 17:34:16 +0000 (17:34 +0000)]
package: Simply empty string check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 17:09:41 +0000 (17:09 +0000)]
request: Drop support for groups
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 15:56:27 +0000 (15:56 +0000)]
archive: Only activate the relevant decompressor
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 15:55:03 +0000 (15:55 +0000)]
archive: Try being more robust against non-existant files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 15:54:49 +0000 (15:54 +0000)]
archive: Rename files inside the archive (again)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 15:03:16 +0000 (15:03 +0000)]
packager: Do not dump JSON in pretty format
This is not pretty enough to be easily read on the CLI, so we can then
dump it as compact as possible.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 20 May 2022 15:01:37 +0000 (15:01 +0000)]
parser: Use special "evr" variable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 16:47:00 +0000 (16:47 +0000)]
package: Automatically erase empty epoch when setting evr
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 16:24:52 +0000 (16:24 +0000)]
builder: Drop legacy Python build stuff
This has now all moved into the C library
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 16:20:19 +0000 (16:20 +0000)]
execute: Ignore if epoll_wait() is being interrupted
This can happen if the process is receiving a signal and we should just
continue as usual.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 15:50:27 +0000 (15:50 +0000)]
build: Make installing the source package an essential job
This should help that the solver does not suggest to not install the
source package. That does not seem to be the best advice here.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 15:16:09 +0000 (15:16 +0000)]
archive: Parse filelist
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 15:09:47 +0000 (15:09 +0000)]
tests: makefile: Dump all package information
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 15:09:35 +0000 (15:09 +0000)]
tests: makefile: Check filelist length
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 15:02:32 +0000 (15:02 +0000)]
tests: makefile: Add test for dist
This test tries to create a source package for a dummy package. We then
evaluate if we can read correct information back again.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 14:14:26 +0000 (14:14 +0000)]
Revert "build: Allow build environments to be interactive"
This reverts commit
91b5b0472158835cf53b489134d4d2e53e717598 .
This is quite problematic because this flag is being used in multiple
ways. One version is that we take user input, the other one is that we
show progress bars on the terminal.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 14:09:20 +0000 (14:09 +0000)]
packages: Add distribution information
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 13:44:17 +0000 (13:44 +0000)]
packages: Add vendor to package metadata
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 13:34:32 +0000 (13:34 +0000)]
package: Add source information
This patch adds support for storing the source package name, evr and
architecture in the metadata.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 11:40:33 +0000 (11:40 +0000)]
packager: Explicitely pass struct pakfire on create
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 17 May 2022 11:39:57 +0000 (11:39 +0000)]
tests: Compile with correct CFLAGS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 16:06:01 +0000 (16:06 +0000)]
Revert "macros: Build for more modern processors only"
This reverts commit
547777ac363bc14975cd7ab77fed3fb160b904f4 .
The version of GCC that we currently have does not seem to support this
feature, yet.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 15:45:37 +0000 (15:45 +0000)]
package: Drop installing self-provides
I have no idea what those do, and it seems to work without it.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 15:40:49 +0000 (15:40 +0000)]
repo: Import any data into the pool
We cannot keep it separate because solving won't work properly any more.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 14:09:03 +0000 (14:09 +0000)]
packager: Automatically set build host/time
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 13:45:33 +0000 (13:45 +0000)]
archive: Read package information from JSON file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 13:30:38 +0000 (13:30 +0000)]
packager: Give better name to metadata file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 10 May 2022 11:32:32 +0000 (11:32 +0000)]
packages: Write package metadata in JSON format
This is starting a new package format which should be easier to write
and parse than our own format. It should also be quite extensible.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 22:22:44 +0000 (22:22 +0000)]
package: Fix storing strings in repository
We tried to store all strings directly in the pool (I think) which is
not what libsolv liked. Any SOLV files written could not be re-read
which is fixed by this change which gives libsolv the chance to store
its strings wherever it wants.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 22:11:36 +0000 (22:11 +0000)]
tests: Drop all repo information from memory before read
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 21:04:00 +0000 (21:04 +0000)]
dependencies: Fix parsing
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 20:17:43 +0000 (20:17 +0000)]
build: Allow build environments to be interactive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 20:14:34 +0000 (20:14 +0000)]
progressbar: Fix output
This was broken in
23b9395887ec464084ca57c23fbe8c012f467700 .
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 20:09:06 +0000 (20:09 +0000)]
tests: Fix build after callback changes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 20:01:03 +0000 (20:01 +0000)]
build: Drop redundant interactivity flag
There is already a flag for this which can be used.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 17:59:29 +0000 (17:59 +0000)]
logging: Do not crash when log callback isn't set
This is now possible because we have a new function to modify the
callback.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 16:12:37 +0000 (16:12 +0000)]
callbacks: Rework them to be easier to pass around
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 10:04:51 +0000 (10:04 +0000)]
pakfire: Introduce confirm callback
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 09:33:50 +0000 (09:33 +0000)]
pakfire: Go back on callbacks
Instead of passing a giant struct will all sorts of callbacks, it is
probably more flexible if we would pass them individually.
However, the log callback should be initialized at the very beginning to
allow Pakfire to properly log from the very start.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 08:42:02 +0000 (08:42 +0000)]
pakfire: Add function to reset all callbacks
When we call pakfire from Python, we will pass some callbacks which we
will hold a reference to. If those are being freed but Pakfire isn't we
might call the freed callback.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 9 May 2022 08:28:09 +0000 (08:28 +0000)]
downloader: Replace snprintf by our own string function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 8 May 2022 16:34:44 +0000 (16:34 +0000)]
db: Check for compatible architecture
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 7 Apr 2022 18:32:43 +0000 (18:32 +0000)]
macros: Build for more modern processors only
This patch enables pakfire to build for processors that have been
released after 2011 only.
It allows us to use modern processor features like SSE4.1, SSE4.2,
POPCNT, SSE3, and SSSE3.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 16:16:06 +0000 (16:16 +0000)]
db: Wrap erasing packages into a transaction, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 16:15:41 +0000 (16:15 +0000)]
file: Ignore if the file was already deleted
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 15:57:20 +0000 (15:57 +0000)]
db: Store a timestamp when the database was modified last
This is useful to detect whether things have changed since the database
was opened and whether things have to be re-read from it.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 14:46:13 +0000 (14:46 +0000)]
Implement a simple locking mechanism to avoid concurrent transactions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:47:37 +0000 (13:47 +0000)]
configure: Fix appending flags to CFLAGS/LDFLAGS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:25:22 +0000 (13:25 +0000)]
testsuite: Fix shadowed variables
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:23:50 +0000 (13:23 +0000)]
testsuite: Fix prototype declarations
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:20:31 +0000 (13:20 +0000)]
packagelist: Make helper function static
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:19:13 +0000 (13:19 +0000)]
transaction: Make pakfire_transaction_downloadsize static
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:18:34 +0000 (13:18 +0000)]
logging: Include header file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:17:11 +0000 (13:17 +0000)]
keystore: Include header file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 9 Dec 2021 13:13:35 +0000 (13:13 +0000)]
pakfire: Do not attempt to call callbacks when not set
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>