aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2017-09-24 07:04:44 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2017-09-24 07:04:44 +0000
commit81ed05f85e7cc98389d055b7529685b3e59f3502 (patch)
treed96a4b256b1135def9d70cb7cf1188531b0fb6dc
parentf682fb5f5c7b08a6e6a25c477f7c445da07bd54f (diff)
Use upstream systemd tarball with meson build system and supply only prebuilt man pages.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11306 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--chapter01/changelog.xml10
-rw-r--r--chapter03/packages.xml18
-rw-r--r--chapter06/createfiles.xml2
-rw-r--r--chapter06/systemd.xml159
-rw-r--r--general.ent6
-rw-r--r--packages.ent17
6 files changed, 116 insertions, 96 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 4c8941aea..5947ac1ef 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -42,6 +42,16 @@
<listitem revision="sysv"> or <listitem revision="systemd"> as
appropriate for the entry or if needed the entire day's listitem.
-->
+ <listitem revision="systemd">
+ <para>2017-09-24</para>
+ <itemizedlist>
+ <listitem>
+ <para>[dj] - Use upstream systemd tarball with meson build system and
+ supply only prebuilt man pages.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
<listitem>
<para>2017-09-23</para>
<itemizedlist>
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index d2674a40b..82514dcdd 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -634,19 +634,25 @@
<para>Home page: <ulink url="&systemd-home;"/></para>
<para>Download: <ulink url="&systemd-url;"/></para>
<para>MD5 sum: <literal>&systemd-md5;</literal></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry revision="systemd">
+ <term>Systemd Man Pages(&systemd-version;) - <token>&systemd-man-size;</token>:</term>
+ <listitem>
+ <para>Home page: <ulink url="&systemd-home;"/></para>
+ <para>Download: <ulink url="&systemd-man-url;"/></para>
+ <para>MD5 sum: <literal>&systemd-man-md5;</literal></para>
<note>
<para>The Linux From Scratch systemd team generates its own tarball
- of the systemd source. This is done in order to generate the manual
- pages and documentation, as well as prevent unnecessary files from
- the <application>systemd</application> git repo from being installed
- on the system. Please use the version generated by the Linux From
- Scratch team.</para>
+ of the man pages using the systemd source. This is done in order to
+ avoid unnecessary dependencies.</para>
</note>
-
</listitem>
</varlistentry>
+
<varlistentry revision="sysv">
<term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term>
<listitem>
diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml
index 5df57ef2a..fbe70a96b 100644
--- a/chapter06/createfiles.xml
+++ b/chapter06/createfiles.xml
@@ -47,7 +47,7 @@ sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
ln -sv bash /bin/sh</userinput></screen>
<screen revision="systemd"><userinput>ln -sv /tools/bin/{bash,cat,dd,echo,ln,pwd,rm,stty} /bin
-ln -sv /tools/bin/{install,perl} /usr/bin
+ln -sv /tools/bin/{env,install,perl} /usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib
sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml
index e1b9c0b2d..9b132921c 100644
--- a/chapter06/systemd.xml
+++ b/chapter06/systemd.xml
@@ -40,109 +40,97 @@
<sect2 role="installation">
<title>Installation of systemd</title>
- <para>Create a file to allow systemd to build when using Util-Linux
- built in Chapter 5, to disable LTO by default, and to build without
- xlstproc:</para>
-
-<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
-<literal>KILL=/bin/kill
-MOUNT_PATH=/bin/mount
-UMOUNT_PATH=/bin/umount
-HAVE_BLKID=1
-BLKID_LIBS="-lblkid"
-BLKID_CFLAGS="-I/tools/include/blkid"
-HAVE_LIBMOUNT=1
-MOUNT_LIBS="-lmount"
-MOUNT_CFLAGS="-I/tools/include/libmount"
-cc_cv_CFLAGS__flto=no
-SULOGIN="/sbin/sulogin"
-GPERF_LEN_TYPE=size_t
-XSLTPROC="/usr/bin/xsltproc"</literal>
-EOF</userinput></screen>
-
- <para>LTO is disabled by default because it causes
- <command>systemd</command> and other auxiliary programs to link to
- <filename class="libraryfile">libgcc_s.so</filename>, slows the build down
- and makes the compiled code larger.</para>
+ <para>Create a symlink to work around missing xsltproc:</para>
+
+<screen><userinput remap="pre">ln -s /tools/bin/true /usr/bin/xsltproc</userinput></screen>
<para>Prepare systemd for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --config-cache \
- --with-rootprefix= \
- --with-rootlibdir=/lib \
- --enable-split-usr \
- --disable-firstboot \
- --disable-ldconfig \
- --disable-sysusers \
- --without-python \
- --with-default-dnssec=no \
- --docdir=/usr/share/doc/systemd-&systemd-version;</userinput></screen>
+<screen><userinput remap="configure">PKG_CONFIG_PATH=/usr/lib/pkgconfig:/tools/lib/pkgconfig \
+LANG=en_US.UTF-8 \
+ meson --prefix /usr \
+ --sysconfdir /etc \
+ --localstatedir /var \
+ -Dblkid=true \
+ -Dbuildtype=release \
+ -Ddefault-dnssec=no \
+ -Dfirstboot=false \
+ -Dkill-path=/bin/kill \
+ -Dkmod-path=/bin/kmod \
+ -Dldconfig=false \
+ -Dmount-path=/bin/mount \
+ -Drootprefix= \
+ -Drootlibdir=/lib \
+ -Dsplit-usr=true \
+ -Dsulogin-path=/sbin/sulogin \
+ -Dsysusers=false \
+ -Dumount-path=/bin/umount \
+ -Db_lto=false \
+ -Dc_link_args="-lblkid -lmount" \
+ -Dc_args="-I/tools/include/blkid -I/tools/include/libmount" \
+ $PWD build</userinput></screen>
<variablelist>
- <title>The meaning of the configure options:</title>
+ <title>The meaning of the meson options:</title>
<varlistentry>
- <term><parameter>--config-cache</parameter></term>
+ <term><parameter>-D*-path=*</parameter></term>
<listitem>
- <para>This switch tells the build system to use
- the <filename>config.cache</filename> file which
- was created earlier.</para>
+ <para>These switches provide location of binaries needed by
+ systemd at runtime that have not yet been installed, or who's
+ pkgconfig files are currently only in
+ <filename>/tools/lib/pkgconfig</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--with-root*</parameter></term>
+ <term><parameter>-Ddefault-dnssec=no</parameter></term>
<listitem>
- <para>These switches ensure that core programs and
- shared libraries are installed in the subdirectories
- of the root partition.</para>
+ <para>This switch turns off the experimental DNSSEC support.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--enable-split-usr</parameter></term>
+ <term><parameter>-Dfirstboot=false</parameter></term>
<listitem>
- <para>This switch ensures that systemd will work on
- systems where /bin, /lib and /sbin directories are not
- symlinks to their /usr counterparts.</para>
+ <para>This switch prevents installation of systemd
+ services responsible for setting up the system for
+ the first time. They are not useful for LFS because
+ everything is done manually.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--without-python</parameter></term>
+ <term><parameter>-Dldconfig=no</parameter></term>
<listitem>
- <para>This switch prevents <command>configure</command>
- from trying to use Python which isn't built
- in LFS.</para>
+ <para>This switch prevents installation of a systemd
+ unit that runs <command>ldconfig</command> at
+ boot, making the boot time longer. Remove it if the
+ described feature is desired, even though it's not
+ useful for source distributions such as LFS.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--disable-firstboot</parameter></term>
+ <term><parameter>-Droot*</parameter></term>
<listitem>
- <para>This switch prevents installation of systemd
- services responsible for setting up the system for
- the first time. They are not useful for LFS because
- everything is done manually.</para>
+ <para>These switches ensure that core programs and
+ shared libraries are installed in the subdirectories
+ of the root partition.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--disable-ldconfig</parameter></term>
+ <term><parameter>-Dsplit-usr=true</parameter></term>
<listitem>
- <para>This switch prevents installation of a systemd
- unit that runs <command>ldconfig</command> at
- boot, making the boot time longer. Remove it if the
- described feature is desired, even though it's not
- useful for source distributions such as LFS.</para>
+ <para>This switch ensures that systemd will work on
+ systems where /bin, /lib and /sbin directories are not
+ symlinks to their /usr counterparts.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--disable-sysusers</parameter></term>
+ <term><parameter>-Dsysusers=false</parameter></term>
<listitem>
<para>This switch prevents installation of systemd
services responsible for setting up the
@@ -153,9 +141,21 @@ EOF</userinput></screen>
</varlistentry>
<varlistentry>
- <term><parameter>--with-default-dnssec=no</parameter></term>
+ <term><parameter>-Dc_link_args="-lblkid -lmount"</parameter></term>
<listitem>
- <para>This switch turns off the experimental DNSSEC support.</para>
+ <para>This switch manually adds libblkid and libmount to the
+ linker flags as they only exist in <filename>/tools/lib</filename>
+ until <application>Util-Linux</application> is installed later in
+ this chapter.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>-Dc_args="-I/tools/include/blkid -I/tools/include/libmount"</parameter></term>
+ <listitem>
+ <para>This switch manually adds the include paths for libblkid and
+ libmount to the CFLAGS variable as the packages are not yet installed
+ in the final system.</para>
</listitem>
</varlistentry>
@@ -163,20 +163,17 @@ EOF</userinput></screen>
<para>Compile the package:</para>
-<screen><userinput remap="make">make</userinput></screen>
-
- <para>This package has a test suite, but it can only be run after the
- package has been reinstalled in BLFS.</para>
+<screen><userinput remap="make">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz
+cd build
+LANG=en_US.UTF-8 ninja</userinput></screen>
+<!--
+ <para>To test the package, execute the following command:</para>
+<screen><userinput remap="test">LANG=en_US.UTF-8 ninja test</userinput></screen>
+-->
<para>Install the package:</para>
-<screen><userinput remap="install">make install</userinput></screen>
-
-<!-- These get installed into /lib now by default.
- <para>Move the NSS libraries to <filename class="directory">/lib</filename>:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
--->
+<screen><userinput remap="install">LANG=en_US.UTF-8 ninja install</userinput></screen>
<para>Remove an unnecessary directory:</para>
@@ -190,6 +187,10 @@ EOF</userinput></screen>
done
ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
+ <para>Remove our earlier created symlink for xsltproc:</para>
+
+<screen><userinput remap="install">rm -f /usr/bin/xsltproc</userinput></screen>
+
<para>Create the <filename>/etc/machine-id</filename> file needed by
<command>systemd-journald</command>:</para>
diff --git a/general.ent b/general.ent
index b072e20b6..bb626279e 100644
--- a/general.ent
+++ b/general.ent
@@ -1,13 +1,13 @@
-<!ENTITY version "SVN-20170923">
+<!ENTITY version "SVN-20170924">
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
Change to x.y for release but not -rc releases -->
<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" -->
-<!ENTITY versiond "20170923-systemd">
+<!ENTITY versiond "20170924-systemd">
<!ENTITY short-versiond "systemd">
<!ENTITY generic-versiond "systemd">
-<!ENTITY releasedate "September 23, 2017">
+<!ENTITY releasedate "September 24, 2017">
<!ENTITY copyrightdate "1999-2017"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "8.2">
diff --git a/packages.ent b/packages.ent
index 3ce8c242b..79e1737ed 100644
--- a/packages.ent
+++ b/packages.ent
@@ -593,13 +593,16 @@
<!ENTITY sysklogd-ch6-du "0.7 MB">
<!ENTITY sysklogd-ch6-sbu "less than 0.1 SBU">
-<!ENTITY systemd-version "234">
-<!ENTITY systemd-size "4,116 KB">
-<!ENTITY systemd-url "http://anduin.linuxfromscratch.org/LFS/systemd-&systemd-version;-lfs.tar.xz">
-<!ENTITY systemd-md5 "be1338f2775713dc33da74ac0146e37b">
-<!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/">
-<!ENTITY systemd-ch6-du "442 MB">
-<!ENTITY systemd-ch6-sbu "7.1 SBU">
+<!ENTITY systemd-version "234">
+<!ENTITY systemd-size "4,688 KB">
+<!ENTITY systemd-url "https://github.com/systemd/systemd/archive/v234/systemd-234.tar.gz">
+<!ENTITY systemd-md5 "2d8f6ebded3462ac0d1a6275e54db561">
+<!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/">
+<!ENTITY systemd-man-size "356 KB">
+<!ENTITY systemd-man-url "http://anduin.linuxfromscratch.org/LFS/systemd-man-pages-&systemd-version;.tar.xz">
+<!ENTITY systemd-man-md5 "c52e13fa137b5f0e3900881d3cdccb9a">
+<!ENTITY systemd-ch6-du "255 MB">
+<!ENTITY systemd-ch6-sbu "0.6 SBU">
<!ENTITY sysvinit-version "2.88dsf">
<!ENTITY sysvinit-size "108 KB">