mirror of
https://github.com/systemd/systemd
synced 2026-04-13 10:35:08 +02:00
Compare commits
No commits in common. "ba900c1719549f09bb388207e5b879af99423acc" and "e91aa2ea23e17c3f589376aab626adc2096e97c7" have entirely different histories.
ba900c1719
...
e91aa2ea23
2
.github/workflows/mkosi.yml
vendored
2
.github/workflows/mkosi.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||
- uses: systemd/mkosi@30288805db1a953ea31045933adb93194f91e3da
|
||||
- uses: systemd/mkosi@01ea953fd2af738f974b228991c768c12b50db95
|
||||
|
||||
- name: Install
|
||||
run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2
|
||||
|
||||
41
meson.build
41
meson.build
@ -989,32 +989,12 @@ if want_bpf_framework == 'false'
|
||||
else
|
||||
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
|
||||
# (like clang-10/llvm-strip-10)
|
||||
if meson.is_cross_build() or cc.get_id() != 'clang' or cc.cmd_array()[0].contains('afl-clang') or cc.cmd_array()[0].contains('hfuzz-clang')
|
||||
r = find_program('clang', required : bpf_framework_required)
|
||||
clang_found = r.found()
|
||||
if clang_found
|
||||
if meson.version().version_compare('>= 0.55')
|
||||
clang = [r.full_path()]
|
||||
else
|
||||
clang = [r.path()]
|
||||
endif
|
||||
endif
|
||||
# Assume that the required flags are supported by the found clang.
|
||||
clang_supports_flags = clang_found
|
||||
else
|
||||
clang_found = true
|
||||
clang = cc.cmd_array()
|
||||
clang_supports_flags = cc.has_argument('-Wno-compare-distinct-pointer-types')
|
||||
clang_bin = cc.get_id() == 'clang' ? cc.cmd_array()[0] : 'clang'
|
||||
if meson.is_cross_build() or clang_bin.contains('afl-clang') or clang_bin.contains('hfuzz-clang')
|
||||
clang_bin = 'clang'
|
||||
endif
|
||||
|
||||
if clang_found
|
||||
# Check if 'clang -target bpf' is supported.
|
||||
clang_supports_bpf = run_command(clang, '-target', 'bpf', '--print-supported-cpus', check : false).returncode() == 0
|
||||
else
|
||||
clang_supports_bpf = false
|
||||
endif
|
||||
|
||||
if not meson.is_cross_build() and clang_found
|
||||
clang = find_program(clang_bin, required : bpf_framework_required)
|
||||
if not meson.is_cross_build() and clang.found()
|
||||
llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
|
||||
check : true).stdout().strip()
|
||||
else
|
||||
@ -1024,14 +1004,9 @@ else
|
||||
|
||||
# Debian installs this in /usr/sbin/ which is not in $PATH.
|
||||
# We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
|
||||
# We use 'bpftool gen' subcommand, it was added by 985ead416df39d6fe8e89580cc1db6aa273e0175 (v5.6).
|
||||
bpftool = find_program('bpftool',
|
||||
'/usr/sbin/bpftool',
|
||||
required : bpf_framework_required,
|
||||
version : '>= 5.6')
|
||||
|
||||
deps_found = libbpf.found() and clang_found and clang_supports_bpf and clang_supports_flags and llvm_strip.found() and bpftool.found()
|
||||
bpftool = find_program('bpftool', '/usr/sbin/bpftool', required : bpf_framework_required)
|
||||
|
||||
deps_found = libbpf.found() and clang.found() and llvm_strip.found() and bpftool.found()
|
||||
# Can build BPF program from source code in restricted C
|
||||
conf.set10('BPF_FRAMEWORK', deps_found)
|
||||
endif
|
||||
@ -3901,7 +3876,7 @@ if git.found()
|
||||
command : [env, 'etags', '-o', '@0@/TAGS'.format(project_source_root)] + all_files)
|
||||
run_target(
|
||||
'ctags',
|
||||
command : [env, 'ctags', '--tag-relative=never', '-o', '@0@/tags'.format(project_source_root)] + all_files)
|
||||
command : [env, 'ctags', '-o', '@0@/tags'.format(project_source_root)] + all_files)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
[Distribution]
|
||||
Distribution=debian
|
||||
Release=testing
|
||||
Release=unstable
|
||||
|
||||
[Packages]
|
||||
BuildPackages=
|
||||
|
||||
@ -1314,15 +1314,11 @@ static int append_cgroup(sd_bus_message *reply, const char *p, Set *pids) {
|
||||
for (;;) {
|
||||
pid_t pid;
|
||||
|
||||
/* libvirt / qemu uses threaded mode and cgroup.procs cannot be read at the lower levels.
|
||||
* From https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#threads,
|
||||
* “cgroup.procs” in a threaded domain cgroup contains the PIDs of all processes in
|
||||
* the subtree and is not readable in the subtree proper. */
|
||||
r = cg_read_pid(f, &pid);
|
||||
if (IN_SET(r, 0, -EOPNOTSUPP))
|
||||
break;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
if (is_kernel_thread(pid) > 0)
|
||||
continue;
|
||||
|
||||
@ -89,6 +89,7 @@ static int show_cgroup_one_by_path(
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_free_ char *p = NULL;
|
||||
size_t n = 0;
|
||||
pid_t pid;
|
||||
char *fn;
|
||||
int r;
|
||||
|
||||
@ -101,18 +102,7 @@ static int show_cgroup_one_by_path(
|
||||
if (!f)
|
||||
return -errno;
|
||||
|
||||
for (;;) {
|
||||
pid_t pid;
|
||||
|
||||
/* libvirt / qemu uses threaded mode and cgroup.procs cannot be read at the lower levels.
|
||||
* From https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#threads,
|
||||
* “cgroup.procs” in a threaded domain cgroup contains the PIDs of all processes in
|
||||
* the subtree and is not readable in the subtree proper. */
|
||||
r = cg_read_pid(f, &pid);
|
||||
if (IN_SET(r, 0, -EOPNOTSUPP))
|
||||
break;
|
||||
if (r < 0)
|
||||
return r;
|
||||
while ((r = cg_read_pid(f, &pid)) > 0) {
|
||||
|
||||
if (!(flags & OUTPUT_KERNEL_THREADS) && is_kernel_thread(pid) > 0)
|
||||
continue;
|
||||
@ -123,6 +113,9 @@ static int show_cgroup_one_by_path(
|
||||
pids[n++] = pid;
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
show_pid_array(pids, n, prefix, n_columns, false, more, flags);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -333,7 +333,7 @@ TEST_RET(copy_holes) {
|
||||
assert_se(fd >= 0);
|
||||
|
||||
fd_copy = mkostemp_safe(fn_copy);
|
||||
assert_se(fd_copy >= 0);
|
||||
assert_se(fd >= 0);
|
||||
|
||||
r = RET_NERRNO(fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 1));
|
||||
if (ERRNO_IS_NOT_SUPPORTED(r))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user