install script diffs

Gerard Beekmans gerard at
Fri Dec 8 10:02:34 PST 2000

> Would it be possible to simply have one large file containing the all
> the book's install commands so that we could "diff" one version
> against the next to see the few lines that changed? That would be so

I was just about to start working on that when I realized the following:

Example: in that one large file with all the install commands you'll find 
these lines to install bash:

      ./configure --enable-static-link --prefix=$LFS/usr \
        --bindir=$LFS/bin --disable-nls --with-ncurses &&
     make &&
     make install &&
     cd $LFS/bin &&
     ln -s bash sh
     cd /usr/lib &&
     ln -s libncurses.a libcurses.a

For some reason I make a change and the new lines look like:

      ./configure --enable-static-link --prefix=$LFS/usr \
        --bindir=$LFS/bin --disable-nls --with-ncurses &&
     make VAR=VALUE &&
     make install &&
     cd $LFS/bin &&
     ln -s bash sh
     cd /usr/lib &&
     ln -s libncurses.a libcurses.a

I run a diff on the old and new file and the output looks like this:

- make &&
+ make VAR=VALUE &&

Now you will have fun figuring out which package this refers to.

So instead of the one-large file thing I have decided on a more modular 

consider a tarball called lfs-commands-2.4.3.tar.bz2
Unpack it and a directory lfs-commands-2.4.3 is created with a bunch of files 
under it. One of the files is called bash-static and contains the lines above

Now I make this change and update the bash-static file. I release the book 
and wrap up a lfs-commands-2.4.4.tar.bz2 file. You download it and unpack it. 
Now you run this to see what has been changed:

diff -Naur lfs-commands-2.4.3 lfs-commands-2.4.4 > lfs-commands-diff

Then you open the lfs-commands-diff file and you see what has been changed in 
which file, thus which package and you can update your script by dumping the 
contents of lfs-commands-2.4.4/bash-static in your script and make the 
necesarry modifications that need to be made to make your script work.

I've already started this. It's a small task thanks to Seth W. Klein who 
provided all the commands.

Now one question raises: what about optional patches like the bzip2 tar 
patch? or the sysvinit patch (I added it today, the meaning of the patch can 
be read below)? Add them to the commands or leave them out because they are 
optional? But from the lfs-commands-diff you then don't see I added that new 
patch unless you read the changelog every time I release a book (which all 
you guys do, right? ;o) to see what big things have been changed.

Or I can add this line to the lfs-commands-2.4.4/sysvinit file:

# Added an optional patch. Check the book if you want and/or need it

then that line will appear in your diff giving you the hint to look in the 
book and see what it is all about.

The sysvinit patch:


When you change run levels (for example when you are going to shutdown your 
system) the init program is going to send the TERM and KILL signals to all 
the processes that init started. But init prints a message to the screen 
saying "sending all processes the TERM signal" and the same for the KILL 
signal. This implies that init sends this signal to all the currently running 
processes, which isn't the case. To avoid this confusion you can apply a 
patch to sysvinit that changes the sentence in the shutdown.c file
and have it print "sending all processes started by init the TERM signal".

If you want to apply that patch, download it from and 
apply it by running the following commands:

     patch -Np1 -i ../sysvinit-2.78.patch


Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list