1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

Merge pull request #31092 from DaanDeMeyer/auto-features

mkosi: Use --auto-features=enabled for meson
This commit is contained in:
Daan De Meyer 2024-01-26 08:59:16 +01:00 committed by GitHub
commit 9b8dd5fbea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 39 additions and 78 deletions

View File

@ -44,23 +44,8 @@ EOF
fi
if [ ! -f "$BUILDDIR"/build.ninja ]; then
[[ -d /etc/rc.d/init.d ]] && sysvinit_path="/etc/rc.d/init.d" || sysvinit_path="/etc/init.d"
if [ "$ID" = "centos" ] && [ "$VERSION" = "8" ]; then
UKIFY="disabled"
else
UKIFY="enabled"
fi
# On Debian 'loadkeys us' fails
if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
DEFAULT_KEYMAP=""
else
DEFAULT_KEYMAP="us"
fi
CONFIGURE_OPTS=(
-D sysvinit-path="$sysvinit_path"
-D sysvinit-path="$([[ -d /etc/rc.d/init.d ]] && echo /etc/rc.d/init.d || echo /etc/init.d)"
-D man=disabled
-D translations=false
-D version-tag="${VERSION_TAG}"
@ -79,8 +64,6 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
-D tpm=true
-D environment-d=true
-D binfmt=true
-D repart=enabled
-D sysupdate=enabled
-D coredump=true
-D pstore=true
-D oomd=true
@ -91,14 +74,10 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
-D portabled=true
-D sysext=true
-D userdb=true
-D homed=enabled
-D networkd=true
-D timedated=true
-D timesyncd=true
-D remote=enabled
-D nss-myhostname=true
-D nss-mymachines=enabled
-D nss-resolve=enabled
-D nss-systemd=true
-D firstboot=true
-D randomseed=true
@ -107,53 +86,26 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
-D quotacheck=true
-D sysusers=true
-D tmpfiles=true
-D importd=enabled
-D hwdb=true
-D rfkill=true
-D xdg-autostart=true
-D translations=true
-D polkit=enabled
-D acl=enabled
-D audit=enabled
-D blkid=enabled
-D fdisk=enabled
-D kmod=enabled
-D pam=enabled
-D pwquality=enabled
-D microhttpd=enabled
-D libcryptsetup=enabled
-D libcurl=enabled
-D idn=true
-D libidn2=enabled
-D qrencode=enabled
-D gcrypt=enabled
-D gnutls=enabled
-D openssl=enabled
-D cryptolib=openssl
-D p11kit=enabled
-D libfido2=enabled
-D tpm2=enabled
-D elfutils=enabled
-D zstd=enabled
-D xkbcommon=enabled
-D pcre2=enabled
-D glib=enabled
-D dbus=enabled
-D bootloader=enabled
-D kernel-install=true
-D analyze=true
-D bpf-framework=enabled
-D ukify="$UKIFY"
-D seccomp=enabled
-D selinux=auto
-D apparmor=auto
-D ukify="$([[ "$ID" = "centos" ]] && [[ "$VERSION" = "8" ]] && echo disabled || echo enabled)"
-D selinux="$([[ "$ID" =~ centos|fedora|opensuse ]] && echo enabled || echo disabled)"
-D apparmor="$([[ "$ID" =~ ubuntu|debian ]] && echo enabled || echo disabled)"
-D smack=true
-D ima=true
-D first-boot-full-preset=true
-D initrd=true
-D fexecve=true
-D default-keymap="$DEFAULT_KEYMAP"
-D libarchive=enabled
-D default-keymap="$([[ "$ID" =~ debian|ubuntu ]] && echo "" || echo "us")"
-D xenctrl="$([[ "$ID" =~ debian|ubuntu|fedora|opensuse ]] && echo enabled || echo disabled)"
-D libiptc="$([[ "$ID" =~ debian|ubuntu ]] && echo enabled || echo disabled)"
-D libcryptsetup-plugins="$([[ "$ID" = "centos" ]] && [[ "$VERSION" = "8" ]] && echo disabled || echo enabled)"
)
# On debian-like systems the library directory is not /usr/lib64 but /usr/lib/<arch-triplet>/.
@ -171,26 +123,26 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
# between the files that we and Fedora's setup package install.
if grep -q '^ID=fedora' /usr/lib/os-release; then
CONFIGURE_OPTS+=(
-Dadm-gid=4
-Daudio-gid=63
-Dcdrom-gid=11
-Ddialout-gid=18
-Ddisk-gid=6
-Dinput-gid=104
-Dkmem-gid=9
-Dkvm-gid=36
-Dlp-gid=7
-Drender-gid=105
-Dsgx-gid=106
-Dtape-gid=33
-Dtty-gid=5
-Dusers-gid=100
-Dutmp-gid=22
-Dvideo-gid=39
-Dwheel-gid=10
-Dsystemd-journal-gid=190
-Dsystemd-network-uid=192
-Dsystemd-resolve-uid=193
-D adm-gid=4
-D audio-gid=63
-D cdrom-gid=11
-D dialout-gid=18
-D disk-gid=6
-D input-gid=104
-D kmem-gid=9
-D kvm-gid=36
-D lp-gid=7
-D render-gid=105
-D sgx-gid=106
-D tape-gid=33
-D tty-gid=5
-D users-gid=100
-D utmp-gid=22
-D video-gid=39
-D wheel-gid=10
-D systemd-journal-gid=190
-D systemd-network-uid=192
-D systemd-resolve-uid=193
)
fi
@ -200,7 +152,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
)
fi
( set -x; meson setup "$BUILDDIR" "$SRCDIR" "${CONFIGURE_OPTS[@]}" )
( set -x; meson setup "$BUILDDIR" "$SRCDIR" --auto-features=enabled "${CONFIGURE_OPTS[@]}" )
fi
( set -x; ninja -C "$BUILDDIR" "$@" )

