Commit graph

1406 commits

Author SHA1 Message Date
Pierre Labastie
8e9343b632 Add forgotten run-with-cgroup.sh script 2023-11-15 19:37:58 +01:00
Pierre Labastie
640cd5746b Fix a typo 2023-11-15 18:24:22 +01:00
Pierre Labastie
cacc6c5433 Allow users to pass a cpuset
If using a new book, MAKEFLAGS is set to -j$(nproc), so that if
we want to easure timings with 4 processors and our computer has
more than that, we need to restrict the number of processors.
Jhalfs allows to do that using th cpuset cgroup controller, so that
it only restrits the make job and not the whole machine. For that
use a small scripts written by Xi Ruoyao that restarts make this
the cpuset set.
2023-11-15 18:24:22 +01:00
Pierre Labastie
63190e6547 Only pass MAKEFLAGS and NINJAJOBS to old books
Also pass them to binutils-pass1 if calculating the SBU
2023-11-15 18:24:22 +01:00
Pierre Labastie
3c43655ec6 Only replace $(nproc) in scriptlets
There is no more $(nproc || echo 1). Note that we may replace
it with $(nproc) if using all cores, so don't replace it in
the comment-test template (otherwise we have infinite recursion).
2023-11-15 18:24:22 +01:00
Pierre Labastie
645ec4780e Reorganize advanced options in Config.in
- Put parallelization menu first
- Fix the logic for variable definitions in this menu
- change jhalfs to reflect the separation of optimization and
  parallelization
- validate new variables
- remove MAKEFLAGS from the validation of optimize variables
- also remove the black list, which has not been used in years.
2023-11-15 18:24:22 +01:00
Pierre Labastie
1352172467 Merge branch 'trunk' into xry111/parallelism 2023-11-13 13:44:32 +01:00
Pierre Labastie
5ed69f823f Dependency on xorg7-* only on last package
Our gen-special.sh transforms a dependency on compound packages
(xorg7-*) on a dependency on the list of packages. This generates
a lot of trials when removing circular dependencies, because if the
dependency on xorg7-* is optional, all packages in the list are tried
in turn, while it is sure that anyway the dependecy must be eliminated.
If the dependency is only on the last package, the circular dep
is eliminated at first try.
2023-10-21 13:37:50 +02:00
Pierre Labastie
6d9bd8e8e8 Add help about kernel config
Now, there is a timeout if the config file is not up to date. Say
so in the help.
2023-09-17 09:41:42 +02:00
Pierre Labastie
1c22535b2e Process two more <replaceable> tags
- one for libreoffice (use the xreflabel to set LO_PREFIX)
- one for abiword (installation of normal.awt-ll_CC files)
2023-09-16 13:39:39 +02:00
Pierre Labastie
9a89ba79de ablfs: new pattern for config recognition
chgrp -v mail ... is found in mutt and shouldn't considered
an install command.
2023-09-16 09:39:53 +02:00
Pierre Labastie
c552eabe63 Always run "teardown" after chroot
If the shell exits with an error, teardown is not run in target
chroot, which may lead to unwanted effects, such as preventing
unmounting the $BUILD_DIR. Tell make to ignore the error.
2023-09-14 16:03:37 +02:00
Pierre Labastie
200cc0151e All the targets after mk_SUDO depend on "devices"
Now that devices.sh can be run even if the fs are already mounted
all the targets after mounting the virtual kernel fs can depend
on "devices". This way, if for some reason a partial build is
restarted after a reboot, the virtual kernel fs are automatically
re-mounted.

Fixes #1737
2023-09-12 22:58:55 +02:00
Pierre Labastie
aceacf2f85 Modify kernfs scripts to be able to run them twice
Those scripts could only be run once, because mount errors out
if it tries to mount an already mounted fs (or unmount a non
mounted fs). This changes generation of the scripts so that
any mount is preceded with "mountpoint -q || ", and any umount
is preceded with "mountpoint -q && ".
2023-09-12 22:54:51 +02:00
Pierre Labastie
74601a7f06 Separate parallelization from optimization
Also, add cpu set choice and the possibility to use nproc
2023-09-11 19:22:13 +02:00
Xi Ruoyao
1b02a9acff
Replace $(nproc || echo 1) and $(nproc) 2023-09-11 16:04:44 +08:00
Pierre Labastie
3b27f93764 Apply a timeout to kernel config in LFS
If the kernel-config file is not up to date (missing options or
whatever), the kernel "make" will hang, waiting for input. So
run "make oldconfig" explicitly, with a timeout.

