Update:
- Fixed an if-statement bug in chapter07 (both HLFS and LFS)
Notes:
- It works for the HLFS and LFS part of jhalfs-X-2386
- The use of Paco can be toggled on/off in the common/config
file
- Use paco-svn-20060319 or later, 1.10.2 will fail with HLFS
and 1.10.3
has a bug and doesn't honour the EXCLUDE dirs.
- Paco will be installed twice in Ch06. The first install
will link
against /tools, and second link against the adjusted
toolchain.
- The paco source package has to be copied manually to the
/sources dir
before starting the make
- Only bootscripts and kernel installation will be logged in
chapter07.
That last note seemed right to me, anyone agree/disagree?
I just don't see a big point in logging a few single config
files.
Manuel: I cannot reproduce that bug in the
"clean-chapter6" target,
hence I cannot fix it. Would you be so kind and confirm if
it's still a
problem, if you got some time? I'd appreciate it ;)
Tor Olav
diff -Naur jhalfs-X-2386-orig/HLFS/master.sh
jhalfs-X-2386-paco/HLFS/master.sh
--- jhalfs-X-2386-orig/HLFS/master.sh 2006-03-22
09:03:53.000000000 +0100
+++ jhalfs-X-2386-paco/HLFS/master.sh 2006-03-22
09:08:15.000000000 +0100
 -370,6
+370,10 
wrt_run_as_root "$"
"$"
#
# The rest of Chapter06
+ elif [ "$vrs" != "" ]
&& [ $USE_PACO != 0 ]; then
+ wrt_paco_prep
+ wrt_run_as_chroot1 "$"
"$"
+ wrt_paco_log "$name" "$vrs"
else
wrt_run_as_chroot1 "$"
"$"
fi
 -399,6
+403,15 
# Keep the script file name for Makefile dependencies.
PREV=$this_script
+
+ if [[ $USE_PACO != 0 ]] ; then
+ if [[ `_IS_ $this_script devices` ]] ; then
+ wrt_paco_inst "068.5"
+ elif [[ `_IS_ $this_script readjusting` ]] ; then
+ wrt_paco_inst "073.5"
+ fi
+ fi
+
done # end for file in chapter06/*
}
 -458,6
+471,15 
# Check if we have a real /etc/fstab file
if [[ `_IS_ $this_script fstab` ]] && [[ -n
"$FSTAB" ]] ; then
wrt_copy_fstab "$this_script"
+ elif [[ $USE_PACO != 0 ]] && [[ `_IS_
$this_script kernel` ]] ; then
+ vrs=`grep "^linux-version"
$JHALFSDIR/packages | sed -e 's/.* //' -e
's/"//g'`
+ wrt_paco_prep
+ wrt_run_as_chroot2 "$"
"$"
+ wrt_paco_log "linux-kernel"
"$vrs"
+ elif [[ $USE_PACO != 0 ]] && [[ `_IS_
$this_script bootscripts` ]]; then
+ wrt_paco_prep
+ wrt_run_as_chroot2 "$"
"$"
+ wrt_paco_log "hlfs-bootscripts"
else
# Initialize the log and run the script
wrt_run_as_chroot2 "$"
"$"
diff -Naur jhalfs-X-2386-orig/LFS/master.sh
jhalfs-X-2386-paco/LFS/master.sh
--- jhalfs-X-2386-orig/LFS/master.sh 2006-03-22
09:03:53.000000000 +0100
+++ jhalfs-X-2386-paco/LFS/master.sh 2006-03-22
09:10:29.000000000 +0100
 -188,7
+188,13 
# and not to use chroot.
if [[ `_IS_ $ kernfs` ]] ; then
wrt_run_as_root "$"
"$file"
- else # The rest of Chapter06
+
+ # The rest of Chapter06
+ elif [ "$vrs" != "" ]
&& [ $USE_PACO != 0 ]; then
+ wrt_paco_prep
+ wrt_run_as_chroot1 "$"
"$"
+ wrt_paco_log "$"
"$"
+ else
wrt_run_as_chroot1 "$"
"$file"
fi
 -207,6
+213,15 
# Keep the script file name for Makefile dependencies.
PREV=$
+
+ if [[ $USE_PACO != 0 ]] ; then
+ if [[ `_IS_ $this_script devices` ]] ; then
+ wrt_paco_inst "065.5"
+ elif [[ `_IS_ $this_script readjusting` ]] ; then
+ wrt_paco_inst "069.5"
+ fi
+ fi
+
done # end for file in chapter06/*
}
 -259,6
+274,14 
# Check if we have a real /etc/fstab file
if [[ `_IS_ $ fstab` ]] && [[ -n
"$FSTAB" ]] ; then
wrt_copy_fstab "$"
+ elif [[ $USE_PACO != 0 ]] && [[ `_IS_
$this_script kernel` ]] ; then
+ wrt_paco_prep
+ wrt_run_as_chroot2 "$"
"$"
+ wrt_paco_log "linux-kernel"
"$"
+ elif [[ $USE_PACO != 0 ]] && [[ `_IS_
$this_script bootscripts` ]]; then
+ wrt_paco_prep
+ wrt_run_as_chroot2 "$"
"$"
+ wrt_paco_log "lfs-bootscripts"
"$"
else
# Initialize the log and run the script
wrt_run_as_chroot2 "$this_script"
"$file"
diff -Naur jhalfs-X-2386-orig/common/config
jhalfs-X-2386-paco/common/config
--- jhalfs-X-2386-orig/common/config 2006-03-22
09:03:53.000000000 +0100
+++ jhalfs-X-2386-paco/common/config 2006-03-22
08:55:34.000000000 +0100
 -65,3
