systemd/0240-test-ignore-the-error-about-our-own-libraries-missin.patch
Jan Macku 0daf48d9aa systemd-250-8
Resolves: #2047682,#2068043,#2068131,#2073003,#2073994,#2082131,#2083493,#2087652,#2100340
2022-07-20 08:37:23 +02:00

57 lines
2.7 KiB
Diff

From 07d0debc02fb8a9f51ff06a03ceb2302e4982166 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 15 Dec 2021 09:14:44 +0100
Subject: [PATCH] test: ignore the error about our own libraries missing during
image creation
19:50:59 F: Missing a shared library required by /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so.
19:50:59 F: Run "ldd /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so" to find out what it is.
19:50:59 F: libsystemd-shared-250.so => not found
19:50:59 F: Cannot create a test image.
(cherry picked from commit ff254eea8feb55bbea9ec5d731e3dc9299b80b9e)
Related: #2087652
---
test/test-functions | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/test/test-functions b/test/test-functions
index 1b10112329..a0ad8b2fb1 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -2021,11 +2021,9 @@ inst_libs() {
while read -r line; do
[[ "$line" = 'not a dynamic executable' ]] && break
- # Skip a harmless error when running the tests on a system with a significantly
- # older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0,
- # which is in this case older than the already installed libsystemd.so.0 in $initdir).
- # The issue is triggered by installing test dependencies in install_missing_libraries().
- [[ "$line" =~ libsystemd.so.*:\ version\ .*\ not\ found ]] && continue
+ # Ignore errors about our own stuff missing. This is most likely caused
+ # by ldd attempting to use the unprefixed RPATH.
+ [[ "$line" =~ libsystemd.*\ not\ found ]] && continue
if [[ "$line" =~ $so_regex ]]; then
file="${BASH_REMATCH[1]}"
@@ -2413,7 +2411,7 @@ inst_binary() {
# In certain cases we might attempt to install a binary which is already
# present in the test image, yet it's missing from the host system.
# In such cases, let's check if the binary indeed exists in the image
- # before doing any other chcecks. If it does, immediately return with
+ # before doing any other checks. If it does, immediately return with
# success.
if [[ $# -eq 1 ]]; then
for path in "" bin sbin usr/bin usr/sbin; do
@@ -2432,6 +2430,10 @@ inst_binary() {
while read -r line; do
[[ "$line" = 'not a dynamic executable' ]] && break
+ # Ignore errors about our own stuff missing. This is most likely caused
+ # by ldd attempting to use the unprefixed RPATH.
+ [[ "$line" =~ libsystemd.*\ not\ found ]] && continue
+
if [[ "$line" =~ $so_regex ]]; then
file="${BASH_REMATCH[1]}"
[[ -e "${initdir}/$file" ]] && continue