Fixes: #1736
2023-09-08 17:01:52 +02:00
Pierre Labastie
06b731490f Allow two names for scriptlet containing "userdel"
It used to be named "revised_chroot", it is now named "cleanup"
Allow both names by testing whether revised something is present.
2023-09-05 13:14:26 +02:00
Pierre Labastie
45f82b1326 Use /usr for XORG_PREFIX unconditionally:
This is possible now that instruction for non /usr XORG_PREFIX
have been made role="nodump".
2023-09-03 23:35:33 +02:00
Pierre Labastie
08614168ec Hide DEL_LA_FILES in internal settings
This prevent normal users to change the default while preserving
the possibility to set it to "n" for tests or whatever.
Fixes ticket #1734
2023-08-30 20:20:59 +02:00
Pierre Labastie
9eb3dbe1c4 Don't build Xorg components that are commented out
gen-special.sh uses the list of files and md5 from the
cat instructions to generate an xml page for each of
the individual components. Until now, there were no commented
out component, so gen-special.sh was not prepared to handle
comments. Now, it removes lines containing comments.
2023-08-30 20:04:38 +02:00
Pierre Labastie
4ba94ad556 Update copyright year 2023-05-24 10:46:14 +02:00
Pierre Labastie
78d04f3f79 Fix "ambiguous redirect" in func_dependencies
We use grep -l ^"${otherlink[*]"\$ to find parentNode, since the
parentNode is the only file with a link line that matches. Problem
is that sometimes the priority line may match too. This makes a
parentNode variable containing several lines, and when redirecting
to $parentNode, creates those "ambiguous redirect" messages.
Fix: use a loop, and only grep on the first line of each file.
2023-04-21 10:49:40 +02:00
Pierre Labastie
72711ab1cd list_lfs.xsl: fixes for dependency checking
Add several packages that shouldn't be removed when doing dependency
checking, two of which are actually not in lfs, but needed for
script: porg tzdata sudo wget
2023-03-23 22:24:06 +01:00
Pierre Labastie
4dfe8f99c4 gen_pkg_book: fixes for dependency checkings
Fix a typo in function definition
use sudo for porg -r and porgball -e
2023-03-23 22:21:26 +01:00
Pierre Labastie
1bf09c15a7 Implementation of dependency checking 4
Implement generation of a modified script if dependency checking is
requested.
2023-03-23 18:38:51 +01:00
Pierre Labastie
42dfc6ef21 Implementation of dependency checking 3
Add an XSL stylesheet for listing packages in LFS. Those are
not listed anywhere else, but they are considered dependencies of
everything, so should never be erased.
2023-03-23 18:37:20 +01:00
Pierre Labastie
dedd502636 Implementation of dependency checking 2
Check the configuration variable in gen_pkg_book
2023-03-23 18:34:50 +01:00
Pierre Labastie
0a1943912e Implementation of dependency checking 1
Generate a switch for configuration
2023-03-23 18:32:24 +01:00
Pierre Labastie
3fa4147515 outputpkgdest: don't mix make and qmake
For outputting DESTDIR=, we need to test whether the text contains
"make". But when it contains "qmake" (or any different word containing
"make" but not exactly "make), we don't want to output anything more
than the text. So strengthen the test.
2023-03-19 10:15:18 +01:00
Pierre Labastie
6ac0d96300 outputpkgdest: fix the case of several <literal>
We output text()[1], literal (literally), text(2). This does
not work if there are several <literal> tags. Change it to
outputing preceding-sibling::text()[1], literal for each
literal tag, then output text()[last()] (which works also
when there are no literal tag, so it removes a choose.
2023-03-19 10:10:24 +01:00
Pierre Labastie
24ad4fd4f4 Fix outputting too many sh <<ROOT_EOF
When installing a bootscript or a unit, this sometimes happen
(e.g. samba).
2023-03-18 22:44:03 +01:00
Pierre Labastie
5126ee3663 porg: fix wrapInstall command 2023-03-07 22:23:37 +01:00
Pierre Labastie
3940a45db3 Have the subshell exit on error for porg install 2023-02-26 22:44:19 +01:00
Pierre Labastie
b39eb29be5 Revert changes to BLFS/Makefile
Changes to book's Makefile have been reverted too...
2023-01-25 13:17:12 +01:00
Pierre Labastie
5c8df43896 Adapt BLFS/Makefile to the new book layout
With the change to python modules and the pythonhosted.xml file
becoming untracked, those changes allow creating/updating this
file.
2023-01-20 10:05:38 +01:00
Pierre Labastie
951d334793 Upadte packInstall for libslirp
Version has a -v, which should be removed in "extract-version"
2023-01-01 14:01:45 +01:00
Pierre Labastie
33ee66c69e Typo in a comment 2022-12-06 15:20:00 +01:00
Pierre Labastie
0f4df7ccfd BLFS tools: don't generate duplicate download code
For additional downloads, the normal book layout is a <bridgehead>
containing "Additional Downloads" followed by one or more
<itemizedlist>, one for each file to download. But on some pages,
there are several <bridgehead>, each followed by one or more
<itemizedlist>. So we have to check that only the <itemizedlist>
correponding to the current <bridgehead> are treated. Otherwise,
the download code may be generated more than once. This imposes
that no other bridgehead is inserted between the one containing
"Additional" (or in some case "Recommended/Optional Download") and
the <itemizedlist>.
2022-11-18 15:45:42 +01:00
Xi Ruoyao
ed335a3113
handle '+' in kernel version string
It appears if the kernel is built from Git repo where HEAD is not a tag.
2022-11-04 22:44:57 +08:00
Pierre Labastie
35f6261ab5 Run the master Makefile with -j1
Also remove some instructions that are only useful for debugging.
2022-11-04 13:19:18 +01:00
Pierre Labastie
fd90f80466 Prevent parallelism in the master Makefile 2022-11-04 13:18:11 +01:00
Pierre Labastie
262e174aa1 systemd: copy /etc/resolv.conf from the host
when entering chroot. This allows using the network in chroot.
2022-10-06 10:39:09 +02:00
Pierre Labastie
3722d3164c Call kernel filesystem scripts from Makefile
Instead of having them inside the Makefile, which implies editing
them (automatically), which is not robust if anything changes:
it got broken when a test for a mountpoint was added...
2022-10-06 10:26:29 +02:00
Pierre Labastie
87eb9e9a94 Make the kernel filesystem scriptlets executable
This is so that they can be run from the main Makefile, instead
of having to edit them to put them inside the Makefile.
2022-10-06 10:20:34 +02:00
Pierre Labastie
8bcaf0d58b Typo 2022-10-02 17:18:11 +02:00
Pierre Labastie
e181f757ba The Optimization menu is also for parallelization 2022-09-29 21:13:03 +02:00
Pierre Labastie
5156f51859 BLFS: remove only "a" lines for runtime deps
Presently, when the <node>groupxx file is created, we copy "a"
lines from <node> to <node>groupxx (changing "a" to "b") and
we remove all the lines containing the runtime dependency from
<node>. This may not always be what we want: for example, a
dependency can be both "required at runtime" and "optional for
tests". We should keep this information when cleaning the nodes.
Only when removing circular paths should the optional tie be broken
if necessary.
2022-09-07 15:51:45 +02:00
Pierre Labastie
875366f635 move git://git.linuxfromscratch.org to https:// 2022-08-19 12:38:59 +02:00
Pierre Labastie
594ff3d878 Remove the "Abort on testsuite failure" config (4)
Remove the bomb-testsuite param in lfs.xsl, with the associated
code.
This implies not passing this param in func_book_parser.
2022-06-15 15:10:52 +02:00