Remove legacy: Remove almost all occurrences of CLFS/clfs

This commit is contained in:
Pierre Labastie 2022-03-01 21:09:30 +01:00
parent 4c36783ec4
commit 0fa52f2403
16 changed files with 60 additions and 479 deletions

View file

@ -117,67 +117,3 @@ Advanced Features --->
[ ] Rebuild the Makefile (see help)
------------------------------
------------------------------
CLFS book, systemd, stable version (as of April 2017)
X86 multilib
Download the files to /usr/src (verify you have write access)
Build in /mnt/clfs (should be owned by root, verify you can execute sudo)
Clean the build directory before beginning
Use "boot" method, with a temporary kernel in /home/user/config-boot
Build a kernel, whose configuration is in /home/user/config-4.15-clfs-systemd
An fstab for the future system si located in /home/user/fstablfs
Run all the testsuites for final system
Settings for an user in Sidney (Australia)
Run four make jobs in parallel
-----------------------------
BOOK Settings --->
Use BOOK (Cross-Compiled Linux From Scratch) --->
Release (Branch or stable book) --->
Branch (preceded by "branch-"), stable Version, or tag (3.0.0-systemd)
Target architecture (x86) --->
Library (multilib) --->
Build method (boot) --->
BOOT kernel config file (mandatory) ($HOME/config-boot)
[ ] Add blfs-tool support (NEW)
[ ] Add custom tools support (NEW)
General Settings --->
Build Directory (/mnt/clfs)
[*] Retrieve source files
Package Archive Directory (/usr/src)
[ ] Retry on 'connection refused' failure (NEW)
Number of retry attempts on download failures (20) (NEW)
Download timeout (in seconds) (30) (NEW)
FTP mirror (http://ftp.osuosl.org) (NEW)
[*] Run the makefile
[*] Rebuild files
Build Settings --->
[*] Run testsuites
Tests level (All final system testsuites) --->
Flavour (Don't stop on testsuite failures) --->
[ ] Create a log of installed files for each package
[*] Use a custom fstab file
Fstab file (optional) ($HOME/fstablfs)
[*] Build the kernel
Kernel config file ($HOME/config-4.15-clfs-systemd
[ ] Strip Installed Binaries/Libraries
[ ] Install non-wide-character ncurses
[ ] DO NOT use/display progress_bar
TimeZone (Australia/Sydney)
Language (en_AU.UTF-8)
[ ] Install the full set of locales
Groff page size (A4) --->
Advanced Features --->
[*] Create SBU and disk usage report
[ ] Run comparison analysis on final stage
[*] Optimization and parallelization
Optimization settings --->
Number of parallel `make' jobs (4)
Optimization level (Cross tools (only MAKEFLAGS), temp tools and final system) --->
Internal Settings (WARNING: for jhalfs developers only) --->
[ ] Rebuild the Makefile (see help)
--------------------------------

77
README
View file

@ -14,10 +14,9 @@
- README (this file): instructions to use the LFS book. This should be
enough if you just want to build a base system as per the LFS book. It is
also a required reading for all the other projects.
- README.CLFS: supplementary instructions to use the CLFS book series.
- README.BLFS: instructions to install an automated build infrastructure
for the BLFS book. There are two ways to do so: (i) install the
tools at the end of an LFS build (CLFS is not supported in that case), or
tools at the end of an LFS build, or
(ii) install the tools on an already running system. Both methods are
described in that file.
- README.CUSTOM: instructions to run custom commands either during the xLFS
@ -25,7 +24,7 @@
instructions on how to write those commands, but some examples are
available.
- README.PACKAGE_MANAGEMENT: instructions to use package management during
the build (only for LFS, patches welcome for CLFS...)
the build
Other sources of information are the context help in the menu interface,
and the xLFS books themselves.
@ -168,60 +167,64 @@
6. LAYOUT::
/BLFS (see README.BLFS)
/CLFS/master.sh
/clfs.xsl
/CLFS2/master.sh
/clfs2.xsl
/CLFS3/master.sh
/clfs3.xsl
/BLFS/* (see README.BLFS)
/LFS/master.sh
/lfs.xsl
/common/common_functions
/common/chroot.xsl
/common_functions
/create-sbu_du-report.sh
/hostreqs.xsl
/kernfs.xsl
/makefile_functions
/packages.xsl
/urls.xsl
/create-sbu_du-report.sh
/progress_bar.sh
/blfs-tool-deps/9xx-*
/urls.xsl
/libs/func_*
/custom/template
/config/
/examples/*
/examples_CLFS-E/*
/custom/examples/*
/config/* (needs to be created after cloning since it is an
empty directory initially)
/template
/extras/do_copy_files
/do_ica_prep
/do_ica_work
/menu/*
/optimize/opt_config
/opt_override
/optimize_functions
/opt_config.d/noOpt
/noSymbols
/O2pipe
/O3pipe
/O3pipe_march
/defOpt_fPIC
/menu/*
/pkgmngt/packageManager.xml.dpkg
/packageManager.xml.pacman
/packageManager.xml.porg
/packageManager.xml.template
/packInstall.sh.dpkg
/packInstall.sh.pacman
/packInstall.sh.porg
/packInstall.sh.template
CHEATSHEET
FUNCTION_LIST
LICENSE
README
README.BLFS
README.CLFS
README.CUSTOM
README.PACKAGE_MANAGEMENT
TODO
LICENSE
Config.in
Makefile
jhalfs
blfs-tool
Makefile
7. FAQ::
Q. "It doesn't work"
@ -244,8 +247,7 @@
$BUILDDIR/
jhalfs (Makefile, cmd scripts, logs, etc..)
sources (where packages reside)
tools (temporary bootstrap system)
cross-tools (temporary CLFS only)
tools (temporary cross compiler)
...
FHS dir structure
...
@ -270,7 +272,7 @@
Q. "Why have 2 copies of the files?"
A. The package files must be visible during the chroot phase and this is a
simple and reliable method of doing so. This method also handles the
CLFS boot build method where the final build may be done on a separate
boot build method where the final build may be done on a separate
machine.
Q. "What is the function of "User account" and "Group account" menu
@ -288,23 +290,6 @@
The only changes to your account will be the creation of a NEW .bashrc
after saving your original to .bashrc.XXX
Q. "When I try to build CLFS the Makefile fails at mid-point"
A. There could be numerous reasons for the failure but the most likely
reason is you are doing a cross-build using the 'chroot' method and the
target is not compatible with the host. If you choose to build using
the chroot method a test is performed at the end of the temptools
phase. If the test succeeds the build continues inside a chroot jail.
However if the test fails, it means the host and target are not
compatible an you should use the 'boot' method to create your target
code.
As an extreme example: You can build a sparc target on a x86 platform but
only the temptools phase. You must select the 'boot' method and not the
'chroot.' You must transfer the toolchain to a sparc platform, reboot the
sparc box and continue the build.
Of all the LFS series of books Cross-LFS requires the greatest
understanding of host/target hardware combination. Please read the book
carefully and don't skip the easy parts (there are none...)
Q. "How could I stop the build at a predefined chosen point?"
A. Launch the Makefile manually passing the last numbered target to be build
as the break point. For example:

View file

@ -1,42 +0,0 @@
CLFS-1.x NOTES
None for now.
CLFS SYSROOT METHOD NOTES
.- If you want to install additional custom packages via "Add custom tools
support" and/or select "Add blfs-tool support", be sure to review and edit
their packages build scripts to follow the sysroot build method or you will
end messing your host system. Be very careful with this.
.- If you install additional packages not using the "Add custom tools support"
feature (i,e, you will install it manually after finished the Makefile run)
you will need to run manually the "Changing the Ownership Of The CLFS System"
phase commands found in the book.
CLFS EMBEDDED SYSTEMS NOTES
.- Mips, WRT and ARM builds are broken due a book bug on the uClibc
*ENDIAN* configuration settings.
.- To install CBLFS packages you must to use the "Add custom tools support"
feature. To learn how it works and how to use it, see the section titled
"Adding Post-System Build Configuration Files and Extra Packages"
found in README.CUSTOM. That is also applicable to bootloaders installation.
.- If you install additional packages not using the "Add custom tools support"
feature (i,e, you will install it manually after finished the Makefile run)
you will need to run manually the "Changing the Ownership Of The CLFS System"
phase commands found in the book.
.- If your target is a MIPS wireless router, you must to select "mips" as
your target architecture and "WRT - MIPS based wireless route" as your
hardware platform.
.- The backup & clean-up phases aren't run. This is to allow users to
review the installed files and do a more in-deeper clean-up before creating
the system tarball.

View file

@ -2,7 +2,7 @@
Normally JHALFS creates a Makefile containing only those scripts found in
the {,B,C,H}LFS books. An automated construction tool cannot predict the
the {,B}LFS books. An automated construction tool cannot predict the
needs of every individual and requests are made "Can you add xxxx package".
Rather than adding numerous package scripts and switches for each request it
was easier to add a tool for the user(s) to code their own package needs.
@ -103,11 +103,9 @@ configuration file which enables/disables the inclusion of custom scripts.
custom
/config <-- where to put your scripts.
/examples <-- a few example scripts
/examples_CLFS-E <-- example scripts for CLFS-Embedded
template <-- ALL scripts MUST look like this
NOTE::: You are responsible for including all dependencies and ensuring they
are built in the right order.
@ -153,12 +151,6 @@ configuration file which enables/disables the inclusion of custom scripts.
Other examples can be found in custom/examples. They are dated and
unmaintained, but can be useful for creating your own scripts.
:::NOTICE:::
The following examples are for use with LFS and are not applicable to any
of the CLFS-sysroot or CLFS-Embedded books. The directory examples_CLFS-E
contains code extracted from Beyond CLFS-embedded. Any packages you chose to
add should honour the DESTDIR=${CLFS} switch or equivalent.
#--------- GLIB example -----------

13
TODO
View file

@ -1,19 +1,6 @@
jhalfs TODO
---------------
MASTER SCRIPT
-------------
- [CLFS] Add a switch to choose between static or DHCP network configuration
for CLFS.
xLFS MODULES
------------
- [CLFS] Add a switch to choose between static or DHCP network configuration
for CLFS.
BLFS MODULE (See BLFS/TODO)
-----------

View file

@ -14,7 +14,6 @@ get_book() { #
case $PROGNAME in
lfs) git_root="lfs.git" ;;
clfs*) ;;
*) echo "BOOK not defined in function <get_book>"
exit 1 ;;
esac
@ -57,48 +56,6 @@ extract_commands() { #
# Extract the commands
echo -n "Extracting commands for"
case ${PROGNAME} in
clfs)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam method "$METHOD" \
--stringparam testsuite "$TEST" \
--stringparam bomb-testsuite "$BOMB_TEST" \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--stringparam sparc "$SPARC64_PROC" \
--stringparam x86 "$TARGET" \
--stringparam mips "$TARGET" \
-o ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
clfs2)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
clfs3)
echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture... "
xsltproc --nonet \
--xinclude \
--stringparam endian x$ENDIAN \
--stringparam timezone "$TIMEZONE" \
--stringparam page "$PAGE" \
--stringparam lang "$LANG" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
;;
lfs)
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
@ -184,8 +141,6 @@ extract_commands() { #
# function. But at this point we can use the profiled xml to get
# version from lfs-release in the lfs case.
case $PROGNAME in
clfs*)
VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
lfs)
VERSION=$(grep 'echo.*lfs-release' prbook.xml | sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
;;
@ -207,12 +162,6 @@ create_package_list() { #
if [ ! -z "$ARCH" ] ; then echo -n " $ARCH" ; fi
echo -n "... "
case ${PROGNAME} in
clfs*)
xsltproc --nonet --xinclude \
-o pkg_tarball_list \
packages.xsl \
$BOOK/BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
;;
lfs)
# lfs does not use the package list anymore
;;
@ -232,11 +181,6 @@ create_chroot_scripts() { #
if [ ! -z $ARCH ] ; then echo -n " $ARCH" ; fi
echo -n "... "
case ${PROGNAME} in
clfs*)
xsltproc --nonet --xinclude \
-o chroot-scripts/ chroot.xsl \
$BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1
;;
lfs)
xsltproc --nonet --xinclude \
-o chroot-scripts/ chroot.xsl \
@ -258,11 +202,6 @@ create_kernfs_scripts() { #
if [ ! -z $ARCH ] ; then echo -n " $ARCH" ; fi
echo -n "... "
case ${PROGNAME} in
clfs*)
xsltproc --nonet --xinclude \
-o kernfs-scripts/ kernfs.xsl \
$BOOK/BOOK/${ARCH}-index.xml >> $LOGDIR/$LOG 2>&1
;;
lfs)
xsltproc --nonet \
-o kernfs-scripts/devices.sh kernfs.xsl \

View file

@ -92,7 +92,7 @@ check_prerequisites() { #
local LC_ALL=C
export LC_ALL
# LFS/CLFS prerequisites
# LFS prerequisites
if [ -n "$MIN_Linux_VER" ]; then
check_version "$MIN_Linux_VER" "`uname -r`" "KERNEL"
fi

View file

@ -36,25 +36,13 @@ wrt_system_build() { #
local RUN=$2
local PREV_IT=$3
if [[ "$PROGNAME" = "clfs" ]] ; then
final_system_Makefiles $RUN
else
chapter_targets $CHAP $RUN
fi
if [[ "$PROGNAME" = "clfs" ]] ; then
basicsystem="$basicsystem $PREV_IT $system_build"
else
CHROOT_TGT="$CHROOT_TGT $PREV_IT $system_build"
fi
if [[ "$RUN" = "$ITERATIONS" ]] ; then
if [[ "$PROGNAME" = "clfs" ]] ; then
basicsystem="$basicsystem iteration-$RUN"
else
CHROOT_TGT="$CHROOT_TGT iteration-$RUN"
fi
fi
}
#----------------------------------#

View file

@ -22,16 +22,8 @@ wrt_CustomTools_target() { # Add any users supplied scripts
if [[ "x${PKG}" = "x" ]]; then
# Create an entry for a self contained cmd script that does not
# reference a package tarball
case $PROGNAME in
clfs2 | clfs3 )
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_RunAsUser "custom-tools/${this_script}"
;;
*)
CHROOT_wrt_target "${this_script}" "$PREV"
CHROOT_wrt_RunAsRoot "custom-tools/${this_script}"
;;
esac
wrt_touch
# Create the build script file
@ -46,22 +38,11 @@ xEOFx
else
# Create an entry for package
case $PROGNAME in
clfs2 | clfs3 )
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "${PKG_FILE}"
LUSER_wrt_RunAsUser "custom-tools/${this_script}"
LUSER_RemoveBuildDirs "${PKG}"
echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/${PKG}-${PKG_VERSION}" >> $MKFILE.tmp
;;
*)
CHROOT_wrt_target "${this_script}" "$PREV"
CHROOT_Unpack "${PKG_FILE}"
CHROOT_wrt_RunAsRoot "custom-tools/${this_script}"
CHROOT_wrt_RemoveBuildDirs "${PKG}"
echo -e "\t@touch $TRACKING_DIR/${PKG}-${PKG_VERSION}" >> $MKFILE.tmp
;;
esac
wrt_touch
# Create the build script file

View file

@ -23,11 +23,6 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
# Housekeeping
[[ ! -d $BUILDDIR/sources ]] && mkdir $BUILDDIR/sources
cd $BUILDDIR/sources
# If using CLFS, /sources is writable by all, but with sticky bit,
# and user does not hold MD5SUMS nor the other files, so use sudo
[[ -f MD5SUMS ]] && sudo rm MD5SUMS
[[ -f MISSING_FILES.DMP ]] && sudo rm MISSING_FILES.DMP
[[ -f urls.lst ]] && sudo rm urls.lst
# Generate URLs file
create_urls
@ -136,16 +131,6 @@ create_urls() { #
cd $JHALFSDIR
case ${PROGNAME} in
clfs*)
echo -n "Creating CLFS <${ARCH}> specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server "$SERVER" \
--stringparam family clfs \
-o $BUILDDIR/sources/urls.lst \
urls.xsl \
$BOOK/BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"
;;
lfs)
echo -n "Creating LFS specific URLs file"
xsltproc --nonet --xinclude \

View file

@ -10,7 +10,7 @@ validate_config() { # Are the config values sane (within reason)
input vars: none
externals: color constants
PROGNAME (lfs,clfs,clfs2,clfs3,blfs)
PROGNAME (lfs only as of February 28th, 2022)
modifies: none
returns: nothing
on error: write text to console and dies
@ -19,7 +19,6 @@ inline_doc
# Common settings by Config.in sections and books family
local -r BOOK_common="BOOK CUSTOM_TOOLS"
local -r BOOK_clfsX="ARCH TARGET"
local -r GENERAL_common="LUSER LGROUP LHOME BUILDDIR CLEAN GETPKG SRC_ARCHIVE \
SERVER RETRYSRCDOWNLOAD RETRYDOWNLOADCNT DOWNLOADTIMEOUT \
RUNMAKE"
@ -30,24 +29,15 @@ inline_doc
# BOOK Settings by book
local -r LFS_book="$BOOK_common INITSYS BLFS_TOOL"
local -r CLFS_book="$BOOK_common BLFS_TOOL METHOD $BOOK_clfsX TARGET32 BOOT_CONFIG"
local -r CLFS2_book="$BOOK_common BLFS_TOOL $BOOK_clfsX"
local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL"
# Build Settings by book
local -r LFS_build="$BUILD_chroot NCURSES5 DEL_LA_FILES $BUILD_common PKGMNGT FULL_LOCALE WRAP_INSTALL"
local -r CLFS_build="$BUILD_chroot $BUILD_common"
local -r CLFS2_build="STRIP $BUILD_common"
local -r CLFS3_build=" $BUILD_common"
# System Settings by book (only LFS for now)
# System Settings by book
local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
# Full list of books settings
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build $LFS_system $ADVANCED_chroot N_PARALLEL REALSBU SAVE_CH5 $ADVANCED_common"
local -r clfs_PARAM_LIST="$CLFS_book $GENERAL_common $CLFS_build $ADVANCED_chroot $ADVANCED_common"
local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build $ADVANCED_common"
local -r clfs3_PARAM_LIST="$CLFS3_book $GENERAL_common $CLFS3_build $ADVANCED_common"
# local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
# Additional variables

View file

@ -57,109 +57,6 @@ EOF
#=======================
#==== PACKAGES NAMES AND VERSIONS ====
#----------------------------------#
get_package_tarball_name() { #
#----------------------------------#
local script_name=`echo ${1} | sed -e 's@^[0-9]\{2\}-@@'`
# The use of 'head' is necessary to limit the return value to the FIRST match..
# hopefully this will not cause problems.
#
case $script_name in
tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
iputils) echo $(grep "^iputils" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
uClibc)
if [[ "${PROGNAME}" = "clfs3" ]]; then
echo $(grep "^uClibc-" $JHALFSDIR/pkg_tarball_list | head -n1 )
else
echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
fi
;;
linux-headers)
if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "clfs" ]]; then
# Uses kernel headers directly
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
else
# CLFS{2,3} used to use massaged headers package
# echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
fi
;;
expect) echo $(grep "^expect" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
util-linux-libs | util-linux-pass1) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
udev) echo $(grep "^systemd" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
xml-parser) echo $(grep "^XML" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
libdbus) echo $(grep "^dbus" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
glibc) echo $(grep "^glibc" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
libelf) echo $(grep "^elfutils" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
*) echo $(grep "^$script_name[_-][[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
;;
esac
}
#----------------------------------#
get_package_version() { #
#----------------------------------#
# Those hacks may change depending on the invention of devs for tarball names.
# Normally, we expect -digit to signal the beginning of the version field
# but it may happen that there is no '-' (tcl, expect), that the version
# field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only
# the second dash) or that the first character of the version is not a digit
# (iputils-s20121221)...
case ${1} in
tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*)
echo ${1} | sed -e 's@^[^[:digit:]]*@@' \
-e 's@\(-src\)*\.tar.*@@'
;;
iputils*) echo ${1} | sed -e 's@^.*-@@' \
-e 's@\.tar.*@@'
;;
glibc*) echo ${1} | sed -e 's@^[^-]*-@@' \
-e 's@\.tar.*@@'
;;
LVM*) echo ${1} | sed -e 's@^[^.]*\.@@' \
-e 's@\.tgz.*@@'
;;
iproute*) echo ${1} | sed -e 's@^[^-]*-@@' \
-e 's@\.tar.*@@'
;;
pkg*|udev*|Singular*|XML*)
echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \
-e 's@\.tar.*@@' \
-e 's@\.zip.*@@'
;;
*) echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \
-e 's@\.tar.*@@' \
-e 's@\.zip.*@@'
;;
esac
}
#=======================
#==== TARGET HEADER ====
#----------------------------------#
@ -315,21 +212,10 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
fi
local file=$1
case ${PROGNAME} in
lfs ) MOUNT_ENV="LFS" ;;
clfs ) MOUNT_ENV="CLFS" ;;
clfs2 ) MOUNT_ENV="CLFS" ;;
clfs3 ) MOUNT_ENV="CLFS" ;;
*) echo "undefined progname $PROGNAME"; exit 1 ;;
esac
(
cat << EOF
@export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
if [ "${PROGNAME}" != lfs ]; then \\
\$(PRT_DU) >>logs/\$@$version; \\
fi
@export LFS=\$(MOUNT_PT) && \\
${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1
EOF
) >> $MKFILE.tmp
}

View file

@ -203,21 +203,15 @@ define echo_finished
@echo $(tab_)- Mount the virtual kernel file systems.
@echo
@echo $(tab_)- Enter to the chroot using the command found
@echo $(tab_)in the section -Entering the Chroot Environment-
@echo $(tab_)except if building CLFS with METHOD=boot.
@echo $(tab_)" in the section -Entering the Chroot Environment-"
@echo $(tab_)" except if building with METHOD=boot."
@echo
@echo $(tab_)- Set a password for the root user.
@echo
@echo $(tab_)- Edit or create /etc/fstab,
@echo $(tab_) " /etc/hosts,"
@echo $(tab_) " /etc/sysconfig/clock,"
@echo $(tab_) " /etc/sysconfig/console,"
@echo $(tab_) " /etc/sysconfig/network,"
@echo $(tab_) " /etc/sysconfig/ifconfig.eth0,"
@echo $(tab_) " /etc/resolv.conf"
@echo $(tab_)and any other configuration file required to suit your needs.
@echo $(tab_)- Edit or create /etc/fstab and any other configuration file
@echo $(tab_)" required to suit your needs."
@echo
@echo $(tab_)- Set-up the boot loader, except if building CLFS with METHOD=boot.
@echo $(tab_)- Set-up the boot loader.
@echo
@echo $(tab_)You can set-up the new boot-loader installed on the new system
@echo $(tab_)or the host bootloader.

View file

@ -8,7 +8,8 @@
<!-- The FTP server used as fallback -->
<xsl:param name="server">ftp://ftp.osuosl.org</xsl:param>
<!-- The book family (lfs or clfs). Needed to use the proper FTP path. -->
<!-- The book family (lfs only now). Needed to use the proper FTP path. -->
<!-- TODO not needed, remove -->
<xsl:param name="family">lfs</xsl:param>
<!-- Do we use a package manager? -->

43
jhalfs
View file

@ -197,40 +197,20 @@ BRANCH_ID=${BRANCH_ID:=development}
case $BRANCH_ID in
development )
case $PROGNAME in
clfs* ) TREE="" ;;
* ) TREE=trunk ;;
esac
TREE=trunk
LFSVRS=development
;;
*EDIT* ) echo " You forgot to set the branch or stable book version."
echo " Please rerun make and fix the configuration."
exit 2 ;;
branch-* )
case $PROGNAME in
lfs )
LFSVRS=${BRANCH_ID}
TREE=${BRANCH_ID#branch-}
;;
clfs* )
LFSVRS=${BRANCH_ID}
TREE=${BRANCH_ID#branch-}
;;
esac
;;
* )
case $PROGNAME in
lfs )
LFSVRS=${BRANCH_ID}
TREE=${BRANCH_ID}
;;
clfs* )
LFSVRS=${BRANCH_ID}
TREE=clfs-${BRANCH_ID}
;;
* )
esac
;;
esac
# Set the document location...
@ -239,13 +219,7 @@ BOOK=${BOOK:=$JHALFSDIR/$PROGNAME-$LFSVRS}
#--- Envars not sourced from configuration
# shellcheck disable=SC2034
case $PROGNAME in
clfs ) declare -r GIT="git://git.clfs.org/cross-lfs" ;;
clfs2 ) declare -r GIT="git://git.clfs.org/clfs-sysroot" ;;
clfs3 ) declare -r GIT="git://git.clfs.org/clfs-embedded" ;;
*) declare -r GIT="git://git.linuxfromscratch.org" ;;
esac
declare -r GIT="git://git.linuxfromscratch.org"
declare -r LOG=000-masterscript.log
# Set true internal variables
@ -384,11 +358,6 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
# Copy needed stylesheets
cp "$COMMON_DIR"/{packages.xsl,chroot.xsl,kernfs.xsl} "$JHALFSDIR/"
# Fix the XSL book parser
case $PROGNAME in
clfs* ) sed 's,FAKEDIR,'"${BOOK}/BOOK"',' "${PACKAGE_DIR}/${XSL}" > "${JHALFSDIR}/${XSL}" ;;
* ) ;;
esac
export XSL=$JHALFSDIR/${XSL}
# Copy packageManager.xml, if needed
@ -459,15 +428,7 @@ if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
fi
# When regenerating the Makefile, we need to know also the
# canonical book version
case $PROGNAME in
clfs* )
VERSION=$(xmllint --noent "$BOOK/prologue/$ARCH/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
lfs)
VERSION=$(grep 'echo.*lfs-release' "$JHALFSDIR/prbook.xml" | sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
;;
*)
VERSION=$(xmllint --noent "$BOOK/prologue/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
esac
fi
build_Makefile

View file

@ -9,8 +9,6 @@
# This list may be different for you.
#BLACK_LIST="attr autoconf coreutils dejagnu gettext gperf groff man-db vim"
# Rationale for attr, coreutils, gperf: the tests do not pass with -jX
# CLFS packages (not tested on December 21st, 2019)
#BLACK_LIST="$BLACK_LIST libee"
#--- Default optimization mode
# This mode is overridden by definitions in opt_override;