From 49f8b0339994429d0dbbb806b323a17e1e8cc081 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 24 Jun 2020 06:26:05 +0000 Subject: [PATCH] Fix package management for new book, and add a patch for porg --- LFS/lfs.xsl | 80 ++++++++++++++++++----------- pkgmngt/packageManager.xml.porg | 43 +++++++++++++++- pkgmngt/packageManager.xml.template | 80 +++++++++++++++++++++++++++-- 3 files changed, 168 insertions(+), 35 deletions(-) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 393be5a..0f64dde 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -143,28 +143,6 @@ otherwise it is in /bin.--> - - - - - - - - - - - - - #! @@ -187,14 +165,16 @@ otherwise it is in /bin.--> - + - + + + + + + + + + + + + + + + + + + + + + + @@ -219,7 +233,9 @@ otherwise it is in /bin.--> not(current()/../@id='ch-tools-dejagnu') and not(current()/../@id='ch-system-systemd')]"/> - @@ -367,7 +385,7 @@ set -e select=".//screen[not(@role) or @role != 'nodump']/userinput[@remap != 'adjust']" mode="pkgmngt"/> - + PREV_SEC=${SECONDS} packInstall SECONDS=${PREV_SEC} @@ -1216,8 +1234,12 @@ PACKAGE= - + + source ${ROOT}${SCRIPT_ROOT}/packInstall.sh export -f packInstall diff --git a/pkgmngt/packageManager.xml.porg b/pkgmngt/packageManager.xml.porg index 0f23e42..cc3986e 100644 --- a/pkgmngt/packageManager.xml.porg +++ b/pkgmngt/packageManager.xml.porg @@ -1,10 +1,11 @@ - + + ]>
@@ -14,6 +15,12 @@ Download: MD5 sum: &porg-md5; + + Package Information + Download: + MD5 sum: &porg-patch-md5; + + @@ -27,6 +34,7 @@ Porg in tools Instructions +patch -Np1 -i ../porg-0.10-renameat2-1.patch ./configure --prefix=/tools \ --disable-grop \ --with-porg-logdir=/tools/var/porg @@ -69,6 +77,38 @@ mkdir -pv /var/lib/packages cp /tools/etc/porgrc /etc + + + + + porg + &porg-version; +
&porg-url;
+
+ + Temporary Porg + + Instructions + +patch -Np1 -i ../porg-0.10-renameat2-1.patch +./configure --prefix=/usr \ + --disable-grop \ + --sysconfdir=/etc \ + --with-porg-logdir=/var/lib/porg + +make + +make install +mkdir -p /usr/share/bash-completion/completions +mv /etc/bash_completion.d/porg* /usr/share/bash-completion/completions + +sed -e '/EXCLUDE/{s/^#//;s@$@:/sources:/home@}' \ + -e '/LOGDIR/s/^#//' \ + -i /etc/porgrc + + +
+ @@ -82,6 +122,7 @@ mkdir -pv /var/lib/packages Instructions +patch -Np1 -i ../porg-0.10-renameat2-1.patch ./configure --prefix=/usr \ --disable-grop \ --sysconfdir=/etc \ diff --git a/pkgmngt/packageManager.xml.template b/pkgmngt/packageManager.xml.template index 46ece59..0375d90 100644 --- a/pkgmngt/packageManager.xml.template +++ b/pkgmngt/packageManager.xml.template @@ -16,6 +16,7 @@ it in html --> Download: @@ -29,11 +30,76 @@ Do not change anything, except the url and the md5 checksum. --> --> - + - + + + + dpkg + x.y.z +
http://where/is/your/package
+
+ + + +./configure --prefix=/tools \ + --disable-nls --without-dselect \ + --without-start-stop-daemon \ + --without-update-alternatives \ + --without-install-info \ + --without-zlib --with-bz2=static --without-selinux + +(cd lib && make) +(cd src && make) +(cd dpkg-deb && make) +(cd dpkg-split && make) + +cp src/dpkg src/dpkg-* /tools/bin +cp dpkg-deb/dpkg-deb /tools/bin +cp dpkg-split/dpkg-split /tools/bin +mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d} +cp debian/dpkg.cfg /tools/etc/dpkg + +cat >> /tools/etc/dpkg/dpkg.cfg << EOF +# admindir on LFS system +admindir /var/lib/dpkg +EOF + +cat >> /tools/etc/dpkg/dpkg.cfg << EOF +# disable fatal error on path checking +force-bad-path +EOF + + + +
+ + + + @@ -95,7 +161,9 @@ any explaining Title and explanations --> mkdir -pv /var/lib/packages
- + touch /var/lib/dpkg/{available,status} @@ -106,6 +174,8 @@ touch /var/log/dpkg.log