aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2021-07-25 20:10:18 -0500
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2021-07-25 20:10:18 -0500
commitff96923bf37ce4beed6b4d0146c454c7df6da95f (patch)
treeb2c7c117025c8a2f520f7bb6d15ad4854721acab /chapter08
parentff5c009123a8163e90f63dd39aa22ef33fc4dca2 (diff)
Package updates and stripping fixes
Add workaround to strip libraries correctly. Update to shadow-4.9. Update to util-linux 2.37.1.
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/binutils.xml4
-rw-r--r--chapter08/shadow.xml11
-rw-r--r--chapter08/strippingagain.xml11
-rw-r--r--chapter08/util-linux.xml10
4 files changed, 21 insertions, 15 deletions
diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index 9b46907e8..1d87b7797 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -57,9 +57,9 @@
<screen><computeroutput>The system has no more ptys.
Ask your system administrator to create more.</computeroutput></screen>
- <para>A glitch in the building system causes the shipped man pages to
+ <para>An error in the building system causes the shipped man pages to
be empty. Workaround the issue and remove the shipped man pages, so the
- building system will regenerate man pages correctly:</para>
+ man pages will be regenerated correctly:</para>
<screen><userinput remap="pre">sed -i '63d' etc/texi2pod.pl
find -name \*.1 -delete</userinput></screen>
diff --git a/chapter08/shadow.xml b/chapter08/shadow.xml
index 49f2ec47c..9aa196421 100644
--- a/chapter08/shadow.xml
+++ b/chapter08/shadow.xml
@@ -89,12 +89,12 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
<screen role="nodump"><userinput>sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs</userinput></screen>
</note>
-
+<!--
<para>Make a minor change to make the first group number generated
by useradd 1000:</para>
<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen>
-
+-->
<para>Prepare Shadow for compilation:</para>
<screen><userinput remap="configure">touch /usr/bin/passwd
@@ -124,13 +124,16 @@ find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></s
<para>Compile the package:</para>
-<screen><userinput remap="make">make</userinput></screen>
+ <screen><userinput remap="make">make</userinput></screen>
<para>This package does not come with a test suite.</para>
<para>Install the package:</para>
-<screen><userinput remap="install">make exec_prefix=/usr install</userinput></screen>
+ <screen><userinput remap="install">make exec_prefix=/usr install
+make -C man install-man
+mkdir -p /etc/default
+useradd -D --gid 999</userinput></screen>
</sect2>
diff --git a/chapter08/strippingagain.xml b/chapter08/strippingagain.xml
index 8f5743b51..d2e686e8f 100644
--- a/chapter08/strippingagain.xml
+++ b/chapter08/strippingagain.xml
@@ -34,15 +34,18 @@
<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
<screen><userinput>save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so
- libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
+ libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; libz.so.&zlib-version;
libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;-->
cd /usr/lib
for LIB in $save_usrlib; do
objcopy --only-keep-debug $LIB $LIB.dbg
- strip --strip-unneeded $LIB
- objcopy --add-gnu-debuglink=$LIB.dbg $LIB
+ cp $LIB /tmp/$LIB
+ strip --strip-unneeded /tmp/$LIB
+ objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
+ install -vm755 /tmp/$LIB /usr/lib
+ rm /tmp/$LIB
done
unset LIB save_usrlib</userinput></screen>
@@ -58,7 +61,7 @@ unset LIB save_usrlib</userinput></screen>
<screen><userinput>find /usr/lib -type f -name \*.a \
-exec strip --strip-debug {} ';'
-find /usr/lib -type f -name \*.so* ! -name \*dbg \
+find /usr/lib -type f -name \*.so* ! -name \*dbg ! -name libz.so* \
-exec strip --strip-unneeded {} ';'
find /usr/{bin,sbin,libexec} -type f \
diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml
index 8f72a80d7..d7613a74c 100644
--- a/chapter08/util-linux.xml
+++ b/chapter08/util-linux.xml
@@ -94,25 +94,25 @@
<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen>
</warning>
-
+<!--
<note><para>There is one test that depends on the configuration of the kernel.
If CONFIG_USER_NS or CONFIG_PID_NS are not set, the tests will hang forever.
To work around the problem, delete one test:</para>
<screen><userinput remap="test">rm tests/ts/lsns/ioctl_ns</userinput></screen>
</note>
-
+-->
<screen><userinput remap="test">chown -Rv tester .
su tester -c "make -k check"</userinput></screen>
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
-
+<!--
<para>Finally, install the man pages:</para>
-<screen><userinput remap="install">tar -xf ../util-linux-man-pages-&util-linux-version;.tar.xz --directory /usr/share/man --strip-components=1</userinput></screen>
-
+<screen><userinput remap="install">tar -xf ../util-linux-man-pages-&util-linux-version;.tar.xz - -directory /usr/share/man - -strip-components=1</userinput></screen>
+-->
</sect2>
<sect2 id="contents-utillinux" role="content">