From 619b313adbf8fa2beb23122bc5425e91df92c81c Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 15 Jun 2019 15:26:23 +0000 Subject: [PATCH] Various fixes and improvements coming from github: - the case for "pax" in packInstall.sh.prog - an error in packageManager.xml.porg (comment before tag) - a non-working $Id in Makefile - some fixes for using the sect1info in lfs (in BLFS tools) - a big rewrite for generating scripts with more consistent line spacing, opening the way to manage remap="test" and remap="doc" attributes --- BLFS/xsl/gen-install.xsl | 91 ++++++++------- BLFS/xsl/gen_pkg_list.xsl | 8 +- BLFS/xsl/lfs_make_book.xsl | 5 +- BLFS/xsl/scripts.xsl | 192 ++++++++++++++++++-------------- Makefile | 2 +- pkgmngt/packInstall.sh.porg | 4 + pkgmngt/packageManager.xml.porg | 2 +- 7 files changed, 170 insertions(+), 134 deletions(-) diff --git a/BLFS/xsl/gen-install.xsl b/BLFS/xsl/gen-install.xsl index f8d814d..7090243 100644 --- a/BLFS/xsl/gen-install.xsl +++ b/BLFS/xsl/gen-install.xsl @@ -6,6 +6,7 @@ + - + @@ -98,8 +97,7 @@ - - + diff --git a/BLFS/xsl/lfs_make_book.xsl b/BLFS/xsl/lfs_make_book.xsl index d33a250..6948a41 100644 --- a/BLFS/xsl/lfs_make_book.xsl +++ b/BLFS/xsl/lfs_make_book.xsl @@ -15,9 +15,9 @@ $package='dbus' or $package='vim' or $package='systemd' or - $package='ninja' or $package='Python' or $package='shadow'"/> + true true @@ -35,10 +35,9 @@ $package='dbus' or $package='vim' or $package='systemd' or - $package='ninja' or $package='Python' or $package='shadow'"/> - + diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl index dc21feb..9492be4 100644 --- a/BLFS/xsl/scripts.xsl +++ b/BLFS/xsl/scripts.xsl @@ -71,15 +71,15 @@ + for libdir in /lib /usr/lib $(find /opt -name lib); do find $libdir -name \*.la \ ! -path \*ImageMagick\* \ -delete -done - - +done @@ -103,6 +103,11 @@ done + + + @@ -138,27 +143,28 @@ done #!/bin/bash set -e unset MAKELEVEL - + - export JH_PKG_DIR= + +export JH_PKG_DIR= SRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${JH_PKG_DIR}} BUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${JH_PKG_DIR}} mkdir -p $SRC_DIR mkdir -p $BUILD_DIR - - - INFOLOG=$(pwd)/info-${JH_PKG_DIR} + + +INFOLOG=$(pwd)/info-${JH_PKG_DIR} TESTLOG=$(pwd)/test-${JH_PKG_DIR} unset MAKEFLAGS #MAKEFLAGS=-j4 @@ -166,41 +172,47 @@ echo MAKEFLAGS: $MAKEFLAGS > $INFOLOG : > $TESTLOG PKG_DEST=${BUILD_DIR}/dest rm -rf $PKG_DEST - - + + + - cd $BUILD_DIR + + +cd $BUILD_DIR [[ -n "$JH_KEEP_FILES" ]] || sudo - rm -rf $JH_UNPACKDIR unpacked + rm -rf $JH_UNPACKDIR unpacked + - exit + +exit + + - cd $SRC_DIR - + +cd $SRC_DIR - @@ -215,16 +227,16 @@ find . -maxdepth 1 -mindepth 1 -type d | xargs sudo rm -rf - - - - echo Start Size: $(sudo du -skx --exclude home /) >> $INFOLOG - + + + +echo Start Size: $(sudo du -skx --exclude home /) >> $INFOLOG - case $PACKAGE in + +case $PACKAGE in *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma) tar -xvf $SRC_DIR/$PACKAGE > unpacked JH_UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'` @@ -247,16 +259,19 @@ find . -maxdepth 1 -mindepth 1 -type d | xargs JH_UNPACKDIR=$JH_PKG_DIR-build mkdir $JH_UNPACKDIR cp $SRC_DIR/$PACKAGE $JH_UNPACKDIR - cp $(find . -mindepth 1 -maxdepth 1 -type l) $JH_UNPACKDIR + ADDITIONAL="$(find . -mindepth 1 -maxdepth 1 -type l)" + if [ -n "$ADDITIONAL" ]; then + cp $ADDITIONAL $JH_UNPACKDIR + fi ;; esac export JH_UNPACKDIR -cd $JH_UNPACKDIR +cd $JH_UNPACKDIR - - - echo Start Time: ${SECONDS} >> $INFOLOG - + + + +echo Start Time: ${SECONDS} >> $INFOLOG @@ -264,14 +279,19 @@ cd $JH_UNPACKDIR mode="installation" select=".//screen[not(@role = 'nodump') and ./userinput] | .//para/command[contains(text(),'check') or - contains(text(),'test')]"/> + contains(text(),'test')]"> + + + + sudo /sbin/ - ldconfig + ldconfig + @@ -367,24 +387,24 @@ cd $JH_UNPACKDIR fi -fi - +fi - echo " + +echo " $ - " | md5sum -c - - + " | md5sum -c - - [[ "$SRC_DIR" != "$BUILD_DIR" ]] && ln -sf $SRC_DIR/$ + +[[ "$SRC_DIR" != "$BUILD_DIR" ]] && ln -sf $SRC_DIR/$ - $BUILD_DIR - + $BUILD_DIR + @@ -545,7 +565,6 @@ EOF - @@ -553,7 +572,6 @@ EOF - @@ -561,9 +579,11 @@ EOF - BOOTPKG_DIR=blfs- + +BOOTPKG_DIR=blfs- + BOOTSRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${BOOTPKG_DIR}} BOOTBUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${BOOTPKG_DIR}} mkdir -p $BOOTSRC_DIR @@ -594,16 +614,15 @@ else tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` fi -cd $BOOTUNPACKDIR - +cd $BOOTUNPACKDIR - + @@ -613,16 +632,16 @@ cd $BOOTUNPACKDIR - + - + @@ -632,8 +651,8 @@ cd $BOOTUNPACKDIR - + @@ -642,22 +661,23 @@ cd $BOOTUNPACKDIR @linkend='systemd-units']"> - + - popd - + +popd - + + - + + echo Time after make: ${SECONDS} >> $INFOLOG echo Size after make: $(sudo du -skx --exclude home /) >> $INFOLOG echo Time before test: ${SECONDS} >> $INFOLOG @@ -682,7 +702,8 @@ echo Time before test: ${SECONDS} >> $INFOLOG - # + +# @@ -698,26 +719,32 @@ echo Time before test: ${SECONDS} >> $INFOLOG - + >> $TESTLOG 2>&1 - || true - + || true + + echo Time after test: ${SECONDS} >> $INFOLOG echo Size after test: $(sudo du -skx --exclude home /) >> $INFOLOG echo Time before install: ${SECONDS} >> $INFOLOG - + + + + + + + + @@ -733,17 +760,6 @@ echo Time before install: ${SECONDS} >> $INFOLOG - - - - - make -j1 - - - - > $INFOLOG select="userinput|following-sibling::screen[@role='root']/userinput" mode="destdir"/> + echo Time after install: ${SECONDS} >> $INFOLOG echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG @@ -873,7 +890,6 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG - @@ -894,7 +910,8 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG - make DESTDIR=$PKG_DEST + +make DESTDIR=$PKG_DEST > $INFOLOG - DESTDIR=$PKG_DEST ninja + +DESTDIR=$PKG_DEST ninja > $INFOLOG contains($instruction-before,'pgrep -l')"> && - + + - - - + + select="substring($instructions, + 1, + string-length($instructions)-1)"/> - + diff --git a/Makefile b/Makefile index 5ab9974..11494d7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: +# $Id$ # From the Build Scripts Written By: Jim Gifford # Modified By: Joe Ciccone diff --git a/pkgmngt/packInstall.sh.porg b/pkgmngt/packInstall.sh.porg index 743314b..44fb8cf 100644 --- a/pkgmngt/packInstall.sh.porg +++ b/pkgmngt/packInstall.sh.porg @@ -37,6 +37,10 @@ case $1 in local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent VERSION=$(sed -n 's/.*flashplayer[^0-9]*\([^"]*\).*/\1/p' $PACKENT) ;; + pax*) + local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent + VERSION=$(sed -n 's/.*pax[^0-9]*\([^"]*\).*/\1/p' $PACKENT) + ;; psutils*) local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent VERSION=$(sed -n 's/.*psutils[^0-9]*\([^"]*\).*/\1/p' $PACKENT) diff --git a/pkgmngt/packageManager.xml.porg b/pkgmngt/packageManager.xml.porg index 3cb8f5f..0f23e42 100644 --- a/pkgmngt/packageManager.xml.porg +++ b/pkgmngt/packageManager.xml.porg @@ -1,5 +1,5 @@ - +