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
This commit is contained in:
DJ Lucas 2017-09-24 07:04:44 +00:00
parent f682fb5f5c
commit 81ed05f85e
6 changed files with 116 additions and 96 deletions

View File

@ -42,6 +42,16 @@
<listitem revision="sysv"> or <listitem revision="systemd"> as <listitem revision="sysv"> or <listitem revision="systemd"> as
appropriate for the entry or if needed the entire day's listitem. 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> <listitem>
<para>2017-09-23</para> <para>2017-09-23</para>
<itemizedlist> <itemizedlist>

View File

@ -634,19 +634,25 @@
<para>Home page: <ulink url="&systemd-home;"/></para> <para>Home page: <ulink url="&systemd-home;"/></para>
<para>Download: <ulink url="&systemd-url;"/></para> <para>Download: <ulink url="&systemd-url;"/></para>
<para>MD5 sum: <literal>&systemd-md5;</literal></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> <note>
<para>The Linux From Scratch systemd team generates its own tarball <para>The Linux From Scratch systemd team generates its own tarball
of the systemd source. This is done in order to generate the manual of the man pages using the systemd source. This is done in order to
pages and documentation, as well as prevent unnecessary files from avoid unnecessary dependencies.</para>
the <application>systemd</application> git repo from being installed
on the system. Please use the version generated by the Linux From
Scratch team.</para>
</note> </note>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry revision="sysv"> <varlistentry revision="sysv">
<term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term> <term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term>
<listitem> <listitem>

View File

@ -47,7 +47,7 @@ sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
ln -sv bash /bin/sh</userinput></screen> ln -sv bash /bin/sh</userinput></screen>
<screen revision="systemd"><userinput>ln -sv /tools/bin/{bash,cat,dd,echo,ln,pwd,rm,stty} /bin <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/libgcc_s.so{,.1} /usr/lib
ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib ln -sv /tools/lib/libstdc++.{a,so{,.6}} /usr/lib
sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la

View File

