]> git.ipfire.org Git - people/ms/pakfire.git/log
people/ms/pakfire.git
15 months agojail: Allow accessing loop devices
Michael Tremer [Tue, 20 Jun 2023 14:43:10 +0000 (14:43 +0000)] 
jail: Allow accessing loop devices

This is not great, but the only way we can mount any images inside the
jail as loop devices are not namespaced (yet).

Jails of this style can access any loop devices set up by the system and
for other jails.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuilds: Install tools that are required to build a certain image
Michael Tremer [Mon, 19 Jun 2023 15:42:57 +0000 (15:42 +0000)] 
builds: Install tools that are required to build a certain image

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuild: Find all packages to be installed and create a new repository with them
Michael Tremer [Mon, 19 Jun 2023 15:27:21 +0000 (15:27 +0000)] 
build: Find all packages to be installed and create a new repository with them

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuild: mkimage: Take a fd for the output
Michael Tremer [Wed, 14 Jun 2023 15:52:36 +0000 (15:52 +0000)] 
build: mkimage: Take a fd for the output

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agoutil: Add function to copy all data from one fd to another
Michael Tremer [Wed, 14 Jun 2023 15:51:44 +0000 (15:51 +0000)] 
util: Add function to copy all data from one fd to another

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuild: Add scaffolding to create images
Michael Tremer [Wed, 14 Jun 2023 15:15:50 +0000 (15:15 +0000)] 
build: Add scaffolding to create images

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agotests: archive: Fix compiling
Michael Tremer [Thu, 1 Jun 2023 21:26:37 +0000 (21:26 +0000)] 
tests: archive: Fix compiling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agotests: Drop PGP test key
Michael Tremer [Thu, 1 Jun 2023 21:24:31 +0000 (21:24 +0000)] 
tests: Drop PGP test key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agocontrib: Update keys of IPFire 3
Michael Tremer [Thu, 1 Jun 2023 21:23:38 +0000 (21:23 +0000)] 
contrib: Update keys of IPFire 3

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Carry the comment with us and require it
Michael Tremer [Thu, 1 Jun 2023 21:16:41 +0000 (21:16 +0000)] 
keys: Carry the comment with us and require it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: Import/export keys as strings
Michael Tremer [Thu, 1 Jun 2023 20:28:50 +0000 (20:28 +0000)] 
_pakfire: Import/export keys as strings

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Do not insist on reading the comment line first
Michael Tremer [Thu, 1 Jun 2023 20:28:21 +0000 (20:28 +0000)] 
keys: Do not insist on reading the comment line first

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agorepos: Write database signature to the correct place
Michael Tremer [Thu, 1 Jun 2023 20:26:38 +0000 (20:26 +0000)] 
repos: Write database signature to the correct place

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agorepos: Fix re-reading repository key
Michael Tremer [Thu, 1 Jun 2023 20:26:09 +0000 (20:26 +0000)] 
repos: Fix re-reading repository key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Wipe memory after importing keys
Michael Tremer [Thu, 1 Jun 2023 19:15:19 +0000 (19:15 +0000)] 
keys: Wipe memory after importing keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Export signing/verification routines in Python
Michael Tremer [Thu, 1 Jun 2023 18:46:21 +0000 (18:46 +0000)] 
keys: Export signing/verification routines in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Flush buffers after creating a signature
Michael Tremer [Thu, 1 Jun 2023 18:46:03 +0000 (18:46 +0000)] 
keys: Flush buffers after creating a signature

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Fix handling IDs (again)
Michael Tremer [Thu, 1 Jun 2023 18:45:43 +0000 (18:45 +0000)] 
keys: Fix handling IDs (again)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Convert the key ID to integer in Python
Michael Tremer [Thu, 1 Jun 2023 18:11:26 +0000 (18:11 +0000)] 
keys: Convert the key ID to integer in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: Implement loading keys
Michael Tremer [Thu, 1 Jun 2023 18:01:07 +0000 (18:01 +0000)] 
_pakfire: Implement loading keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Make the ID an array of bytes again
Michael Tremer [Thu, 1 Jun 2023 17:59:45 +0000 (17:59 +0000)] 
keys: Make the ID an array of bytes again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: keys: Fix error handling when returning algorithm
Michael Tremer [Thu, 1 Jun 2023 17:08:17 +0000 (17:08 +0000)] 
_pakfire: keys: Fix error handling when returning algorithm

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agotests: Add some simple tests for keys in Python
Michael Tremer [Thu, 1 Jun 2023 17:08:01 +0000 (17:08 +0000)] 
tests: Add some simple tests for keys in Python

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agopakfire: Import everything from _pakfire
Michael Tremer [Thu, 1 Jun 2023 17:03:52 +0000 (17:03 +0000)] 
pakfire: Import everything from _pakfire

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: Export the key algorithm constants
Michael Tremer [Thu, 1 Jun 2023 17:03:32 +0000 (17:03 +0000)] 
_pakfire: Export the key algorithm constants

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: keys: Treat IDs as integers
Michael Tremer [Thu, 1 Jun 2023 17:03:10 +0000 (17:03 +0000)] 
_pakfire: keys: Treat IDs as integers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Change key id into uint64_t
Michael Tremer [Thu, 1 Jun 2023 17:01:18 +0000 (17:01 +0000)] 
keys: Change key id into uint64_t

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months ago_pakfire: Drop listing keys
Michael Tremer [Thu, 1 Jun 2023 16:41:45 +0000 (16:41 +0000)] 
_pakfire: Drop listing keys

