jhalfs feature suggestions

Pierre Labastie pierre.labastie at neuf.fr
Fri Jun 22 13:15:22 PDT 2012


Le 22/06/2012 03:12, James Robertson a écrit :
> All
>
> So jhalfs is a neat tool.  I think there are a couple features that 
> could aid the automation of the build.  I'm pretty sure that Jeremy 
> will want to add some features to the tool when we get going on 
> package building. jhalfs would be perfect for that function.
>
> lfs-commands/chapter07/130-network
>
> There are a few **EDIT ME*** areas of this file.  It would be good to 
> expose those settings in the configurator at the front so a person 
> could put in domain suffix, and primary and backup dns servers.  it 
> might be good to offer a flag to be able to set the ONBOOT parm to no 
> if you wanted to.
>
> lfs-commands/chapter07/136-hostname
>
> Simiarly, add a configurator option to set the hostname.
>
> lfs-commands/chapter08/143-fstab
>
> The configurator offers a feature to setup and copy over your own 
> fstab file.  That is cool.  Another alternate feature would simply 
> provide fields to populate the EDIT ME options here for root and swap 
> partition location and fs type for the root partition information up 
> front.
>
> I am going to play with custom tools and blfs-tool support to see how 
> those work.  Does anyone have experience with that they would like to 
> share?
>
Hi James,

The blfs tool in jhalfs trunk is pretty outdated and I do not think it 
can work with the current version of the blfs book.
I have been working on a new version of the blfs tool, which is in 
svn://svn.linuxfromscratch.org/ALFS/jhalfs/branches/ablfs. In this 
branch, the lfs part of the tool is the same as in jhalfs trunk, while 
the blfs tool is not perfect yet, but works. Well, the blfs book is not 
easy to automate anyway, due to its structure.

I think the custom tool can be used in both the trunk and the branch 
version.

Concerning the improvements you listed above, they could be added, with 
some work, but would break immediately if any of the corresponding 
instructions in the book were changed. Maybe a better idea would be to 
have the option of copying over a whole /etc hierarchy. For the moment, 
I'd rather suggest you create those files with the custom tool. Here is 
for example my network file (to be put into custom/config):
------------------------------
$ cat 950-networkconf

PKG=""
PKG_VERSION=""
PKG_FILE=""
URL=""
MD5=""
for i in PATCH{1..10}; do
    unset $i
done
PATCH1=""

( cat << "xEOFx"
cat > /etc/hosts << "EOF"
# Begin /etc/hosts (network card version)

127.0.0.1 localhost
10.0.2.9 turbolivirt

# End /etc/hosts (network card version)
EOF
cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=10.0.2.9
GATEWAY=10.0.2.2
PREFIX=24
BROADCAST=10.0.2.255
EOF
cat > /etc/resolv.conf << "EOF"
# Begin /etc/resolv.conf

nameserver 10.0.2.3

# End /etc/resolv.conf
EOF
echo "HOSTNAME=turbolivirt" > /etc/sysconfig/network
xEOFx
) > tmp
-----------------------------------
I can send you other batches for setting /etc/profile, /etc/bashrc and 
the other config files, creating an initramfs, and installing lvm.

Regards,
Pierre




More information about the alfs-discuss mailing list