PERFORCE change 88111 for review
soc-saturnero
soc-saturnero at FreeBSD.org
Mon Dec 12 15:49:22 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=88111
Change 88111 by soc-saturnero at soc-saturnero_sberta on 2005/12/12 23:48:57
"Integrate" (by hand) from FreeSBIE.org cvs. If someone knows how
to do it automatically, please tell!
Affected files ...
.. //depot/projects/soc2005/freesbie/conf/freesbie.defaults.conf#15 edit
.. //depot/projects/soc2005/freesbie/extra/adduser.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/adduser/homemfs.rc#1 add
.. //depot/projects/soc2005/freesbie/extra/buildmodules.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/comconsole.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/customroot.sh#3 edit
.. //depot/projects/soc2005/freesbie/extra/customscripts.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/customscripts/README#1 add
.. //depot/projects/soc2005/freesbie/extra/etcmfs.sh#3 edit
.. //depot/projects/soc2005/freesbie/extra/etcmfs/etcmfs.rc#3 edit
.. //depot/projects/soc2005/freesbie/extra/sound.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/sound/snd_card_ids.txt#1 add
.. //depot/projects/soc2005/freesbie/extra/sound/sound_detect.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig-probe.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig-probe/xconfig-probe.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig-probe/xkbdlayout.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig-probe/xorg.conf.orig#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/Cards#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/pcitable.gz#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/xconfig.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/xkbdlayout.sh#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/xorg.conf.orig#1 add
.. //depot/projects/soc2005/freesbie/extra/xconfig/xorg.conf.vmware#1 add
.. //depot/projects/soc2005/freesbie/scripts/buildkernel.sh#6 edit
.. //depot/projects/soc2005/freesbie/scripts/buildworld.sh#7 edit
.. //depot/projects/soc2005/freesbie/scripts/clonefs.sh#6 edit
.. //depot/projects/soc2005/freesbie/scripts/img.sh#7 edit
.. //depot/projects/soc2005/freesbie/scripts/installkernel.sh#5 edit
.. //depot/projects/soc2005/freesbie/scripts/installworld.sh#4 edit
.. //depot/projects/soc2005/freesbie/scripts/iso.sh#6 edit
.. //depot/projects/soc2005/freesbie/scripts/launch.sh#10 edit
.. //depot/projects/soc2005/freesbie/scripts/pkginstall.sh#5 edit
.. //depot/projects/soc2005/freesbie/scripts/powerpc/iso.sh#6 edit
Differences ...
==== //depot/projects/soc2005/freesbie/conf/freesbie.defaults.conf#15 (text+ko) ====
@@ -7,40 +7,46 @@
# See COPYING for license terms.
#
# $FreeBSD$
-# $Id: freesbie.defaults.conf,v 1.4 2005/10/30 13:53:53 saturnero Exp $
+# $Id: freesbie.defaults.conf,v 1.6 2005/11/15 22:59:42 saturnero Exp $
#
# Don't modify it, create your own conf/freesbie.conf instead, or set
# an environment variable called FREESBIE_CONF to the absolute path of
-# your configuration file.
+# your configuration file. Alternatively, you can set the variables
+# you want to override as environment variables
# Variables
# Path where files are installed.
-BASEDIR="/usr/local/freesbie-fs"
+BASEDIR=${BASEDIR:-"/usr/local/freesbie-fs"}
# Temporary directory used when building images
-CLONEDIR="/usr/local/freesbie-clone"
+CLONEDIR=${CLONEDIR:-"/usr/local/freesbie-clone"}
# Directory with system sources
-SRCDIR="/usr/src"
+SRCDIR=${SRCDIR:-"/usr/src"}
# Path of the built iso, use absolute path
-ISOPATH="/usr/obj/FreeSBIE.iso"
+ISOPATH=${ISOPATH:-"/usr/obj/FreeSBIE.iso"}
# Path of the built image, use absolute path
-IMGPATH="/usr/obj/FreeSBIE.img"
+IMGPATH=${IMGPATH:-"/usr/obj/FreeSBIE.img"}
# Default parameters for the image, use diskinfo(1) to obtain yours
-SECTS=501760 # Total number of sectors
-SECTT=32 # Sectors/track
-HEADS=16 # Heads
+SECTS=${SECTS:-501760} # Total number of sectors
+SECTT=${SECTT:-32} # Sectors/track
+HEADS=${HEADS:-16} # Heads
#
# Optional variables
-# Arguments passed to make(1) when building world and kernel
+# Arguments passed to make(1) when building world and kernel.
+# Cannot be an environment variable.
+MAKEJ=${MAKEJ:-"-j3"}
+
+# Arguments passed to make(1) when building world and kernel.
+# Can also be an environment variable.
#
-MAKEOPT="-j3"
+#MAKEOPT="-DNO_CLEAN"
# Kernel configuration file, with complete path
#
@@ -102,4 +108,3 @@
# system
#
NO_UNIONFS=YES # Unionfs is broken in > 6.0, so disable it by default
-
==== //depot/projects/soc2005/freesbie/extra/customroot.sh#3 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: customroot.sh,v 1.3 2005/11/27 22:54:08 saturnero Exp $
set -e -u
@@ -24,4 +24,8 @@
find . -not -name 'README' -not -path '*CVS*' | \
cpio -dump -v ${BASEDIR} >> ${LOGFILE} 2>&1
+if [ -f ${CUSTOMROOT}/etc/master.passwd ]; then
+ chroot ${BASEDIR} cap_mkdb /etc/master.passwd
+fi
+
cd ${LOCALDIR}
==== //depot/projects/soc2005/freesbie/extra/etcmfs.sh#3 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: etcmfs.sh,v 1.3 2005/12/01 00:14:23 saturnero Exp $
set -e -u
@@ -26,3 +26,8 @@
mtree -Pcp ${BASEDIR}/etc > ${TMPFILE}
mv ${TMPFILE} ${BASEDIR}/etc/mtree/etc.dist
+
+if [ -d ${BASEDIR}/usr/local/etc ]; then
+ mtree -Pcp ${BASEDIR}/usr/local/etc > ${TMPFILE}
+ mv ${TMPFILE} ${BASEDIR}/etc/mtree/localetc.dist
+fi
==== //depot/projects/soc2005/freesbie/extra/etcmfs/etcmfs.rc#3 (text+ko) ====
@@ -25,7 +25,7 @@
# SUCH DAMAGE.
#
# $FreeBSD$
-# $Id$
+# $Id: etcmfs.rc,v 1.3 2005/12/01 00:14:23 saturnero Exp $
#
# PROVIDE: etcmfs
@@ -36,6 +36,7 @@
name="etcmfs"
etcsize="20m"
+localetcsize="10m"
load_rc_config $name
@@ -58,4 +59,21 @@
umount ${tempdir}
mount /dev/${device} /etc
+
+if [ -f /etc/mtree/localetc.dist ]; then
+ device=$(mdconfig -a -t malloc -s ${localetcsize})
+ newfs /dev/${device} > /dev/null 2>&1
+ mount /dev/${device} ${tempdir}
+
+ cd /usr/local/etc
+ find . -print -depth | cpio -dump --quiet ${tempdir}
+
+ cd $back
+
+ mtree -PUer -q -p ${tempdir} < /etc/mtree/localetc.dist > /dev/null 2>&1
+
+ umount ${tempdir}
+ mount /dev/${device} /usr/local/etc
+fi
+
rmdir ${tempdir}
==== //depot/projects/soc2005/freesbie/scripts/buildkernel.sh#6 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: buildkernel.sh,v 1.4 2005/11/15 21:47:53 saturnero Exp $
set -e -u
@@ -40,7 +40,7 @@
fi
cd $SRCDIR
-
-(script -aq $LOGFILE make ${MAKEOPT:-} buildkernel __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} || print_error;) | grep '^>>>'
+makeargs="${MAKEOPT:-} ${MAKEJ:-} __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH}"
+(script -aq $LOGFILE make $makeargs buildkernel || print_error;) | grep '^>>>'
cd $LOCALDIR
==== //depot/projects/soc2005/freesbie/scripts/buildworld.sh#7 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: buildworld.sh,v 1.4 2005/11/15 21:47:53 saturnero Exp $
set -e -u
@@ -32,7 +32,8 @@
fi
cd $SRCDIR
-
-(script -aq $LOGFILE make ${MAKEOPT:-} buildworld __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} || print_error;) | grep '^>>>'
+
+makeargs="${MAKEOPT:-} ${MAKEJ:-} __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH}"
+(script -aq $LOGFILE make ${makeargs:-} buildworld || print_error;) | grep '^>>>'
cd $LOCALDIR
==== //depot/projects/soc2005/freesbie/scripts/clonefs.sh#6 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: clonefs.sh,v 1.6 2005/11/27 22:42:52 saturnero Exp $
set -e -u
@@ -33,7 +33,8 @@
cd $SOURCEDIR
# Find the total dir size and initialize the vnode
- FSSIZE=$(($(du -kd 0 | cut -f 1) + 64000))
+ DIRSIZE=$(($(du -kd 0 | cut -f 1)))
+ FSSIZE=$(($DIRSIZE + ($DIRSIZE/5)))
dd if=/dev/zero of=${UFSFILE} bs=1k count=${FSSIZE} >> ${LOGFILE} 2>&1
DEVICE=/dev/$(mdconfig -a -t vnode -f ${UFSFILE})
@@ -128,7 +129,7 @@
# else pass it to cpio
if [ -f ${FILE_LIST} ]; then
echo "Using ${FILE_LIST} as source" | tee -a ${LOGFILE}
- cpio -dump -v ${CLONEDIR} < ${FILE_LIST} >> ${LOGFILE} 2>&1
+ sed 's/^#.*//g' ${FILE_LIST} | cpio -dump -v ${CLONEDIR} >> ${LOGFILE} 2>&1
else
echo "${FILE_LIST} is not a valid path, exiting..." \
| tee -a ${LOGFILE}
@@ -143,7 +144,16 @@
if [ -n "${PRUNE_LIST:-}" ]; then
if [ -f ${PRUNE_LIST} ]; then
echo "Deleting files listed in ${PRUNE_LIST}" | tee -a ${LOGFILE}
- (cd ${CLONEDIR} && cat ${PRUNE_LIST} | xargs rm -rvf >> ${LOGFILE} 2>&1)
+ set +e
+ (cd ${CLONEDIR} && sed 's/^#.*//g' ${PRUNE_LIST} | xargs rm -rvf >> ${LOGFILE} 2>&1)
+ if [ -z "${NO_COMPRESSEDFS:-}" ]; then
+ echo "Filling the uncompressed fs with zeros to compress better"
+ echo "Don't worry if you see a 'filesystem full' message here"
+ zerofile=$(env TMPDIR=${CLONEDIR}/usr mktemp -t zero)
+ dd if=/dev/zero of=${zerofile} >> ${LOGFILE} 2>&1
+ rm ${zerofile}
+ fi
+ set -e
else
echo "${PRUNE_LIST} isn't a regular file, skipping file deletion" \
| tee -a ${LOGFILE}
==== //depot/projects/soc2005/freesbie/scripts/img.sh#7 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: img.sh,v 1.3 2005/11/17 00:21:42 saturnero Exp $
set -e -u
@@ -17,7 +17,7 @@
echo "#### Building bootable UFS image for ${ARCH} ####"
-LABEL="FreeSBIE" # UFS label
+FREESBIE_LABEL=${FREESBIE_LABEL:-"FreeSBIE"} # UFS label
# Temp file and directory to be used later
TMPFILE=`mktemp -t freesbie`
@@ -48,14 +48,14 @@
bsdlabel -w -B ${DEVICE}s1 >> ${LOGFILE} 2>&1
-newfs -b 4096 -f 512 -i 8192 -L ${LABEL} -O1 -U ${DEVICE}s1a >> ${LOGFILE} 2>&1
+newfs -b 4096 -f 512 -i 8192 -L ${FREESBIE_LABEL} -O1 -U ${DEVICE}s1a >> ${LOGFILE} 2>&1
mount /dev/${DEVICE}s1a ${TMPDIR}
echo "Writing files..."
cd ${CLONEDIR}
find . -print -depth | cpio -dump -v ${TMPDIR} >> ${LOGFILE} 2>&1
-echo "/dev/ufs/${LABEL} / ufs ro 1 1" > ${TMPDIR}/etc/fstab
+echo "/dev/ufs/${FREESBIE_LABEL} / ufs ro 1 1" > ${TMPDIR}/etc/fstab
umount ${TMPDIR}
cd ${LOCALDIR}
==== //depot/projects/soc2005/freesbie/scripts/installkernel.sh#5 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: installkernel.sh,v 1.4 2005/11/15 21:47:53 saturnero Exp $
set -e -u
@@ -39,8 +39,9 @@
echo hint.psm.0.flags=0x1000 >> ${BASEDIR}/boot/device.hints
cd ${SRCDIR}
-
-(script -aq $LOGFILE make ${MAKEOPT:-} installkernel __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR} || print_error;) | grep '^>>>'
+
+makeargs="${MAKEOPT:-} ${MAKEJ:-} __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR}"
+(script -aq $LOGFILE make ${makeargs:-} installkernel || print_error;) | grep '^>>>'
cd ${BASEDIR}/boot/kernel
if [ "${ARCH}" = "`uname -m`" -a -z "${DEBUG:-}" ]; then
==== //depot/projects/soc2005/freesbie/scripts/installworld.sh#4 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: installworld.sh,v 1.5 2005/11/18 15:39:09 saturnero Exp $
set -e -u
@@ -30,10 +30,13 @@
cd ${SRCDIR}
-(script -aq $LOGFILE make ${MAKEOPT:-} installworld __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR} || print_error;) | grep '^>>>'
+makeargs="${MAKEOPT:-} ${MAKEJ:-} __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR}"
+(script -aq $LOGFILE make ${makeargs:-} installworld || print_error;) | grep '^>>>'
cd ${SRCDIR}/etc
-(script -aq $LOGFILE make ${MAKEOPT:-} distribution __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR} || print_error;) | grep '^>>>'
-
+makeargs="${MAKEOPT:-} __MAKE_CONF=${MAKE_CONF} TARGET_ARCH=${ARCH} DESTDIR=${BASEDIR}"
+set +e
+(script -aq $LOGFILE make ${makeargs:-} distribution || print_error;) | grep '^>>>'
+set -e
cd $LOCALDIR
==== //depot/projects/soc2005/freesbie/scripts/iso.sh#6 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: iso.sh,v 1.5 2005/11/27 16:02:43 saturnero Exp $
set -e -u
@@ -15,12 +15,13 @@
exit 1
fi
-LABEL="FreeSBIE"
+FREESBIE_LABEL=${FREESBIE_LABEL:-"FreeSBIE"}
echo "#### Building bootable ISO image for ${ARCH} ####"
# This part was taken from the mkisoimages.sh scripts under
# /usr/src/release/${ARCH}/
+set +e
type mkisofs 2>&1 | grep " is " >/dev/null
if [ $? -ne 0 ]; then
echo The cdrtools port is not installed. Trying to get it now.
@@ -34,20 +35,20 @@
fi
fi
fi
+set -e
-
echo "Saving mtree structure..."
mtree -Pcp ${CLONEDIR} | bzip2 -9 > root.dist.bz2
mkdir -p ${CLONEDIR}/dist
mv root.dist.bz2 ${CLONEDIR}/dist/
-echo "/dev/iso9660/${LABEL} / cd9660 ro 0 0" > ${CLONEDIR}/etc/fstab
+echo "/dev/iso9660/${FREESBIE_LABEL} / cd9660 ro 0 0" > ${CLONEDIR}/etc/fstab
cd ${CLONEDIR}
echo "Running mkisofs..."
-mkisofs -b boot/cdboot -no-emul-boot -J -r -ldots -l -L -V ${LABEL} -p FreeSBIE -o $ISOPATH . >> ${LOGFILE} 2>&1
+mkisofs -b boot/cdboot -no-emul-boot -J -r -ldots -l -L -V ${FREESBIE_LABEL} -p FreeSBIE -o $ISOPATH . >> ${LOGFILE} 2>&1
echo "ISO created:"
==== //depot/projects/soc2005/freesbie/scripts/launch.sh#10 (text+ko) ====
@@ -7,7 +7,7 @@
# See COPYING for license terms.
#
# $FreeBSD$
-# $Id: launch.sh,v 1.3 2005/10/29 18:46:07 drizzt Exp $
+# $Id: launch.sh,v 1.4 2005/12/11 10:43:32 saturnero Exp $
#
# Usage: launch.sh ${TARGET} [ ${LOGFILE} ]
@@ -56,16 +56,19 @@
kill $$ # XXX exit 1 won't work.
}
+# If SCRIPTS_OVERRIDE is not defined, set it to ${LOCALDIR}/scripts/custom
+SCRIPTS_OVERRIDE=${SCRIPTS_OVERRIDE:-"${LOCALDIR}/scripts/custom"}
+
# Check order:
-# - scripts/custom/${ARCH}/${TARGET}.sh
-# - scripts/custom/${TARGET}.sh
+# - ${SCRIPTS_OVERRIDE}/${ARCH}/${TARGET}.sh
+# - ${SCRIPTS_OVERRIDE}/${TARGET}.sh
# - scripts/${ARCH}/${TARGET}.sh
# - scripts/${TARGET}.sh
-if [ -f "${LOCALDIR}/scripts/custom/${ARCH}/${TARGET}.sh" ]; then
- . ${LOCALDIR}/scripts/custom/${ARCH}/${TARGET}.sh
-elif [ -f "${LOCALDIR}/scripts/custom/${TARGET}.sh" ]; then
- . ${LOCALDIR}/scripts/custom/${TARGET}.sh
+if [ -f "${SCRIPTS_OVERRIDE}/${ARCH}/${TARGET}.sh" ]; then
+ . ${SCRIPTS_OVERRIDE}/${ARCH}/${TARGET}.sh
+elif [ -f "${SCRIPTS_OVERRIDE}/${TARGET}.sh" ]; then
+ . ${SCRIPTS_OVERRIDE}/${TARGET}.sh
elif [ -f "${LOCALDIR}/scripts/${ARCH}/${TARGET}.sh" ]; then
. ${LOCALDIR}/scripts/${ARCH}/${TARGET}.sh
elif [ -f "${LOCALDIR}/scripts/${TARGET}.sh" ]; then
==== //depot/projects/soc2005/freesbie/scripts/pkginstall.sh#5 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: pkginstall.sh,v 1.8 2005/12/11 12:27:41 saturnero Exp $
set -e -u
@@ -39,7 +39,11 @@
touch origins
echo -n "Finding origins... "
while read row; do
- if [ -z ${row} ]; then continue; fi
+ if [ -z "${row}" ]; then continue; fi
+ set +e
+ if (echo ${row} | grep -q "^#"); then continue; fi
+ set -e
+
pkg=$(echo $row | cut -d\ -f 1)
# pkg_info might fail if the listed package isn't present
@@ -92,17 +96,63 @@
fi
}
-create_packages() {
+sort_packages() {
cd ${WORKDIR}
- sort -u origins deps > packages
- totpkg=$(wc -l packages | awk '{print $1}')
- echo "Creating ${totpkg} packages"
+ pkgfile=${WORKDIR}/packages
+ sortfile=${WORKDIR}/sortpkg
+ sort -u deps origins > $pkgfile
+
+ [ -f $sortfile ] && rm $sortfile
+ touch $sortfile
+
+ count() {
+ file=$1;
+ echo $(wc -l ${file} | awk '{print $1}')
+ }
+
+ totpkg=$(wc -l $pkgfile | awk '{print $1}')
+ echo "Sorting ${totpkg} packages by dependencies"
+ echo -n "[0"
+ count=1
+
+ while [ "$(count $pkgfile)" != "$(count $sortfile)" ]; do
+ while read pkg; do
+ depnotfound=0
+ if (grep -q "^${pkg}\$" ${sortfile}); then continue; fi
+ for dep in $(pkg_info -qr ${pkg} | cut -d ' ' -f 2); do
+ if (grep -q "^${dep}\$" ${sortfile}); then
+ continue;
+ else
+ depnotfound=1
+ break;
+ fi
+ done
+ if [ "$depnotfound" = "0" ]; then
+ echo ${pkg} >> ${sortfile};
+ # Progress bar
+ if [ $((${count} % 10)) -eq 0 ]; then
+ echo -n ${count}
+ else
+ echo -n "."
+ fi
+ count=$((${count} + 1))
+ fi
+ done < $pkgfile
+ done
+ echo "]"
+}
+
+copy_packages() {
+ chrootpkgpath=${CHROOTWD#$BASEDIR}
+ pkgfile=${WORKDIR}/sortpkg
+ pkgaddcmd="chroot ${BASEDIR} pkg_add -v"
+ totpkg=$(wc -l $pkgfile | awk '{print $1}')
+ echo "Copying ${totpkg} packages"
cd ${CHROOTWD}
set +e
echo -n "[0"
count=1
while read pkg; do
-
# Progress bar
if [ $((${count} % 10)) -eq 0 ]; then
echo -n ${count}
@@ -111,8 +161,15 @@
fi
count=$((${count} + 1))
- pkg_create -vb ${pkg} >> ${LOGFILE} 2>&1
- done < ${WORKDIR}/packages
+ echo "Running pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar" >> ${LOGFILE}
+ pkg_create -b ${pkg} ${CHROOTWD}/${pkg}.tar >> ${LOGFILE} 2>&1
+
+ echo "Running $pkgaddcmd ${chrootpkgpath}/${pkg}.tar" >> ${LOGFILE}
+ $pkgaddcmd ${chrootpkgpath}/${pkg}.tar >> ${LOGFILE} 2>&1
+
+ rm ${CHROOTWD}/${pkg}.tar
+
+ done < $pkgfile
echo "]"
set -e
}
@@ -122,21 +179,6 @@
chroot ${BASEDIR} pkg_delete -a >> ${LOGFILE} 2>&1
}
-install_packages() {
- cd ${WORKDIR}
- totorig=$(wc -l origins | awk '{print $1}')
- totpkgs=$(wc -l packages | awk '{print $1}')
- echo "Installing ${totorig} packages and their dependencies (${totpkgs} total)"
-
- export PKG_PATH=${CHROOTWD#$BASEDIR}
- set +e
- while read pkg; do
- echo "-> ${pkg}"
- chroot ${BASEDIR} pkg_add -v ${pkg} >> ${LOGFILE} 2>&1
- done < origins
- set -e
-}
-
# Deletes workdirs
purge_wd() {
cd ${LOCALDIR}
@@ -148,8 +190,7 @@
echo "Installing packages listed in ${PKGFILE}"
find_origins
find_deps
-create_packages
+sort_packages
delete_old_packages
-install_packages
-
+copy_packages
purge_wd
==== //depot/projects/soc2005/freesbie/scripts/powerpc/iso.sh#6 (text+ko) ====
@@ -5,7 +5,7 @@
# See COPYING for licence terms.
#
# $FreeBSD$
-# $Id$
+# $Id: iso.sh,v 1.4 2005/11/15 15:11:43 saturnero Exp $
if [ -z "${LOGFILE:-}" ]; then
echo "This script can't run standalone."
@@ -13,7 +13,7 @@
exit 1
fi
-LABEL="FreeSBIE"
+FREESBIE_LABEL=${FREESBIE_LABEL:-"FreeSBIE"}
echo "#### Building bootable ISO image for ${ARCH} ####"
@@ -39,14 +39,14 @@
mkdir -p ${CLONEDIR}/dist
mv root.dist.bz2 ${CLONEDIR}/dist/
-echo "/dev/iso9660/${LABEL} / cd9660 rw 0 0" > ${CLONEDIR}/etc/fstab
+echo "/dev/iso9660/${FREESBIE_LABEL} / cd9660 rw 0 0" > ${CLONEDIR}/etc/fstab
cd ${CLONEDIR}
cp ${SRCDIR}/release/powerpc/boot.tbxi boot
echo "Running mkisofs..."
-mkisofs -hfs-bless boot -map ${SRCDIR}/release/powerpc/hfs.map -r -hfs -part -no-desktop -hfs-volid ${LABEL} -V ${LABEL} -l -J -L -o $ISOPATH . >> ${LOGFILE} 2>&1
+mkisofs -hfs-bless boot -map ${SRCDIR}/release/powerpc/hfs.map -r -hfs -part -no-desktop -hfs-volid ${FREESBIE_LABEL} -V ${FREESBIE_LABEL} -l -J -L -o $ISOPATH . >> ${LOGFILE} 2>&1
echo "ISO created:"
More information about the p4-projects
mailing list