We no longer keep keys stored.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Drop delete operation
Michael Tremer [Thu, 1 Jun 2023 16:24:56 +0000 (16:24 +0000)] 
keys: Drop delete operation

Since we don't have a keystore any more, there is no need to implement
this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agorepos: Implement creating a detached signature for databases
Michael Tremer [Thu, 1 Jun 2023 15:53:02 +0000 (15:53 +0000)] 
repos: Implement creating a detached signature for databases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agorepos: Drop flags argument from compose function
Michael Tremer [Thu, 1 Jun 2023 15:44:37 +0000 (15:44 +0000)] 
repos: Drop flags argument from compose function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Implement signature verification
Michael Tremer [Thu, 1 Jun 2023 15:24:57 +0000 (15:24 +0000)] 
keys: Implement signature verification

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Refactor importing keys
Michael Tremer [Thu, 1 Jun 2023 14:10:10 +0000 (14:10 +0000)] 
keys: Refactor importing keys

This is now using the base64 decoder and insists on reading the comment
line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agoutil: Implement decoding base64 data and add tests
Michael Tremer [Thu, 1 Jun 2023 13:56:54 +0000 (13:56 +0000)] 
util: Implement decoding base64 data and add tests

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agoDrop the old keystore as it is not longer being used
Michael Tremer [Thu, 1 Jun 2023 12:43:43 +0000 (12:43 +0000)] 
Drop the old keystore as it is not longer being used

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agokeys: Replace usage of PGP by signify
Michael Tremer [Thu, 1 Jun 2023 12:40:55 +0000 (12:40 +0000)] 
keys: Replace usage of PGP by signify

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agolibpakfire: Drop fetching PGP keys from keyservers
Michael Tremer [Tue, 30 May 2023 10:03:15 +0000 (10:03 +0000)] 
libpakfire: Drop fetching PGP keys from keyservers

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuild: Set CCACHE_DIR
Michael Tremer [Tue, 30 May 2023 18:14:08 +0000 (18:14 +0000)] 
build: Set CCACHE_DIR

This is mostly for completeness and not to cause any problems when there
is a custom ccache configuration inside the jail.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agobuild: Set CCACHE_TEMPDIR to /tmp
Michael Tremer [Tue, 30 May 2023 18:11:56 +0000 (18:11 +0000)] 
build: Set CCACHE_TEMPDIR to /tmp

This will cause that ccache creates any temporary files in /tmp instead
of the cache dir. This caused massive bandwidth and slightly slow builds
with a shared NFS cache.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agodaemon: Wrap Pakfire entirely into a thread
Michael Tremer [Fri, 26 May 2023 17:15:04 +0000 (17:15 +0000)] 
daemon: Wrap Pakfire entirely into a thread

This is an attempt to fix a couple of concurrency issues which cause
that Pakfire does not cleanup any files on disk.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
15 months agodaemon: Make job_id a property
Michael Tremer [Fri, 26 May 2023 16:59:14 +0000 (16:59 +0000)] 
daemon: Make job_id a property

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agoconfig: Allow longer section & key names
Michael Tremer [Thu, 25 May 2023 14:22:24 +0000 (14:22 +0000)] 
config: Allow longer section & key names

This allows us to use UUIDs as repository names

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agofile: Replace /usr/bin/env with the absolute path if possible
Michael Tremer [Thu, 25 May 2023 13:32:30 +0000 (13:32 +0000)] 
file: Replace /usr/bin/env with the absolute path if possible

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agobuild: Fix creating the build environment without a snapshot
Michael Tremer [Thu, 25 May 2023 12:06:01 +0000 (12:06 +0000)] 
build: Fix creating the build environment without a snapshot

