|
|
594167 |
From 90fb011c43410958e5bda6f470137522f536adb4 Mon Sep 17 00:00:00 2001
|
|
|
594167 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
594167 |
Date: Mon, 28 Mar 2022 20:03:37 +0200
|
|
|
594167 |
Subject: [PATCH] test-systemctl-enable: also use freshly-built systemd-id128
|
|
|
594167 |
|
|
|
594167 |
Tests were failing on centos7 because systemd-id128 is not in path.
|
|
|
594167 |
|
|
|
594167 |
(cherry picked from commit 2a2d002fb0913fe931b4ac903ca425a725aa79c0)
|
|
|
594167 |
|
|
|
594167 |
Related: #2082131
|
|
|
594167 |
---
|
|
|
594167 |
meson.build | 21 ++++++++++++---------
|
|
|
594167 |
test/test-systemctl-enable.sh | 5 +++--
|
|
|
594167 |
2 files changed, 15 insertions(+), 11 deletions(-)
|
|
|
594167 |
|
|
|
594167 |
diff --git a/meson.build b/meson.build
|
|
|
594167 |
index 005af872cf..4fc3e64e54 100644
|
|
|
594167 |
--- a/meson.build
|
|
|
594167 |
+++ b/meson.build
|
|
|
594167 |
@@ -2371,7 +2371,7 @@ public_programs += executable(
|
|
|
594167 |
install_rpath : rootlibexecdir,
|
|
|
594167 |
install : true)
|
|
|
594167 |
|
|
|
594167 |
-exe = executable(
|
|
|
594167 |
+systemctl = executable(
|
|
|
594167 |
'systemctl',
|
|
|
594167 |
systemctl_sources,
|
|
|
594167 |
include_directories : includes,
|
|
|
594167 |
@@ -2385,13 +2385,7 @@ exe = executable(
|
|
|
594167 |
install_rpath : rootlibexecdir,
|
|
|
594167 |
install : true,
|
|
|
594167 |
install_dir : rootbindir)
|
|
|
594167 |
-public_programs += exe
|
|
|
594167 |
-if want_tests != 'false'
|
|
|
594167 |
- test('test-systemctl-enable',
|
|
|
594167 |
- test_systemctl_enable_sh,
|
|
|
594167 |
- # https://github.com/mesonbuild/meson/issues/2681
|
|
|
594167 |
- args : exe.full_path())
|
|
|
594167 |
-endif
|
|
|
594167 |
+public_programs += systemctl
|
|
|
594167 |
|
|
|
594167 |
if conf.get('ENABLE_PORTABLED') == 1
|
|
|
594167 |
dbus_programs += executable(
|
|
|
594167 |
@@ -3188,13 +3182,22 @@ executable(
|
|
|
594167 |
install : true,
|
|
|
594167 |
install_dir : rootlibexecdir)
|
|
|
594167 |
|
|
|
594167 |
-public_programs += executable(
|
|
|
594167 |
+systemd_id128 = executable(
|
|
|
594167 |
'systemd-id128',
|
|
|
594167 |
'src/id128/id128.c',
|
|
|
594167 |
include_directories : includes,
|
|
|
594167 |
link_with : [libshared],
|
|
|
594167 |
install_rpath : rootlibexecdir,
|
|
|
594167 |
install : true)
|
|
|
594167 |
+public_programs += systemd_id128
|
|
|
594167 |
+
|
|
|
594167 |
+if want_tests != 'false'
|
|
|
594167 |
+ test('test-systemctl-enable',
|
|
|
594167 |
+ test_systemctl_enable_sh,
|
|
|
594167 |
+ # https://github.com/mesonbuild/meson/issues/2681
|
|
|
594167 |
+ args : [systemctl.full_path(),
|
|
|
594167 |
+ systemd_id128.full_path()])
|
|
|
594167 |
+endif
|
|
|
594167 |
|
|
|
594167 |
public_programs += executable(
|
|
|
594167 |
'systemd-path',
|
|
|
594167 |
diff --git a/test/test-systemctl-enable.sh b/test/test-systemctl-enable.sh
|
|
|
594167 |
index ecb433380e..8eb2828e35 100644
|
|
|
594167 |
--- a/test/test-systemctl-enable.sh
|
|
|
594167 |
+++ b/test/test-systemctl-enable.sh
|
|
|
594167 |
@@ -6,6 +6,7 @@ set -ex
|
|
|
594167 |
export SYSTEMD_IGNORE_CHROOT=1
|
|
|
594167 |
|
|
|
594167 |
systemctl=${1:-systemctl}
|
|
|
594167 |
+systemd_id128=${2:-systemd-id128}
|
|
|
594167 |
|
|
|
594167 |
unset root
|
|
|
594167 |
cleanup() {
|
|
|
594167 |
@@ -606,7 +607,7 @@ check_alias o 'the-id'
|
|
|
594167 |
check_alias w '39a'
|
|
|
594167 |
check_alias W 'right'
|
|
|
594167 |
|
|
|
594167 |
-check_alias b "$(systemd-id128 boot-id)"
|
|
|
594167 |
+check_alias b "$("$systemd_id128" boot-id)"
|
|
|
594167 |
|
|
|
594167 |
# Specifiers not available for [Install]
|
|
|
594167 |
( ! check_alias C '' )
|
|
|
594167 |
@@ -637,7 +638,7 @@ check_alias l "$(uname -n | sed 's/\..*//')"
|
|
|
594167 |
test ! -e "$root/etc/machine-id"
|
|
|
594167 |
( ! check_alias m '' )
|
|
|
594167 |
|
|
|
594167 |
-systemd-id128 new >"$root/etc/machine-id"
|
|
|
594167 |
+"$systemd_id128" new >"$root/etc/machine-id"
|
|
|
594167 |
check_alias m "$(cat "$root/etc/machine-id")"
|
|
|
594167 |
|
|
|
594167 |
check_alias n 'some-some-link6@.socket'
|