From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:master commit in: /, configs/
Date: Thu, 16 Jun 2011 01:01:35 +0000 (UTC) [thread overview]
Message-ID: <db0cb1e0971201ff81a595247b24db874e5bc1fb.hexxeh@gentoo> (raw)
Message-ID: <20110616010135.u_3Our3Gepqnz5P_ptt4LIQVfYwW7-6h5ZTgKXA5ETY@z> (raw)
commit: db0cb1e0971201ff81a595247b24db874e5bc1fb
Author: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Jun 16 00:44:25 2011 +0000
Commit: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Jun 16 00:44:25 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=db0cb1e0
Bugfixes and tidy up
---
configs/fluxbox.ini | 2 +-
create_image.sh | 43 ++++++++++++++++++++++++++++---------------
parse_config.sh | 1 +
3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/configs/fluxbox.ini b/configs/fluxbox.ini
index cdc2e1f..596d0c7 100644
--- a/configs/fluxbox.ini
+++ b/configs/fluxbox.ini
@@ -8,7 +8,7 @@ TIMEZONE='Europe/London'
HOSTNAME='gentoo'
ROOT_PASSWORD='g3nt00'
DEFAULT_USERNAME='gentoo'
-DEEFAULT_PASSWORD='g3nt00'
+DEFAULT_PASSWORD='g3nt00'
USE_FLAGS='-qt4 kde X dbus gtk gnome xorg udev truetype nls imlib'
PACKAGE_USE='media-libs/imlib2 X'
FEATURES='parallel-fetch userfetch userpriv getbinpkg'
diff --git a/create_image.sh b/create_image.sh
index 27d439b..1f58e83 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -18,10 +18,11 @@ IMAGE_WORK_PATH="/root/gentoo/${BUILD_ID}"
LOG_FILE="${IMAGE_WORK_PATH}/log.txt"
TOOL_RES_PATH=`pwd`/res
-CPU_CORES=`grep -c processor /proc/cpuinfo`
+NUM_JOBS=$(( `grep -c processor /proc/cpuinfo`+1 ))
STAGE3_URL="http://distfiles.gentoo.org/releases/x86/current-stage3/stage3-i486-20110607.tar.bz2"
PORTAGE_URL="http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2"
BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
+EMERGE_PROXY="http://127.0.0.1:3128"
echo "Creating build working directory"
mkdir -p ${IMAGE_WORK_PATH}
@@ -121,16 +122,21 @@ cp -L /etc/resolv.conf etc/resolv.conf
echo "Setting up make.conf"
mkdir -p usr/portage/packages
-echo 'PORTAGE_BINHOST="${BINHOST_URL}"' >> etc/make.conf
-echo 'PKGDIR="/usr/portage/packages"' >> etc/make.conf
-echo 'FEATURES="${FEATURES}"' >> etc/make.conf
-echo 'USE="${USE_FLAGS}"' >> etc/make.conf
-if [[ ${OUTPUT_FORMAT} = "vbox" ]]
-then
+echo "PORTAGE_BINHOST=\"${BINHOST_URL}\"" >> etc/make.conf
+echo "PKGDIR=\"/usr/portage/packages\"" >> etc/make.conf
+echo "FEATURES=\"${FEATURES}\"" >> etc/make.conf
+echo "USE=\"${USE_FLAGS}\"" >> etc/make.conf
+
+if [[ ${OUTPUT_FORMAT} = "vbox" ]]; then
echo 'INPUT_DEVICES="virtualbox evdev"' >> etc/make.conf
echo 'VIDEO_CARDS="virtualbox"' >> etc/make.conf
fi
+if [ -n $EMERGE_PROXY ]; then
+ echo "Enabling HTTP proxy"
+ echo "http_proxy=\"${EMERGE_PROXY}\"" >> etc/make.conf
+fi
+
echo "Setting up package.use"
mkdir -p etc/portage
echo ${PACKAGE_USE} >> etc/portage/package.use
@@ -156,7 +162,7 @@ cp ${TOOL_RES_PATH}/fstab etc/fstab &>> ${LOG_FILE}
echo "Setting up networking"
echo 'config_eth0=( "dhcp" )' > etc/conf.d/net
cp etc/init.d/net.lo etc/init.d/net.eth0
-linux32 chroot . rc-update add net.eth0 default
+linux32 chroot . rc-update add net.eth0 default &>> ${LOG_FILE}
echo "Downloading/installing kernel sources"
linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE}
@@ -165,7 +171,7 @@ echo "Copying kernel configuration"
cp ${TOOL_RES_PATH}/kernelconfig usr/src/linux/.config
echo "Building kernel"
-linux32 chroot . make -C /usr/src/linux -j$(( ${CPU_CORES}+1 )) &>> ${LOG_FILE}
+linux32 chroot . make -C /usr/src/linux -j${NUM_JOBS} &>> ${LOG_FILE}
echo "Installing kernel"
linux32 chroot . make -C /usr/src/linux modules_install &>> ${LOG_FILE}
@@ -174,8 +180,11 @@ linux32 chroot . cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel &>> ${LOG
echo "Setting root password"
linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE}
-echo "Installing packages list"
-linux32 chroot . emerge ${PACKAGES_LIST} &>> ${LOG_FILE}
+echo "Processing packages list"
+for PACKAGE in ${PACKAGES_LIST}; do
+ echo "Installing ${PACKAGE}"
+ linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE}
+done
echo "Adding default user"
linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME}
@@ -186,10 +195,14 @@ then
echo "Installing VirtualBox additions/drivers"
linux32 chroot . emerge xf86-video-virtualbox xf86-input-virtualbox virtualbox-guest-additions &>> ${LOG_FILE}
linux32 chroot . rc-update add virtualbox-guest-additions default &>> ${LOG_FILE}
- linux32 chroot . mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak &>> ${LOG_FILE}
+ mv etc/X11/xorg.conf etc/X11/xorg.conf.bak &>> ${LOG_FILE}
linux32 chroot . usermod -a vboxguest ${DEFAULT_USERNAME}
fi
+if [ -n ${EMERGE_PROXY} ]; then
+ sed -i '/http_proxy/ d' etc/make.conf
+fi
+
echo "Installing extlinux"
extlinux --heads 255 --sectors 63 --install boot
dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc
@@ -200,19 +213,19 @@ cleanup_mounts
case "${OUTPUT_FORMAT}" in
"raw" )
echo "Already in raw format, not converting"
- IMAGE_OUT="${IMAGE_NAME}.image"
+ IMAGE_OUT="${BUILD_ID}.image"
;;
"vbox" )
echo "Converting image from RAW to VDI"
qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi
rm -rf ${IMAGE_NAME}
- IMAGE_OUT="${IMAGE_NAME}.vdi"
+ IMAGE_OUT="${BUILD_ID}.vdi"
;;
"vmware" )
echo "Converting image from RAW to VMDK"
qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk
rm -rf ${IMAGE_NAME}
- IMAGE_OUT="${IMAGE_NAME}.vmdk"
+ IMAGE_OUT="${BUILD_ID}.vmdk"
;;
esac
mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}
diff --git a/parse_config.sh b/parse_config.sh
index 24aba14..090954a 100755
--- a/parse_config.sh
+++ b/parse_config.sh
@@ -23,6 +23,7 @@ cfg_parser ()
ini[0]="" # remove first element
ini[${#ini[*]} + 1]='}' # add the last brace
eval "$(echo "${ini[*]}")" # eval the result
+ IFS=" "
}
next reply other threads:[~2011-06-16 1:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 0:44 Liam McLoughlin [this message]
2011-06-16 1:01 ` [gentoo-commits] proj/gentoaster:master commit in: /, configs/ Liam McLoughlin
-- strict thread matches above, loose matches on Subject: below --
2011-08-02 16:48 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-28 4:51 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-06-16 15:58 Liam McLoughlin
2011-06-16 0:51 Liam McLoughlin
2011-06-15 21:09 Liam McLoughlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db0cb1e0971201ff81a595247b24db874e5bc1fb.hexxeh@gentoo \
--to=hexxeh@hexxeh.net \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox