Commit Graph

21 Commits

Author SHA1 Message Date
Aleksa Sarai
1d5c7e771c
build: drop build-time systemd dependency
On openSUSE, our packages are build in the Open Build Service which does
not have a proper systemd installation that you can query to get the
systemdunitdir.

The simplest solution is to re-add the ability to explicitly set the
systemdunitdir (as was previously possible with the autotools build
system in pre-5.0 LXC).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2022-10-28 14:34:28 +11:00
Đoàn Trần Công Danh
5313e50484
meson.build: allow explicit distrosysconfdir
Allows either:

- Build inside minimal-and-clean chroot with neither
  /etc/sysconfig nor /etc/default available.
- Cross Compile lxc from foreign distro,
  let's say host distro uses /etc/sysconfig and build distro
  uses /etc/default and vice versus.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2022-10-28 14:33:19 +11:00
Serge Hallyn
cfcbdb75f0
use systemd dbus StartTransientUnit for unpriv cgroup2
If, when init'ing cgroups for a container start, we detect that we
are an unprivileged user on a unified-hierarchy-only system, then we
try to request systemd, through dbus api, to create a new scope for
us with delegation.  Call the cgroup it creates for us P1.  We then
create P1/init, move ourselves into there, so we can enable the
controllers for delegation to P1's children through P1/cgroup.subtree_control.

On attach, we try to request systemd attach us to the container's
scope.  We can't do that ourselves in the normal case, as root owns
our login cgroups.

Create a new command api for the lxc monitor to tell lxc-attach the
systemd scope to which to attach.

Changelog:
 * free cgroup_meta.systemd_scope in lxc_conf_free (Thanks Tycho)
 * fix some indent
 * address some (not all) of brauner's feedback

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2022-07-25 18:12:19 -04:00
Christian Brauner
57f4bd73cb
build: map autotools options to meson options in meson_options.txt
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-13 15:46:33 +02:00
Christian Brauner
493bf2ded8
build: add missing memfd-rexec option
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-13 15:33:36 +02:00
Christian Brauner
0c4549a331
build: support thread-safety enforcement as option
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-13 15:33:31 +02:00
Christian Brauner
d42a3b1366
build: add oss-fuzz switch
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-09 23:07:07 +02:00
Christian Brauner
0b9adfdad4
build: add seccomp build option
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-09 23:07:07 +02:00
Christian Brauner
575d0e34ae
build: add additional command line switches
In order to compile for fuzzers where we will need and want to turn a
bunch of things off add command line switches that allow us to do so.

Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-06-08 20:03:05 +02:00
Stéphane Graber
4dd5e0cf13
meson: Add coverity flag
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-06-07 17:18:03 -04:00
Stéphane Graber
8131bb44ec
meson: Add init scripts
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-30 19:16:40 -04:00
Stéphane Graber
b3d189920a
meson: Add tools option
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-27 22:02:36 -04:00
Stéphane Graber
54f1ddb39d
meson_options: Move entries around
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-27 22:02:34 -04:00
Christian Brauner
8c48813a6c
build: add pam_cgfs to meson
Signed-off-by: Christian Brauner (Microsoft) <christian.brauner@ubuntu.com>
2022-05-19 11:49:48 +02:00
Stéphane Graber
9d18059b8d
meson: Add global config
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-12 22:23:58 +02:00
Stéphane Graber
7609de1826
meson: Rework options
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-07 18:47:11 +02:00
Stéphane Graber
0860988ed9
meson: Setup pkgconfig
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-05-01 11:50:18 +02:00
Christian Brauner
747bc634c5
build: add io-uring-event-loop option
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-10-28 17:07:27 +02:00
Christian Brauner
72f1c44ab2
build: add cmd builds
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-27 12:03:04 +02:00
Christian Brauner
dcfe4e135d
build: add more global config variables
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-13 11:03:34 +02:00
Christian Brauner
9b9d56e6e8
build: add meson skeleton
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-09-03 19:06:09 +02:00