Re: LFS Books homogenization

"Viel Losero" ([email protected] via blfs-dev Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.devel
Message-ID <aN-zmesUvZehitk9@hostname>
On 03-10, Pierre Labastie wrote:
> On Thu, 2025-10-02 at 12:01 -0500, Bruce Dubbs wrote:
> > On 10/2/25 11:49 AM, Viel Losero ([email protected] via blfs-dev
> > Mailing List) wrote:
> > > 
> > > Hi all,
> > > 
> > > This is my first post on the list.
> > > 
> > > Fist of all, thanks all you for your great job.
> > > 
> > > Second, sorry because English is not my main language.
> > > 
> > > Well, to explain it in short, looking a few inside the Book's XML
> > > files
> > > I found that some Elements like userinput sometimes have the
> > > attribute
> > > remap and some times not, in BLFS and GLFS. MLFS looks fine.
> > > 
> > > Dunno if this happens with more XML elements and attributes.
> > > Need look deeper. Did you accept patches? commits?
> > > Or maybe some can fix it opening a ticket.
> > > I need to learn how you works. :) I am old but new here.
> > > 
> > > I think this attributes was helfull to extract the command lines
> > > for people
> > > that want to automate the build of some packages. I am trying to
> > > build my
> > > dirty system based on LFS but this is an other history.
> > > 
> > > There are any file that document the use of these attributes?
> > > from my notes:
> > > # mlfs book --> init
> > > # mlfs chapter -->
> > > # mlfs sect1 id="ch-tools-{pkg}" --> chroot package name
> > > # mlfs sect1 id="ch-system-{pkg}" --> package name
> > > # mlfs sect2 role="package" --> package description, build time and
> > > disk space.
> > > # mlfs sect2 role="nodump" --> commands related to config files,
> > > tests ... no needed to run
> > > # mlfs sect2 role="installation" --> patch, configure, make,
> > > install and post
> > > # mlfs sect2 role="configuration" --> package configuration files
> > > like vimrc
> > > # mlfs sect2 role="content" --> the last lines explain what in
> > > package.
> > > # mlfs sect2 arch="ml_32,ml_all" -->
> > > # mlfs sect2 arch="ml_x32,ml_all" -->
> > > # mlfs screen revision="sysv" -->
> > > # mlfs screen revision="systemd" -->
> > > # mlfs userinput remap="pre" --> patch, and post. like make
> > > distclean.
> > > # mlfs userinput remap="configure" --> configure the package
> > > # mlfs userinput remap="make" --> make the package
> > > # mlfs userinput remap="test" --> tests, exclude
> > > 
> > > Some examples for userinput with and without remap="pre":
> > > [root@dirty mlfs]# grep -rwn . -e ".*patch -Np1"
> > > seems all matches have remap="pre" excluding
> > > ./chapter03/packages.xml:508:
> > > that not apply because is a note.
> > > [root@dirty mlfs]# grep -rwn ../glfs/ -e ".*patch -Np1"
> > > edited output:
> > > ../glfs/archive/glibc.xml:77:<screen><userinput>patch -Np1 -i
> > > ../glfs/shareddeps/security/glib2.xml:115:<screen><userinput
> > > remap="pre">patch
> > > [root@dirty mlfs]# grep -rwn ../blfs-git/ -e ".*patch -Np1"
> > > edited output:
> > > ../blfs-git/x/installing/mesa.xml:342:<screen><userinput>patch -Np1
> > > -i
> > > ../blfs-git/x/installing/xorg-server.xml:233:<screen><userinput
> > > remap="pre">patch -Np1 -i ../xorg
> > 
> > We recommend doing a manual build at least once before trying to
> > automate building 
> > LFS/BLFS.

Thanks Bruce,

Maybe I explained it in short and bad when I said that I am building my dirty
system.

I have build MLFS and GLFS manually, without Steam and Wine, with some custom
packages from BLFS to successfull migrate, I write from it.

> > 
> > The only reason we have the remap= attributes in the xml files is to
> > support alfs: 
> > https://rivendell.linuxfromscratch.org/alfs/
> > 
> > That tool is primarily for developers, but others find it useful.

To be honest, I haven't used jhafls.  I tried but IMO it is not frienly for me.
In the past I thought jhalfs used Python, now I see are bash Makefile.  If I am
not wrong I see something about arch and debian packages, need go deeper.  Each
Linux distribution has its strengths and weaknesses. You know.  Some others
reasons I don't use jhalfs was that I want package based system that can easy
update, dependencies management and if possible reproducible.  Is in that way I
said I am building my dirty system based on LFS.

Why not use Slackware, Gentoo, Arch, Debian ...
If someone want to know how I ended with LFS I can explain my autolearning
Linux experience distro based and why I switched. Basically to learn more in
the search of the KISS principe.

So don't get it rude but ... I can write my scripts and work with your great
XML Books without say nothing ... or IMO try to improve the LFS ecosystem.

I love learn and help to improve things. :)

> 
> FWIIW, only attributes that are referenced in "template/template.xml"
> are used by alfs for BLFS. That is, any attribute in userinput tag is
> not used by alfs (this is different in LFS, where remap attributes are
> all in userinput tags). Having more attributes would help a lot (for
> alfs and any automation tool), but would put too much burden on
> editors, I guess. I'm not sure GLFS/MLFS should follow the template. If
> they did, they could be tested with alfs, I think...
> 
> Pierre

> -- 
> http://lists.linuxfromscratch.org/sympa/info/blfs-dev
> Unsubscribe: See the above information page

Thanks too Pierre,

That helps I will look the template.

It is not my intention to burder editors to get my scrіpts to work.
The books are great as they are, but as you said, that can help a lot on
automation.

A little example here:
[root@dirty ~]# bash /home/data/scripts/bash/LFS/extract.from.books.sh mlfs vim
patch
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
[root@dirty ~]# bash /home/data/scripts/bash/LFS/extract.from.books.sh mlfs vim
configure
./configure --prefix=/usr
[root@dirty ~]# bash /home/data/scripts/bash/LFS/extract.from.books.sh mlfs vim
install
make install
ln -sv vim /usr/bin/vi
for L in  /usr/share/man/{,*/}man1/vim.1; do
    ln -sv vim.1 $(dirname $L)/vi.1
done
ln -sv ../vim/vim91/doc /usr/share/doc/vim-9.1.1754
[root@dirty ~]# bash /home/data/scripts/bash/LFS/extract.from.books.sh glfs
sqlite install
./configure --prefix=/usr     \
            --disable-static  \
            --enable-fts{4,5} \
            CPPFLAGS="-D SQLITE_ENABLE_COLUMN_METADATA=1 \
                      -D SQLITE_ENABLE_UNLOCK_NOTIFY=1   \
                      -D SQLITE_ENABLE_DBSTAT_VTAB=1     \
                      -D SQLITE_SECURE_DELETE=1"         &&
make
make install
[root@dirty ~]#


As you can see MLFS book can print in separatedly what I call patch part,
configure part, make part, install part.(Maybe a post part are needed).
The GLFS book and the BLFS print all what I call the copy paste part.

Sorry for border a lot and for the extension of the mail.
I only want to ask if you plan to tag all the books in the near future and/or
if you have documented it.  Now I will look the template.

As I said the books are great as they are but if you have future plans I ask
before to avoid me extra job and get the corrent way.

Thanks.

Viel.

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.