View File

@ -49,6 +49,7 @@ BuildPackages=
pkgconfig(libfido2)
pkgconfig(libidn2)
pkgconfig(libkmod)
pkgconfig(liblz4)
pkgconfig(libmicrohttpd)
pkgconfig(libnftnl)
pkgconfig(libpcre2-8)

View File

@ -6,6 +6,7 @@ Distribution=|ubuntu
[Content]
Packages=
^libtss2-esys-[0-9\.]+-0$
dmsetup
libapparmor1
libarchive13
@ -14,6 +15,7 @@ Packages=
libglib2.0-0
libgnutls30
libidn2-0
liblz4-1
libmicrohttpd12
libnftnl11
libp11-kit0
@ -22,7 +24,9 @@ Packages=
libqrencode4
libssl3
libip4tc2
libtss2-dev # Use the -dev package to avoid churn in updating version numbers
^libtss2-mu[0-9\.-]+$
libtss2-rc0
libtss2-tcti-device0
tzdata
BuildPackages=
@ -49,6 +53,7 @@ BuildPackages=
libidn2-dev
libiptc-dev
libkmod-dev
liblz4-dev
libmicrohttpd-dev
libmount-dev
libnftnl-dev
@ -59,6 +64,7 @@ BuildPackages=
libseccomp-dev
libsmartcols-dev
libssl-dev
libtss2-dev
libxen-dev
libxkbcommon-dev
libzstd-dev

View File

@ -57,6 +57,7 @@ BuildPackages=
libarchive-devel
libblkid-devel
libbpf-devel
libbz2-devel
libcap-devel
libcryptsetup-devel
libcurl-devel
@ -67,6 +68,7 @@ BuildPackages=
libgcrypt-devel
libgnutls-devel
libkmod-devel
liblz4-devel
libmicrohttpd-devel
libmount-devel
libnftnl-devel