@ -40,88 +40,58 @@
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of systemd</title> <title>Installation of systemd</title>
<para>Create a file to allow systemd to build when using Util-Linux <para>Create a symlink to work around missing xsltproc:</para>
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" <screen><userinput remap="pre">ln -s /tools/bin/true /usr/bin/xsltproc</userinput></screen>
<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>Prepare systemd for compilation:</para> <para>Prepare systemd for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \ <screen><userinput remap="configure">PKG_CONFIG_PATH=/usr/lib/pkgconfig:/tools/lib/pkgconfig \
--sysconfdir=/etc \ LANG=en_US.UTF-8 \
--localstatedir=/var \ meson --prefix /usr \
--config-cache \ --sysconfdir /etc \
--with-rootprefix= \ --localstatedir /var \
--with-rootlibdir=/lib \ -Dblkid=true \
--enable-split-usr \ -Dbuildtype=release \
--disable-firstboot \ -Ddefault-dnssec=no \
--disable-ldconfig \ -Dfirstboot=false \
--disable-sysusers \ -Dkill-path=/bin/kill \
--without-python \ -Dkmod-path=/bin/kmod \
--with-default-dnssec=no \ -Dldconfig=false \
--docdir=/usr/share/doc/systemd-&systemd-version;</userinput></screen> -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> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the meson options:</title>
<varlistentry> <varlistentry>
<term><parameter>--config-cache</parameter></term> <term><parameter>-D*-path=*</parameter></term>
<listitem> <listitem>
<para>This switch tells the build system to use <para>These switches provide location of binaries needed by
the <filename>config.cache</filename> file which systemd at runtime that have not yet been installed, or who's
was created earlier.</para> pkgconfig files are currently only in
<filename>/tools/lib/pkgconfig</filename>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--with-root*</parameter></term> <term><parameter>-Ddefault-dnssec=no</parameter></term>
<listitem> <listitem>
<para>These switches ensure that core programs and <para>This switch turns off the experimental DNSSEC support.</para>
shared libraries are installed in the subdirectories
of the root partition.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<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>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-python</parameter></term>
<listitem>
<para>This switch prevents <command>configure</command>
from trying to use Python which isn't built
in LFS.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--disable-firstboot</parameter></term>
<listitem> <listitem>
<para>This switch prevents installation of systemd <para>This switch prevents installation of systemd
services responsible for setting up the system for services responsible for setting up the system for
@ -131,7 +101,7 @@ EOF</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--disable-ldconfig</parameter></term> <term><parameter>-Dldconfig=no</parameter></term>
<listitem> <listitem>
<para>This switch prevents installation of a systemd <para>This switch prevents installation of a systemd
unit that runs <command>ldconfig</command> at unit that runs <command>ldconfig</command> at
@ -142,7 +112,25 @@ EOF</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--disable-sysusers</parameter></term> <term><parameter>-Droot*</parameter></term>
<listitem>
<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>-Dsplit-usr=true</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>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>-Dsysusers=false</parameter></term>
<listitem> <listitem>
<para>This switch prevents installation of systemd <para>This switch prevents installation of systemd
services responsible for setting up the services responsible for setting up the
@ -153,9 +141,21 @@ EOF</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--with-default-dnssec=no</parameter></term> <term><parameter>-Dc_link_args="-lblkid -lmount"</parameter></term>
<listitem> <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> </listitem>
</varlistentry> </varlistentry>
@ -163,20 +163,17 @@ EOF</userinput></screen>
<para>Compile the package:</para> <para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz
cd build
<para>This package has a test suite, but it can only be run after the LANG=en_US.UTF-8 ninja</userinput></screen>
package has been reinstalled in BLFS.</para> <!--
<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> <para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen> <screen><userinput remap="install">LANG=en_US.UTF-8 ninja 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>
-->
<para>Remove an unnecessary directory:</para> <para>Remove an unnecessary directory:</para>
@ -190,6 +187,10 @@ EOF</userinput></screen>
done done
ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen> 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 <para>Create the <filename>/etc/machine-id</filename> file needed by
<command>systemd-journald</command>:</para> <command>systemd-journald</command>:</para>

View File

@ -1,13 +1,13 @@
<!ENTITY version "SVN-20170923"> <!ENTITY version "SVN-20170924">
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; <!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
Change to x.y for release but not -rc releases --> Change to x.y for release but not -rc releases -->
<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" --> <!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" -->
<!ENTITY versiond "20170923-systemd"> <!ENTITY versiond "20170924-systemd">
<!ENTITY short-versiond "systemd"> <!ENTITY short-versiond "systemd">
<!ENTITY generic-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 copyrightdate "1999-2017"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "8.2"> <!ENTITY milestone "8.2">

View File

@ -593,13 +593,16 @@
<!ENTITY sysklogd-ch6-du "0.7 MB"> <!ENTITY sysklogd-ch6-du "0.7 MB">
<!ENTITY sysklogd-ch6-sbu "less than 0.1 SBU"> <!ENTITY sysklogd-ch6-sbu "less than 0.1 SBU">
<!ENTITY systemd-version "234"> <!ENTITY systemd-version "234">
<!ENTITY systemd-size "4,116 KB"> <!ENTITY systemd-size "4,688 KB">
<!ENTITY systemd-url "http://anduin.linuxfromscratch.org/LFS/systemd-&systemd-version;-lfs.tar.xz"> <!ENTITY systemd-url "https://github.com/systemd/systemd/archive/v234/systemd-234.tar.gz">
<!ENTITY systemd-md5 "be1338f2775713dc33da74ac0146e37b"> <!ENTITY systemd-md5 "2d8f6ebded3462ac0d1a6275e54db561">
<!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/"> <!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/">
<!ENTITY systemd-ch6-du "442 MB"> <!ENTITY systemd-man-size "356 KB">
<!ENTITY systemd-ch6-sbu "7.1 SBU"> <!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-version "2.88dsf">
<!ENTITY sysvinit-size "108 KB"> <!ENTITY sysvinit-size "108 KB">