For some reason, I really messed this one up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agoarchive: Implement extracting archives into arbitrary locations
Michael Tremer [Thu, 25 May 2023 10:27:09 +0000 (10:27 +0000)] 
archive: Implement extracting archives into arbitrary locations

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agoinstallcheck: Add a function that checks whether a package can be installed
Michael Tremer [Mon, 8 May 2023 13:55:19 +0000 (13:55 +0000)] 
installcheck: Add a function that checks whether a package can be installed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months ago_pakfire: archive: Allow opening packages in any repository
Michael Tremer [Mon, 8 May 2023 13:54:24 +0000 (13:54 +0000)] 
_pakfire: archive: Allow opening packages in any repository

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agorequest: Implement multiinstall for kernel as pooljobs
Michael Tremer [Mon, 8 May 2023 12:15:27 +0000 (12:15 +0000)] 
request: Implement multiinstall for kernel as pooljobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agorequest: Fix passing solver flags
Michael Tremer [Mon, 8 May 2023 12:05:46 +0000 (12:05 +0000)] 
request: Fix passing solver flags

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agojail: Set up the loopback interface
Michael Tremer [Fri, 5 May 2023 10:23:39 +0000 (10:23 +0000)] 
jail: Set up the loopback interface

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agoclient: Add switch to disable test builds
Michael Tremer [Fri, 5 May 2023 07:43:14 +0000 (07:43 +0000)] 
client: Add switch to disable test builds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agocgroups: Prevent falling through to default statement all the time
Michael Tremer [Fri, 5 May 2023 07:42:31 +0000 (07:42 +0000)] 
cgroups: Prevent falling through to default statement all the time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Do not upload any packages for test jobs
Michael Tremer [Fri, 5 May 2023 06:19:03 +0000 (06:19 +0000)] 
daemon: Do not upload any packages for test jobs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agocgroups: Don't create groups in system root for unprivileged users
Michael Tremer [Thu, 4 May 2023 15:43:10 +0000 (15:43 +0000)] 
cgroups: Don't create groups in system root for unprivileged users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agocgroups: Fix checks for file descriptors
Michael Tremer [Thu, 4 May 2023 15:20:07 +0000 (15:20 +0000)] 
cgroups: Fix checks for file descriptors

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopakfire: Log user/group and subids
Michael Tremer [Fri, 5 May 2023 06:09:54 +0000 (06:09 +0000)] 
pakfire: Log user/group and subids

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopakfire: Split comment
Michael Tremer [Fri, 5 May 2023 06:09:44 +0000 (06:09 +0000)] 
pakfire: Split comment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopwd: Use libsubid
Michael Tremer [Fri, 5 May 2023 06:07:52 +0000 (06:07 +0000)] 
pwd: Use libsubid

This is an attempt to read any subids using libsubid from shadow.

However, it seems that libsubid is not entirely thread-safe and randomly
fails. Hence this code is kept disabled for now.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopakfire: Be more verbose when pakfire_create fails
Michael Tremer [Fri, 5 May 2023 06:07:19 +0000 (06:07 +0000)] 
pakfire: Be more verbose when pakfire_create fails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopakfire: Move SUBIDs into user/group structs
Michael Tremer [Thu, 4 May 2023 17:00:25 +0000 (17:00 +0000)] 
pakfire: Move SUBIDs into user/group structs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agoutil: Drop function to fetch user home directory
Michael Tremer [Thu, 4 May 2023 16:44:37 +0000 (16:44 +0000)] 
util: Drop function to fetch user home directory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopakfire: Fetch more user/group information at startup
Michael Tremer [Thu, 4 May 2023 16:41:47 +0000 (16:41 +0000)] 
pakfire: Fetch more user/group information at startup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Finish builds with a regular POST request
Michael Tremer [Wed, 3 May 2023 16:12:46 +0000 (16:12 +0000)] 
hub: Finish builds with a regular POST request

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Set a default ccache path in the configuration
Michael Tremer [Fri, 28 Apr 2023 16:08:39 +0000 (16:08 +0000)] 
daemon: Set a default ccache path in the configuration

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agobuild: Allow setting a different ccache path
Michael Tremer [Fri, 28 Apr 2023 16:06:29 +0000 (16:06 +0000)] 
build: Allow setting a different ccache path

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months ago_pakfire: Improve Python exception raising on build
Michael Tremer [Fri, 28 Apr 2023 15:27:07 +0000 (15:27 +0000)] 
_pakfire: Improve Python exception raising on build

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agobuild: Drop pakfire_build legacy function
Michael Tremer [Fri, 28 Apr 2023 14:18:04 +0000 (14:18 +0000)] 
build: Drop pakfire_build legacy function

