From 75646aed8c0741cff073c6aab856f5fe77bf2d83 Mon Sep 17 00:00:00 2001 From: Thomas Trepl Date: Mon, 23 Dec 2024 22:43:43 +0100 Subject: [PATCH] Apply fixes on systemd contributed by Eric Clothier --- chapter01/changelog.xml | 10 ++++ chapter08/systemd.xml | 112 ++++++++++++++++++++-------------------- 2 files changed, 66 insertions(+), 56 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 22050a85a..6890c8061 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,16 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-12-23 + + + [thomas] - Fix systemd instructions. Thanks to + Eric Clothier for preparing the patch. + + + + 2024-12-15 diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index de7ce92be..b5949e93b 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -273,10 +273,13 @@ ninja test rm -rf * - Create a symlink to work around missing xsltproc: + + + -ln -sf /bin/true /usr/bin/xsltproc + + Prepare systemd for compilation: PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \ -CC="gcc -m32 -march=i686" \ -CXX="g++ -m32 -march=i686" \ -LANG=en_US.UTF-8 \ -meson --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --libdir=/usr/lib32 \ - -Drootlibdir=/usr/lib32 \ - -Dblkid=true \ - -Ddefault-dnssec=no \ - -Dfirstboot=false \ - -Dinstall-tests=false \ - -Dldconfig=false \ - -Dsysusers=false \ - -Db_lto=false \ - -Drpmmacrosdir=no \ - -Dhomed=false \ - -Duserdb=false \ - -Dman=false \ - -Dmode=release \ - .. +CC="gcc -m32" \ +CXX="g++ -m32" \ +LANG=en_US.UTF-8 \ +meson setup .. \ + --prefix=/usr \ + --libdir=/usr/lib32 \ + --buildtype=release \ + -D default-dnssec=no \ + -D firstboot=false \ + -D install-tests=false \ + -D ldconfig=false \ + -D sysusers=false \ + -D rpmmacrosdir=no \ + -D homed=disabled \ + -D userdb=false \ + -D man=disabled \ + -D mode=release Compile the package: @@ -318,10 +324,13 @@ meson --prefix=/usr \ Install the package: + LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install -cp -Rv DESTDIR/usr/lib32/* /usr/lib32 -rm -rf DESTDIR -rm -f /usr/bin/xsltproc +cp -v DESTDIR/usr/lib32/libsystemd.so* /usr/lib32/ +cp -v DESTDIR/usr/lib32/libudev.so* /usr/lib32/ +rm -rf DESTDIR @@ -336,9 +345,6 @@ rm -f /usr/bin/xsltproc rm -rf * - Create a symlink to work around missing xsltproc: - -ln -sf /bin/true /usr/bin/xsltproc Prepare systemd for compilation: -PKG_CONFIG_PATH="/usr/libx32/pkgconfig" \ -CC="gcc -mx32" \ -CXX="g++ -mx32" \ -CFLAGS+=" -Wno-error=shift-overflow" \ -CXXFLAGS+=" -Wno-error=shift-overflow" \ -LANG=en_US.UTF-8 \ -meson --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --libdir=/usr/libx32 \ - -Drootlibdir=/usr/libx32 \ - -Dblkid=true \ - -Ddefault-dnssec=no \ - -Dfirstboot=false \ - -Dinstall-tests=false \ - -Dldconfig=false \ - -Dsysusers=false \ - -Db_lto=false \ - -Drpmmacrosdir=no \ - -Dhomed=false \ - -Duserdb=false \ - -Dman=false \ - -Dmode=release \ - .. + PKG_CONFIG_PATH="/usr/libx32/pkgconfig" \ +CC="gcc -mx32" \ +CXX="g++ -mx32" \ +LANG=en_US.UTF-8 \ +meson setup .. \ + --prefix=/usr \ + --libdir=/usr/libx32 \ + --buildtype=release \ + -D default-dnssec=no \ + -D firstboot=false \ + -D install-tests=false \ + -D ldconfig=false \ + -D sysusers=false \ + -D rpmmacrosdir=no \ + -D homed=false \ + -D userdb=false \ + -D man=disabled \ + -D mode=release Compile the package: @@ -379,9 +379,9 @@ meson --prefix=/usr \ Install the package: LANG=en_US.UTF-8 DESTDIR=$PWD/DESTDIR ninja install -cp -Rv DESTDIR/usr/libx32/* /usr/libx32 -rm -rf DESTDIR -rm -f /usr/bin/xsltproc +cp -v DESTDIR/usr/libx32/libsystemd.so* /usr/libx32/ +cp -v DESTDIR/usr/libx32/libudev.so* /usr/libx32/ +rm -rf DESTDIR