]>
git.ipfire.org Git - pakfire.git/log
Michael Tremer [Thu, 17 Oct 2024 18:22:31 +0000 (18:22 +0000)]
tests: Remove jail tests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 18:18:01 +0000 (18:18 +0000)]
pakfire: Make the pool status a flag
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 18:15:05 +0000 (18:15 +0000)]
pakfire: Drop the private dir
This is not being used.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 18:11:23 +0000 (18:11 +0000)]
pakfire: Reorganise initialization
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 17:47:32 +0000 (17:47 +0000)]
tests: Drop the old snapshot tests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 17:44:51 +0000 (17:44 +0000)]
snapshots: Remove the overly complicated struct
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 17:40:01 +0000 (17:40 +0000)]
pakfire: Make the umount code clearer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 17:36:42 +0000 (17:36 +0000)]
pakfire: Fix incorrect reference counting
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 17:36:15 +0000 (17:36 +0000)]
snapshot: Ensure we only umount once
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 16:58:44 +0000 (16:58 +0000)]
pakfire: Refactor how we mount the ramdisk, and snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 16:53:48 +0000 (16:53 +0000)]
libpakfire: Remove non-existant function from headers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 16:53:01 +0000 (16:53 +0000)]
snapshots: Tell the mount operation where to mount the snapshot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 15:28:40 +0000 (15:28 +0000)]
pakfire: Tidy up the code to create a new pakfire instance slightly
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 13:47:43 +0000 (13:47 +0000)]
snapshots: Destroy directories after umount
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 13:45:15 +0000 (13:45 +0000)]
snapshots: Remove the old-style snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 13:42:57 +0000 (13:42 +0000)]
build: Remove old-style snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 13:42:25 +0000 (13:42 +0000)]
cli: Fix enabling the snapshot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 13:24:44 +0000 (13:24 +0000)]
pakfire: Experimental implementation to use overlayfs for snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:38:34 +0000 (10:38 +0000)]
tests: Make xfer tests compile and run again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:25:05 +0000 (10:25 +0000)]
repo: Cleanup argument order when downloading packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:24:33 +0000 (10:24 +0000)]
httpclient: Fix error handling when leaving the main loop early
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:24:05 +0000 (10:24 +0000)]
httpclient: Don't run the main loop if there are no transfers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:23:29 +0000 (10:23 +0000)]
httpclient: Don't fall through when trying to reset the timer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:23:06 +0000 (10:23 +0000)]
httpclient: Terminate the event loop if there are no transfers left
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 13 Oct 2024 10:18:17 +0000 (10:18 +0000)]
xfer: Keep a reference to ourselves
This is necessary so that the handle won't be cleaned up when the last
reference to the xfer is gone. It should be good enough to add the xfer
to the HTTP client and then wait for everything to complete.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:25:53 +0000 (19:25 +0000)]
archive: Be less noisy if we cannot open an archive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:22:48 +0000 (19:22 +0000)]
archive: Improve error handling when opening an archive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:16:23 +0000 (19:16 +0000)]
xfer: Only copy the URL once
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:14:24 +0000 (19:14 +0000)]
xfer: Fail creation when in offline mode
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:12:36 +0000 (19:12 +0000)]
httpclient: Remove references to downloader
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:11:30 +0000 (19:11 +0000)]
httpclient: Remove unused cURL import
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:10:27 +0000 (19:10 +0000)]
repo: Refactor the xfer creation function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:09:19 +0000 (19:09 +0000)]
xfer: Only have one way to create a new xfer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 19:01:37 +0000 (19:01 +0000)]
xfer: Decouple more from HTTP client
We used to require a HTTP client to create an xfer but we are actually
not using it any more. That way, we can avoid some more complicated code
paths and we can keep a single request and multiple requests further
apart in the code.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 18:05:30 +0000 (18:05 +0000)]
ctx: Move the cURL share handle here
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:35:15 +0000 (17:35 +0000)]
python: Reformat some code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:32:33 +0000 (17:32 +0000)]
python: Add __version__
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:24:32 +0000 (17:24 +0000)]
python: Don't mess with the Gettext configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:23:52 +0000 (17:23 +0000)]
python: Drop the native Python code and move the C module
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:15:08 +0000 (17:15 +0000)]
pakfire: Simplify storing features
We don't need a struct here because we only store a list of strings.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:11:36 +0000 (17:11 +0000)]
pakfire: Remove the unused locking mechanism
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:02:51 +0000 (17:02 +0000)]
build: Tell the dependency callback how many bytes have been consumed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 17:02:30 +0000 (17:02 +0000)]
packages: Fail when trying to add invalid dependencies
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:43:45 +0000 (16:43 +0000)]
pty: Consider ourselves drained if the master fd is closed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:42:52 +0000 (16:42 +0000)]
pty: Initialize/reset file descriptors with EBADF
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:42:15 +0000 (16:42 +0000)]
pty: Remove closing an unused file descriptor
This was never used and not initialized, so it closed standard input.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:39:33 +0000 (16:39 +0000)]
log stream: Reset file descriptors to EBADF
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:39:11 +0000 (16:39 +0000)]
log stream: Avoid infinite loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:36:57 +0000 (16:36 +0000)]
cgroup: Initialize file descriptors
It was possible that those closed the standard input.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 16:12:29 +0000 (16:12 +0000)]
log stream: Remove FILE handle
This is being replaced by our own loop that splits the input by line.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:53:48 +0000 (14:53 +0000)]
jail: Connect parent side of the logger
This is now possible as we have the new event loop.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:53:30 +0000 (14:53 +0000)]
log stream: Correctly check for open file descriptors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:37:26 +0000 (14:37 +0000)]
jail: Wait a little bit later in the child process
That way, we can set for the child process to die before we start
waiting.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:35:57 +0000 (14:35 +0000)]
cgroup: Parse more stats
This is to reduce logging errors when we could not parse a line.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:25:54 +0000 (14:25 +0000)]
parser: Make this less verbose
The parser generates so much logging output that I cannot find anything
in the logs any more.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:15:55 +0000 (14:15 +0000)]
pakfire: Don't fail when looking up empty UID/GIDs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 14:10:40 +0000 (14:10 +0000)]
pty: Don't try to map empty output buffers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:59:57 +0000 (13:59 +0000)]
jail: If no output handling has been configured dump stuff on the terminal
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:51:42 +0000 (13:51 +0000)]
jail: Bring back sending the build output to the logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:40:00 +0000 (13:40 +0000)]
jail: Setup shell environment in the shell function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:38:27 +0000 (13:38 +0000)]
jail: Always set PS1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:38:02 +0000 (13:38 +0000)]
util: Drop unused function to check if the terminal is a TTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:27:46 +0000 (13:27 +0000)]
jail: Drop the interactive helper function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:22:50 +0000 (13:22 +0000)]
jail: Make the entire jail private
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:19:44 +0000 (13:19 +0000)]
python: Remove Pakfire.execute()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:16:23 +0000 (13:16 +0000)]
jail: Remove an unused buffer struct
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 13:10:56 +0000 (13:10 +0000)]
jail: Replace standard input/output callbacks with the PTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 12:34:11 +0000 (12:34 +0000)]
pty: Explicitely request to connect stdin/stdout
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 12:26:48 +0000 (12:26 +0000)]
cli: build: Send all log messages to syslog, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 12 Oct 2024 11:44:47 +0000 (11:44 +0000)]
pty: Add callbacks to stream input and output
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:10:01 +0000 (10:10 +0000)]
jail: Remove functions that capture the command output
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:08:06 +0000 (10:08 +0000)]
configure: Don't check for epoll any more
We don't call this directly any more.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:03:25 +0000 (10:03 +0000)]
pty: De-register events before closing the file descriptors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 10:03:06 +0000 (10:03 +0000)]
pty: Don't terminate the event loop on error
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:56:16 +0000 (09:56 +0000)]
tests: Show return code on failed assertions as well as errno
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:51:52 +0000 (09:51 +0000)]
pty: Implement capturing the output
This should be the most efficient version, yet.
We create a memfd buffer which we write to and later copy the output to
the heap. This also reduces the amount of callbacks that we have to pass
around.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 10 Oct 2024 09:47:36 +0000 (09:47 +0000)]
pty: Refactor forwarding
This should make the process slightly more efficient because we are
checking if there is anything in the buffers before entering the loop.
We also handle any return values from the read()/write() calls better so
that we won't continue to loop too often.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 17:32:59 +0000 (17:32 +0000)]
arch: Dynamically create an array with the supported arches
Clang did not like the previous solution.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 16:15:53 +0000 (16:15 +0000)]
tests: Fix string formatting in command.c
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:50:15 +0000 (15:50 +0000)]
configure: Remove option to enable the static analyzer
This is not compatible with Clang.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:34:43 +0000 (15:34 +0000)]
configure: Correctly define CURL_HAS_WEBSOCKETS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:27:19 +0000 (15:27 +0000)]
configure: Fix cURL WebSocket check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:22:56 +0000 (15:22 +0000)]
configure: Don't insist on a specific version of JSON-C
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:22:29 +0000 (15:22 +0000)]
xfer: Fix check for cURL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:09:16 +0000 (15:09 +0000)]
repo: Fix string formatting
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 15:07:21 +0000 (15:07 +0000)]
jail: Fix formatting strings
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:20:43 +0000 (14:20 +0000)]
python: Update function declaration for the log callback
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:20:16 +0000 (14:20 +0000)]
python: Update initialization of types
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 14:19:37 +0000 (14:19 +0000)]
python: Correctly initialize and cast keyword arguments
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:54:24 +0000 (13:54 +0000)]
cli: Declare command outside the switch statement
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:53:54 +0000 (13:53 +0000)]
cli: Fix broken include guard
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:41:00 +0000 (13:41 +0000)]
xfer: Compile even if cURL does not have support for WebSockets
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:38:26 +0000 (13:38 +0000)]
xfer: Support compiling with older versions of cURL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:19:08 +0000 (13:19 +0000)]
transaction: Don't declare anything after the label
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:09:18 +0000 (13:09 +0000)]
libpakfire: Set __attribute__((format(...))) wherever needed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:07:26 +0000 (13:07 +0000)]
build: Replace the bitfield with a state enum
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:06:56 +0000 (13:06 +0000)]
file: Don't declare hardlink in the switch statement
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 9 Oct 2024 13:06:29 +0000 (13:06 +0000)]
log stream: Initialize r in case events was zero
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 8 Oct 2024 15:48:16 +0000 (15:48 +0000)]
os: Make more space for the distro information
ArchLinux is using a longer version_id with timestamps which is why we
need some more space here. There is no point in being too tight with
this.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 8 Oct 2024 13:41:43 +0000 (13:41 +0000)]
configure: Drop dependencies on Python modules
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>