]>
git.ipfire.org Git - people/ms/pakfire.git/log
Michael Tremer [Mon, 29 Jan 2024 17:50:22 +0000 (17:50 +0000)]
file: Remove the legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 17:46:09 +0000 (17:46 +0000)]
dependencies: Drop the legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 17:45:13 +0000 (17:45 +0000)]
problem: Store a reference to the context
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 17:42:33 +0000 (17:42 +0000)]
parser: Store a reference to the context
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 17:15:31 +0000 (17:15 +0000)]
libpakfire: db: Replace legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 17:05:11 +0000 (17:05 +0000)]
build: Replace (most of) the legacy logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 16:56:47 +0000 (16:56 +0000)]
logging: Make the legacy logger configurable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 16:49:22 +0000 (16:49 +0000)]
libpakfire: Move to new logging in pakfire.c
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 29 Jan 2024 10:54:19 +0000 (10:54 +0000)]
python: Make sure we hold the GIL when jumping into the logging callback
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:59:18 +0000 (18:59 +0000)]
tests: Re-enable jail tests that pass
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:55:14 +0000 (18:55 +0000)]
python: Pakfire.execute(): Fix parsing some arguments
There have been a couple of problems here when no or invalid values have
been passed.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:44:22 +0000 (18:44 +0000)]
tests: Fix path to test configuration file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:38:55 +0000 (18:38 +0000)]
tests: Test the locally built binaries
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:27:42 +0000 (18:27 +0000)]
tests: Dump log onto the console for Python tests
This is not very elegant, but I don't have a better way to do this now.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 26 Jan 2024 18:11:40 +0000 (18:11 +0000)]
python: Add tests for the Archive class
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 18:20:22 +0000 (18:20 +0000)]
tests: Add functions to make opening files in the test env easier
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:44:56 +0000 (16:44 +0000)]
tests: Add Python tests for context
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:43:47 +0000 (16:43 +0000)]
python: ctx: Cleanup code that dereferences the logging function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:41:11 +0000 (16:41 +0000)]
python: ctx: Setup the default logger
There was some code that started implementing this, but weirdly it was
never called...
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:08:05 +0000 (16:08 +0000)]
tests: Disable all jail tests
Those mess up the console.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:04:44 +0000 (16:04 +0000)]
tests: Migrate other Python tests to the new framework
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:01:09 +0000 (16:01 +0000)]
tests: Build a common basis for Python tests
This new class has some methods that make it easy for us to set up some
simple Pakfire environments.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 16:00:13 +0000 (16:00 +0000)]
tests: Fix syntax errors in keys tests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 25 Jan 2024 15:36:16 +0000 (15:36 +0000)]
tests: Remove dummy Python test
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 14 Jan 2024 16:12:56 +0000 (16:12 +0000)]
httpclient: Don't store finished transfers internally
This caused a recursion in reference counting resulting in the HTTP
client and all finished transfers never being freed.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 14 Jan 2024 16:02:03 +0000 (16:02 +0000)]
tests: Fix cgroup tests building from source
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 14 Jan 2024 16:01:43 +0000 (16:01 +0000)]
jail: Reset all callbacks after execution
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 14 Jan 2024 15:57:09 +0000 (15:57 +0000)]
jail: Remove unnecessary pakfire_jail_exec wrapper function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 14 Jan 2024 15:50:11 +0000 (15:50 +0000)]
jail: Remove callbacks from command calls
This makes those functions having fewer arguments which should help us
to write cleaner code.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 18:50:45 +0000 (18:50 +0000)]
jail: Replace communication callbacks by setting callbacks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 18:08:50 +0000 (18:08 +0000)]
jail: Add functions to set standard input/output callbacks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:40:33 +0000 (17:40 +0000)]
jail: Fix incorrect variable name
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:34:25 +0000 (17:34 +0000)]
jail: Drop extra function to check if buffer is full
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:30:03 +0000 (17:30 +0000)]
jail: Rename PTY forwarding flags
The term flags is slightly overused and makes things confusing.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:27:30 +0000 (17:27 +0000)]
jail: Move struct declarations out of the large struct
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:24:19 +0000 (17:24 +0000)]
jail: Remove unused stdout/stderr buffers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:22:11 +0000 (17:22 +0000)]
jail: Drop custom log callback stuff
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:19:23 +0000 (17:19 +0000)]
build: Drop setting jail callback and use output callback instead
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 17:04:35 +0000 (17:04 +0000)]
jail: Implement sending data into standard input
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 16:33:00 +0000 (16:33 +0000)]
jail: Keep reading from/writing to PTY for as long as there is work to do
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 14:50:53 +0000 (14:50 +0000)]
jail: Forward function names of child processes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 14:25:54 +0000 (14:25 +0000)]
jail: Remove duplicate logging function
There were two functions essentially doing the same, so one can go.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 13:43:49 +0000 (13:43 +0000)]
jail: Honour the buffer length when forwarding log messages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 13:10:02 +0000 (13:10 +0000)]
jail: PTY forwarding: Call the output callback if available
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 12:52:13 +0000 (12:52 +0000)]
jail: Only connect the current terminal if requested
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 12:45:46 +0000 (12:45 +0000)]
jail: Do not try to attempt any TTY operations if we don't have a TTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 12:37:45 +0000 (12:37 +0000)]
jail: Refactor how to drain logging buffers with callbacks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 19 Dec 2023 12:00:30 +0000 (12:00 +0000)]
jail: Make PTY forwarding a flag and remove interactive bool
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:24:45 +0000 (13:24 +0000)]
jail: Use the "fill buffer" function for logging, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:19:54 +0000 (13:19 +0000)]
jail: Align processing of file descriptors in the event loop
This is slightly easier to read than checking the event type first and
then handle the rest.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:07:50 +0000 (13:07 +0000)]
jail: Implement PTY forwarding
This replaces the previous pipe forwarding with a new controlling PTY
that is set up for each jail.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:07:00 +0000 (13:07 +0000)]
jail: Only try to restore file descriptors if they are still open
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:06:20 +0000 (13:06 +0000)]
jail: Fix setting raw mode only on the correct side
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 13:05:08 +0000 (13:05 +0000)]
jail: Store flags of stdin/stdout
We will need to restore them after we are finish the PTY forwarding.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 11:55:44 +0000 (11:55 +0000)]
mount: No longer create /dev/console in the jail
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 16 Dec 2023 11:53:47 +0000 (11:53 +0000)]
util: Fix creating symlinks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 8 Dec 2023 17:22:43 +0000 (17:22 +0000)]
jail: Setup PTY in the master process and add it to the event loop
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 8 Dec 2023 16:45:39 +0000 (16:45 +0000)]
jail: Create a better struct to hold all PTY related stuff
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 8 Dec 2023 15:47:20 +0000 (15:47 +0000)]
jail: Have the child process allocate a new PTY
The master file descriptor is being sent to the parent process.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 8 Dec 2023 15:30:13 +0000 (15:30 +0000)]
jail: Fix FD check in stdin
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 8 Dec 2023 15:29:45 +0000 (15:29 +0000)]
jail: Bring back the UNIX domain socket between child/parent
We will need this later to pass around file descriptors.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 2 Dec 2023 12:57:13 +0000 (12:57 +0000)]
jail: Bring back helper function to add FDs to epoll()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 2 Dec 2023 12:48:08 +0000 (12:48 +0000)]
Revert "jail: This changes how we launch sub-processes"
This reverts commit
9b171c6a54a5f8e42ba3f11f285af601aecaa303 .
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 2 Dec 2023 12:41:02 +0000 (12:41 +0000)]
jail: Commit some disabled code to set up a PTY
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 2 Dec 2023 12:36:19 +0000 (12:36 +0000)]
util: Create a function to create relative symlinks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 24 Nov 2023 16:49:57 +0000 (16:49 +0000)]
path: Add function to compute relative paths
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 24 Nov 2023 15:35:29 +0000 (15:35 +0000)]
mount: Add comment about mounting /proc
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 24 Nov 2023 15:29:41 +0000 (15:29 +0000)]
jail: Mount some things in the outer namespace and some in the inner one
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:39:39 +0000 (18:39 +0000)]
jail: Log the mountpoints when entering the inner namespaces
There is only little sense in logging the mount table of the host system
as it only makes the debug log very noisy.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:37:02 +0000 (18:37 +0000)]
libpakfire: Drop using libmount
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:34:58 +0000 (18:34 +0000)]
libpakfire: os.h: Add missing header for pid_t
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:34:10 +0000 (18:34 +0000)]
mount: Use the parse helpers to log /proc/self/mounts
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:33:21 +0000 (18:33 +0000)]
parse: Remove any trailing line breaks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 18:17:05 +0000 (18:17 +0000)]
parse: Move parse function into an extra file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:50:35 +0000 (17:50 +0000)]
jail: setgroups: Use pakfire_file_write
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:47:50 +0000 (17:47 +0000)]
jail: Actually exit if something went wrong during initialization
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:47:24 +0000 (17:47 +0000)]
jail: Don't let the second child die when the first child finishes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:42:29 +0000 (17:42 +0000)]
jail: Don't fail if cgroup stats could not be read
This is kind of a fire and forget situation, but should be good enough.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:36:37 +0000 (17:36 +0000)]
jail: Remove signalfd stuff
I don't think that we need this.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:34:29 +0000 (17:34 +0000)]
compress: Be less verbose when walking through the file system
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:33:41 +0000 (17:33 +0000)]
jail: Fix format character when setting GIDs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:32:27 +0000 (17:32 +0000)]
jail: This changes how we launch sub-processes
This patch changes that we will launch a new process in a new mount
namespace which will then set up that namespace and fork another child
into a new user/network/time/etc. namespace.
This is not completed as the internal mount namespace is not set up
correctly, yet.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 5 Nov 2023 17:31:20 +0000 (17:31 +0000)]
cgroup: Be less verbose when parsing stats
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:43:26 +0000 (08:43 +0000)]
jail: Use eventfd_read/write convenience handlers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:40:48 +0000 (08:40 +0000)]
jail: Correctly compile out debug stuff when not enabled
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:37:32 +0000 (08:37 +0000)]
mount: Remove unused function to check for mountpoints
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:34:04 +0000 (08:34 +0000)]
libpakfire: Drop the stupid namespace stuff
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:28:49 +0000 (08:28 +0000)]
mount: Make changing mount operation not dependant on pakfire
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 2 Nov 2023 08:23:43 +0000 (08:23 +0000)]
cli: Check for root privileges when needed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 20:09:22 +0000 (20:09 +0000)]
xfer: Implement another version for tmpfiles
O_TMPFILE requires filesystem support which is sadly not available for
NFS.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:10:54 +0000 (19:10 +0000)]
xfer: Try again for temporary issues on API calls
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:06:42 +0000 (19:06 +0000)]
tests: xfer: Fix digest check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:06:27 +0000 (19:06 +0000)]
xfer: Translate any errors into our own error codes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:05:53 +0000 (19:05 +0000)]
xfer: Correctly truncate if the download failed
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:05:10 +0000 (19:05 +0000)]
xfer: Fail on any HTTP return codes >= 400
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 19:04:38 +0000 (19:04 +0000)]
xfer: Receive any error messages from cURL
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 17:48:03 +0000 (17:48 +0000)]
xfer: Remove restoring the mtime of downloads
The servers don't generally send this information.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 17:43:44 +0000 (17:43 +0000)]
xfer: Set mtime only if we received one
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 17:43:23 +0000 (17:43 +0000)]
xfer: Remove unused flags field
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 1 Nov 2023 17:41:54 +0000 (17:41 +0000)]
xfer: Group freeing cURL things together
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>