+65,18 
#--- Working directories
JHALFSDIR=$BUILDDIR/jhalfs
LOGDIR=$JHALFSDIR/logs
+
+#==== PACO VARIABLES ====
+#--- Use paco? 0/1 0(no)/1(yes)
+USE_PACO=1
+PACO_VERSION=20060319
+
+#--- Name of the Paco source package
+PACO_FILE=paco-$PACO_VERSION.tar.*
+
+#--- Variables needed
+# Don't change unless you know what you're doing
+PACO_INCLUDE=/
+PACO_EXCLUDE=/tmp:/usr/src:/usr/share/info/dir
+PACO_TMPFILE=/tmp/paco.tmp
+LD_PRELOAD=/usr/lib/libpaco-log.so
diff -Naur jhalfs-X-2386-orig/common/paco-build.sh
jhalfs-X-2386-paco/common/paco-build.sh
--- jhalfs-X-2386-orig/common/paco-build.sh 1970-01-01
01:00:00.000000000 +0100
+++ jhalfs-X-2386-paco/common/paco-build.sh 2006-03-22
08:13:19.000000000 +0100
 -0,0
+1,9 
+#!/bin/sh
+set -e
+
+cd $PKGDIR
+./configure --prefix=/usr \
+ --disable-gpaco \
+ --sysconfdir=/etc &&
+make &&
+make install
diff -Naur jhalfs-X-2386-orig/common/paco-functions
jhalfs-X-2386-paco/common/paco-functions
--- jhalfs-X-2386-orig/common/paco-functions 1970-01-01
01:00:00.000000000 +0100
+++ jhalfs-X-2386-paco/common/paco-functions 2006-03-22
08:13:19.000000000 +0100
 -0,0
+1,67 
+#!/bin/bash
+
+
+#----------------------------#
+wrt_paco_inst() { #
+#----------------------------#
+ name="paco"
+ this_script="$1-$name"
+ file="chapter06/$this_script"
+ chapter6="$chapter6 $this_script"
+
+ # Write target, dependency and unpack
+ wrt_target "$this_script" "$PREV"
+ wrt_unpack2 "$PACO_FILE"
+
+ # Copy the Paco build script to the correct directory and
make it executable
+ echo -e "\t cp $JHALFSDIR/paco-build.sh
$JHALFSDIR/$-commands/$file && \\"
>> $MKFILE.tmp
+ echo -e "\tchmod +x
$JHALFSDIR/$-commands/$file" >>
$MKFILE.tmp
+
+ # Run the script
+ wrt_run_as_chroot1 "$"
"$"
+
+ # Clean up
+ wrt_remove_build_dirs "$name"
+ echo -e '\t touch $ ' >> $MKFILE.tmp
+
+ # Override the PREV variable
+ PREV="$this_script"
+}
+
+
+#----------------------------------#
+wrt_paco_prep() { # Export Paco variables
+#----------------------------------# and remove tmpfile
+(
+cat << EOF
+ echo "export PACO_INCLUDE=$PACO_INCLUDE"
>> envars && \\
+ echo "export
PACO_EXCLUDE=\$(SRC):$JHALFSDIR:$PACO_EXCLUDE"
>> envars && \\
+ echo "export PACO_TMPFILE=$PACO_TMPFILE"
>> envars && \\
+ echo "export LD_PRELOAD=$LD_PRELOAD" >>
envars && \\
+ rm -f \$(MOUNT_PT)$PACO_TMPFILE
+EOF
+) >> $MKFILE.tmp
+}
+
+
+#----------------------------------#
+wrt_paco_log() { # If the tmpfile exist,
then log the current package
+#----------------------------------# and remove tempfile
+ local package
+
+ if [[ $2 != "" ]] ; then
+ package="$1-$2";
+ else
+ package="$1"
+ fi
+(
+cat << EOF
+ if
[ -e \$(MOUNT_PT)$PACO_TMPFILE ]; then \\
+ paco --log --logdir=\$(MOUNT_PT)/var/log/paco \\
+ --package=$package < \$(MOUNT_PT)$PACO_TMPFILE;
\\
+ fi && \\
+ rm -f \$(MOUNT_PT)$PACO_TMPFILE
+EOF
+) >> $MKFILE.tmp
+}
+
diff -Naur jhalfs-X-2386-orig/master.sh
jhalfs-X-2386-paco/master.sh
--- jhalfs-X-2386-orig/master.sh 2006-03-22
09:03:53.000000000 +0100
+++ jhalfs-X-2386-paco/master.sh 2006-03-22
08:13:19.000000000 +0100
 -67,6
+67,14 
[[ $? > 0 ]] && echo "$MODULE did not
load.." && exit 2
echo "OK"
#
+# If Paco is requested, then source the paco-functions file
+if [ $USE_PACO != 0 ] ; then
+ echo -n "Loading paco-functions module..."
+ source $COMMON_DIR/paco-functions
+ [[ $? > 0 ]] && echo
"$COMMON_DIR/paco-functions did not load.."
&& exit
+ echo "OK"
+fi
+#
echo "---------------$"
 -312,6
+320,9 
if [[ "$PWD" != "$JHALFSDIR" ]];
then
cp -v $COMMON_DIR/makefile-functions $JHALFSDIR/
+ if [[ USE_PACO != 0 ]]; then
+ cp -v $COMMON_DIR/paco-build.sh $JHALFSDIR/
+ fi
if [[ -n "$FILES" ]]; then
# pushd/popd necessary to deal with mulitiple files
pushd $PACKAGE_DIR
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
|