Changeset 55e82d2
- Timestamp:
- 06/12/2022 08:54:14 PM (2 years ago)
- Branches:
- ablfs-more, trunk
- Children:
- ff30640
- Parents:
- 84d0d39
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LFS/lfs.xsl
r84d0d39 r55e82d2 11 11 <!-- use package management ? 12 12 n = no, original behavior 13 y = yes, add PKG_DEST to scripts in install commands of chapter0 6-0813 y = yes, add PKG_DEST to scripts in install commands of chapter08-10 14 14 --> 15 15 <xsl:param name="pkgmngt" select="'n'"/> … … 17 17 <!-- Package management with "porg style" ? 18 18 n = no, same as pkgmngt description above 19 y = yes, wrap install commands of chapter0 6-08into a bash function.19 y = yes, wrap install commands of chapter08-10 into a bash function. 20 20 note that pkgmngt must be 'y' in this case 21 21 --> … … 188 188 <xsl:if test="$pkgmngt='y' and 189 189 following-sibling::sect1[1][@id='ch-tools-stripping' or @id='ch-tools-cleanup']"> 190 <xsl:choose> 191 <xsl:when test="$bashdir='/tools'"> 192 <xsl:apply-templates 193 select="document('packageManager.xml')//sect1[ 194 contains(@id,'ch-tools')]" 195 mode="pkgmngt"> 196 <xsl:with-param name="order" select="$order+1"/> 197 <xsl:with-param name="dirname" select="$dirname"/> 198 </xsl:apply-templates> 199 </xsl:when> 200 <xsl:otherwise> 201 <xsl:apply-templates 202 select="document('packageManager.xml')//sect1[ 203 contains(@id,'ch-chroot')]" 204 mode="pkgmngt"> 205 <xsl:with-param name="order" select="$order+1"/> 206 <xsl:with-param name="dirname" select="$dirname"/> 207 </xsl:apply-templates> 208 </xsl:otherwise> 209 </xsl:choose> 190 <xsl:apply-templates 191 select="document('packageManager.xml')//sect1[ 192 contains(@id,'ch-chroot')]" 193 mode="pkgmngt"> 194 <xsl:with-param name="order" select="$order+1"/> 195 <xsl:with-param name="dirname" select="$dirname"/> 196 </xsl:apply-templates> 210 197 </xsl:if> 211 198 <xsl:if test="$pkgmngt='y' and … … 246 233 <xsl:otherwise> 247 234 <!-- We cannot know which directory(ies) are needed by the package. Create a 248 reasonable bunch of them. Should be close to "Creating Directories".--> 249 <xsl:text>mkdir -pv $PKG_DEST/{bin,boot,etc,lib,sbin} 235 reasonable bunch of them. Should be close to "Creating Directories". 236 Create also symlinks from /lib, /bin, /sbin to their counterpart 237 in usr, so that the package only has files in /usr--> 238 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc} 250 239 mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin} 251 240 mkdir -pv $PKG_DEST/usr/share/{doc,info,bash-completion/completions} … … 254 243 x86_64) mkdir -v $PKG_DEST/lib64 ;; 255 244 esac 245 ln -sv usr/sbin $PKG_DEST 246 ln -sv usr/bin $PKG_DEST 247 ln -sv usr/lib $PKG_DEST 256 248 </xsl:text> 257 249 </xsl:otherwise> … … 300 292 </xsl:text> 301 293 </xsl:if> 302 <!-- remove empty directories -->294 <!-- remove empty directories and symlinks--> 303 295 <xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \ 304 296 $PKG_DEST/usr/share/bash-completion{/completions,} \ … … 306 298 $PKG_DEST/usr/lib/pkgconfig \ 307 299 $PKG_DEST/usr/{lib,bin,sbin,include} \ 308 $PKG_DEST/{boot,etc ,lib,bin,sbin}; do300 $PKG_DEST/{boot,etc}; do 309 301 [ -d "$dir" ] && [ -z "$(ls $dir)" ] && rmdir -v $dir 310 302 done 311 303 [ -d $PKG_DEST/lib64 ] && [ -z "$(ls $PKG_DEST/lib64)" ] && 312 304 rmdir -v $PKG_DEST/lib64 305 rm -v $PKG_DEST/{lib,bin,sbin} 313 306 <!-- prevent overwriting symlinks: if a package install something in 314 307 these directories, it'll be lost if not using package management, … … 1267 1260 1268 1261 if [ -d "$PKGDIR" ]; then rm -rf $PKGDIR; fi 1262 if [ -d "$PKG_DEST" ]; then rm -rf $PKG_DEST; fi 1269 1263 if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi 1270 1264 </xsl:text> -
common/libs/func_book_parser
r84d0d39 r55e82d2 110 110 # in the stylesheet... 111 111 sed -i 's/-iv /-v /' "./${COMMANDS}/"chapter??/*kernel* 112 112 # If doing a destdir install (PM without wrap), the gcc instructions 113 # fail for two reasons: a missing dir, and gcc -dumpmachine returns a 114 # wrong string. 115 if [ "$PKGMNGT" = y ] && [ "$WRAP_INSTALL" = n ]; then 116 sed -e 's|(gcc|&/xgcc|' \ 117 -e '/lto_plug/imkdir -pv $PKG_DEST/usr/lib/bfd-plugins' \ 118 -i ./${COMMANDS}/chapter08/*gcc 119 fi 113 120 echo "done" 114 121 -
pkgmngt/packInstall.sh.pacman
r84d0d39 r55e82d2 31 31 # on the system 32 32 # Right now, we have the files in the current directory. They should be moved 33 # to /sources/$PACKAGE/src. 34 mkdir -p ../$PACKAGE/src 33 # to /sources/$PACKAGE/src. Also, in case there was a failure before, clean 34 # /sources/$PACKAGE 35 rm -rf /sources/$PACKAGE 36 mkdir -p /sources/$PACKAGE/src 37 35 38 # We'll build as user builder. We need this directory to be owned by that user. 36 chown -R builder ../$PACKAGE37 mv * ../$PACKAGE/src39 chown -R builder /sources/$PACKAGE 40 mv * /sources/$PACKAGE/src 38 41 chown -R builder $PKG_DEST 39 chmod -R o+r ../$PACKAGE42 chmod -R o+r /sources/$PACKAGE 40 43 41 44 cat > PKGBUILD <<EOF -
pkgmngt/packageManager.xml.pacman
r84d0d39 r55e82d2 10 10 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 11 11 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ 12 <!ENTITY libarchive-version "3. 4.3">13 <!ENTITY curl-version "7. 71.1">14 <!ENTITY fakeroot-version "1.2 4">15 <!ENTITY pacman-version " 5.2.2">12 <!ENTITY libarchive-version "3.6.1"> 13 <!ENTITY curl-version "7.83.1"> 14 <!ENTITY fakeroot-version "1.29"> 15 <!ENTITY pacman-version "6.0.1"> 16 16 <!ENTITY libarchive-url "https://github.com/libarchive/libarchive/releases/download/v&libarchive-version;/libarchive-&libarchive-version;.tar.xz"> 17 <!ENTITY curl-url "https://curl. haxx.se/download/curl-&curl-version;.tar.xz">17 <!ENTITY curl-url "https://curl.se/download/curl-&curl-version;.tar.xz"> 18 18 <!ENTITY fakeroot-url "http://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_&fakeroot-version;.orig.tar.gz"> 19 <!ENTITY pacman-url "https://sources.archlinux.org/other/pacman/pacman-&pacman-version;.tar. gz">20 <!ENTITY curl-md5 " b54b386057846ce3edd3584b19741569">21 <!ENTITY libarchive-md5 " 4b216ea3015ecf8ae555a2026f9a6b73">22 <!ENTITY fakeroot-md5 " 964e5f438f1951e5a515dd54edd50fa6">23 <!ENTITY pacman-md5 " 3a9b078a83996a3272844807b91959c6">19 <!ENTITY pacman-url "https://sources.archlinux.org/other/pacman/pacman-&pacman-version;.tar.xz"> 20 <!ENTITY curl-md5 "08c6d9c25d9cf8d17be28363753e42ca"> 21 <!ENTITY libarchive-md5 "9465f7995649c9ea84854a7fd8c76f30"> 22 <!ENTITY fakeroot-md5 "cab9604a7dc1d58346e0d15bb285bd0f"> 23 <!ENTITY pacman-md5 "f71e6f06867749735960d0c1d199d375"> 24 24 <!ENTITY % general-entities SYSTEM "BOOK/general.ent"> 25 25 %general-entities; … … 55 55 --> 56 56 57 <!-- Do not change the next line. The name of the scriptlet will be taken 58 from the dbhtml instruction: it is the name of the file less .html, with 59 xxx-x-added before (x, digits).--> 60 <sect1 id="ch-tools-libarchive" role="wrap"> 61 <?dbhtml filename="libarchive.html"?> 62 63 <sect1info condition="script"> 64 <productname>libarchive</productname> 65 <productnumber>&libarchive-version;</productnumber> 66 <address>&libarchive-url;</address> 67 </sect1info> 68 69 <title>Libarchive-&libarchive-version;</title> 70 71 <sect2 role="installation"> 72 <title/> 73 <screen><userinput remap="configure">./configure --prefix=/tools \ 74 --without-bz2lib \ 75 --without-xml2 \ 76 --enable-bsdtar=static \ 77 --enable-bsdcpio=static</userinput></screen> 78 <screen><userinput remap="make">make</userinput></screen> 79 <screen><userinput remap="install">make install</userinput></screen> 80 </sect2> 81 82 </sect1> 83 84 <sect1 id="ch-tools-openssl" role="wrap"> 85 <?dbhtml filename="openssl.html"?> 86 87 <sect1info condition="script"> 88 <productname>openssl</productname> 89 <productnumber>&openssl-version;</productnumber> 90 <address>&openssl-url;</address> 91 </sect1info> 92 93 <title>openssl-&openssl-version;</title> 94 95 <sect2 role="installation"> 96 <title/> 97 <screen><userinput remap="configure">./config --prefix=/tools \ 98 --openssldir=/tools/etc/ssl \ 99 --libdir=lib</userinput></screen> 100 <screen><userinput remap="make">make</userinput></screen> 101 <screen><userinput remap="install">make install</userinput></screen> 102 </sect2> 103 104 </sect1> 105 106 <sect1 id="ch-tools-curl" role="wrap"> 107 <?dbhtml filename="curl.html"?> 108 109 <sect1info condition="script"> 110 <productname>curl</productname> 111 <productnumber>&curl-version;</productnumber> 112 <address>&curl-url;</address> 113 </sect1info> 114 115 <title>Curl-&curl-version;</title> 116 117 <sect2 role="installation"> 118 <title/> 119 <screen><userinput remap="configure">./configure --prefix=/tools \ 120 --disable-static</userinput></screen> 121 <screen><userinput remap="make">make</userinput></screen> 122 <screen><userinput remap="install">make install</userinput></screen> 123 </sect2> 124 125 </sect1> 126 127 <sect1 id="ch-tools-libcap" role="wrap"> 128 <?dbhtml filename="libcap.html"?> 129 130 <sect1info condition="script"> 131 <productname>libcap</productname> 132 <productnumber>&libcap-version;</productnumber> 133 <address>&libcap-url;</address> 134 </sect1info> 135 136 <title>libcap-&libcap-version;</title> 137 138 <sect2 role="installation"> 139 <title/> 140 <screen><userinput remap="make">make lib=lib prefix=/tools GOLANG=no PAM_CAP=no</userinput></screen> 141 <screen><userinput remap="install">make lib=lib prefix=/tools GOLANG=no PAM_CAP=no install</userinput></screen> 142 </sect2> 143 144 </sect1> 145 146 <sect1 id="ch-tools-fakeroot" role="wrap"> 147 <?dbhtml filename="fakeroot.html"?> 148 149 <sect1info condition="script"> 150 <productname>fakeroot</productname> 151 <productnumber>&fakeroot-version;</productnumber> 152 <address>&fakeroot-url;</address> 153 </sect1info> 154 155 <title>fakeroot-&fakeroot-version;</title> 156 157 <sect2 role="installation"> 158 <title/> 159 <screen><userinput remap="configure">./configure --prefix=/tools</userinput></screen> 160 <screen><userinput remap="make">make</userinput></screen> 161 <screen><userinput remap="install">make install</userinput></screen> 162 </sect2> 163 164 </sect1> 165 166 <sect1 id="ch-tools-pkgmngt" role="wrap"> 167 <?dbhtml filename="pacman.html"?> 168 169 <sect1info condition="script"> 170 <productname>pacman</productname> 171 <productnumber>&pacman-version;</productnumber> 172 <address>&pacman-url;</address> 173 </sect1info> 174 175 <title>Pacman-&pacman-version;</title> 176 177 <sect2 role="installation"> 178 <title/> 179 <!-- You can use any number of remap="pre", "configure", "make", "test", "install" 180 <screen><userinput remap="something">Instructions</userinput></screen>. 181 They are executed in that order. "pre" can be used for patching for example. 182 In case testing is enabled, the instructions flagged test are logged to a different 183 file (test-log). If testing is not enabled, they are not executed at all. Do not 184 put line breaks before and after your instructions. <userinput> without 185 remap attribute are considered configuration instructions and executed last. You 186 can also use remap="adjust" for the same purpose. --> 187 <screen><userinput remap="configure">mkdir build 188 cd build 189 meson --prefix=/tools \ 190 --sysconfdir=/tools/etc \ 191 --localstatedir=/tools/var \ 192 -Dcrypto=openssl \ 193 -Ddoc=disabled \ 194 -Dgpgme=disabled \ 195 -Dpkg_config_path=/tools/lib/pkgconfig</userinput></screen> 196 197 <screen><userinput remap="make">ninja</userinput></screen> 198 199 <screen><userinput remap="install">ninja install</userinput></screen> 200 201 <screen><userinput>sed -e 's@/usr@/tools@g' \ 202 -e 's/\([^!]\)strip/\1!strip/' \ 203 -e 's/\([^!]\)libtool/\1!libtool/' \ 204 -e 's/\([^!]\)zipman/\1!zipman/' \ 205 -i /tools/etc/makepkg.conf 206 cat >> /tools/etc/makepkg.conf << EOF 207 BUILDDIR=/sources 208 PKGDEST=/var/lib/packages 209 PACKAGER="Pierre Labastie <lnimbus@club-internet.fr>" 210 EOF 211 cat >> /tools/etc/pacman.conf << EOF 212 DBPath = /var/lib/pacman/ 213 CacheDir = /var/cache/pacman/pkg/ 214 LogFile = /var/log/pacman.log 215 SigLevel = Never 216 # Repository: do not add one now: repo-add needs openssl. 217 EOF</userinput></screen> 218 219 </sect2> 220 221 </sect1> 222 223 <!-- version for new book: needs ninja and meson, which needs 57 <!-- pacman now needs ninja and meson, which needs 224 58 Python rebuilt with libffi and zlib. Needs also pkg-config --> 225 59 <sect1 id="ch-chroot-libarchive" role="wrap"> … … 285 119 <title/> 286 120 <screen><userinput remap="configure">./configure --prefix=/usr \ 287 --disable-static</userinput></screen> 121 --disable-static \ 122 --with-openssl</userinput></screen> 288 123 <screen><userinput remap="make">make</userinput></screen> 289 124 <screen><userinput remap="install">make install</userinput></screen> … … 305 140 <sect2 role="installation"> 306 141 <title/> 307 <screen><userinput remap="pre">sed -i '/install.*STACAPLIBNAME/d' libcap/Makefile</userinput></screen> 308 <screen><userinput remap="make">make lib=lib</userinput></screen> 309 <screen><userinput remap="install">make lib=lib PKGCONFIGDIR=/usr/lib/pkgconfig install 310 chmod -v 755 /lib/libcap.so.&libcap-version; 311 mv -v /lib/libpsx.a /usr/lib 312 rm -v /lib/libcap.so 313 ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen> 142 <screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen> 143 <screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen> 144 <screen><userinput remap="install">make lib=lib prefix=/usr install</userinput></screen> 314 145 </sect2> 315 146 … … 352 183 <screen><userinput remap="make">make</userinput></screen> 353 184 <screen><userinput remap="install">make install 354 mv -v /usr/lib/libz.so.* /lib 355 ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen> 185 rm -fv /usr/lib/libz.a</userinput></screen> 356 186 </sect2> 357 187 … … 371 201 <sect2 role="installation"> 372 202 <title/> 373 <screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native </userinput></screen>203 <screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native --disable-exec-static-tramp</userinput></screen> 374 204 <screen><userinput remap="make">make</userinput></screen> 375 205 <screen><userinput remap="install">make install</userinput></screen> … … 523 353 sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \ 524 354 -e 's:/var/spool/mail:/var/mail:' \ 525 - i etc/login.defs526 sed -i 's/1000/999/' etc/useradd</userinput></screen>355 -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \ 356 -i etc/login.defs</userinput></screen> 527 357 <screen><userinput remap="configure">touch /usr/bin/passwd 528 ./configure --sysconfdir=/etc \358 ./configure --sysconfdir=/etc --disable-static \ 529 359 --with-group-name-max-length=32</userinput></screen> 530 360 <screen><userinput remap="make">make</userinput></screen> … … 605 435 <title/> 606 436 <screen><userinput remap="configure">./configure --prefix=/usr \ 607 --disable-static \ 608 --enable-threaded-resolver</userinput></screen> 437 --disable-static --with-openssl \ 438 --enable-threaded-resolver \ 439 --with-ca-path=/etc/ssl/certs</userinput></screen> 609 440 <screen><userinput remap="make">make</userinput></screen> 610 441 <screen><userinput remap="install">make DESTDIR=$PKG_DEST install 442 rm -rf docs/examples/.deps 611 443 find docs \( -name "Makefile*" -o -name "*.1" -o -name "*.3" \) -exec rm {} \; 612 444 install -v -d -m755 $PKG_DEST/usr/share/doc/curl-&curl-version;
Note:
See TracChangeset
for help on using the changeset viewer.