Commit graph

402 commits

Author SHA1 Message Date
Pierre Labastie
e4b7aa8206 Replace "cat /proc/cpuinfo" with "lscpu" in the sub-du report: cpuinfo gets
too big with several cores
2020-06-19 06:51:10 +00:00
Pierre Labastie
3da8c49659 Update ICA for new LFS/master.sh 2020-06-14 07:08:19 +00:00
Pierre Labastie
b217a303e4 Fix sbu-du calculations for the new numbering 2020-06-11 13:59:59 +00:00
Pierre Labastie
22bb166d9d Fix the save-ch5 target 2020-06-11 08:22:20 +00:00
Pierre Labastie
ebe1ba613c Adapt for the cross 2 branch. Note that ICA is broken now. Keeping some old
code to use for fixing ICA, but committing now so that testing can begin!
2020-06-10 20:01:17 +00:00
Pierre Labastie
9ef12f76bb Use a private name for MAKEFLAGS in jhalfs, so that it does not propagate
to top make, when ticking "Run the makefile"
2020-06-05 10:18:27 +00:00
Pierre Labastie
ae1d8a5b59 Prevent a permission problem when using blfs tools with the cros-chap5 branch:
/var/lib needs to be owned by LUSER during chap 5, but it is owned
by root after installing the blfs tools. SO chown it.
2020-05-08 08:22:55 +00:00
Pierre Labastie
38016d5ca7 Add a missing file for saving chapter 5 work 2020-05-01 19:36:10 +00:00
Pierre Labastie
f5ecc2838a Add code to save work at the end of chapter 5
(and finish the rebuild-makefile change)
2020-05-01 14:24:32 +00:00
Pierre Labastie
31a9b1440c remove the __pycache__ dirs from comparison analysis 2020-04-10 10:16:41 +00:00
Pierre Labastie
7b7b5e9624 Various fixes for ICA 2020-04-02 09:56:51 +00:00
Pierre Labastie
0835a1065f Two fixes:"
- use /etc/passwd to check whether LUSER exists
- use sudo -H -u $(LUSER) to be sure that HOME is set (depends on distro)
2020-04-01 09:11:32 +00:00
Pierre Labastie
04de9bc4db Allow to find kernfs and chroot in any chapter
We use those files to generate code snippets to use in Makefile.
They used to be in chapter 6, but the new book will have some
of them in chapter 5.
2020-03-29 17:19:25 +00:00
Pierre Labastie
939731aa52 No need to prin DU from Makefile in LFS
We now print the disk usage from the scriptlet, so printing
again from the Makefile results in a duplicated line. Remove
the printing if book=lfs
2020-03-29 13:46:19 +00:00
Pierre Labastie
5e4a124e3d Remove /tools and /cross-tools when cleaning
If we stop a build before the "do-housekeeping" target is executed, there
may be symlinks of the type /tools->/mnt/lfs/tools. If we want to restart,
for example after fixing something else, and we run the "creatingtoolsdir"
target (or similar one in CLFS) again, it will fail. It's better to clean
those symlinks when cleaning the build directory.
2020-03-29 13:05:48 +00:00
Pierre Labastie
20e3fcdec2 Do not use a login shell for LUSER
Most books have something like "exec /bin/bash" in .bash_profile for the
building user. This results in stopping and waiting for commands when
running a a login shell. The current jhalfs way of removing .bash_profile is
suboptimal, since a user may want to login as $(LUSER) and expect that the
environment is set (without having to source .bashrc). So remove the
"-i" flag in "sudo -u $(LUSER) ..."
2020-03-29 12:58:06 +00:00
Pierre Labastie
a1795f0351 TRACKFILE should not contain LFS packages that are also in BLFS, ticket #1723 2019-09-25 07:50:45 +00:00
Pierre Labastie
085435e66f Remove the obsolete vim-lang instructions and variable, and add non-wide-
charater ncurses library
2019-09-05 17:22:04 +00:00
Pierre Labastie
3b14992061 Fix "installed files size" for the last package:
In create-sbu_du.sh, we use "du -s" for getting the size of the installed
files at the end of the build, and we compare to the "KB" from the previous
package to get the Installed size of the last package. But the du command
excludes an absolute dir, while it should be relative. This lead to bogus
stats.
2019-07-15 20:00:32 +00:00
Pierre Labastie
2c603d8caf Fix a few missing bits of the transition to the new menu subsystem 2019-04-25 08:44:43 +00:00
Pierre Labastie
f596dde66c Get rid of the GPLv2 license:
- Replace the menu system with the Kconfiglib, which has an ISC license
- Remove farce and any reference to it
- Rewrite the copyright notice, add the LICENSE files
- Adapt Config.in and a few other programs to the new menu system
2019-04-24 16:16:20 +00:00
Pierre Labastie
7fa93699d4 Fix a long standing bug in func_compare.sh:
The files in test-logs have the package version in their names
2019-04-24 15:07:04 +00:00
Pierre Labastie
72e9e684e7 Fix a long standing bug in func_check_version.sh:
Using the non existent dotSTR variable caused a ragged output.
Use the spaceSTR variable rather
2019-04-24 15:01:26 +00:00
Pierre Labastie
bc2f5913e6 Improve common/progress_bar.sh based on shellcheck:
- remove useless array declarations
  - remove unused variables
  - remove $ prefix for variable names in arithmetic expressions
  - normalize indentation (2 spaces)