Since we need to extend the interface, it is becoming painful to keep
the compat layer working for only one call.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agobuild: Avoid having to steps when not using the snapshot
Michael Tremer [Fri, 28 Apr 2023 13:09:11 +0000 (13:09 +0000)] 
build: Avoid having to steps when not using the snapshot

The build environment can be cached in a snapshot which allows much
faster builds. But sometimes, we don't want to use the snapshot.

In those cases, we will install the default set of packages first and
then we will install the source package. In order to find any dependency
problems quicker, this is now being done in just one step.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Correctly read the CPU model
Michael Tremer [Fri, 28 Apr 2023 08:44:11 +0000 (08:44 +0000)] 
hub: Correctly read the CPU model

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agopwd: Remove static buffer for subid entry
Michael Tremer [Fri, 28 Apr 2023 09:40:26 +0000 (09:40 +0000)] 
pwd: Remove static buffer for subid entry

In the build service, it could happen that Pakfire runs concurrently
which might cause that the statically allocated memory might be
overwritten by another thread.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Automatically fetch a TGT when a keytab has been given
Michael Tremer [Thu, 27 Apr 2023 18:23:15 +0000 (18:23 +0000)] 
hub: Automatically fetch a TGT when a keytab has been given

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Don't use a default keytab
Michael Tremer [Thu, 27 Apr 2023 18:22:52 +0000 (18:22 +0000)] 
hub: Don't use a default keytab

This might overwrite when a user is logged in.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Attempt to reconnect on 502 Proxy Error
Michael Tremer [Thu, 27 Apr 2023 10:23:57 +0000 (10:23 +0000)] 
hub: Attempt to reconnect on 502 Proxy Error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Refactor message handling
Michael Tremer [Wed, 26 Apr 2023 17:19:57 +0000 (17:19 +0000)] 
hub: Refactor message handling

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Build scaffolding to abort builds
Michael Tremer [Wed, 26 Apr 2023 17:14:14 +0000 (17:14 +0000)] 
daemon: Build scaffolding to abort builds

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Rename log message field
Michael Tremer [Wed, 26 Apr 2023 17:01:37 +0000 (17:01 +0000)] 
hub: Rename log message field

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Update message format for job messages
Michael Tremer [Wed, 26 Apr 2023 15:17:00 +0000 (15:17 +0000)] 
hub: Update message format for job messages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Receive jobs over the new control connection
Michael Tremer [Wed, 26 Apr 2023 15:13:53 +0000 (15:13 +0000)] 
daemon: Receive jobs over the new control connection

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Use the new control connection for sending stats
Michael Tremer [Wed, 26 Apr 2023 13:43:14 +0000 (13:43 +0000)] 
daemon: Use the new control connection for sending stats

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agodaemon: Include timestamp in log messages
Michael Tremer [Tue, 25 Apr 2023 14:54:12 +0000 (14:54 +0000)] 
daemon: Include timestamp in log messages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Refactor communication with the hub after merging pakfire-web and -hub
Michael Tremer [Tue, 25 Apr 2023 14:53:32 +0000 (14:53 +0000)] 
hub: Refactor communication with the hub after merging pakfire-web and -hub

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agohub: Move from pakfirehub.ipfire.org to pakfire.ipfire.org
Michael Tremer [Thu, 20 Apr 2023 19:40:09 +0000 (19:40 +0000)] 
hub: Move from pakfirehub.ipfire.org to pakfire.ipfire.org

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
16 months agofile: Check for invalid script interpreters
Michael Tremer [Fri, 14 Apr 2023 10:29:18 +0000 (10:29 +0000)] 
file: Check for invalid script interpreters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months ago_pakfire: Define PY_SSIZE_T_CLEAN
Michael Tremer [Sat, 22 Apr 2023 09:35:56 +0000 (09:35 +0000)] 
_pakfire: Define PY_SSIZE_T_CLEAN

https://docs.python.org/3/c-api/intro.html

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agoRevert "downloader: Drop using deprecated CURLOPT_PROTOCOLS"
Michael Tremer [Thu, 13 Apr 2023 13:47:23 +0000 (13:47 +0000)] 
Revert "downloader: Drop using deprecated CURLOPT_PROTOCOLS"

