1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-22 06:50:18 +03:00

Merge pull request #15527 from Werkov/mkosi-opensuse

Add mkosi config for openSUSE Tumbleweed
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-04-23 11:00:02 +02:00 committed by GitHub
commit ca57eed2e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 5 deletions

View File

@ -31,7 +31,6 @@ BuildPackages=
gnu-efi-devel
gnutls-devel
gperf
hostname
iptables-devel
kmod-devel
libacl-devel

60
.mkosi/mkosi.opensuse Normal file
View File

@ -0,0 +1,60 @@
# SPDX-License-Identifier: LGPL-2.1+
# This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
# Simply invoke "mkosi" in the project directory to build an OS image.
[Distribution]
Distribution=opensuse
Release=tumbleweed
[Output]
Format=raw_btrfs
Bootable=yes
[Partitions]
RootSize=3G
[Packages]
# Uncomment to share system RPM cache (works only with Tumbleweed)
#Cache=/var/cache/zypp/packages
BuildDirectory=mkosi.builddir
BuildPackages=
docbook-xsl-stylesheets
fdupes
gcc
gnu-efi
gperf
intltool
libacl-devel
libapparmor-devel
libblkid-devel
libbz2-devel
libcap-devel
libcryptsetup-devel
libcurl-devel
libgcrypt-devel
libkmod-devel
liblz4-devel
libmicrohttpd-devel
libmount-devel
libseccomp-devel
libselinux-devel
libxslt-tools
m4
meson
pam-devel
pciutils-devel
pcre-devel
python3
python3-lxml
qrencode-devel
zlib-devel
# to satisfy tests
acl
glibc-locale
system-group-obsolete
timezone
Packages=
# brought in via meson->python3
libp11-kit0

View File

@ -42,6 +42,14 @@ fi
if [ ! -f "$BUILDDIR"/build.ninja ] ; then
sysvinit_path=`realpath /etc/init.d`
init_path=`realpath /sbin/init 2>/dev/null`
if [ -z "$init_path" ] ; then
rootprefix=""
else
rootprefix=${init_path%/lib/systemd/systemd}
rootprefix=/${rootprefix#/}
fi
nobody_user=`id -u -n 65534 2> /dev/null`
if [ "$nobody_user" != "" ] ; then
# Validate that we can translate forth and back
@ -76,11 +84,17 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
fi
fi
meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D default-hierarchy=unified -D man=false -D "nobody-user=$nobody_user" -D "nobody-group=$nobody_group"
meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D "rootprefix=$rootprefix" -D default-hierarchy=unified -D man=false -D "nobody-user=$nobody_user" -D "nobody-group=$nobody_group"
fi
ninja -C "$BUILDDIR" all
[ "$WITH_TESTS" = 0 ] || ninja -C "$BUILDDIR" test
if [ "$WITH_TESTS" = 1 ] ; then
for id in 1 2 3; do
groupadd -g $id testgroup$id || :
done
ninja -C "$BUILDDIR" test
fi
ninja -C "$BUILDDIR" install
mkdir -p "$DESTDIR"/etc

View File

@ -27,5 +27,5 @@ ExecStart=test %h = /root
ExecStart=sh -c 'test %s = /bin/sh'
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
ExecStart=sh -c 'test %H = $$(hostname)'
ExecStart=sh -c 'test %H = $$(uname -n)'
ExecStart=sh -c 'test %v = $$(uname -r)'

View File

@ -25,5 +25,5 @@ ExecStart=test %h = /root
ExecStart=sh -c 'test %s = /bin/sh'
ExecStart=sh -c 'test %m = $$(cat /etc/machine-id)'
ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
ExecStart=sh -c 'test %H = $$(hostname)'
ExecStart=sh -c 'test %H = $$(uname -n)'
ExecStart=sh -c 'test %v = $$(uname -r)'