2019-04-13 16:33:38 +00:00
Pierre Labastie
0e4ddfa0c1 Improve top-level jhalfs based on shellcheck
* Various improvements from shellcheck around quoting, the use of
   read, `` vs $() and other logical comparisons
 * Provide a function for sourcing/loading files so we can remove a lot
   of duplication. Move loading of some functions from
   common/common-functions to ./jhalfs for consistency
 * Provide some functions for standardized messaging
 * Remove other duplication in the code, especially checking VERBOSITY
 * Standardize indentation. Two spaces seemed the most prevalent so I
   went with that.

Patch by Jeremy Huntwork, with slight modifications.
2019-04-13 16:31:24 +00:00
Pierre Labastie
2758d9421e Use sect1info for getting informations on LFS packages:
- add sect1info sections to packagemanager.xml.xxx + various fixes
- add templates in LFS/lfs.xsl for script start and script end:
  - script start: define variables containing package information
                  print disk usage
                  unpack and change dir
  - script end: print disk usage
                remove build dir
- remove the corresponding operations from master.sh
2019-04-11 07:40:50 +00:00
Pierre Labastie
13c475babc Get virtual kernel filesystem commands from the book, and really add
/run/systemd/resolve/resolv.conf after creating the kernel FS in chapter 6
2019-03-13 06:31:55 +00:00
Pierre Labastie
49ba78d711 Always display gcc's full version 2019-03-11 14:25:09 +00:00
Pierre Labastie
3b43e17bda Generate console files:
- add variables LOCAL (y is hw clock set to local time) and LOG_LEVEL (sysv)
- generate /etc/sysconfig/console (sysv) or /etc/vconsole.conf (systemd)
- generate /etc/adjtime (only systemd)
- remove UNICODE and FONTMAP variables (jhalfs makes unicode default)
2019-03-09 08:11:37 +00:00
Pierre Labastie
90f5b6de2e Remove obsolete blfs_tools dependencies 2019-03-09 08:02:10 +00:00
Pierre Labastie
399058f718 Python in func_check_version should be uppercase 2019-02-15 16:06:46 +00:00
Pierre Labastie
7a821947ad Add version check for Python 2019-02-15 14:11:36 +00:00
Pierre Labastie
f168be19d5 Remove "-i" flags in kernel scriptlet 2019-01-02 20:57:01 +00:00
Pierre Labastie
94a78ddfa2 When installing BLFS tools, the database of installed packages is populated
with LFS pacakges. But packages installed only in tools should not be in
this database. As a side note, it would be cleaner to use an xsl stylesheet
for that.
2018-12-08 09:04:01 +00:00
Pierre Labastie
625cb147bd Add possibility to automate bash shell startup files, vimrc, and rng.
This adds a new variable to the configuration (LANGUAGE).
Also automate the generation of various <replaceable> instructions
2018-09-28 14:35:46 +00:00
Pierre Labastie
b86dfaf1c0 Fix generation of chroot instructions 2018-05-12 11:27:10 +00:00
Pierre Labastie
c7b535b488 Remove the need to have write access to BUILDDIR, using sudi, which is
required anyway. ticket #1715
2018-02-03 16:37:32 +00:00
Pierre Labastie
1fa0dee15b Prepend JH_ to exported variables in jhalfs-blfs, so that collision with
build system variables is unlikely
2018-01-30 13:53:34 +00:00
Pierre Labastie
84a3fda1c3 Do not optimize binutils-pass1 in order to measure the SBU:
- introduce REALSBU variable if Config.in and jhalfs, and display it
- Adpat LFS/master.sh
2018-01-14 10:26:43 +00:00
Pierre Labastie
2e1c1c3c16 Remove spaces at the end of lines 2018-01-13 09:08:56 +00:00
Pierre Labastie
dc7fd7b7ba Add .la file removal to LFS and BLFS scripts 2018-01-12 19:04:19 +00:00
Pierre Labastie
5637b53ba7 override libelf->elfutils for getting the tarball name 2018-01-12 16:10:54 +00:00
Pierre Labastie
4b2a5fd304 Typos and removing useless instruction 2018-01-07 18:23:51 +00:00
Pierre Labastie
e6ed1a1de7 Warn before cleaning BUILDDIR; see #1711 2017-11-01 14:40:53 +00:00
Pierre Labastie
9556f88088 Missing word in a comment 2017-11-01 14:40:09 +00:00
Pierre Labastie
fb63ddff14 No need for $() in if command 2017-11-01 14:39:34 +00:00
Pierre Labastie
e3f4b9a4c1 Fix grepping for VERSION (func_install_blfs)
Add LFS-Release (update-lfs.sh and func_install_blfs)
2017-08-17 11:27:07 +00:00
Pierre Labastie
6d1d77c1e8 Improve the list of installed LFS packages:
Take package names and versions from <sect1info> tags in lfs-full.xml
2017-08-10 15:25:12 +00:00
Pierre Labastie
b8aa7ed93b common/libs/func_install_blfs: Add LFS to BLFS tools 2017-08-09 14:10:46 +00:00
Pierre Labastie
340c27e8ae common/libs/func_install_blfs:
Honour-variables-set-in-jhalfs
2017-08-09 13:47:45 +00:00