]>
git.ipfire.org Git - pakfire.git/log
Michael Tremer [Tue, 22 Oct 2024 15:29:52 +0000 (15:29 +0000)]
repo: Check if progress could be started okay
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 15:28:04 +0000 (15:28 +0000)]
build: Correct evaluate some more return codes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 15:23:09 +0000 (15:23 +0000)]
digest: Don't assign r when it is never read
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 15:13:08 +0000 (15:13 +0000)]
jenkins: Add a pipeline
This is going to help us to achieve better code quality and
compatibility because we will automatically build Pakfire for a couple
of common distributions and run it through Clang's Static Analyzer.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 09:23:34 +0000 (09:23 +0000)]
stripper: Identify source files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 15:03:14 +0000 (15:03 +0000)]
config: Avoid updating line when it is never being read back
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 15:00:07 +0000 (15:00 +0000)]
cli: daemon: Correctly catch daemon initialization errors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 14:58:48 +0000 (14:58 +0000)]
key: Refactor return values
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 14:40:06 +0000 (14:40 +0000)]
path: Fix a potential memory leak if either path is not absolute
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 14:38:53 +0000 (14:38 +0000)]
pwd: Initialize array before using it
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 14:34:46 +0000 (14:34 +0000)]
file: Cleanup initializing files
There was a potential memory leak here if the entry could not be
allocated.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 14:26:41 +0000 (14:26 +0000)]
libpakfire: Initialize some return values that could be undefined
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 01:44:39 +0000 (01:44 +0000)]
pakfire: Align the disk reader with the writer
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 00:12:57 +0000 (00:12 +0000)]
configure: Link against libdw
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 00:09:37 +0000 (00:09 +0000)]
stripper: Find all ELF files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 00:07:38 +0000 (00:07 +0000)]
repo: Improve return code handling
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 22 Oct 2024 00:07:12 +0000 (00:07 +0000)]
archive: Fix return code if the archive could not be opened
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 23:48:56 +0000 (23:48 +0000)]
stripper: Build scaffolding for a new stripper
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 18:41:39 +0000 (18:41 +0000)]
linter: Build out dummy function to scan the payload
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 18:40:55 +0000 (18:40 +0000)]
linter: Keep a reference to Pakfire
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 18:23:46 +0000 (18:23 +0000)]
archive: Use convenience function to open and walk through the archive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 18:11:22 +0000 (18:11 +0000)]
archive: Log the format and compression
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 18:01:39 +0000 (18:01 +0000)]
archive: Simplify opening an archive
There is nothing special needed now we clone the file descriptors. So
this is mainly just to make the file sticky.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 17:56:34 +0000 (17:56 +0000)]
archive: Fix passing error codes when opening the archive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 17:49:23 +0000 (17:49 +0000)]
archive: Simplify the walk/filter callbacks
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 17:38:51 +0000 (17:38 +0000)]
archive: Cleanup loop when searching for files
This mainly removes the ugly label jump.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 17:33:27 +0000 (17:33 +0000)]
archive: cookie: Rename __f to f now that variable is free again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 17:31:51 +0000 (17:31 +0000)]
archive: Streamline opening and reading from the archive
We will now always create a copy of the file descriptor so that we can
independently run mutliple operations on the same archive without
breaking anything.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 14:43:10 +0000 (14:43 +0000)]
archive: Fetch the writer only once
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 21 Oct 2024 14:37:54 +0000 (14:37 +0000)]
archive: Move extraction code back to where it belongs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 20 Oct 2024 10:21:12 +0000 (10:21 +0000)]
archive: Remove unnecessary underscores from functions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sun, 20 Oct 2024 10:19:22 +0000 (10:19 +0000)]
archive: Minor code cleanups
No functional changes.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 15:07:22 +0000 (15:07 +0000)]
build: Lint the archives after build
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 14:57:33 +0000 (14:57 +0000)]
linter: Check if package name contains whitespace
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 14:48:49 +0000 (14:48 +0000)]
linter: Add result callback to print to the CLI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 14:29:00 +0000 (14:29 +0000)]
linter: Make this entirely private
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 14:28:02 +0000 (14:28 +0000)]
linter: Store any results
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 13:58:47 +0000 (13:58 +0000)]
cli: pakfire-builder: Add command to call the linter
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 13:58:04 +0000 (13:58 +0000)]
linter: Base this on archives rather than packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 13:32:29 +0000 (13:32 +0000)]
pty: Hack to avoid lock-up when we don't have a newline
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 12:47:13 +0000 (12:47 +0000)]
jail: Create helper function to capture output
That way, we can have the length as an extra argument.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 12:33:31 +0000 (12:33 +0000)]
tests: Have pipe return an error if it could not write
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 12:32:28 +0000 (12:32 +0000)]
pty: Replace any CRNL with NL when capturing the output
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 10:18:44 +0000 (10:18 +0000)]
pty: Configure like SSH does it
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:49:49 +0000 (09:49 +0000)]
jail: Immediately send SIGKILL when the timer has expired
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:46:50 +0000 (09:46 +0000)]
jail: Turn off some broken jail tests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:37:01 +0000 (09:37 +0000)]
tests: Try some invalid creations of Pakfire
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:28:20 +0000 (09:28 +0000)]
httpclient: Initialize like everything else
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:27:55 +0000 (09:27 +0000)]
httpclient: Keep better track of all sorts of references
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:01:08 +0000 (09:01 +0000)]
cli: snapshots: Commit forgotten files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Sat, 19 Oct 2024 09:00:44 +0000 (09:00 +0000)]
httpclient: Explicitely keep a reference to any xfers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 16:28:33 +0000 (16:28 +0000)]
tests: python: Load the configuration file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 16:17:16 +0000 (16:17 +0000)]
tests: Make Pakfire operate in the stub root all the time
This makes it easier than bind-mounting the command.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 16:06:48 +0000 (16:06 +0000)]
tests: Make xfer tests compile again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 16:01:36 +0000 (16:01 +0000)]
pakfire: Check if we have a valid distribution configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:46:35 +0000 (15:46 +0000)]
cli: Don't use logging functions when setting up Pakfire fails
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:42:43 +0000 (15:42 +0000)]
libpakfire: Export pakfire_update_snapshot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:33:29 +0000 (15:33 +0000)]
pakfire: Fix return values when generating the distro tag
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:31:36 +0000 (15:31 +0000)]
pakfire: Catch errors when loading distro information
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:18:46 +0000 (15:18 +0000)]
snapshots: Automatically create a new snapshot if there are none
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:18:10 +0000 (15:18 +0000)]
snapshot: Remove the option to define packages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:08:43 +0000 (15:08 +0000)]
pakfire: Cleanup old snapshots after creating a new one
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:08:22 +0000 (15:08 +0000)]
snapshots: Be more verbose when cleaning up snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 15:00:31 +0000 (15:00 +0000)]
snapshots: Overlayfs does not like colons in the directory name
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 14:59:35 +0000 (14:59 +0000)]
snapshot: Cleanup old snapshots
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 12:55:16 +0000 (12:55 +0000)]
cli: builder: Add command to update a snapshot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 12:54:43 +0000 (12:54 +0000)]
snapshots: Add function to create a new snapshot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 12:53:12 +0000 (12:53 +0000)]
pakfire: Add a function to clone a Pakfire instance
This will create a new independant instance based on the previous one.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 12:52:20 +0000 (12:52 +0000)]
pakfire: Show more information if setup fails
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 12:50:18 +0000 (12:50 +0000)]
pakfire: Pass path when reading /etc/os-release
The Pakfire path is not set at this point.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 10:44:55 +0000 (10:44 +0000)]
config: Add a helper function to dump the configuration into a file handle
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 10:44:10 +0000 (10:44 +0000)]
pakfire: Fail if pakfire_path() is called without the path being set
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Fri, 18 Oct 2024 10:37:46 +0000 (10:37 +0000)]
string: Fix incorrect buffer variable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 18:50:24 +0000 (18:50 +0000)]
linter: Refactor
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 17 Oct 2024 18:26:55 +0000 (18:26 +0000)]
tests: Let Pakfire create its own temporary directories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
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>