Skip to content

Commit

Permalink
systemd: Update to v235
Browse files Browse the repository at this point in the history
This version of systemd replaces autotools with meson as its build
system.

Note:

Cross building with meson is not as straightforward as autotools since
meson does not support the classic gcc tupple. Instead it requires a
cross build configuration file which details the cross toolchain.

Meaning, that anything that needs to be built using meson must reference
a common meson cross configuration file.

To do this, we simply put the meson cross configuration file in the
global config directory for all builds to reference. For now, a CFG
variable which allows to reference the config/ directory must be
manually added to the config/config file until the buildgear tool
automatically exports it.
  • Loading branch information
lundmar committed Dec 4, 2017
1 parent 5ab1ebe commit a768613
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 29 deletions.
@@ -0,0 +1,27 @@
From 3bd469546b735b25255fba7163a8a43777fa5f93 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Tue, 31 Oct 2017 16:20:53 +0900
Subject: [PATCH] meson: do not create systemd-user-sessions.service if PAM is
disabled

Fixes #7227.
---
units/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/units/meson.build b/units/meson.build
index 4e2ae3f30..5772a27ca 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -208,7 +208,7 @@ in_units = [
'multi-user.target.wants/ graphical.target.wants/ rescue.target.wants/'],
['systemd-update-utmp.service', 'ENABLE_UTMP',
'sysinit.target.wants/'],
- ['systemd-user-sessions.service', '',
+ ['systemd-user-sessions.service', 'HAVE_PAM',
'multi-user.target.wants/'],
['systemd-vconsole-setup.service', 'ENABLE_VCONSOLE'],
['systemd-volatile-root.service', ''],
--
2.15.0

59 changes: 30 additions & 29 deletions systemd/Buildfile
Expand Up @@ -3,43 +3,43 @@
# License: LGPLv2.1 MIT PD GPLv2

name=systemd
version=234
version=235
release=1
source=(http://mirror.mini-distribution.io/$name-$version.tar.xz
source=(https://github.com/systemd/systemd/archive/$name-$version.tar.gz
0001-meson-do-not-create-systemd-user-sessions.service-if.patch
vconsole.conf)
depends=(libcap kmod util-linux pciutils glib tcp_wrappers libgcrypt xz)

build() {
cd $name-$version

./configure --build=$BUILD \
--host=$HOST \
--prefix=/usr \
--disable-static \
patch -p1 -i $SRC/0001-meson-do-not-create-systemd-user-sessions.service-if.patch

meson build --prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--localstatedir=/var \
--disable-nls \
--without-python \
--enable-compat-libs \
--disable-audit \
--disable-ima \
--disable-kdbus \
--disable-selinux \
--disable-pam \
--with-libgcrypt-prefix=$SYSROOT/usr \
--with-gpg-error-prefix=$SYSROOT/usr \
--disable-libcryptsetup \
--disable-dbus \
--disable-tests \
--disable-efi \
--disable-networkd \
--disable-gnuefi \
--disable-bootchart \
ac_cv_func_malloc_0_nonnull=yes

make -j $JOBS
make DESTDIR=$PKG install
--cross-file=$CFG/$HOST.meson

meson configure build -Dapparmor=false \
-Dbuildtype=release \
-Dldconfig=false \
-Drootlibdir=/usr/lib \
-Daudit=false \
-Dima=false \
-Dselinux=false \
-Dpam=false \
-Dlibcryptsetup=false \
-Dtests=unsafe \
-Ddbus=false \
-Defi=false \
-Dgnu-efi=false \
-Dnetworkd=false \
-Dapparmor=false

ninja -C build

DESTDIR=$PKG ninja -C build install

# Systemd required fixes
ln -s /proc/self/mounts $PKG/etc/mtab
Expand Down Expand Up @@ -67,13 +67,14 @@ build() {
rm $PKG/usr/lib/tmpfiles.d/x11.conf
rm $PKG/usr/lib/udev/rules.d/73-seat-late.rules
rm -r $PKG/etc/X11
rm -r $PKG/usr/share/{doc,locale}

# Fix libtool files
fix_la_files $PKG
}

check() {
# Test for preinstalled intltool-update tool
check_tool meson "Please install meson"
check_tool intltool-update "Please install intltool"
check_exist /usr/share/xml/docbook/stylesheet/docbook-xsl "Please install docbook-xsl"
}

0 comments on commit a768613

Please sign in to comment.