Commit Graph

1441 Commits

Author SHA1 Message Date
Euiseo Cha 41e5e3f5d8
Merge remote-tracking branch 'upstream/trunk' into mihari-dev 2023-11-26 14:31:01 +09:00
Pierre Labastie 35094eda67 Major refactoring of README
Describe each item in the menu, fix layout, and try to follow
the order of tasks to do to run jhalfs.
2023-11-23 10:07:45 +01:00
Pierre Labastie cd87e527fe Fix configuration about saving temporary work
It is no more at the end of chapter five now... Also the tar file is
not compressed
2023-11-23 10:05:27 +01:00
Pierre Labastie 6ffc37b902 Confg.in: fix help for ALL_CORES
The settings don't depend on book version, and you can answer y even
with old books.
2023-11-21 11:51:29 +01:00
Pierre Labastie 10756d05d7 Move the parallelism menu to "Build Settings"
Now that parallelism has been included into the book, this is no
more an advanced configuration...
2023-11-21 10:40:52 +01:00
Pierre Labastie 9440e4ac61 Merge branch 'trunk' into xry111/parallelism 2023-11-21 10:37:56 +01:00
Pierre Labastie bc64795e63 Remove a spurious menu in Config.in 2023-11-21 10:36:30 +01:00
Pierre Labastie 824efcac1c Merge branch 'trunk' into xry111/parallelism 2023-11-21 10:23:18 +01:00
Pierre Labastie c1f02f262e LFS: remove alternate server code
It's been broken for years, and nobody has complained, so I'd say
it is not useful. If a user wants to use a mirror instead of upstream,
better use a wget-list directly on this server...
2023-11-21 10:19:20 +01:00
Pierre Labastie 05b955b62c BLFS: remove support for ftp and alternate server
ftp urls have been removed from book, and in case you have to use
an alternate server, better download directly to /sources/yourself.
2023-11-21 10:12:28 +01:00
Pierre Labastie 23b0161d6c BLFS tools: update qt?-prefix for recent books 2023-11-18 10:36:47 +01:00
Pierre Labastie c5f4ef3d5e BLFS tools: update qt?-prefix for recent books 2023-11-18 07:47:29 +01:00
Pierre Labastie 67ca47e5f8 Stupid typo 2023-11-17 16:31:22 +01:00
Pierre Labastie 924076f0b5 blfs tools: fix JOBS
If all cores are used, it should be set to 0, which will use nproc
after the cpuset has been defined, and not nproc (which is the number
of cores/threads on the machine).
2023-11-17 16:10:01 +01:00
Pierre Labastie 04a608ba8e Pass NINJAJOBS if N_PARALLEL is defined
Now that MAKEFLAGS is defined at the beginning of the scriptlet,
there is no need to pass MAKEFLAGS as an envar to the scriptlet.
But still NINJAJOBS is not defined. In most cases, when we want
to use all cores, this is not a problem. But if N_PARALLEL is
defined, it needs to be passed. Note that we also pass
MAKEFLAGS in this case, because we use the old "wrt_xxx" function,
but it is not used.
2023-11-17 15:57:55 +01:00
Pierre Labastie a9360e10a7 Fix MAKEFLAGS for binutils-pass1
We need a special case for binutils-pass1 in case REALSBU is set
to y. Use variables JOBSBP1 in shell and jobs-bp1 in .xsl.
2023-11-17 15:55:36 +01:00
Pierre Labastie da4bce358d Fix blfs tools Makefile now that MAKEFLAGS is set
Previously, the "update" target was just added to the end of
the "all" target prerequisites, so that it was run at the end.
But now, we enter make with some -j value in MAKEFLAGS, so that
the "update" target may well be run before the other targets, which
is wrong: for example if it is run before the "xxx-z-libxslt" target,
xsltproc is not found and the update target fails.
To fix, define "update" as the default target, and have it depend
on "all".
2023-11-17 13:59:06 +01:00
Pierre Labastie d18fc24d5b blfs tools: update JOBS for the new config
Now, we have ALL_CORES set to y or n, and depending on this,
we want either JOBS to be set to $(nproc) or to the value
of N_PARALLEL.
2023-11-17 13:57:15 +01:00
Pierre Labastie 078ef3cf12 Pass sanitized MAKEFLAGS to scriptlets
Now that we have MAKEFLAGS in the environment, "make" in chroot
is run with MAKEFLAGS set. This cause it to pass the -j value
into MAKEFLAGS to inferiors (scriptlets), but it is passed with
a --jobserver-auth value added. If we do not precede the command
running the scriptlet with a +, it passes --jobserver-auth=-2,-2
meaning that the jobserver is disabled, and "make" in the scriptlet
understands that it should only run one job at a time (defeating
the value of the -j flag). But even if we do precede the command
running the scriptlet with a +, it passes --jobserver-auth=3,4,
which shows it is running, but this jobserver will authorize only
one job at a time since the parent make contains the target
.NOTPARALLEL!
To work around this problem, tje only solution is to change the
MAKEFLAGS at the beginning of the scriptlet. Fortunately, lfs.xsl
knows what we want as job number (either $(nproc) or a fixed number),
so use it to set MAKEFLAGS.
2023-11-17 13:18:12 +01:00
Pierre Labastie 249d4ade20 Fix (again) the run-in-cgroup.sh script
When using "sh  << EOF", what is between this line and EOF runs
with no attached terminal. But we need a terminal for running the
build. So we have to use "sh -c ". But then nesting of double
quotes, $, etc is too complicated. So run as root, and become back
user only when exec'ing. For some reason $@ does not work, so use
a variable set to $@.
2023-11-16 16:10:46 +01:00
Pierre Labastie 09ac7fc548 Typo
The name of the script is run-in-cgroup.sh, not run-in-cgroup ...
2023-11-16 16:10:07 +01:00
Pierre Labastie cff36a77ba Fix session management in run-in-cgroup.sh
Still WIP but some progress...
When moving a shell to a cgroup not associated with a session,
then subsequent calls to pam_systemd or pam_elogind create
a new session, and a new cgroup for that session, so that the
cgroup of the calling process is not used (this is a problem
with both systemd and elogind). For systemd, the problem can be
solved by passing --slice <user slice> to systemd-run. For elogind,
we need to first move the shell to a non session cgroup, then run
sudo so that a new session is created, then pass the cpuset to that
session's cgroup. Hopefully, if neither systemd nor elgind is used,
then the former solution should work (to be tested!!!).
2023-11-16 14:37:58 +01:00
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
Euiseo Cha c18186f031
fix: bugs 2023-03-30 17:38:31 +09:00
Euiseo Cha c463f10a88
fix: bugs 2023-03-30 17:33:40 +09:00
Euiseo Cha 4978d4d7f6
feat: md5sum update 2023-03-30 15:39:25 +09:00
Euiseo Cha a2598ef89f
fix: bugs 2023-03-30 15:34:40 +09:00
Euiseo Cha a23b5e3116
feat: fix config 2023-03-30 12:32:48 +09:00