Changeset 9e76c64 for chapter08/glibc.xml
- Timestamp:
- 02/08/2024 04:32:26 AM (7 months ago)
- Branches:
- xry111/clfs-ng
- Children:
- c7c614de
- Parents:
- e49e2ea (diff), 4816dc6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/glibc.xml
re49e2ea r9e76c64 1 <?xml version="1.0" encoding=" ISO-8859-1"?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ … … 50 50 51 51 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen> 52 52 <!-- 53 53 <para>Now fix two security vulnerabilities and a regression causing the 54 54 posix_memalign() function very slow in some conditions:</para> 55 55 56 56 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-fixes-patch;</userinput></screen> 57 57 --> 58 58 <para>The Glibc documentation recommends building Glibc 59 59 in a dedicated build directory:</para> … … 74 74 --enable-kernel=&linux-major-version;.&linux-minor-version; \ 75 75 --enable-stack-protector=strong \ 76 --with-headers=/usr/include \77 76 --disable-nscd \ 78 77 libc_cv_slibdir=/usr/lib</userinput></screen> … … 105 104 <para>This option increases system security by adding 106 105 extra code to check for buffer overflows, such as stack 107 smashing attacks.</para> 108 </listitem> 109 </varlistentry> 110 <!-- do we need this one? --> 111 <varlistentry> 112 <term><parameter>--with-headers=/usr/include</parameter></term> 113 <listitem> 114 <para>This option tells the build system where to find the 115 kernel API headers.</para> 106 smashing attacks. Note that Glibc always explicitly overrides 107 the default of GCC, so this option is still needed even though 108 we've already specified <option>--enable-default-ssp</option> for 109 GCC.</para> 116 110 </listitem> 117 111 </varlistentry> … … 208 202 209 203 <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen> 204 205 <important> 206 <para> 207 If upgrading Glibc to a new minor version (for example, from 208 Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you 209 need to take some extra precautions to avoid breaking the system: 210 </para> 211 212 <itemizedlist> 213 <listitem> 214 <!-- There are two reasons we don't support this: 215 1. Upgrading on a system with separate /lib and /usr/lib is 216 tricky. 217 2. With Glibc prior to 2.34 libc.so.6 etc. are symlinks to 218 libc-2.33.so etc., again causing the upgradation tricky. 219 The Glibc NEWS file explicit states they no longer use 220 symlinks for the ABI names to avoid upgradation 221 issues. --> 222 <para> 223 Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is 224 not supported. Rebuild LFS if you are running such an old LFS 225 system but you need a newer Glibc. 226 </para> 227 </listitem> 228 229 <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154095.html --> 230 <listitem> 231 <para> 232 If upgrading on a LFS system prior to 12.0 (exclusive), install 233 <application>Libxcrypt</application> following 234 <xref role='.' linkend='ch-system-libxcrypt'/> In addition to 235 a normal <application>Libxcrypt</application> installation, 236 <emphasis role='bold'>you MUST follow the note in Libxcrypt 237 section to install 238 <filename class='libraryfile'>libcrypt.so.1*</filename> 239 (overwritting 240 <filename class='libraryfile'>libcrypt.so.1</filename> from the 241 prior Glibc installation)</emphasis>. 242 </para> 243 </listitem> 244 245 <!-- Otherwise on lfs-systemd nscd will fail to start on boot, 246 and on both lfs-sysv and lfs-systemd useradd etc. will try 247 to start nscd, then nscd will fail to start as well and 248 produce some spurious error message. --> 249 <listitem> 250 <para> 251 If upgrading on a LFS system prior to 12.1 (exclusive), 252 remove the <command>nscd</command> program: 253 </para> 254 255 <screen role='nodump'><userinput>rm -f /usr/sbin/nscd</userinput></screen> 256 257 <para> 258 If this system (prior to LFS 12.1, exclusive) is based on 259 Systemd, it's also needed to disable and stop the 260 <command>nscd</command> service now: 261 </para> 262 263 <screen revision='systemd' role='nodump'><userinput>systemctl disable --now nscd</userinput></screen> 264 </listitem> 265 266 <listitem> 267 <para> 268 Upgrade the kernel and reboot if it's older than &min-kernel; 269 (check the current version with <command>uname -r</command>) 270 or if you want to upgrade it anyway, following 271 <xref linkend='ch-bootable-kernel' role='.'/> 272 </para> 273 </listitem> 274 275 <listitem> 276 <para> 277 Upgrade the kernel API headers if it's older than &min-kernel; 278 (check the current version with 279 <command>cat /usr/include/linux/version.h</command>) 280 or if you want to upgrade it anyway, following 281 <xref linkend='ch-tools-linux-headers'/> (but removing 282 <envar>$LFS</envar> from the <command>cp</command> command). 283 </para> 284 </listitem> 285 286 <!-- This is to ensure we don't start a process at the time point 287 where some Glibc shared libraries are updated but the others 288 are not. Such mismatches can cause programs crash on startup, 289 esp. a mismatch between ld-linux-x86-64.so.2 and 290 libc.so.6. Note that a crash in the installation process 291 will leave the system in a state with the mismatch forever, 292 unrecoverable without the help of another distro. --> 293 <listitem> 294 <para> 295 Perform a <envar>DESTDIR</envar> installation and upgrade 296 the Glibc shared libraries on the system using one single 297 <command>install</command> command: 298 </para> 299 300 <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install 301 install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen> 302 </listitem> 303 </itemizedlist> 304 305 <para> 306 It's imperative to strictly follow these steps above unless you 307 completely understand what you are doing. 308 <emphasis role='bold'>Any unexpected deviation may render the 309 system completely unusable. YOU ARE WARNED.</emphasis> 310 </para> 311 312 <para> 313 Then continue to run the <command>make install</command> command, 314 the <command>sed</command> command against 315 <filename>/usr/bin/ldd</filename>, and the commands to install 316 the locales. Once they are finished, reboot the system 317 immediately. 318 </para> 319 </important> 210 320 211 321 <para>Install the package:</para> … … 247 357 248 358 <screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale 249 localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true359 localedef -i C -f UTF-8 C.UTF-8 250 360 localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 251 361 localedef -i de_DE -f ISO-8859-1 de_DE … … 299 409 needed for some tests later in this chapter:</para> 300 410 301 <screen role="nodump"><userinput remap="locale-full">localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true411 <screen role="nodump"><userinput remap="locale-full">localedef -i C -f UTF-8 C.UTF-8 302 412 localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen> 303 413
Note:
See TracChangeset
for help on using the changeset viewer.