This reverts commit de08af0247aa2bf56251a168eca186c701dce6c2.

This is difficult to mirgate to since Debian Bullseye ships a version of
cURL which does not support CURLOPT_PROTOCOL_STR, yet. So since on
Bookworm there is only a deprecation warning, we will simply revert this
patch for now and deal with the warning.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agofile: Implement scaffolding for CF protection check
Michael Tremer [Thu, 13 Apr 2023 13:43:40 +0000 (13:43 +0000)] 
file: Implement scaffolding for CF protection check

See #13084

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agobuild: Don't try to bind-mount @local if it does not exist
Michael Tremer [Thu, 13 Apr 2023 11:26:06 +0000 (11:26 +0000)] 
build: Don't try to bind-mount @local if it does not exist

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agoarchive: Remove any nested functions from reading files
Michael Tremer [Wed, 12 Apr 2023 13:55:35 +0000 (13:55 +0000)] 
archive: Remove any nested functions from reading files

Nested functions require an executable stack which we want to avoid.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agodownloader: Drop using deprecated CURLOPT_PROTOCOLS
Michael Tremer [Tue, 11 Apr 2023 16:24:20 +0000 (16:24 +0000)] 
downloader: Drop using deprecated CURLOPT_PROTOCOLS

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Fix coding style of sysusers macro
Michael Tremer [Tue, 11 Apr 2023 12:28:43 +0000 (12:28 +0000)] 
macros: Fix coding style of sysusers macro

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Apply all local sysusers files by default
Michael Tremer [Tue, 11 Apr 2023 12:26:35 +0000 (12:26 +0000)] 
macros: Apply all local sysusers files by default

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Add macro to apply sysusers based users/groups inside the jail
Stefan Schantl [Sat, 1 Apr 2023 08:20:34 +0000 (10:20 +0200)] 
macros: Add macro to apply sysusers based users/groups inside the jail

This macro can be called inside a build file and easily allows to apply
any kind of users/groups specified in a sysusers file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Add macro to automatically install any systemd sysusers files
Stefan Schantl [Sat, 1 Apr 2023 08:18:02 +0000 (10:18 +0200)] 
macros: Add macro to automatically install any systemd sysusers files

This macros works very similar than the tmpfiles one but handles
sysusers files.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agosystemd.macro: Avoid declaring the directory for tmpfiles twice
Stefan Schantl [Sat, 1 Apr 2023 08:10:17 +0000 (10:10 +0200)] 
systemd.macro: Avoid declaring the directory for tmpfiles twice

We allready have declared this directory in the arch macro file,
so there is no need in doing this again.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Add macro to automatically install all systemd sysusers files
Stefan Schantl [Thu, 30 Mar 2023 12:52:29 +0000 (14:52 +0200)] 
macros: Add macro to automatically install all systemd sysusers files

This macros works very similar than the tmpfiles one but handles
sysusers files.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomacros: Introduce sysusersdir
Stefan Schantl [Wed, 29 Mar 2023 11:41:42 +0000 (13:41 +0200)] 
macros: Introduce sysusersdir

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agomeson: Avoid calling meson without setup is deprecated
Stefan Schantl [Wed, 29 Mar 2023 11:40:16 +0000 (13:40 +0200)] 
meson: Avoid calling meson without setup is deprecated

Calling meson without setup as argument when configure
a project is deprecated since a while by the meson developers.

To avoid any problems in future adding this argument.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agoarchive: sysusers: Fix walking through archive for sysusers files
Stefan Schantl [Tue, 28 Mar 2023 17:10:57 +0000 (19:10 +0200)] 
archive: sysusers: Fix walking through archive for sysusers files

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
17 months agoHardening: Declare content of /usr/lib/grub as firmware files
Stefan Schantl [Tue, 28 Mar 2023 08:55:21 +0000 (10:55 +0200)] 
Hardening: Declare content of /usr/lib/grub as firmware files

This folder contains the neccessary files, which are written to
the MBR, dealing with EFI, or loading additional required grub
modules unless the whole grub menu can be displayed or a selected
OS will start up.

Some of these files are 32bit ELF files or do not have SSP etc.

So I would suggest to mark them as firmware files and therefore
skip some of the hardening tests.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
18 months agoparser: Perform a side-lookup for packages in build namespace
Michael Tremer [Fri, 24 Mar 2023 17:27:10 +0000 (17:27 +0000)] 
parser: Perform a side-lookup for packages in build namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>