1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-13 00:58:27 +03:00

1283 Commits

Author SHA1 Message Date
Yu Watanabe
96ff465861 missing_syscall: name_to_handle_at is supported by glibc since 2.14
Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.
2025-03-04 02:24:49 +09:00
Yu Watanabe
65e844bdb8 missing_syscall: gettid is supported by glibc since 2.30
Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.
2025-03-04 02:24:49 +09:00
Yu Watanabe
69a5c4b14c missing_syscall: getrandom is supported by glibc since 2.25
Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.
2025-03-04 02:24:49 +09:00
Yu Watanabe
6ca5be8d3f missing_syscall: memfd_create() is supported by glibc since 2.27
Now, our baseline of glibc is 2.31, hence it is OK to drop it.
2025-03-04 02:24:36 +09:00
Yu Watanabe
4424e6c811 tree-wide: drop workarounds for statx()
struct statx in glibc header was introduced in glibc-2.28
(fd70af45528d59a00eb3190ef6706cb299488fcd), but at that time,
sys/stat.h conflicts with linux/stat.h. Since glibc-2.30
(5dad6ffbb2b76215cfcd38c3001778536ada8e8a), sys/stat.h includes
linux/stat.h if exists.

Since now our baseline of glibc is 2.31. Hence, we can drop workarounds
for struct statx by importing linux/stat.h from newer kernel (v6.14-rc4).
2025-03-01 00:33:28 +09:00
Lennart Poettering
dadbb34919 profile: generate shell + command OSC events 2025-02-27 15:13:15 +01:00
Mike Yuan
384949f7de core: dlopen()'ify libapparmor
In Arch Linux we currently have a half-baked apparmor support,
in particular we cannot link systemd to libapparmor for service
context integration, since that will pull apparmor into base system.
Hence, let's turn this into a dlopen dep.

