mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
test: add support for NO_BUILD=1 on openSUSE
This commit is contained in:
parent
ced10d4838
commit
abf062674e
|
@ -935,11 +935,52 @@ install_debian_systemd() {
|
|||
done < <(grep -E '^Package:' "${SOURCE_DIR}/debian/control" | cut -d ':' -f 2)
|
||||
}
|
||||
|
||||
install_suse_systemd() {
|
||||
local testsdir=/usr/lib/systemd/tests
|
||||
local pkgs
|
||||
|
||||
dinfo "Install SUSE systemd"
|
||||
|
||||
pkgs=(
|
||||
systemd
|
||||
systemd-container
|
||||
systemd-coredump
|
||||
systemd-experimental
|
||||
systemd-journal-remote
|
||||
systemd-portable
|
||||
udev
|
||||
)
|
||||
|
||||
for p in "${pkgs[@]}"; do
|
||||
rpm -q "$p" &>/dev/null || continue
|
||||
|
||||
ddebug "Install files from package $p"
|
||||
while read -r f; do
|
||||
[ -e "$f" ] || continue
|
||||
[ -d "$f" ] && continue
|
||||
inst "$f"
|
||||
done < <(rpm -ql "$p")
|
||||
done
|
||||
|
||||
# we only need testsdata dir as well as the unit tests (for
|
||||
# TEST-02-UNITTESTS) in the image.
|
||||
dinfo "Install unit tests and testdata directory"
|
||||
|
||||
mkdir -p "$initdir/$testsdir"
|
||||
cp "$testsdir"/test-* "$initdir/$testsdir/"
|
||||
cp -a "$testsdir/testdata" "$initdir/$testsdir/"
|
||||
|
||||
# On openSUSE, these dirs are not created at package install for now on.
|
||||
mkdir -p "$initdir/var/log/journal/remote"
|
||||
}
|
||||
|
||||
install_distro_systemd() {
|
||||
dinfo "Install distro systemd"
|
||||
|
||||
if get_bool "$LOOKS_LIKE_DEBIAN"; then
|
||||
install_debian_systemd
|
||||
elif get_bool "$LOOKS_LIKE_SUSE"; then
|
||||
install_suse_systemd
|
||||
else
|
||||
dfatal "NO_BUILD not supported for this distro"
|
||||
exit 1
|
||||
|
@ -957,8 +998,6 @@ install_systemd() {
|
|||
# remove unneeded documentation
|
||||
rm -fr "$initdir"/usr/share/{man,doc}
|
||||
|
||||
get_bool "$LOOKS_LIKE_SUSE" && setup_suse
|
||||
|
||||
# enable debug logging in PID1
|
||||
echo LogLevel=debug >>"$initdir/etc/systemd/system.conf"
|
||||
# store coredumps in journal
|
||||
|
@ -2405,12 +2444,6 @@ instmods() {
|
|||
return 0
|
||||
}
|
||||
|
||||
setup_suse() {
|
||||
ln -fs ../usr/bin/systemctl "${initdir:?}/bin/"
|
||||
ln -fs ../usr/lib/systemd "$initdir/lib/"
|
||||
inst_simple "/usr/lib/systemd/system/haveged.service"
|
||||
}
|
||||
|
||||
_umount_dir() {
|
||||
local mountpoint="${1:?}"
|
||||
if mountpoint -q "$mountpoint"; then
|
||||
|
|
Loading…
Reference in a new issue