Changeset 5dd7bff for pkgmngt


Ignore:
Timestamp:
07/06/2020 05:31:55 AM (4 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
3ac3ae1
Parents:
5a965ad
Message:

Use latest version of pacman

Changes to packageManager.xml.pacman:

  • Add needed deps in chapter 5/7 and 6/8
  • Add user tester if it does not exist
  • Change permissions for some dirs so that user tester can write to them
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pkgmngt/packageManager.xml.pacman

    r5a965ad r5dd7bff  
    1010<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
    1111  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
    12 <!ENTITY libarchive-version "3.1.2">
    13 <!ENTITY curl-version       "7.39.0">
    14 <!ENTITY pacman-version     "4.1.2">
    15 <!ENTITY libarchive-url "http://www.libarchive.org/downloads/libarchive-&libarchive-version;.tar.gz">
    16 <!ENTITY curl-url       "http://curl.haxx.se/download/curl-&curl-version;.tar.lzma">
     12<!ENTITY libarchive-version "3.4.3">
     13<!ENTITY curl-version       "7.71.1">
     14<!ENTITY fakeroot-version   "1.24">
     15<!ENTITY pacman-version     "5.2.2">
     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">
     18<!ENTITY fakeroot-url   "http://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_&fakeroot-version;.orig.tar.gz">
    1719<!ENTITY pacman-url     "https://sources.archlinux.org/other/pacman/pacman-&pacman-version;.tar.gz">
    18 <!ENTITY curl-md5       "e9aa6dec29920eba8ef706ea5823bad7">
    19 <!ENTITY libarchive-md5 "efad5a503f66329bb9d2f4308b5de98a">
    20 <!ENTITY pacman-md5     "063c8b0ff6bdf903dc235445525627cd">
     20<!ENTITY curl-md5       "b54b386057846ce3edd3584b19741569">
     21<!ENTITY libarchive-md5 "4b216ea3015ecf8ae555a2026f9a6b73">
     22<!ENTITY fakeroot-md5   "964e5f438f1951e5a515dd54edd50fa6">
     23<!ENTITY pacman-md5     "3a9b078a83996a3272844807b91959c6">
     24<!ENTITY % general-entities SYSTEM "BOOK/general.ent">
     25%general-entities;
    2126]>
    2227
     
    3540        <para>Download: <ulink url="&curl-url;"/></para>
    3641        <para>MD5 sum: <literal>&curl-md5;</literal></para>
     42        <para>Download: <ulink url="&fakeroot-url;"/></para>
     43        <para>MD5 sum: <literal>&fakeroot-md5;</literal></para>
    3744        <para>Download: <ulink url="&libarchive-url;"/></para>
    3845        <para>MD5 sum: <literal>&libarchive-md5;</literal></para>
     
    7582</sect1>
    7683
     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
    77106<sect1 id="ch-tools-curl" role="wrap">
    78107  <?dbhtml filename="curl.html"?>
     
    90119<screen><userinput remap="configure">./configure --prefix=/tools \
    91120            --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>
    92160<screen><userinput remap="make">make</userinput></screen>
    93161<screen><userinput remap="install">make install</userinput></screen>
     
    117185remap attribute are considered configuration instructions and executed last. You
    118186can also use remap="adjust" for the same purpose. -->
    119 <screen><userinput remap="configure">./configure --prefix=/tools \
    120     --without-openssl \
    121     PKG_CONFIG_PATH=/tools/lib/pkgconfig \
    122     DUPATH=/tools/bin/du</userinput></screen>
    123 
    124 <screen><userinput remap="make">make</userinput></screen>
    125 
    126 <screen><userinput remap="install">make install</userinput></screen>
     187<screen><userinput remap="configure">mkdir build
     188cd build
     189meson --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>
    127200
    128201<screen><userinput>sed -e 's@/usr@/tools@g' \
    129202    -e 's/\([^!]\)strip/\1!strip/' \
     203    -e 's/\([^!]\)libtool/\1!libtool/' \
    130204    -e 's/\([^!]\)zipman/\1!zipman/' \
    131205    -i /tools/etc/makepkg.conf
     
    147221</sect1>
    148222
     223<!-- version for new book: needs ninja and meson, which needs
     224     Python rebuilt with libffi and zlib. Needs also pkg-config -->
     225<sect1 id="ch-chroot-libarchive" role="wrap">
     226  <?dbhtml filename="libarchive.html"?>
     227
     228  <sect1info condition="script">
     229    <productname>libarchive</productname>
     230    <productnumber>&libarchive-version;</productnumber>
     231    <address>&libarchive-url;</address>
     232  </sect1info>
     233
     234  <title>Libarchive-&libarchive-version;</title>
     235
     236  <sect2 role="installation">
     237    <title/>
     238<screen><userinput remap="configure">./configure --prefix=/usr \
     239            --without-bz2lib \
     240            --without-xml2   \
     241            --enable-bsdtar=static \
     242            --enable-bsdcpio=static</userinput></screen>
     243<screen><userinput remap="make">make</userinput></screen>
     244<screen><userinput remap="install">make install</userinput></screen>
     245  </sect2>
     246
     247</sect1>
     248
     249<sect1 id="ch-chroot-openssl" role="wrap">
     250  <?dbhtml filename="openssl.html"?>
     251
     252  <sect1info condition="script">
     253    <productname>openssl</productname>
     254    <productnumber>&openssl-version;</productnumber>
     255    <address>&openssl-url;</address>
     256  </sect1info>
     257
     258  <title>openssl-&openssl-version;</title>
     259
     260  <sect2 role="installation">
     261    <title/>
     262<screen><userinput remap="configure">
     263./config --prefix=/usr         \
     264         --openssldir=/etc/ssl \
     265         --libdir=lib          \
     266         shared</userinput></screen>
     267<screen><userinput remap="make">make</userinput></screen>
     268<screen><userinput remap="install">make install</userinput></screen>
     269  </sect2>
     270
     271</sect1>
     272
     273<sect1 id="ch-chroot-curl" role="wrap">
     274  <?dbhtml filename="curl.html"?>
     275
     276  <sect1info condition="script">
     277    <productname>curl</productname>
     278    <productnumber>&curl-version;</productnumber>
     279    <address>&curl-url;</address>
     280  </sect1info>
     281
     282  <title>Curl-&curl-version;</title>
     283
     284  <sect2 role="installation">
     285    <title/>
     286<screen><userinput remap="configure">./configure --prefix=/usr \
     287            --disable-static</userinput></screen>
     288<screen><userinput remap="make">make</userinput></screen>
     289<screen><userinput remap="install">make install</userinput></screen>
     290  </sect2>
     291
     292</sect1>
     293
     294<sect1 id="ch-chroot-libcap" role="wrap">
     295  <?dbhtml filename="libcap.html"?>
     296
     297  <sect1info condition="script">
     298    <productname>libcap</productname>
     299    <productnumber>&libcap-version;</productnumber>
     300    <address>&libcap-url;</address>
     301  </sect1info>
     302
     303  <title>libcap-&libcap-version;</title>
     304
     305  <sect2 role="installation">
     306    <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
     310chmod -v 755 /lib/libcap.so.&libcap-version;
     311mv -v /lib/libpsx.a /usr/lib
     312rm -v /lib/libcap.so
     313ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen>
     314  </sect2>
     315
     316</sect1>
     317
     318<sect1 id="ch-chroot-fakeroot" role="wrap">
     319  <?dbhtml filename="fakeroot.html"?>
     320
     321  <sect1info condition="script">
     322    <productname>fakeroot</productname>
     323    <productnumber>&fakeroot-version;</productnumber>
     324    <address>&fakeroot-url;</address>
     325  </sect1info>
     326
     327  <title>fakeroot-&fakeroot-version;</title>
     328
     329  <sect2 role="installation">
     330    <title/>
     331<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     332<screen><userinput remap="make">make</userinput></screen>
     333<screen><userinput remap="install">make install</userinput></screen>
     334  </sect2>
     335
     336</sect1>
     337
     338<sect1 id="ch-chroot-zlib" role="wrap">
     339  <?dbhtml filename="zlib.html"?>
     340
     341  <sect1info condition="script">
     342    <productname>zlib</productname>
     343    <productnumber>&zlib-version;</productnumber>
     344    <address>&zlib-url;</address>
     345  </sect1info>
     346
     347  <title>zlib-&zlib-version;</title>
     348
     349  <sect2 role="installation">
     350    <title/>
     351<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     352<screen><userinput remap="make">make</userinput></screen>
     353<screen><userinput remap="install">make install
     354mv -v /usr/lib/libz.so.* /lib
     355ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen>
     356  </sect2>
     357
     358</sect1>
     359
     360<sect1 id="ch-chroot-libffi" role="wrap">
     361  <?dbhtml filename="libffi.html"?>
     362
     363  <sect1info condition="script">
     364    <productname>libffi</productname>
     365    <productnumber>&libffi-version;</productnumber>
     366    <address>&libffi-url;</address>
     367  </sect1info>
     368
     369  <title>libffi-&libffi-version;</title>
     370
     371  <sect2 role="installation">
     372    <title/>
     373<screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen>
     374<screen><userinput remap="make">make</userinput></screen>
     375<screen><userinput remap="install">make install</userinput></screen>
     376  </sect2>
     377
     378</sect1>
     379
     380<sect1 id="ch-chroot-python" role="wrap">
     381  <?dbhtml filename="Python-pass2.html"?>
     382
     383  <sect1info condition="script">
     384    <productname>Python</productname>
     385    <productnumber>&python-version;</productnumber>
     386    <address>&python-url;</address>
     387  </sect1info>
     388
     389  <title>Python-&python-version;</title>
     390
     391  <sect2 role="installation">
     392    <title/>
     393<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip --enable-shared</userinput></screen>
     394<screen><userinput remap="make">make</userinput></screen>
     395<screen><userinput remap="install">make install</userinput></screen>
     396  </sect2>
     397
     398</sect1>
     399
     400<sect1 id="ch-chroot-ninja" role="wrap">
     401  <?dbhtml filename="ninja.html"?>
     402
     403  <sect1info condition="script">
     404    <productname>ninja</productname>
     405    <productnumber>&ninja-version;</productnumber>
     406    <address>&ninja-url;</address>
     407  </sect1info>
     408
     409  <title>ninja-&ninja-version;</title>
     410
     411  <sect2 role="installation">
     412    <title/>
     413<screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen>
     414<screen><userinput remap="install">install -vm755 ninja /usr/bin/</userinput></screen>
     415  </sect2>
     416
     417</sect1>
     418
     419<sect1 id="ch-chroot-meson" role="wrap">
     420  <?dbhtml filename="meson.html"?>
     421
     422  <sect1info condition="script">
     423    <productname>meson</productname>
     424    <productnumber>&meson-version;</productnumber>
     425    <address>&meson-url;</address>
     426  </sect1info>
     427
     428  <title>meson-&meson-version;</title>
     429
     430  <sect2 role="installation">
     431    <title/>
     432<screen><userinput remap="install">cp meson.py /usr/bin/meson
     433cp -rv mesonbuild /usr/bin</userinput></screen>
     434  </sect2>
     435
     436</sect1>
     437
     438<sect1 id="ch-chroot-pkgconfig" role="wrap">
     439  <?dbhtml filename="pkgconfig.html"?>
     440
     441  <sect1info condition="script">
     442    <productname>pkg-config</productname>
     443    <productnumber>&pkgconfig-version;</productnumber>
     444    <address>&pkgconfig-url;</address>
     445  </sect1info>
     446
     447  <title>pkg-config-&pkgconfig-version;</title>
     448
     449  <sect2 role="installation">
     450    <title/>
     451<screen><userinput remap="configure">./configure --prefix=/usr              \
     452            --with-internal-glib       \
     453            --disable-host-tool        \
     454            --docdir=/usr/share/doc/pkg-config-&pkgconfig-version;</userinput></screen>
     455<screen><userinput remap="make">make</userinput></screen>
     456<screen><userinput remap="install">make install</userinput></screen>
     457  </sect2>
     458
     459</sect1>
     460
     461<sect1 id="ch-chroot-pkgmngt" role="wrap">
     462  <?dbhtml filename="pacman.html"?>
     463
     464  <sect1info condition="script">
     465    <productname>pacman</productname>
     466    <productnumber>&pacman-version;</productnumber>
     467    <address>&pacman-url;</address>
     468  </sect1info>
     469
     470  <title>Pacman-&pacman-version;</title>
     471
     472  <sect2 role="installation">
     473    <title/>
     474<screen><userinput remap="configure">mkdir build
     475cd build
     476meson --prefix=/usr                        \
     477      -Dcrypto=openssl                     \
     478      -Ddoc=disabled                       \
     479      -Dgpgme=disabled</userinput></screen>
     480
     481<screen><userinput remap="make">ninja</userinput></screen>
     482
     483<screen><userinput remap="install">ninja install</userinput></screen>
     484
     485<screen><userinput>sed -e 's/\([^!]\)strip/\1!strip/' \
     486    -e 's/\([^!]\)libtool/\1!libtool/' \
     487    -e 's/\([^!]\)zipman/\1!zipman/' \
     488    -i /etc/makepkg.conf
     489cat &gt;&gt; /etc/makepkg.conf &lt;&lt; EOF
     490BUILDDIR=/sources
     491PKGDEST=/var/lib/packages
     492PACKAGER="Pierre Labastie &lt;lnimbus@club-internet.fr&gt;"
     493EOF
     494cat &gt;&gt; /etc/pacman.conf &lt;&lt; EOF
     495DBPath   = /var/lib/pacman/
     496CacheDir = /var/cache/pacman/pkg/
     497LogFile  = /var/log/pacman.log
     498SigLevel = Never
     499# Repository: do not add one now: repo-add needs openssl.
     500EOF
     501chown tester:tester /var/lib/{packages,pacman}</userinput></screen>
     502
     503  </sect2>
     504
     505</sect1>
     506
     507<sect1 id="ch-chroot-shadow" role="wrap">
     508  <?dbhtml filename="shadow.html"?>
     509
     510  <sect1info condition="script">
     511    <productname>shadow</productname>
     512    <productnumber>&shadow-version;</productnumber>
     513    <address>&shadow-url;</address>
     514  </sect1info>
     515
     516  <title>shadow-&shadow-version;</title>
     517
     518  <sect2 role="installation">
     519    <title/>
     520<screen><userinput remap="pre">sed -i 's/groups$(EXEEXT) //' src/Makefile.in
     521find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \;
     522find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
     523find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;
     524sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
     525    -e 's:/var/spool/mail:/var/mail:'                 \
     526    -i etc/login.defs
     527sed -i 's/1000/999/' etc/useradd</userinput></screen>
     528<screen><userinput remap="configure">touch /usr/bin/passwd
     529./configure --sysconfdir=/etc \
     530            --with-group-name-max-length=32</userinput></screen>
     531<screen><userinput remap="make">make</userinput></screen>
     532<screen><userinput remap="install">make install</userinput></screen>
     533  </sect2>
     534
     535</sect1>
     536
    149537<!-- Mandatory section for creating dirs. These instructions are added at the
    150538end of the creating dirs instructions of the book. Do not change the
     
    162550  <title>Creating Essential Files</title>
    163551
    164 <para>No file?</para>
     552<screen><userinput>if ! grep -q tester /etc/passwd; then
     553    echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd
     554    echo "tester:x:101:" >> /etc/group
     555    install -o tester -d /home/tester
     556fi
     557chown tester:tester /var/lib/{packages,pacman}</userinput></screen>
    165558
    166559</sect1>
     
    217610
    218611</sect1>
     612
     613<sect1 id="ch-system-fakeroot" role="wrap">
     614  <?dbhtml filename="fakeroot.html"?>
     615
     616  <sect1info condition="script">
     617    <productname>fakeroot</productname>
     618    <productnumber>&fakeroot-version;</productnumber>
     619    <address>&fakeroot-url;</address>
     620  </sect1info>
     621
     622  <title>fakeroot-&fakeroot-version;</title>
     623
     624  <sect2 role="installation">
     625    <title/>
     626<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     627<screen><userinput remap="make">make</userinput></screen>
     628<screen><userinput remap="install">make DESTDIR=$PKG_DEST install</userinput></screen>
     629  </sect2>
     630
     631</sect1>
     632
    219633<sect1 id="ch-system-pkgmngt" role="wrap">
    220634  <?dbhtml filename="pacman.html"?>
     
    231645    <title/>
    232646
    233 <screen><userinput remap="configure">./configure --prefix=/usr \
    234             --sysconfdir=/etc \
    235             --localstatedir=/var</userinput></screen>
    236 
    237 <screen><userinput remap="make">make</userinput></screen>
     647<screen><userinput remap="configure">mkdir build
     648cd build
     649meson --prefix=/usr \
     650      -Dcrypto=openssl</userinput></screen>
     651
     652<screen><userinput remap="make">ninja</userinput></screen>
    238653
    239654<!-- Those instructions are executed with PKG_DEST set. They are not processed
     
    241656populated before, so it is basically empty. You have thus to create any directory
    242657needed in $PKG_DEST and not otherwise created by the make install command. -->
    243 <screen><userinput remap="install">make DESTDIR=$PKG_DEST install</userinput></screen>
     658<screen><userinput remap="install">DESTDIR=$PKG_DEST ninja install</userinput></screen>
    244659
    245660<screen><userinput>sed -e 's/\([^!]\)strip/\1!strip/' \
    246661    -e 's/\([^!]\)zipman/\1!zipman/' \
     662    -e 's/\([^!]\)libtool/\1!libtool/' \
    247663    -i /etc/makepkg.conf
    248664cat &gt;&gt; /etc/makepkg.conf &lt;&lt; EOF
Note: See TracChangeset for help on using the changeset viewer.