Ref: https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/issues/22
2025-02-21 14:22:51 +01:00
Mike Yuan
a0924d96cb
missing_syscall: add {set,remove}xattrat() 2025-02-09 14:51:03 +01:00
Mike Yuan
0f633e5257
missing_syscall: drop more defs below our kernel baseline 2025-02-09 14:51:03 +01:00
Mike Yuan
d43dc71e99
meson: glibc now provides wrapper for sched_setattr()
C.f. 21571ca0d7
2025-02-09 14:51:03 +01:00
Yu Watanabe
be4f4c4343 meson: also skip uid/gid check for nobody user/group when id command not found
Follow-up for 8b413ae4060b21ed4712fdad7eba195890740756.
2025-02-07 10:49:58 +00:00
Vyacheslav Yurkov
8b413ae406 meson: Skip getent when it's not found 2025-02-07 09:15:46 +09:00
Lennart Poettering
81cf3dc466 build: fail the build if we accidentally drop a "const" qualifier on a parameter
let's be strict here, our codebase allows it.
2025-01-20 21:44:23 +01:00
Mike Yuan
9cd064aa9f meson: bump C std to gnu17
GCC 8.4 (our baseline) defaults to gnu17 already.
2025-01-17 19:46:37 +00:00
Zbigniew Jędrzejewski-Szmek
4e97e697c0
Several fixlets for GCC warnings (#36051)
Replaces #36043 and #36039.
2025-01-16 22:41:31 +01:00
Miroslav Lichvar
af96ccfc24 udev: set clock group for PTP and RTC devices
Add a new group for clock devices to enable applications like linuxptp
to open clocks without root privileges.
2025-01-16 21:12:47 +01:00
Yu Watanabe
9c881fa867 fundamental-macro: conditionalize several gcc warning pragmas
This fixes the following error:

In file included from ../src/basic/macro.h:13,
                 from ../src/basic/env-util.h:9,
                 from ../src/nss-systemd/nss-systemd.c:7:
../src/fundamental/macro-fundamental.h:61:9: error: option ‘-Wzero-as-null-pointer-constant’ is valid for C++/ObjC++ but not for C [-Werror=pragmas]
   61 |         _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
      |         ^~~~~~~
../src/nss-systemd/nss-systemd.c:106:1: note: in expansion of macro ‘DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT’
  106 | DISABLE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2025-01-17 04:35:09 +09:00
Lennart Poettering
1d5f0a88e0 fundamental: unify gcc warning pragmas at one place
This also drops HAVE_WSTRINGOP_TRUNCATION as the corresponding option
was introduced in GCC 8, and our baseline is GCC 8.4.
2025-01-17 04:08:58 +09:00
Mike Yuan
70923ed358
meson: enable -Wzero-as-null-pointer-constant
Support for C added in gcc 15:
236c0829ee
2025-01-16 02:26:56 +01:00
Lennart Poettering
7adafb0832 missing: add quotactl_fd() wrapper 2025-01-15 13:24:04 +01:00
Luca Boccassi
af0a28854d meson: add udev/hwdb build aliases
Allows to do:

meson compile libudev udev hwdb
meson install --no-rebuild --tags libudev,udev,hwdb
2025-01-15 09:48:27 +00:00
Lennart Poettering
ec0c10fc9d user-classification: add new "foreign" UID range
This makes the UID range configurable via build time options, but of
course it really shouldn't be changed. The default range I picked is
outside even of IPAs current (ridiculously large) allocation ranges,
hence hopefully minimizes conflicts.
2025-01-08 21:41:03 +01:00
Luca Boccassi
6b61f34a46 Stop installing some markdown docs/ files
These files are rendered on systemd.io and targeted at contributors, not
users, so it's not really useful to install them on a running system.
2025-01-08 09:45:09 +01:00
Yu Watanabe
066e603ac6 meson: drop workaround for CentOS 8
CentOS 8 and RHEL 8 reached EOL.
2025-01-07 02:06:04 +09:00
Daan De Meyer
8224a48da9 Introduce systemd-pty-forward
This allows running a command with tinted terminal background.
2025-01-03 17:07:33 +01:00
Mike Yuan
c439bd25ca
random-util: our baseline includes getrandom() (v3.17) now
Plus, linux/random.h never defined getrandom(), hence remove
the custom machinery for sys/random.h vs linux/random.h
in favor of single HAVE_GETRANDOM.
2025-01-02 20:40:45 +01:00
Mike Yuan
2627cd1343
random-util: drop needless conditionalization of sys/auxv.h
We assume its existence in basic/build-path.c, shared/userdb.c,
and coredump/coredump.c already, for which nothing has been reported
so far. So this seems safe to drop.
2025-01-02 20:34:21 +01:00
Mike Yuan
03ccee1939 errno-list: prefer strerrorname_np() as errno_to_name() provider 2025-01-02 12:01:53 +01:00
Mike Yuan
c415a4816c
tree-wide: drop inclusion of linux/memfd.h
We carry our own definitions in missing_mman.h, and otherwise
sys/mman.h is employed. Let's drop the unneeded detection/inclusion
of linux/memfd.h hence.
2024-12-24 16:56:21 +01:00
Yu Watanabe
a4d1891475 meson: allow to customize the access mode for tty/pts devices
Then, switch the default value to "0600", due to general security
concerns about terminals being written to by other users.

Closing #35599.
2024-12-16 21:36:07 +00:00
Andreas Schwab
f5083b209c dmi: add RISC-V 64bit support 2024-12-05 03:59:32 +09:00
Daan De Meyer
1a077e05fb Add proper dependencies to ukify target
Also remove the systemd-measure dependency from the mkosi target as
mkosi doesn't invoke systemd-measure itself.
2024-11-15 10:32:24 +00:00
Lennart Poettering
67e003d7dd
Introduce systemd-keyutil to do various key/certificate operations (#35095)
Let's gather generic key/certificate operations in a new tool
systemd-keyutil instead of spreading them across various special purpose
tools.

Fixes #35087
2024-11-11 16:09:07 +01:00
Zbigniew Jędrzejewski-Szmek
211d2f972d Rename src/partition to src/repart 2024-11-11 09:17:10 +01:00
Zbigniew Jędrzejewski-Szmek
a32e1f8896 Move growfs+makefs to src/growfs/
Those two programs are used together and it makes sense to keep them
together. makefs is smaller, so name the directory after growfs.
2024-11-10 14:09:46 +01:00
Mike Yuan
e997cfaa73 meson.build: add a few features to summary 2024-11-10 05:39:11 +09:00
Daan De Meyer
4b1ad0398e Introduce systemd-keyutil to do various key/certificate operations
Let's gather generic key/certificate operations in a new tool
systemd-keyutil instead of spreading them across various special
purpose tools.

Fixes #35087
2024-11-08 15:00:21 +01:00
Zbigniew Jędrzejewski-Szmek
97318131fd Rename src/boot/efi to just src/boot
I very much dislike the approach in which we were mixing Linux and UEFI C code
in the same subdirectory. No code was shared between two environments. This
layout was created in e7dd673d1e0acfe5420599588c559fd85a3a9e8f, with the
justification of "being more consistent with the rest of systemd", but I don't
see how it's supposed to be so.

Originally, when the C code was just a single bootctl.c file, this wasn't so
bad. But over time the userspace code grew quite a bit. With the moves done in
previuos commits, the intermediate subdirectory is now empty except for the
efi/ subdir, and this additional subdirectory level doesn't have a good
justification. The components is called "systemd-boot", not "systemd-efi", and
we can remove one level of indentation.
2024-11-07 14:52:06 +01:00
Zbigniew Jędrzejewski-Szmek
5ffff673ac Move systemd-sbsign to its own source subdirectory
It's already two files, and I expect that more will come. It's nicer to give
its own subdirectory to maintain consistent structure.
2024-11-07 14:51:43 +01:00
Zbigniew Jędrzejewski-Szmek
1dabec0056 Move systemd-measure to its own source subdirectory
We have other subdirectories with just a single C file. And I expect
that systemd-measure will only grow over time, adding new functionality.
It's nicer to give its own subdirectory to maintain consistent structure.
2024-11-07 14:50:53 +01:00
Zbigniew Jędrzejewski-Szmek
daf72e8df1 Move bless-boot components to their own source subdirectory 2024-11-07 14:50:41 +01:00
Zbigniew Jędrzejewski-Szmek
0b676aab33 Move bootctl to its own source subdirectory
It's been split into a bunch of files and deserves its own subdirectory
similarly to systemctl.
2024-11-07 14:15:00 +01:00
Luca Boccassi
d145d1d410 meson: update version numbers for 257~rc1 2024-11-06 16:58:14 +00:00
Zbigniew Jędrzejewski-Szmek
243b63d8a6 meson: add separate option for sysupdated, disable in release builds
This commit introduces a build-time option to enable/disable sysupdated
separately from sysupdate. 'auto' translated to enabled by default in
developer builds.
2024-10-31 21:08:08 +00:00
Zhou Qiankang
85d0aff84c meson: add loongarch64's definition to cpu_arch_defines
The default definition to add is `-D__loongarch64__`, which is not searched in [bpf_tracing.h](09b9e83102/src/bpf_tracing.h (L68))

This may avoid `error: Must specify a BPF target arch via __TARGET_ARCH_xxx` in loongarch64

Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com>
2024-10-28 15:21:55 +09:00
anonymix007
cefa196723 macro: Add DISABLE_WARNING_STRINGOP_OVERREAD
While at it, also add -Wunknown-warning-option to basic_disabled_warnings to fix compilation with clang
2024-10-11 23:07:44 +03:00
Lennart Poettering
882032faaf meson: sort includes 2024-10-11 10:41:06 +02:00
Mike Yuan
f005e267bc
path-lookup: move from basic/ to libsystemd/
So that sd_path_lookup() can be utilized to replace
duplicate functions.
2024-10-06 19:27:12 +02:00
Luca Boccassi
394c61416c core: load IPE policy on boot
IPE is a new LSM being introduced in 6.12. Like IMA, it works based on a
policy file that has to be loaded at boot, the earlier the better. So
like IMA, if such a policy is present, load it and activate it.

If there are any .p7b files in /etc/ipe/, load them as policies.
The files have to be inline signed in DER format as per IPE documentation.

For more information on the details of IPE:

https://microsoft.github.io/ipe/
2024-10-02 18:29:43 +02:00
Helmut Grohne
608009dc62 bpf: fix cross build failure on Debian
For compiling bpf code, the system include directory needs to be
constructed. On Debian-like systems, this requires passing a multiarch
directory. Since clang's -dump-machine prints something other that the
multiarch triplet, gcc was interrogated earlier, but that also yields a
wrong result for cross compilation and was thus skipped resulting in
clang not finding asm/types.h.

Rather than, -dump-machine we should ask for -print-multiarch (which
rarely differs). Whenever gcc is in use, this is right (even for cross
building). Since clang does not support -print-multiarch and its
-dump-machine never matches Debian's multiarch, we resort to asking gcc
when building natively. For cross builds using clang, we are out of
luck.
2024-10-01 22:08:06 +02:00