From a09825ce9fb3bd315f35654b6e6ee4f92c675cde Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 1 Jul 2024 18:06:45 +0200 Subject: [PATCH 1/4] test: install /etc/hosts Needed for resolving the "localhost" hostname. --- test/test-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-functions b/test/test-functions index 8b497b2e27..16e9c9c12a 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1947,6 +1947,7 @@ EOF install_config_files() { dinfo "Install config files" inst /etc/sysconfig/init || : + inst /etc/hosts inst /etc/passwd inst /etc/shadow inst_any /etc/login.defs /usr/etc/login.defs From 56a894e888002f44f3463b3188f9d5abdcca4bb0 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 2 Jul 2024 10:33:29 +0200 Subject: [PATCH 2/4] test: fix TEST-24-CRYPTSETUP on SUSE /etc/systemd/journald.conf.d drop-in dir already exists on SUSE. --- test/TEST-24-CRYPTSETUP/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TEST-24-CRYPTSETUP/test.sh b/test/TEST-24-CRYPTSETUP/test.sh index a7e118c4f0..a275cca302 100755 --- a/test/TEST-24-CRYPTSETUP/test.sh +++ b/test/TEST-24-CRYPTSETUP/test.sh @@ -198,7 +198,7 @@ EOF # Forward journal messages to the console, so we have something to investigate even if we fail to mount # the encrypted /var - mkdir "$initdir/etc/systemd/journald.conf.d/" + mkdir -p "$initdir/etc/systemd/journald.conf.d/" echo -ne "[Journal]\nForwardToConsole=yes\n" >"$initdir/etc/systemd/journald.conf.d/99-forward.conf" # If $INITRD wasn't provided explicitly, generate a custom one with dm-crypt From 855bad331e28a03d7ad5831caacd3481db938180 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 2 Jul 2024 15:20:18 +0200 Subject: [PATCH 3/4] test: preserve symlink in inst_recursive() On SUSE this function is used to copy symlinks installed in *.wants/ directories. --- test/test-functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-functions b/test/test-functions index 16e9c9c12a..03f188b0a2 100644 --- a/test/test-functions +++ b/test/test-functions @@ -2960,6 +2960,8 @@ inst_recursive() { while read -r item; do if [[ -d "$item" ]]; then inst_dir "$item" + elif [[ -L "$item" ]]; then + inst_symlink "$item" elif [[ -f "$item" ]]; then inst_simple "$item" fi From 252542ffc3fda9b110d108a1bce1a1d562baebd4 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 2 Jul 2024 18:55:17 +0200 Subject: [PATCH 4/4] test: fix TEST-74-AUX-UTILS.ssh.sh on SUSE --- test/units/TEST-74-AUX-UTILS.ssh.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/units/TEST-74-AUX-UTILS.ssh.sh b/test/units/TEST-74-AUX-UTILS.ssh.sh index 5d87d9f7ac..79055a1841 100755 --- a/test/units/TEST-74-AUX-UTILS.ssh.sh +++ b/test/units/TEST-74-AUX-UTILS.ssh.sh @@ -46,7 +46,10 @@ test -f /etc/ssh/ssh_host_rsa_key || ssh-keygen -t rsa -C '' -N '' -f /etc/ssh/s echo "PermitRootLogin yes" >> /etc/ssh/sshd_config echo "LogLevel DEBUG3" >> /etc/ssh/sshd_config -test -f /etc/ssh/ssh_config || echo 'Include /etc/ssh/ssh_config.d/*.conf' > /etc/ssh/ssh_config +test -f /etc/ssh/ssh_config || { + echo 'Include /etc/ssh/ssh_config.d/*.conf' + echo 'Include /usr/etc/ssh/ssh_config.d/*.conf' +} >/etc/ssh/ssh_config # ssh wants this dir around, but distros cannot agree on a common name for it, let's just create all that are aware of distros use mkdir -p /usr/share/empty.sshd /var/empty /var/empty/sshd /run/sshd