Commit graph

194 commits

Author SHA1 Message Date
Pierre Labastie
cfdb089dcf Fix generation of full locales
The recent addition of instructions for adding locales not
installed by make install-localedata has broken the generation
of the scriptlet, because there is a missing linefeed.
Use xsl:for-each to add a linefeed after each <userinput>
text.
2021-05-11 09:59:19 +02:00
Pierre Labastie
47dfc81bdc Account for the change in umount command in LFS
The command for unmounting the kernel vfs is now
  umount -Rv $LFS
So we have first to use that command in teardown (change in
kernfs.xsl). Second, since the command tries to umount
$LFS, but the Makefile is on $LFS, it fails. Ignore the
error in the Makefile (change in master.sh)
2021-03-09 21:58:44 +01:00
Pierre Labastie
5562bf14e0 Fix make exiting with an error if $(MOUNT_PT)/var/lib does not exist 2020-09-30 05:43:59 +00:00
Pierre Labastie
088130f04a Fix changing the ownership of $BUILDDIR/var/lib to LUSER when it has been
created by func_install_blfs. Fixes ticket #1729
2020-09-17 15:30:29 +00:00
Pierre Labastie
56c1fff69a Create os-release also for SysV
This has been in the book for a few months, but jhalfs was not updated.
It is now...
2020-08-22 11:49:09 +00:00
Pierre Labastie
6f74ca146f LFS/master.sh: only count chapter* dirs in lfs-commands
We count the number of files in lfs-commands to know whether
we have an old or a new book. But this shouldn't include the
custom-tools dir, so only count chapter*.
2020-07-10 13:29:15 +00:00
Pierre Labastie
88a8275eb8 lfs.xsl: mode=pkgmngt: use $pos and not position() when calling
start-script
2020-07-09 17:04:30 +00:00
Pierre Labastie
46c6113b28 Prevent overwriting /var/run and lock symlinks with PM
/var/run and /var/lock are created as symlinks in creatingdirs. But
if a package install something into those dirs (with DESTDIR install),
they get overwritten with true directories if using a package
manager. Note that without PM, anything installed into those dirs
is lost at next reboot. So remove those dirs before packaging.
2020-07-09 17:02:10 +00:00
Pierre Labastie
3484658167 Various fixes for recent pacman with new book
- add createfiles instructions of packageManager.xml for new book too
- remove unneeded chown when installing pacman (not needed thanks to
  the above)
- Use a dedicated user "builder" for running makepkg: user "tester" is 
  removed at the end of chapter 8, but is needed in following chapters.
2020-07-07 15:27:54 +00:00
Pierre Labastie
f017b22731 LFS/lfs.xsl: fix cases when using DESTDIR
We cannot use only the fact that it is not in chapter-temporary-tools
since now we have several chapter for the temporary system.
so use a list of chapters (non negated).
2020-07-06 05:51:22 +00:00
Pierre Labastie
3ac3ae199f Change numberings of scriptlets:
- major number can be on 4 digits, so use it in packInstall
- minor number (for package manager) can be greater than 10
  - code on 2 digits
  - change various files accordingly
2020-07-06 05:38:54 +00:00
Pierre Labastie
49f8b03399 Fix package management for new book, and add a patch for porg 2020-06-24 06:26:05 +00:00
Pierre Labastie
13e52a5572 Add the multilib book: fixes ticket #1722 2020-06-20 17:16:22 +00:00
Pierre Labastie
706e5bf46a Various small fixes/improvements:
- Prefer SysV over Sys V in Config.in
- do not generate the package list for lfs, it is not needed anymore
- prevent an (ignored) error in LFS/master.sh
- log new files under the scriptlet name (allows to log files for the same
  package from different builds)
- keep the full name in log_new_file functions (fix a undetected bug in
  CLFS/HLFS)
