Merge pull request #32477 from DaanDeMeyer/fixes

Various fixes
This commit is contained in:
Daan De Meyer
2024-04-25 18:24:09 +02:00
committed by GitHub
50 changed files with 109 additions and 150 deletions

View File

@@ -321,6 +321,7 @@ meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
slow_tests = want_tests != 'false' and get_option('slow-tests')
fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
integration_tests = want_tests != 'false' and get_option('integration-tests')
install_tests = want_tests != 'false' and get_option('install-tests')
if add_languages('cpp', native : false, required : fuzzer_build)
@@ -2574,6 +2575,18 @@ endif
#####################################################################
mkosi = find_program('mkosi', required : false)
if integration_tests and not mkosi.found()
error('Could not find mkosi which is required to run the integration tests')
endif
mkosi_depends = public_programs
foreach executable : ['systemd-journal-remote', 'systemd-measure']
if executable in executables_by_name
mkosi_depends += [executables_by_name[executable]]
endif
endforeach
if mkosi.found()
custom_target('mkosi',
build_always_stale : true,
@@ -2588,13 +2601,9 @@ if mkosi.found()
'--build-dir', meson.current_build_dir() / 'mkosi.builddir',
'--force',
'--debug',
'build'
],
depends : public_programs + [
executables_by_name['systemd-journal-remote'],
executables_by_name['systemd-measure'],
ukify,
'build',
],
depends : mkosi_depends,
)
endif

View File

@@ -40,6 +40,7 @@ Packages=
quota-tools
sbsigntools
shadow
squashfs-tools
tpm2-tss
vim

View File

@@ -52,6 +52,7 @@ Packages=
selinux-policy
selinux-policy-targeted
setools-console
squashfs-tools
util-linux
vim-common

View File

@@ -61,6 +61,7 @@ Packages=
psmisc
quota
sbsigntool
squashfs-tools
tzdata
xxd

View File

@@ -61,6 +61,7 @@ Packages=
sbsigntools
sed
shadow
squashfs
timezone
user(bin)
user(daemon)

View File

@@ -19,6 +19,9 @@ enable dbus-broker.service
enable systemd-networkd.service
enable systemd-networkd-wait-online.service
# systemd-resolved is disable by default on CentOS so make sure it is enabled.
enable systemd-resolved.service
# We install dnf in some images but it's only going to be used rarely,
# so let's not have dnf create its cache.
disable dnf-makecache.*

View File

@@ -83,8 +83,7 @@ static int run(int argc, char *argv[]) {
/* This is mostly intended to be used for scripts which want
* to detect whether AC power is plugged in or not. */
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -226,9 +226,7 @@ static int run(int argc, char *argv[]) {
usec_t timeout;
int r;
log_show_color(true);
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -499,8 +499,7 @@ static int run(int argc, char *argv[]) {
int r;
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -79,8 +79,7 @@ static int run(int argc, char *argv[]) {
uint32_t n;
int r;
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -1160,9 +1160,7 @@ static int measure_main(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
int r;
log_show_color(true);
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -797,9 +797,7 @@ static int run(int argc, char *argv[]) {
size_t vks;
int slot, slot_to_wipe, r;
log_show_color(true);
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -84,8 +84,7 @@ static int load_and_print(void) {
static int run(int argc, char *argv[]) {
int r;
log_parse_environment();
log_open();
log_setup();
if (argc > 1)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");

View File

@@ -33,8 +33,7 @@ static inline void fuzz_setup_logging(void) {
* in a fuzzing mode, so disable most of the logging. */
log_set_assert_return_is_critical(true);
log_set_max_level(LOG_CRIT);
log_parse_environment();
log_open();
log_setup();
}
/* Force value to not be optimized away. */

View File

@@ -120,8 +120,7 @@ static int hwdb_main(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
int r;
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -1070,8 +1070,7 @@ static int run(int argc, char **argv) {
_cleanup_free_ char *cert = NULL, *trust = NULL;
int r;
log_show_color(true);
log_parse_environment();
log_setup();
/* The journal merging logic potentially needs a lot of fds. */
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);

View File

@@ -764,8 +764,7 @@ static int run(int argc, char **argv) {
bool use_journal;
int r;
log_show_color(true);
log_parse_environment();
log_setup();
/* The journal merging logic potentially needs a lot of fds. */
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);

View File

@@ -305,8 +305,7 @@ static int run(int argc, char *argv[]) {
_cleanup_free_ char *message = NULL;
int r;
log_open();
log_parse_environment();
log_setup();
sigbus_install();

View File

@@ -257,9 +257,7 @@ static int run(int argc, char *argv[]) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
int r;
log_show_color(true);
log_parse_environment();
log_open();
log_setup();
r = parse_argv(argc, argv);
if (r <= 0)

View File

@@ -190,8 +190,7 @@ static int do_umount(const char *user) {
static int run(int argc, char *argv[]) {
int r;
log_parse_environment();
log_open();
log_setup();
if (argc != 3)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),

Some files were not shown because too many files have changed in this diff Show More