From f8bdaa6ff38311051aaf92ec552678ddb66f83c1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 18 Dec 2024 10:42:01 +0800 Subject: [PATCH 1/2] systemd: Sync a sed with udev in sysv revision Let's make the two revisions more consistent. --- chapter08/systemd.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index c2fc9dc6d..1e17c60ce 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -45,8 +45,9 @@ sgx, from the default udev rules: - sed -i -e 's/GROUP="render"/GROUP="video"/' \ - -e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in + sed -e 's/GROUP="render"/GROUP="video"/' \ + -e 's/GROUP="sgx", //' \ + -i rules.d/50-udev-default.rules.in Prepare systemd for compilation: From e5955cd62a4069b1e2c9fb1536c55dc399a8bcb3 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 18 Dec 2024 10:48:14 +0800 Subject: [PATCH 2/2] gettext: Fix build issue with system libxml2 The upstream fix is explicitly checking libxml2 version so it's not practical to be turned into a sed. But I don't want to upload another patch just for such a "temporary" issue (as it'll be fixed for 0.23.1 anyway). This alternative fix relies on: 1. The fact that the return type of xmlCtxtGetLastError and the arg type of xmlStructuredErrorFunc are changed in the same commit 61034116d0a3 ("error: Make more xmlError structs constant"). 2. GCC supports typeof(expr) to get the type of expr w/o really evaluating it. So it should have the same effect as the upstream fix. Tested with both --with-included-libxml2 and --without-included-libxml2 on BLFS. --- chapter08/gettext.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chapter08/gettext.xml b/chapter08/gettext.xml index f26d15536..d8fbc8f20 100644 --- a/chapter08/gettext.xml +++ b/chapter08/gettext.xml @@ -43,6 +43,14 @@ Installation of Gettext + At first, fix an issue causing the package fail to build with + libxml-2.12 or later. The fix is optional for building LFS, but + required if rebuilding this package in BLFS with libxml + installed: + +sed -e '/^structured/s/xmlError \*/typeof(xmlCtxtGetLastError(NULL)) /' \ + -i gettext-tools/src/its.c + Prepare Gettext for compilation: ./configure --prefix=/usr \