]>
git.ipfire.org Git - pakfire.git/log
Michael Tremer [Thu, 30 Jan 2025 16:14:05 +0000 (16:14 +0000)]
repo: Simply scan again on forced refresh of local repos
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 16:10:36 +0000 (16:10 +0000)]
repo: Make the write metadata function public
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 16:02:43 +0000 (16:02 +0000)]
pakfire: Remove the refresh function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 16:02:13 +0000 (16:02 +0000)]
pakfire: Don't refresh the local repository sooner than the others
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:57:41 +0000 (15:57 +0000)]
python: Drop Pakfire.refresh()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:56:37 +0000 (15:56 +0000)]
pakfire: Refresh repos once all have been created
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:54:04 +0000 (15:54 +0000)]
build: Move creating the local repository into Pakfire
Pakfire is kind of the thing that should do the setup. That way, we have
it all in one place instead of two places of setup.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:25:04 +0000 (15:25 +0000)]
cli: The shell environment is obviously local, too
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:21:36 +0000 (15:21 +0000)]
contrib: Remove the local repo from the configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:20:41 +0000 (15:20 +0000)]
build: Always create a local build repository in the home directory
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 15:19:15 +0000 (15:19 +0000)]
path: Add function to expand paths
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 14:52:23 +0000 (14:52 +0000)]
build: Create a flag to mark locally run builds
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:45:10 +0000 (11:45 +0000)]
repo: Increase the Zstandard compression level
The data is actually really small and compresses well, so we can spend
some extra CPU cycles to save disk space and bandwidth.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:43:55 +0000 (11:43 +0000)]
compress: Implement passing the compression level to XZ & Zstd
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:30:21 +0000 (11:30 +0000)]
compress: Fix flushing Zstandard output data
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:18:04 +0000 (11:18 +0000)]
repo: Move compression detection
It is easier to run this when we read the database instead of in the
lower level SOLV reading function because inheriting the FILE handle
becomes difficult.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:17:22 +0000 (11:17 +0000)]
package: Add function to destroy a package
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:11:00 +0000 (11:11 +0000)]
tests: archive: Make the test repository virtual
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:10:35 +0000 (11:10 +0000)]
repo: Make all internal repositories virtual
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:10:04 +0000 (11:10 +0000)]
repo: Since we now support virtual repositories, the don't have to be local
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:04:06 +0000 (11:04 +0000)]
repo: Fix return codes when reading SOLV data
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 11:00:57 +0000 (11:00 +0000)]
repo: Remove unused function to only add package metadata
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:56:48 +0000 (10:56 +0000)]
cli: Use import function to import archives
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:54:50 +0000 (10:54 +0000)]
repo: Optionally return the package object when importing archives
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:50:35 +0000 (10:50 +0000)]
repo: Introduce the concept of virtual repositories
These repos can import packages, but they won't copy them but rather
leave them where they were before.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:39:16 +0000 (10:39 +0000)]
repos: Revert changing pakfire_path_relpath
Use pakfire_path_relative instead which writes the path to the stack.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:24:30 +0000 (10:24 +0000)]
build: Remove fetching unused path
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:22:49 +0000 (10:22 +0000)]
job: Don't lose build status when closing the log file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 10:18:39 +0000 (10:18 +0000)]
util: Make sure relative paths are always relative
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:54:12 +0000 (09:54 +0000)]
repo: Unify code to import packages
This now supports the flat layout that we use for the @local build
repository as well as the UUID layout that we use to publish packages.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:15:40 +0000 (09:15 +0000)]
compress: Automatically detect gzip-compressed data
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:12:16 +0000 (09:12 +0000)]
repo: Refactor finding the installed repository
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:07:33 +0000 (09:07 +0000)]
repo: Refactor identity function
We could in theory have two repositories with the same name.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:06:04 +0000 (09:06 +0000)]
repo: Drop an unused function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 09:04:30 +0000 (09:04 +0000)]
repo: Refactor opening existing repositories
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:55:27 +0000 (08:55 +0000)]
repo: Refactor creating a new repo
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:39:48 +0000 (08:39 +0000)]
repo: Fix weird argument handling
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:36:00 +0000 (08:36 +0000)]
job: Remove the braindead UUID parsing/unparsing
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:28:47 +0000 (08:28 +0000)]
jobs: Pass all log messages on to the upstream logger
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:21:25 +0000 (08:21 +0000)]
log file: Change compression to gzip
Although it would be nice to only use one compression algorithm, the
challenges to use Zstandard are a little bit too large. The compression
is actually not better (if even) and takes up a lot more resources. At
the same time, there is very little support for Zstandard in browsers
and Python itself, which results us writing a lot of extra code to
ensure that the files are often decoded again to be delivered in
plaintext and being DEFLATEd again by the reverse proxies.
So it all makes a lot more sense to use gzip from the start and just be
done with it.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:17:22 +0000 (08:17 +0000)]
compress: Add transparent gzip compression
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Thu, 30 Jan 2025 08:16:45 +0000 (08:16 +0000)]
configure: Depend on zlib
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 18:36:29 +0000 (18:36 +0000)]
xfer: Don't use chunked encoding for uploads
This is deprecated in HTTP/2 and on the server side we now live without
it. cURL even sends a Content-Length header which is quite helpful.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 17:11:08 +0000 (17:11 +0000)]
string: Don't return the number of elements in an array after append
We don't use this anywhere and it requires to reset r whenever we store
the value in it.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 17:10:21 +0000 (17:10 +0000)]
compress: Drastically increase the Zstandard compression level
All files that we generate are being transferred or stored for a long
time. So it should be wise to always spend the extra CPU cycles.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 17:10:02 +0000 (17:10 +0000)]
log file: Add a human readable filename argument
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 16:49:03 +0000 (16:49 +0000)]
job: Create a log file and write the entire job output to it
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 16:47:46 +0000 (16:47 +0000)]
log file: Reset the file handle immediately
Since we are calling some logging functions from here we might want to
write to the closed file handle.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 16:46:47 +0000 (16:46 +0000)]
buildservice: Always set title on upload
This will always be set, so there is no point in adding this check.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 16:46:23 +0000 (16:46 +0000)]
buildservice: Send digest without choosing some algorithm
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 16:45:52 +0000 (16:45 +0000)]
buildservice: Reformat how to play with arguments
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 15:06:15 +0000 (15:06 +0000)]
log stream: Make this more versatile
This is needed because we have differnt types of input and therefore
need to be able to handle them all.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 15:03:52 +0000 (15:03 +0000)]
build: Log something when the result callback returned non-zero
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 15:02:14 +0000 (15:02 +0000)]
job: Properly implement the log stream now
This is now a post event which will always be called when there have
been any other events processed. We will therefore try to send as many
log lines as possible before we terminate.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 14:00:59 +0000 (14:00 +0000)]
tests: compress: Tidy up the code to get better assertion messages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 14:00:35 +0000 (14:00 +0000)]
buildservice: Make setting the upload filename optional
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 14:00:12 +0000 (14:00 +0000)]
compress: Correctly terminate on EOF
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 11:46:39 +0000 (11:46 +0000)]
compress: Refactor transparent Zstandard compression
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 11:09:44 +0000 (11:09 +0000)]
log file: Add new object to write a (compressed) log file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Wed, 29 Jan 2025 10:40:57 +0000 (10:40 +0000)]
buildservice: Use the URL to upload the payload
This is just a change in the protocol which hopefully will give us some
more flexibility in the future.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:53:18 +0000 (17:53 +0000)]
builds: Remove old target implementation
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:50:14 +0000 (17:50 +0000)]
tests: Add some basic tests for the log stream
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:49:35 +0000 (17:49 +0000)]
log stream: Add a function to print custom content into the stream
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:47:55 +0000 (17:47 +0000)]
log stream: Don't loop forever if we did not find a line break
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:47:13 +0000 (17:47 +0000)]
log stream: Only call the read function when there is new data to read
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 17:43:21 +0000 (17:43 +0000)]
log stream: Add function to close the stream
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 16:29:05 +0000 (16:29 +0000)]
job: Send an API call once the job has finished
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:49:26 +0000 (15:49 +0000)]
jobs: Upload packages after the build is done
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:23:44 +0000 (15:23 +0000)]
buildservice: Simplify how it is being initialized
This make this all more re-usable in other places.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:07:40 +0000 (15:07 +0000)]
build: Add a result callback and use it in the CLI builder
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:05:08 +0000 (15:05 +0000)]
repo: Add a function that imports an archive
I know that we have been doing this in so many places, but hopefully
this is now the new (soon to be unified) way to do this.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:04:11 +0000 (15:04 +0000)]
build: Drop old code that copies the packages after build
This is broken and needs to be replaced by something more custom.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 15:03:10 +0000 (15:03 +0000)]
package: Make a function available to all that generates the filename
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 14:00:35 +0000 (14:00 +0000)]
repo: Pass the package as well as the archive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:40:27 +0000 (11:40 +0000)]
repos: Add a convenient way to iterate over all local archives
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:23:08 +0000 (11:23 +0000)]
build: Remove remains of some logging callback
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:16:51 +0000 (11:16 +0000)]
packages: Fix group parsing for legacy package formats
In older package formats, we stored the groups as a string. The current
test package is in this format and the added code ensures that we can
parse the group.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:05:07 +0000 (11:05 +0000)]
tests: Fix running Python tests
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:02:09 +0000 (11:02 +0000)]
archive: Use the branch prediction macros in potentially hot code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:01:50 +0000 (11:01 +0000)]
strings: Use the branch prediction macros in potentially hot code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 11:01:25 +0000 (11:01 +0000)]
util: Introduce macros to tell the compiler how likely branches are
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Tue, 28 Jan 2025 10:47:37 +0000 (10:47 +0000)]
arch: Use our own string comparison function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:51:52 +0000 (17:51 +0000)]
string: Make setting a string faster
This avoids calling a lot of libc functions that we actually don't need.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:40:47 +0000 (17:40 +0000)]
build: Ensure the ccache directory exists or create it
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:36:13 +0000 (17:36 +0000)]
xfer: Always append a / to the base URL
When cURL merges URLs it will cut off the last part if the URL is not
terminated with /.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:35:45 +0000 (17:35 +0000)]
string: Add a function to append something to a string
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:29:27 +0000 (17:29 +0000)]
xfer: Don't crash if xfer finishes too early
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 17:26:24 +0000 (17:26 +0000)]
deps: Remove unused variable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:55:10 +0000 (16:55 +0000)]
daemon: Return an error if we could not subscribe to signals
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:53:18 +0000 (16:53 +0000)]
cgroup: Initialize return value in case there are no children
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:52:36 +0000 (16:52 +0000)]
ELF: Initilize r just in case the binary has no program headers
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:50:52 +0000 (16:50 +0000)]
repo: Initialize return value on scan just in case we find no files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:45:42 +0000 (16:45 +0000)]
python: Refactor fetching dependencies and re-use existing code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:40:23 +0000 (16:40 +0000)]
python: Minor code cleanups in Solution class
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:38:26 +0000 (16:38 +0000)]
python: Identify as "pakfire" and not "_pakfire"
The module was renamed some time ago.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:34:26 +0000 (16:34 +0000)]
python: Use the string array function for arches
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:30:08 +0000 (16:30 +0000)]
python: Drop file handle wrapper
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:28:08 +0000 (16:28 +0000)]
python: Use strings functions to free strings in Package
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:24:44 +0000 (16:24 +0000)]
python: Minor code cleanups in the Package class
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Michael Tremer [Mon, 27 Jan 2025 16:22:57 +0000 (16:22 +0000)]
configure: Fix config.h
PACKAGE_VERSION was accidentially redefined which rendered all compiler
checks broken which then wiped out all custom CFLAGS that we have been
using.
This patch adds a new variable with the full version which fixes the
problem.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>