2020-06-20 17:01:23 +00:00
Pierre Labastie
9a4c530f55 Clean LFS/master.sh from unused
functions
2020-06-20 16:45:26 +00:00
Pierre Labastie
0a0753d579 Remove spaces at the end of lines 2020-06-19 14:25:52 +00:00
Pierre Labastie
3da8c49659 Update ICA for new LFS/master.sh 2020-06-14 07:08:19 +00:00
Pierre Labastie
b33c6ee52d Fix the case of the kernel for otimization 2020-06-11 20:43:33 +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
36f5dce727 Fix lfs.xsl for cross2, and change scriptlet numbering for trunk and cross2 2020-06-09 07:28:05 +00:00
Pierre Labastie
7e0a1b8018 Fix an issue in ck_terminal, which was working only by chance (compensating
bugs) on some setup (but not all)
2020-05-31 08:58:41 +00:00
Pierre Labastie
6caa5b8816 Allows having << EOF in tests, and not generating >> $TEST_LOG... until the
matching EOF is found.
2020-05-31 07:31:32 +00:00
Pierre Labastie
9728b235e6 Check terminal size before starting build 2020-05-25 06:47:48 +00:00
Pierre Labastie
323ae3e633 Add -j1 to "make install" in the
lfs book (done long ago in blfs)
2020-05-18 08:31:43 +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
bdb0761120 Run "Cleaning up" page in ICA iterations too: it allows to remove .la and some .a
files
2020-04-08 08:37:54 +00:00
Pierre Labastie
709eb7470d Remove the /usr/share/doc/openssl-<version> dir before renaming
/usr/share/doc/openssl, otherwise it moves it as a subdirectory
2020-04-07 17:08:30 +00:00
Pierre Labastie
49e2745200 Further fix user creation (or no) 2020-04-02 11:54:50 +00:00
Pierre Labastie
dd7e0f6793 Fix LUSER creation (or no creation). 2020-04-02 11:46:36 +00:00
Pierre Labastie
7b7b5e9624 Various fixes for ICA 2020-04-02 09:56:51 +00:00
Pierre Labastie
0a577f5575 typo forgotten \ 2020-04-01 09:14:14 +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
a73ed74337 Fix the SHELL for CHROOT target for LFS
We use the filter builtin function of make to retrieve the right
shell to use during the CHROOT phase, which is the same as the
one in CHROOT1.
Also do not assume envars exist when removing it at the beginning
of the SUDO phase.
2020-03-31 08:47:52 +00:00
Pierre Labastie
a2b56892e4 Fix a forgotten new IDREF 2020-03-29 20:35:52 +00:00
Pierre Labastie
3261fe76c8 Adapt master.sh to new book, staying compatible
This involves changing the way make targets are built. Specially
the make target is changed when encountering a specific file
(for example the make target becomes sudo when rencountering kernfs)
This allows more flexibility.
2020-03-29 17:16:09 +00:00
Pierre Labastie
4762fb9900 Set the correct #! executable in creat* scriptlets
Those scriptlets need to use a temporary bash, which is in /tools/bin
for current LFS. But if we use a new method (cross-compiling + sysroot)
it ends into /bin. So we have to set the correct `#!' header
in both cases.
We rely on the pesence of a "creatingtoolsdir" sect1 to know that
bash is in /tools
2020-03-29 15:13:15 +00:00
Pierre Labastie
903eefd093 Adapt LFS/master.sh to use chap4 scriptlets
- take targets from scriptlet names
    - neutralize some commands or bash builtins so that they are not
      used even if they are in the scriptlets, if not needed
    - do not set PREV in chapter 5 anymore
    - Improve save and restore user, so that if the LUSER exists,
      its home is saved while building temporary tools, and restored
      afterwards
2020-03-29 14:06:41 +00:00
Pierre Labastie
123105f683 Do not rely on /tools for setting ROOT (again)
Using the chapter ancestor is not enough. It's better to use the sect1 id
and test that it starts with ch-tools: package-manager does not have this
ancestor. Also the virtual kernel filesystems are done before chroot,
so directly test this one.

This works for the current lfs book. We'll need something new if we
change the order of pages.
2020-03-29 13:42:43 +00:00
Pierre Labastie
1dce18968f Don't use /tools for setting the ROOT variable
In the generated scriptlets, we need to know if we are on host
or chrooted. Presently, we
rely on /tools being a symlink or not. But we may want to remove this
ugly symlink in future versions of LFS, so anticipate and use the
chapter ancestor.
2020-03-29 13:24:48 +00:00
Pierre Labastie
a131250b6f Generate chapter 4 scriptlets
This is a major change for LFS. We won't be using the makefile for
the final preparations, but we'll extract the book instructions and
use them (the "use part not in this commit).
Since getting figures for those scriptlets is not important, and we
cannot use start and end scripts, which need already set up user and
dirs, do not use them
2020-03-29 13:17:38 +00:00
Pierre Labastie
2a9b0c3181 Remove envars before the SUDO phase
This is to allow root to execute ": > envars". On a non empty envars
owned by lfs, in a directory world writable with sticky bit and not owned
by lfs, this may be forbiden by the fs/protected_regular sysctl.
See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
2020-03-15 17:15:28 +00:00
Pierre Labastie
94fc75e616 Remain compatible with older versions of lfs 2020-02-11 13:55:28 +00:00
Pierre Labastie
c035132e2a Fix jhalfs for new idrefs in lfs svn 2020-02-11 13:25:03 +00:00
Pierre Labastie
9a61eadbbf attr does not install man pages in man2 and man5 anymore, so no need
for removing them. This fixes a stupid bug, that removed all man-pages
    man2 pages when porg was used!
2019-12-22 09:53:30 +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
5451eaeb9e Fix generation of the SBU-DU stats:
The "create-sbu_du.sh" script expects all the logs containing
"Totalseconds" also contains two lines starting with "KB:" with disk usage
stats. Generates those lines for all the logs. Hopefully, the stats are
fairly accurate now...
2019-07-15 20:06:35 +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
adbd09b06c LFS/lfs.xsl: Update directory layout of PKG_DEST
- Do not symlink /{usr/,}lib64->lib
    - Do not symlink /usr/{man,info}->share
    - Create /lib64 on x86_64
    - Create /usr/lib/pkgconfig
    - do not create /usr/lib/rpcsvc
    - check that a directory exists before testing its emptyness
      (for example, attr removes empty manx dirs)
2019-04-08 10:03:26 +00:00
Pierre Labastie
3142368d67 I cannot read: variable in /etc/sysconfig/console is LOGLEVEL, not LOG_LEVEL! 2019-03-15 16:18:48 +00:00
Pierre Labastie
c6506aea23 Remove sudo from commands run as root (and some DEBUG lines) 2019-03-15 08:55:01 +00:00