public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-04  3:47 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-04  3:47 UTC (permalink / raw
  To: gentoo-commits

commit:     d46419cab28b97d2a0fcba912c25c142c9d7d923
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sat Jun  4 03:47:29 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sat Jun  4 03:47:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=d46419ca

Adding fstab and renaming bootloader config

---
 create_image.sh                |   13 ++++++++-----
 syslinux.conf => extlinux.conf |    0
 fstab                          |   27 +++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 12f93ee..e403df9 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -43,8 +43,8 @@ echo -e "\x55\xaa" | dd bs=1 count=2 seek=510 of=${IMAGE_NAME} conv=notrunc &>>
 LOOP_DEV_IMAGE=`losetup -f`
 losetup ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
 
-sfdisk ${LOOP_DEV_IMAGE} -D -uM &>> ${LOG_FILE} << EOF
-,${BOOT_MEGABYTES},83,*
+sfdisk ${LOOP_DEV_IMAGE} -uM &>> ${LOG_FILE} << EOF
+1,${BOOT_MEGABYTES},83,*
 ,${SWAP_MEGABYTES},82,-
 ,,83,-
 EOF
@@ -61,7 +61,7 @@ sleep 2
 losetup -d ${LOOP_DEV_BOOT}
 
 LOOP_DEV_ROOT=`losetup -f`
-losetup -o $(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
+losetup -o $(( 512  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
 mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE}
 #sleep 2
 #losetup -d ${LOOP_DEV_ROOT}
@@ -76,7 +76,7 @@ echo "Mounting fileystems"
 
 echo "Mount root"
 mkdir -p rootfs
-mount -o loop,offset=$(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
+mount -o loop,offset=$(( 512  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
 echo "Mount boot"
 mkdir -p rootfs/boot
 mount -o loop,offset=512 ${IMAGE_NAME} rootfs/boot
@@ -128,6 +128,9 @@ echo "Setting hostname to ${HOSTNAME}"
 linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
 #linux32 chroot . hostname ${HOSTNAME} &>> ${LOG_FILE}
 
+echo "Copying new fstab"
+cp ../fstab etc/fstab &>> ${LOG_FILE}
+
 echo "Downloading/installing kernel sources"
 linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE}
 
@@ -166,7 +169,7 @@ linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' |
 echo "Installing extlinux"
 extlinux --heads 255 --sectors 63 --install boot
 dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc
-
+cp ../extlinux.conf boot/
 cd  ..
 cleanup_mounts
 

diff --git a/syslinux.conf b/extlinux.conf
similarity index 100%
rename from syslinux.conf
rename to extlinux.conf

diff --git a/fstab b/fstab
new file mode 100644
index 0000000..e67e4ec
--- /dev/null
+++ b/fstab
@@ -0,0 +1,27 @@
+# /etc/fstab: static file system information.
+#
+# noatime turns off atimes for increased performance (atimes normally aren't 
+# needed; notail increases performance of ReiserFS (at the expense of storage 
+# efficiency).  It's safe to drop the noatime options if you want and to 
+# switch between notail / tail freely.
+#
+# The root filesystem should have a pass number of either 0 or 1.
+# All other filesystems should have a pass number of 0 or greater than 1.
+#
+# See the manpage fstab(5) for more information.
+#
+
+# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>
+
+# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
+/dev/sda1		/boot		ext2		noauto,noatime	1 2
+/dev/sda3		/		ext3		noatime		0 1
+/dev/sda2		none		swap		sw		0 0
+/dev/cdrom		/mnt/cdrom	auto		noauto,ro	0 0
+#/dev/fd0		/mnt/floppy	auto		noauto		0 0
+
+# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
+# POSIX shared memory (shm_open, shm_unlink).
+# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
+#  use almost no memory if not populated with files)
+shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-05 23:32 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-05 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     c9ff63e4a36d2eb2e2ed783787d2e572cfcdaa68
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sat Jun  4 17:43:54 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sat Jun  4 17:43:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=c9ff63e4

Fixed mounting! We're now booting to a login prompt

---
 create_image.sh |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 61ab9e7..69cc84e 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -3,9 +3,10 @@
 IMAGE_BASENAME="${1}"
 IMAGE_NAME="${IMAGE_BASENAME}.image"
 IMAGE_OUT="${IMAGE_BASENAME}.vdi"
+IMAGE_MEGABYTES="${2}"
 BOOT_MEGABYTES=64
 SWAP_MEGABYTES=128
-IMAGE_MEGABYTES="${2}"
+ROOT_MEGABYTES=$(( ${IMAGE_MEGABYTES} - ( ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} + 1 ) ))
 IMAGE_BYTES=$(( ${IMAGE_MEGABYTES} * 1024 * 1024 ))
 TIMEZONE="Europe/London"
 HOSTNAME="gentoo"
@@ -46,7 +47,7 @@ losetup ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
 sfdisk ${LOOP_DEV_IMAGE} -H64 -S32 &>> ${LOG_FILE} << EOF
 1,${BOOT_MEGABYTES},83,*
 $(( 1+ ${BOOT_MEGABYTES} )),${SWAP_MEGABYTES},82,-
-$(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),,83,-
+$(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),${ROOT_MEGABYTES},83,-
 EOF
 sleep 2
 losetup -d ${LOOP_DEV_IMAGE}
@@ -55,19 +56,19 @@ losetup -d ${LOOP_DEV_IMAGE}
 echo "Creating filesystems"
 
 LOOP_DEV_BOOT=`losetup -f`
-losetup -o $(( 512 * 2048 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
+losetup -o $(( 512 * 2048 )) --sizelimit $(( ${BOOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
 mkfs -t ext2 ${LOOP_DEV_BOOT} &>> ${LOG_FILE}
 sleep 2
 losetup -d ${LOOP_DEV_BOOT}
 
 LOOP_DEV_ROOT=`losetup -f`
-losetup -o $(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${ROOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
 mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE}
-#sleep 2
-#losetup -d ${LOOP_DEV_ROOT}
+sleep 2
+losetup -d ${LOOP_DEV_ROOT}
 
 LOOP_DEV_SWAP=`losetup -f`
-losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${SWAP_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
 mkswap ${LOOP_DEV_SWAP} &>> ${LOG_FILE}
 sleep 2 
 losetup -d ${LOOP_DEV_SWAP}



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-05 23:32 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-05 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     4d2593cdefcdc24edd46d2e28a8dd4d38769501d
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sat Jun  4 17:01:12 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sat Jun  4 17:01:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=4d2593cd

Fixed offset but now mounting fails

---
 create_image.sh |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index e403df9..61ab9e7 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -4,7 +4,7 @@ IMAGE_BASENAME="${1}"
 IMAGE_NAME="${IMAGE_BASENAME}.image"
 IMAGE_OUT="${IMAGE_BASENAME}.vdi"
 BOOT_MEGABYTES=64
-SWAP_MEGABYTES=512
+SWAP_MEGABYTES=128
 IMAGE_MEGABYTES="${2}"
 IMAGE_BYTES=$(( ${IMAGE_MEGABYTES} * 1024 * 1024 ))
 TIMEZONE="Europe/London"
@@ -33,7 +33,7 @@ umount -d rootfs/dev &>> ${LOG_FILE}
 umount -d rootfs/proc &>> ${LOG_FILE}
 umount -d rootfs/boot &>> ${LOG_FILE}
 umount -d rootfs &>> ${LOG_FILE}
-#losetup -d ${LOOP_DEV_ROOT}
+losetup -d ${LOOP_DEV_ROOT}
 }
 cleanup_mounts
 
@@ -43,10 +43,10 @@ echo -e "\x55\xaa" | dd bs=1 count=2 seek=510 of=${IMAGE_NAME} conv=notrunc &>>
 LOOP_DEV_IMAGE=`losetup -f`
 losetup ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
 
-sfdisk ${LOOP_DEV_IMAGE} -uM &>> ${LOG_FILE} << EOF
+sfdisk ${LOOP_DEV_IMAGE} -H64 -S32 &>> ${LOG_FILE} << EOF
 1,${BOOT_MEGABYTES},83,*
-,${SWAP_MEGABYTES},82,-
-,,83,-
+$(( 1+ ${BOOT_MEGABYTES} )),${SWAP_MEGABYTES},82,-
+$(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),,83,-
 EOF
 sleep 2
 losetup -d ${LOOP_DEV_IMAGE}
@@ -55,19 +55,19 @@ losetup -d ${LOOP_DEV_IMAGE}
 echo "Creating filesystems"
 
 LOOP_DEV_BOOT=`losetup -f`
-losetup -o 512 ${LOOP_DEV_BOOT} ${IMAGE_NAME}
+losetup -o $(( 512 * 2048 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
 mkfs -t ext2 ${LOOP_DEV_BOOT} &>> ${LOG_FILE}
 sleep 2
 losetup -d ${LOOP_DEV_BOOT}
 
 LOOP_DEV_ROOT=`losetup -f`
-losetup -o $(( 512  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
 mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE}
 #sleep 2
 #losetup -d ${LOOP_DEV_ROOT}
 
 LOOP_DEV_SWAP=`losetup -f`
-losetup -o $(( 512 + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
 mkswap ${LOOP_DEV_SWAP} &>> ${LOG_FILE}
 sleep 2 
 losetup -d ${LOOP_DEV_SWAP}
@@ -76,10 +76,10 @@ echo "Mounting fileystems"
 
 echo "Mount root"
 mkdir -p rootfs
-mount -o loop,offset=$(( 512  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
+mount -o loop,offset=$(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
 echo "Mount boot"
 mkdir -p rootfs/boot
-mount -o loop,offset=512 ${IMAGE_NAME} rootfs/boot
+mount -o loop,offset=$(( 512 * 2048 )) ${IMAGE_NAME} rootfs/boot
 cd rootfs
 
 # Setup Gentoo



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-05 23:32 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-05 23:32 UTC (permalink / raw
  To: gentoo-commits

commit:     d1aadbeda8cd4edd4eb79c5236af655ae3487c6b
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sat Jun  4 18:51:21 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sat Jun  4 18:51:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=d1aadbed

Reenable hostname setting

---
 create_image.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 69cc84e..4f1d302 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -127,7 +127,7 @@ linux32 chroot . cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime &>> ${LOG_FIL
 
 echo "Setting hostname to ${HOSTNAME}"
 linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
-#linux32 chroot . hostname ${HOSTNAME} &>> ${LOG_FILE}
+linux32 chroot . bin/hostname ${HOSTNAME} &>> ${LOG_FILE}
 
 echo "Copying new fstab"
 cp ../fstab etc/fstab &>> ${LOG_FILE}



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-08  0:06 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-08  0:06 UTC (permalink / raw
  To: gentoo-commits

commit:     628fe2949f3e9683feb2086249af43cb55513379
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Wed Jun  8 00:06:07 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Wed Jun  8 00:06:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=628fe294

Started testing GNOME, dies with Perl errors at the moment though

---
 create_image.sh |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 4f1d302..b12ac78 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -112,7 +112,8 @@ echo 'PKGDIR="/usr/portage/packages"' >> etc/make.conf
 echo 'FEATURES="parallel-fetch userfetch userpriv getbinpkg"' >> etc/make.conf
 mkdir -p usr/portage/packages
 
-#echo "Setting up make.conf"
+echo "Setting up make.conf"
+echo 'USE="-qt4 -kde X dbus gtk gnome hal gdu extras device-mapper policykit static-libs"' >> etc/make.conf
 #echo 'INPUT_DEVICES="virtualbox evdev"' >> etc/make.conf
 #echo 'VIDEO_CARDS="virtualbox"' >> etc/make.conf
 
@@ -151,11 +152,12 @@ linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LO
 echo "Installing dhcpcd"
 linux32 chroot . emerge dhcpcd &>> ${LOG_FILE}
 
-#echo "Installing XML-Parser - BUG"
-#linux32 chroot . emerge dev-perl/XML-Parser &>> ${LOG_FILE}
+echo "Installing Perl"
+linux32 chroot . emerge perl &>> ${LOG_FILE}
+linux32 chroot . perl-cleaner --all &>> ${LOG_FILE}
 
-#echo "Installing GNOME"
-#linux32 chroot . emerge gnome &>> ${LOG_FILE}
+echo "Installing GNOME"
+linux32 chroot . emerge gnome &>> ${LOG_FILE}
 
 echo "Adding default user"
 linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME}



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-14 20:44 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-14 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     841df9efa3b2dc065a269ce943f87a8f4de83000
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Tue Jun 14 20:44:05 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Tue Jun 14 20:44:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=841df9ef

Fixed Stage3 and Portage download

---
 create_image.sh |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index b12ac78..e1e24c3 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -15,6 +15,9 @@ DEFAULT_USERNAME="gentoo"
 DEFAULT_PASSWORD="g3nt00"
 LOG_FILE="`pwd`/log.txt"
 
+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"
+
 echo "Starting log at ${LOG_FILE}..."
 echo "" > ${LOG_FILE}
 
@@ -86,19 +89,19 @@ cd rootfs
 # Setup Gentoo
 
 echo "Downloading Stage 3"
-#wget http://gentoo.virginmedia.com/releases/x86/current-stage3/stage3-i686-20110315.tar.bz2 -O stage3.tar.bz2 &>> ${LOG_FILE}
+wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE}
 
 echo "Extracting Stage 3"
 tar jxf ../stage3.tar.bz2 &>> ${LOG_FILE}
-#rm stage3.tar.bz2
+rm stage3.tar.bz2
 
 echo "Downloading Portage snapshot"
 cd usr
-#wget http://gentoo.virginmedia.com/snapshots/portage-latest.tar.bz2 &>> ${LOG_FILE}
+wget ${PORTAGE_URL} -o ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
 
 echo "Extracting Portage snapshot"
 tar jxf ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
-#rm portage-latest.tar.bz2
+rm portage-latest.tar.bz2
 
 echo "Setting up chroot"
 cd ..
@@ -152,12 +155,12 @@ linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LO
 echo "Installing dhcpcd"
 linux32 chroot . emerge dhcpcd &>> ${LOG_FILE}
 
-echo "Installing Perl"
-linux32 chroot . emerge perl &>> ${LOG_FILE}
-linux32 chroot . perl-cleaner --all &>> ${LOG_FILE}
+#echo "Installing Perl"
+#linux32 chroot . emerge perl &>> ${LOG_FILE}
+#linux32 chroot . perl-cleaner --all &>> ${LOG_FILE}
 
-echo "Installing GNOME"
-linux32 chroot . emerge gnome &>> ${LOG_FILE}
+#echo "Installing GNOME"
+#linux32 chroot . emerge gnome &>> ${LOG_FILE}
 
 echo "Adding default user"
 linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME}



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-14 21:03 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-14 21:03 UTC (permalink / raw
  To: gentoo-commits

commit:     840844d190b8f6d26e637c9ca08329bd100da779
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Tue Jun 14 21:03:23 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Tue Jun 14 21:03:23 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=840844d1

Fixed typo in the wget for Portage

---
 create_image.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index e1e24c3..64289f9 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -1,5 +1,6 @@
 #!/bin/bash
 
+echo $0
 IMAGE_BASENAME="${1}"
 IMAGE_NAME="${IMAGE_BASENAME}.image"
 IMAGE_OUT="${IMAGE_BASENAME}.vdi"
@@ -92,15 +93,15 @@ echo "Downloading Stage 3"
 wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE}
 
 echo "Extracting Stage 3"
-tar jxf ../stage3.tar.bz2 &>> ${LOG_FILE}
+tar jvxf ../stage3.tar.bz2 &>> ${LOG_FILE}
 rm stage3.tar.bz2
 
 echo "Downloading Portage snapshot"
 cd usr
-wget ${PORTAGE_URL} -o ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
+wget ${PORTAGE_URL} -O ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
 
 echo "Extracting Portage snapshot"
-tar jxf ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
+tar jvxf ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
 rm portage-latest.tar.bz2
 
 echo "Setting up chroot"



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-14 21:28 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-14 21:28 UTC (permalink / raw
  To: gentoo-commits

commit:     484185b7c2d0d05ea507d99db74374581ce74118
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Tue Jun 14 21:28:01 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Tue Jun 14 21:28:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=484185b7

Conditionals for download and updated kernel config

---
 create_image.sh |   21 ++++---
 kernelconfig    |  187 ++++++++++++++++++++++++++++++++++++++++---------------
 2 files changed, 149 insertions(+), 59 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 64289f9..d3025db 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -14,6 +14,7 @@ HOSTNAME="gentoo"
 ROOT_PASSWORD="g3nt00"
 DEFAULT_USERNAME="gentoo"
 DEFAULT_PASSWORD="g3nt00"
+USE_FLAGS="-qt4 -kde X dbus gtk gnome hal gdu extras device-mapper policykit static-libs"
 LOG_FILE="`pwd`/log.txt"
 
 STAGE3_URL="http://distfiles.gentoo.org/releases/x86/current-stage3/stage3-i486-20110607.tar.bz2"
@@ -89,20 +90,24 @@ cd rootfs
 
 # Setup Gentoo
 
-echo "Downloading Stage 3"
-wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE}
+if [ ! -f ../stage3.tar.bz2 ];
+then
+	echo "Downloading Stage 3"
+	wget ${STAGE3_URL} -O ../stage3.tar.bz2 &>> ${LOG_FILE}
+fi
 
 echo "Extracting Stage 3"
 tar jvxf ../stage3.tar.bz2 &>> ${LOG_FILE}
-rm stage3.tar.bz2
 
-echo "Downloading Portage snapshot"
-cd usr
-wget ${PORTAGE_URL} -O ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
+if [ ! -f ../portage-latest.tar.bz2 ];
+then
+	echo "Downloading Portage snapshot"
+	wget ${PORTAGE_URL} -O ../portage-latest.tar.bz2 &>> ${LOG_FILE}
+fi
 
 echo "Extracting Portage snapshot"
+cd usr
 tar jvxf ../../portage-latest.tar.bz2 &>> ${LOG_FILE}
-rm portage-latest.tar.bz2
 
 echo "Setting up chroot"
 cd ..
@@ -117,7 +122,7 @@ echo 'FEATURES="parallel-fetch userfetch userpriv getbinpkg"' >> etc/make.conf
 mkdir -p usr/portage/packages
 
 echo "Setting up make.conf"
-echo 'USE="-qt4 -kde X dbus gtk gnome hal gdu extras device-mapper policykit static-libs"' >> etc/make.conf
+echo 'USE="${USE_FLAGS}"' >> etc/make.conf
 #echo 'INPUT_DEVICES="virtualbox evdev"' >> etc/make.conf
 #echo 'VIDEO_CARDS="virtualbox"' >> etc/make.conf
 

diff --git a/kernelconfig b/kernelconfig
index 5573ed4..65e1fdf 100644
--- a/kernelconfig
+++ b/kernelconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.36-gentoo-r5
-# Sat Mar 19 00:31:56 2011
+# Linux/i386 2.6.38-gentoo-r6 Kernel Configuration
+# Tue Jun 14 22:24:43 2011
 #
 # CONFIG_64BIT is not set
 CONFIG_X86_32=y
@@ -44,15 +44,13 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y
 # CONFIG_AUDIT_ARCH is not set
 CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
-CONFIG_HAVE_EARLY_RES=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
-CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_X86_32_LAZY_GS=y
 CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
 CONFIG_KTIME_SCALAR=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 CONFIG_CONSTRUCTORS=y
+CONFIG_HAVE_IRQ_WORK=y
+CONFIG_IRQ_WORK=y
 
 #
 # General setup
@@ -66,10 +64,12 @@ CONFIG_LOCALVERSION=""
 CONFIG_HAVE_KERNEL_GZIP=y
 CONFIG_HAVE_KERNEL_BZIP2=y
 CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_XZ=y
 CONFIG_HAVE_KERNEL_LZO=y
 CONFIG_KERNEL_GZIP=y
 # CONFIG_KERNEL_BZIP2 is not set
 # CONFIG_KERNEL_LZMA is not set
+# CONFIG_KERNEL_XZ is not set
 # CONFIG_KERNEL_LZO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
@@ -86,15 +86,27 @@ CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_AUDIT_WATCH=y
 CONFIG_AUDIT_TREE=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+
+#
+# IRQ subsystem
+#
+CONFIG_GENERIC_HARDIRQS=y
+# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set
+CONFIG_HAVE_SPARSE_IRQ=y
+CONFIG_GENERIC_IRQ_PROBE=y
+# CONFIG_GENERIC_PENDING_IRQ is not set
+# CONFIG_AUTO_IRQ_AFFINITY is not set
+# CONFIG_IRQ_PER_CPU is not set
+# CONFIG_HARDIRQS_SW_RESEND is not set
+# CONFIG_SPARSE_IRQ is not set
 
 #
 # RCU Subsystem
 #
-CONFIG_TREE_RCU=y
-# CONFIG_TINY_RCU is not set
+CONFIG_TINY_RCU=y
+# CONFIG_PREEMPT_RCU is not set
 # CONFIG_RCU_TRACE is not set
-CONFIG_RCU_FANOUT=32
-# CONFIG_RCU_FANOUT_EXACT is not set
 # CONFIG_TREE_RCU_TRACE is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=18
@@ -113,23 +125,26 @@ CONFIG_CGROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
 # CONFIG_RT_GROUP_SCHED is not set
 # CONFIG_BLK_CGROUP is not set
-# CONFIG_SYSFS_DEPRECATED_V2 is not set
-CONFIG_RELAY=y
 CONFIG_NAMESPACES=y
 CONFIG_UTS_NS=y
 CONFIG_IPC_NS=y
 CONFIG_USER_NS=y
 CONFIG_PID_NS=y
 CONFIG_NET_NS=y
+# CONFIG_SCHED_AUTOGROUP is not set
+# CONFIG_SYSFS_DEPRECATED is not set
+CONFIG_RELAY=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_RD_GZIP=y
 CONFIG_RD_BZIP2=y
 CONFIG_RD_LZMA=y
+CONFIG_RD_XZ=y
 CONFIG_RD_LZO=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 CONFIG_ANON_INODES=y
+# CONFIG_EXPERT is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
@@ -168,6 +183,7 @@ CONFIG_TRACEPOINTS=y
 # CONFIG_OPROFILE is not set
 CONFIG_HAVE_OPROFILE=y
 CONFIG_KPROBES=y
+# CONFIG_JUMP_LABEL is not set
 CONFIG_OPTPROBES=y
 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
 CONFIG_KRETPROBES=y
@@ -183,6 +199,7 @@ CONFIG_HAVE_HW_BREAKPOINT=y
 CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
 CONFIG_HAVE_USER_RETURN_NOTIFIER=y
 CONFIG_HAVE_PERF_EVENTS_NMI=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
 
 #
 # GCOV-based kernel profiling
@@ -256,6 +273,7 @@ CONFIG_X86_EXTENDED_PLATFORM=y
 # CONFIG_X86_ELAN is not set
 # CONFIG_X86_RDC321X is not set
 CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
+# CONFIG_X86_32_IRIS is not set
 CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_PARAVIRT_GUEST is not set
 CONFIG_NO_BOOTMEM=y
@@ -288,6 +306,7 @@ CONFIG_X86_GENERIC=y
 CONFIG_X86_CPU=y
 CONFIG_X86_INTERNODE_CACHE_SHIFT=6
 CONFIG_X86_CMPXCHG=y
+CONFIG_CMPXCHG_LOCAL=y
 CONFIG_X86_L1_CACHE_SHIFT=6
 CONFIG_X86_XADD=y
 # CONFIG_X86_PPRO_FENCE is not set
@@ -314,6 +333,7 @@ CONFIG_DMI=y
 # CONFIG_IOMMU_HELPER is not set
 # CONFIG_IOMMU_API is not set
 CONFIG_NR_CPUS=1
+# CONFIG_IRQ_TIME_ACCOUNTING is not set
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_VOLUNTARY=y
 # CONFIG_PREEMPT is not set
@@ -337,6 +357,7 @@ CONFIG_HIGHMEM4G=y
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_HIGHMEM=y
 # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
@@ -347,6 +368,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_SPARSEMEM_STATIC=y
+CONFIG_HAVE_MEMBLOCK=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_COMPACTION is not set
@@ -358,10 +380,12 @@ CONFIG_VIRT_TO_BUS=y
 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
 # CONFIG_MEMORY_FAILURE is not set
+# CONFIG_TRANSPARENT_HUGEPAGE is not set
+CONFIG_NEED_PER_CPU_KM=y
 CONFIG_HIGHPTE=y
 CONFIG_X86_CHECK_BIOS_CORRUPTION=y
 CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
-CONFIG_X86_RESERVE_LOW_64K=y
+CONFIG_X86_RESERVE_LOW=64
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MTRR=y
 # CONFIG_MTRR_SANITIZER is not set
@@ -400,7 +424,6 @@ CONFIG_ACPI=y
 CONFIG_ACPI_PROCFS=y
 CONFIG_ACPI_PROCFS_POWER=y
 # CONFIG_ACPI_POWER_METER is not set
-CONFIG_ACPI_SYSFS_POWER=y
 # CONFIG_ACPI_EC_DEBUGFS is not set
 CONFIG_ACPI_PROC_EVENT=y
 CONFIG_ACPI_AC=y
@@ -497,7 +520,7 @@ CONFIG_ISA_DMA_API=y
 # CONFIG_SCx200 is not set
 # CONFIG_OLPC is not set
 # CONFIG_OLPC_OPENFIRMWARE is not set
-CONFIG_K8_NB=y
+CONFIG_AMD_NB=y
 CONFIG_PCCARD=y
 CONFIG_PCMCIA=y
 CONFIG_PCMCIA_LOAD_CIS=y
@@ -531,6 +554,7 @@ CONFIG_HAVE_AOUT=y
 # CONFIG_BINFMT_AOUT is not set
 CONFIG_BINFMT_MISC=y
 CONFIG_HAVE_ATOMIC_IOMAP=y
+CONFIG_HAVE_TEXT_POKE_SMP=y
 CONFIG_NET=y
 
 #
@@ -558,7 +582,7 @@ CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y
 # CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
+# CONFIG_NET_IPGRE_DEMUX is not set
 CONFIG_IP_MROUTE=y
 # CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
 CONFIG_IP_PIMSM_V1=y
@@ -679,6 +703,7 @@ CONFIG_IP_NF_MANGLE=y
 #
 # IPv6: Netfilter Configuration
 #
+CONFIG_NF_DEFRAG_IPV6=y
 CONFIG_NF_CONNTRACK_IPV6=y
 CONFIG_IP6_NF_IPTABLES=y
 CONFIG_IP6_NF_MATCH_IPV6HEADER=y
@@ -755,9 +780,11 @@ CONFIG_NET_CLS_ACT=y
 # CONFIG_NET_ACT_PEDIT is not set
 # CONFIG_NET_ACT_SIMP is not set
 # CONFIG_NET_ACT_SKBEDIT is not set
+# CONFIG_NET_ACT_CSUM is not set
 CONFIG_NET_SCH_FIFO=y
 # CONFIG_DCB is not set
 CONFIG_DNS_RESOLVER=y
+# CONFIG_BATMAN_ADV is not set
 
 #
 # Network testing
@@ -805,6 +832,7 @@ CONFIG_RFKILL_LEDS=y
 CONFIG_RFKILL_INPUT=y
 # CONFIG_NET_9P is not set
 # CONFIG_CAIF is not set
+# CONFIG_CEPH_LIB is not set
 
 #
 # Device Drivers
@@ -854,6 +882,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_RBD is not set
 CONFIG_MISC_DEVICES=y
 # CONFIG_AD525X_DPOT is not set
 # CONFIG_IBM_ASM is not set
@@ -864,13 +893,18 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_ENCLOSURE_SERVICES is not set
 # CONFIG_CS5535_MFGPT is not set
 # CONFIG_HP_ILO is not set
+# CONFIG_APDS9802ALS is not set
 # CONFIG_ISL29003 is not set
+# CONFIG_ISL29020 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_SENSORS_BH1780 is not set
+# CONFIG_SENSORS_BH1770 is not set
+# CONFIG_SENSORS_APDS990X is not set
 # CONFIG_HMC6352 is not set
 # CONFIG_DS1682 is not set
 # CONFIG_VMWARE_BALLOON is not set
 # CONFIG_BMP085 is not set
+# CONFIG_PCH_PHUB is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -881,6 +915,11 @@ CONFIG_MISC_DEVICES=y
 # CONFIG_EEPROM_MAX6875 is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_CB710_CORE is not set
+
+#
+# Texas Instruments shared transport line discipline
+#
+# CONFIG_TI_ST is not set
 CONFIG_HAVE_IDE=y
 # CONFIG_IDE is not set
 
@@ -936,6 +975,7 @@ CONFIG_SATA_PMP=y
 CONFIG_SATA_AHCI=y
 # CONFIG_SATA_AHCI_PLATFORM is not set
 # CONFIG_SATA_INIC162X is not set
+# CONFIG_SATA_ACARD_AHCI is not set
 # CONFIG_SATA_SIL24 is not set
 CONFIG_ATA_SFF=y
 
@@ -1034,26 +1074,19 @@ CONFIG_BLK_DEV_DM=y
 # CONFIG_DM_CRYPT is not set
 # CONFIG_DM_SNAPSHOT is not set
 CONFIG_DM_MIRROR=y
+# CONFIG_DM_RAID is not set
 # CONFIG_DM_LOG_USERSPACE is not set
 CONFIG_DM_ZERO=y
 # CONFIG_DM_MULTIPATH is not set
 # CONFIG_DM_DELAY is not set
 # CONFIG_DM_UEVENT is not set
+# CONFIG_TARGET_CORE is not set
 # CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-
-#
-# You can enable one or both FireWire driver stacks.
-#
-
-#
-# The newer stack is recommended.
-#
 # CONFIG_FIREWIRE is not set
-# CONFIG_IEEE1394 is not set
 # CONFIG_FIREWIRE_NOSY is not set
 # CONFIG_I2O is not set
 CONFIG_MACINTOSH_DRIVERS=y
@@ -1068,6 +1101,7 @@ CONFIG_NETDEVICES=y
 # CONFIG_VETH is not set
 # CONFIG_NET_SB1000 is not set
 # CONFIG_ARCNET is not set
+CONFIG_MII=y
 CONFIG_PHYLIB=y
 
 #
@@ -1081,6 +1115,7 @@ CONFIG_PHYLIB=y
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_SMSC_PHY is not set
 # CONFIG_BROADCOM_PHY is not set
+# CONFIG_BCM63XX_PHY is not set
 # CONFIG_ICPLUS_PHY is not set
 # CONFIG_REALTEK_PHY is not set
 # CONFIG_NATIONAL_PHY is not set
@@ -1090,7 +1125,6 @@ CONFIG_PHYLIB=y
 # CONFIG_FIXED_PHY is not set
 # CONFIG_MDIO_BITBANG is not set
 CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
@@ -1167,6 +1201,8 @@ CONFIG_BNX2=y
 # CONFIG_ATL1E is not set
 # CONFIG_ATL1C is not set
 # CONFIG_JME is not set
+# CONFIG_STMMAC_ETH is not set
+# CONFIG_PCH_GBE is not set
 # CONFIG_NETDEV_10000 is not set
 CONFIG_TR=y
 # CONFIG_IBMOL is not set
@@ -1200,7 +1236,9 @@ CONFIG_WLAN=y
 # CONFIG_HERMES is not set
 # CONFIG_P54_COMMON is not set
 # CONFIG_RT2X00 is not set
-# CONFIG_WL12XX is not set
+# CONFIG_RTL8192CE is not set
+# CONFIG_WL1251 is not set
+# CONFIG_WL12XX_MENU is not set
 # CONFIG_ZD1211RW is not set
 
 #
@@ -1240,7 +1278,6 @@ CONFIG_FDDI=y
 # CONFIG_SLIP is not set
 # CONFIG_NET_FC is not set
 CONFIG_NETCONSOLE=y
-# CONFIG_NETCONSOLE_DYNAMIC is not set
 CONFIG_NETPOLL=y
 # CONFIG_NETPOLL_TRAP is not set
 CONFIG_NET_POLL_CONTROLLER=y
@@ -1319,16 +1356,19 @@ CONFIG_INPUT_JOYSTICK=y
 # CONFIG_JOYSTICK_STINGER is not set
 # CONFIG_JOYSTICK_TWIDJOY is not set
 # CONFIG_JOYSTICK_ZHENHUA is not set
+# CONFIG_JOYSTICK_AS5011 is not set
 # CONFIG_JOYSTICK_JOYDUMP is not set
 # CONFIG_JOYSTICK_XPAD is not set
 CONFIG_INPUT_TABLET=y
 # CONFIG_TABLET_USB_ACECAD is not set
 # CONFIG_TABLET_USB_AIPTEK is not set
 # CONFIG_TABLET_USB_GTCO is not set
+# CONFIG_TABLET_USB_HANWANG is not set
 # CONFIG_TABLET_USB_KBTAB is not set
 # CONFIG_TABLET_USB_WACOM is not set
 CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_AD7879 is not set
+# CONFIG_TOUCHSCREEN_BU21013 is not set
 # CONFIG_TOUCHSCREEN_DYNAPRO is not set
 # CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
 # CONFIG_TOUCHSCREEN_EETI is not set
@@ -1348,6 +1388,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
 # CONFIG_TOUCHSCREEN_TSC2007 is not set
+# CONFIG_TOUCHSCREEN_ST1232 is not set
 # CONFIG_TOUCHSCREEN_TPS6507X is not set
 CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_AD714X is not set
@@ -1362,9 +1403,9 @@ CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_YEALINK is not set
 # CONFIG_INPUT_CM109 is not set
 # CONFIG_INPUT_UINPUT is not set
-# CONFIG_INPUT_WINBOND_CIR is not set
 # CONFIG_INPUT_PCF8574 is not set
 # CONFIG_INPUT_ADXL34X is not set
+# CONFIG_INPUT_CMA3000 is not set
 
 #
 # Hardware I/O ports
@@ -1377,6 +1418,7 @@ CONFIG_SERIO_SERPORT=y
 CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 # CONFIG_SERIO_ALTERA_PS2 is not set
+# CONFIG_SERIO_PS2MULT is not set
 # CONFIG_GAMEPORT is not set
 
 #
@@ -1433,6 +1475,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_TIMBERDALE is not set
 # CONFIG_SERIAL_ALTERA_JTAGUART is not set
 # CONFIG_SERIAL_ALTERA_UART is not set
+# CONFIG_SERIAL_PCH_UART is not set
 CONFIG_UNIX98_PTYS=y
 # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -1458,7 +1501,6 @@ CONFIG_NVRAM=y
 # CONFIG_MWAVE is not set
 # CONFIG_PC8736x_GPIO is not set
 # CONFIG_NSC_GPIO is not set
-# CONFIG_CS5535_GPIO is not set
 # CONFIG_RAW_DRIVER is not set
 CONFIG_HPET=y
 # CONFIG_HPET_MMAP is not set
@@ -1505,10 +1547,12 @@ CONFIG_I2C_I801=y
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
+# CONFIG_I2C_INTEL_MID is not set
 # CONFIG_I2C_OCORES is not set
 # CONFIG_I2C_PCA_PLATFORM is not set
 # CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_XILINX is not set
+# CONFIG_I2C_EG20T is not set
 
 #
 # External I2C/SMBus adapter drivers
@@ -1531,6 +1575,10 @@ CONFIG_I2C_I801=y
 # PPS support
 #
 # CONFIG_PPS is not set
+
+#
+# PPS generators support
+#
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 # CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
@@ -1538,10 +1586,11 @@ CONFIG_POWER_SUPPLY=y
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 # CONFIG_PDA_POWER is not set
 # CONFIG_TEST_POWER is not set
-# CONFIG_BATTERY_DS2760 is not set
 # CONFIG_BATTERY_DS2782 is not set
+# CONFIG_BATTERY_BQ20Z75 is not set
 # CONFIG_BATTERY_BQ27x00 is not set
 # CONFIG_BATTERY_MAX17040 is not set
+# CONFIG_BATTERY_MAX17042 is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
@@ -1568,6 +1617,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_K10TEMP is not set
 # CONFIG_SENSORS_ASB100 is not set
 # CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS620 is not set
 # CONFIG_SENSORS_DS1621 is not set
 # CONFIG_SENSORS_I5K_AMB is not set
 # CONFIG_SENSORS_F71805F is not set
@@ -1595,12 +1645,14 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_LM93 is not set
 # CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LTC4261 is not set
 # CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
 # CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_SHT21 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMM665 is not set
 # CONFIG_SENSORS_DME1737 is not set
@@ -1623,11 +1675,11 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_W83791D is not set
 # CONFIG_SENSORS_W83792D is not set
 # CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83795 is not set
 # CONFIG_SENSORS_W83L785TS is not set
 # CONFIG_SENSORS_W83L786NG is not set
 # CONFIG_SENSORS_W83627HF is not set
 # CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
 # CONFIG_SENSORS_LIS3_I2C is not set
 # CONFIG_SENSORS_APPLESMC is not set
 
@@ -1650,6 +1702,7 @@ CONFIG_WATCHDOG=y
 # CONFIG_ALIM1535_WDT is not set
 # CONFIG_ALIM7101_WDT is not set
 # CONFIG_F71808E_WDT is not set
+# CONFIG_SP5100_TCO is not set
 # CONFIG_SC520_WDT is not set
 # CONFIG_SBC_FITPC2_WATCHDOG is not set
 # CONFIG_EUROTECH_WDT is not set
@@ -1663,6 +1716,7 @@ CONFIG_WATCHDOG=y
 # CONFIG_HP_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_PC87413_WDT is not set
+# CONFIG_NV_TCO is not set
 # CONFIG_60XX_WDT is not set
 # CONFIG_SBC8360_WDT is not set
 # CONFIG_SBC7240_WDT is not set
@@ -1701,21 +1755,24 @@ CONFIG_MFD_SUPPORT=y
 # CONFIG_TPS6507X is not set
 # CONFIG_TWL4030_CORE is not set
 # CONFIG_MFD_STMPE is not set
-# CONFIG_MFD_TC35892 is not set
+# CONFIG_MFD_TC3589X is not set
 # CONFIG_MFD_TMIO is not set
 # CONFIG_PMIC_DA903X is not set
 # CONFIG_PMIC_ADP5520 is not set
 # CONFIG_MFD_MAX8925 is not set
 # CONFIG_MFD_MAX8998 is not set
 # CONFIG_MFD_WM8400 is not set
-# CONFIG_MFD_WM831X is not set
+# CONFIG_MFD_WM831X_I2C is not set
 # CONFIG_MFD_WM8350_I2C is not set
 # CONFIG_MFD_WM8994 is not set
 # CONFIG_MFD_PCF50633 is not set
 # CONFIG_ABX500_CORE is not set
+# CONFIG_MFD_CS5535 is not set
 # CONFIG_LPC_SCH is not set
 # CONFIG_MFD_RDC321X is not set
 # CONFIG_MFD_JANZ_CMODIO is not set
+# CONFIG_MFD_VX855 is not set
+# CONFIG_MFD_WL1273_CORE is not set
 # CONFIG_REGULATOR is not set
 # CONFIG_MEDIA_SUPPORT is not set
 
@@ -1745,6 +1802,7 @@ CONFIG_DRM=y
 # CONFIG_DRM_SIS is not set
 # CONFIG_DRM_VIA is not set
 # CONFIG_DRM_SAVAGE is not set
+# CONFIG_STUB_POULSBO is not set
 # CONFIG_VGASTATE is not set
 # CONFIG_VIDEO_OUTPUT_CONTROL is not set
 # CONFIG_FB is not set
@@ -1798,6 +1856,7 @@ CONFIG_SND_DMA_SGBUF=y
 CONFIG_SND_AC97_CODEC=m
 CONFIG_SND_DRIVERS=y
 # CONFIG_SND_DUMMY is not set
+# CONFIG_SND_ALOOP is not set
 # CONFIG_SND_VIRMIDI is not set
 # CONFIG_SND_MTPAV is not set
 # CONFIG_SND_SERIAL_U16550 is not set
@@ -1856,10 +1915,7 @@ CONFIG_SND_HDA_CODEC_REALTEK=y
 CONFIG_SND_HDA_CODEC_ANALOG=y
 CONFIG_SND_HDA_CODEC_SIGMATEL=y
 CONFIG_SND_HDA_CODEC_VIA=y
-CONFIG_SND_HDA_CODEC_ATIHDMI=y
-CONFIG_SND_HDA_CODEC_NVHDMI=y
-CONFIG_SND_HDA_CODEC_INTELHDMI=y
-CONFIG_SND_HDA_ELD=y
+CONFIG_SND_HDA_CODEC_HDMI=y
 CONFIG_SND_HDA_CODEC_CIRRUS=y
 CONFIG_SND_HDA_CODEC_CONEXANT=y
 CONFIG_SND_HDA_CODEC_CA0110=y
@@ -1869,7 +1925,6 @@ CONFIG_SND_HDA_GENERIC=y
 # CONFIG_SND_HDA_POWER_SAVE is not set
 # CONFIG_SND_HDSP is not set
 # CONFIG_SND_HDSPM is not set
-# CONFIG_SND_HIFIER is not set
 # CONFIG_SND_ICE1712 is not set
 # CONFIG_SND_ICE1724 is not set
 CONFIG_SND_INTEL8X0=m
@@ -1920,7 +1975,7 @@ CONFIG_USB_HIDDEV=y
 #
 # CONFIG_HID_3M_PCT is not set
 CONFIG_HID_A4TECH=y
-# CONFIG_HID_ACRUX_FF is not set
+# CONFIG_HID_ACRUX is not set
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
 # CONFIG_HID_CANDO is not set
@@ -1929,9 +1984,12 @@ CONFIG_HID_CHICONY=y
 # CONFIG_HID_PRODIKEYS is not set
 CONFIG_HID_CYPRESS=y
 # CONFIG_HID_DRAGONRISE is not set
+# CONFIG_HID_EMS_FF is not set
 # CONFIG_HID_EGALAX is not set
 CONFIG_HID_EZKEY=y
 CONFIG_HID_KYE=y
+# CONFIG_HID_UCLOGIC is not set
+# CONFIG_HID_WALTOP is not set
 CONFIG_HID_GYRATION=y
 # CONFIG_HID_TWINHAN is not set
 CONFIG_HID_KENSINGTON=y
@@ -1939,9 +1997,11 @@ CONFIG_HID_LOGITECH=y
 CONFIG_LOGITECH_FF=y
 # CONFIG_LOGIRUMBLEPAD2_FF is not set
 # CONFIG_LOGIG940_FF is not set
+# CONFIG_LOGIWII_FF is not set
 CONFIG_HID_MICROSOFT=y
 # CONFIG_HID_MOSART is not set
 CONFIG_HID_MONTEREY=y
+# CONFIG_HID_MULTITOUCH is not set
 CONFIG_HID_NTRIG=y
 # CONFIG_HID_ORTEK is not set
 CONFIG_HID_PANTHERLORD=y
@@ -1951,6 +2011,8 @@ CONFIG_HID_PETALYNX=y
 # CONFIG_HID_QUANTA is not set
 # CONFIG_HID_ROCCAT is not set
 # CONFIG_HID_ROCCAT_KONE is not set
+# CONFIG_HID_ROCCAT_KONEPLUS is not set
+# CONFIG_HID_ROCCAT_PYRA is not set
 CONFIG_HID_SAMSUNG=y
 CONFIG_HID_SONY=y
 # CONFIG_HID_STANTUM is not set
@@ -2029,6 +2091,7 @@ CONFIG_USB_STORAGE=y
 # CONFIG_USB_STORAGE_ONETOUCH is not set
 # CONFIG_USB_STORAGE_KARMA is not set
 # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_UAS is not set
 CONFIG_USB_LIBUSUAL=y
 
 #
@@ -2064,6 +2127,7 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
 # CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_YUREX is not set
 # CONFIG_USB_GADGET is not set
 
 #
@@ -2082,6 +2146,8 @@ CONFIG_LEDS_CLASS=y
 # CONFIG_LEDS_ALIX2 is not set
 # CONFIG_LEDS_PCA9532 is not set
 # CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_LP5523 is not set
 # CONFIG_LEDS_CLEVO_MAIL is not set
 # CONFIG_LEDS_PCA955X is not set
 # CONFIG_LEDS_BD2802 is not set
@@ -2099,6 +2165,7 @@ CONFIG_LEDS_TRIGGERS=y
 #
 # iptables trigger is under Netfilter config (LED target)
 #
+# CONFIG_NFC_DEVICES is not set
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 CONFIG_EDAC=y
@@ -2108,6 +2175,7 @@ CONFIG_EDAC=y
 #
 # CONFIG_EDAC_DEBUG is not set
 CONFIG_EDAC_DECODE_MCE=y
+# CONFIG_EDAC_MCE_INJ is not set
 # CONFIG_EDAC_MM_EDAC is not set
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
@@ -2182,16 +2250,15 @@ CONFIG_DMADEVICES=y
 # CONFIG_UIO is not set
 # CONFIG_STAGING is not set
 CONFIG_X86_PLATFORM_DEVICES=y
-# CONFIG_ACER_WMI is not set
 # CONFIG_ASUS_LAPTOP is not set
 # CONFIG_FUJITSU_LAPTOP is not set
-# CONFIG_TC1100_WMI is not set
 # CONFIG_MSI_LAPTOP is not set
 # CONFIG_PANASONIC_LAPTOP is not set
 # CONFIG_COMPAL_LAPTOP is not set
 # CONFIG_SONY_LAPTOP is not set
-# CONFIG_IDEAPAD_ACPI is not set
+# CONFIG_IDEAPAD_LAPTOP is not set
 # CONFIG_THINKPAD_ACPI is not set
+# CONFIG_SENSORS_HDAPS is not set
 # CONFIG_INTEL_MENLOW is not set
 CONFIG_EEEPC_LAPTOP=y
 # CONFIG_ACPI_WMI is not set
@@ -2201,6 +2268,7 @@ CONFIG_EEEPC_LAPTOP=y
 # CONFIG_TOSHIBA_BT_RFKILL is not set
 # CONFIG_ACPI_CMPC is not set
 # CONFIG_INTEL_IPS is not set
+# CONFIG_IBM_RTL is not set
 
 #
 # Firmware Drivers
@@ -2228,16 +2296,16 @@ CONFIG_JBD=y
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
-# CONFIG_OCFS2_FS is not set
 # CONFIG_BTRFS_FS is not set
 # CONFIG_NILFS2_FS is not set
+CONFIG_FS_POSIX_ACL=y
 CONFIG_FILE_LOCKING=y
 CONFIG_FSNOTIFY=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY_USER=y
+# CONFIG_FANOTIFY is not set
 CONFIG_QUOTA=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
 # CONFIG_PRINT_QUOTA_WARNING is not set
@@ -2246,7 +2314,6 @@ CONFIG_QUOTA_TREE=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
 CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
 CONFIG_AUTOFS4_FS=y
 # CONFIG_FUSE_FS is not set
 CONFIG_GENERIC_ACL=y
@@ -2317,6 +2384,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 CONFIG_NFS_USE_KERNEL_DNS=y
+# CONFIG_NFS_USE_NEW_IDMAPPER is not set
 # CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
@@ -2325,8 +2393,6 @@ CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
 CONFIG_RPCSEC_GSS_KRB5=y
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
 # CONFIG_CEPH_FS is not set
 # CONFIG_CIFS is not set
 # CONFIG_NCP_FS is not set
@@ -2394,7 +2460,6 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=y
-# CONFIG_DLM is not set
 
 #
 # Kernel hacking
@@ -2425,8 +2490,10 @@ CONFIG_TIMER_STATS=y
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_MUTEXES is not set
+CONFIG_BKL=y
 # CONFIG_DEBUG_LOCK_ALLOC is not set
 # CONFIG_PROVE_LOCKING is not set
+# CONFIG_SPARSE_RCU_POINTER is not set
 # CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
@@ -2440,6 +2507,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_WRITECOUNT is not set
 CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_LIST is not set
+# CONFIG_TEST_LIST_SORT is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_DEBUG_NOTIFIERS is not set
 # CONFIG_DEBUG_CREDENTIALS is not set
@@ -2447,7 +2515,6 @@ CONFIG_ARCH_WANT_FRAME_POINTERS=y
 CONFIG_FRAME_POINTER=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
@@ -2466,8 +2533,10 @@ CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
 CONFIG_RING_BUFFER=y
 CONFIG_EVENT_TRACING=y
+CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
 CONFIG_CONTEXT_SWITCH_TRACER=y
 CONFIG_TRACING=y
 CONFIG_GENERIC_TRACER=y
@@ -2494,6 +2563,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
 CONFIG_HAVE_ARCH_KMEMCHECK=y
+# CONFIG_TEST_KSTRTOX is not set
 # CONFIG_STRICT_DEVMEM is not set
 CONFIG_X86_VERBOSE_BOOTUP=y
 CONFIG_EARLY_PRINTK=y
@@ -2503,8 +2573,8 @@ CONFIG_DEBUG_STACK_USAGE=y
 # CONFIG_X86_PTDUMP is not set
 CONFIG_DEBUG_RODATA=y
 # CONFIG_DEBUG_RODATA_TEST is not set
+# CONFIG_DEBUG_SET_MODULE_RONX is not set
 CONFIG_DEBUG_NX_TEST=m
-# CONFIG_4KSTACKS is not set
 CONFIG_DOUBLEFAULT=y
 # CONFIG_IOMMU_STRESS is not set
 CONFIG_HAVE_MMIOTRACE_SUPPORT=y
@@ -2528,6 +2598,7 @@ CONFIG_OPTIMIZE_INLINING=y
 #
 CONFIG_KEYS=y
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
+# CONFIG_SECURITY_DMESG_RESTRICT is not set
 CONFIG_SECURITY=y
 # CONFIG_SECURITYFS is not set
 CONFIG_SECURITY_NETWORK=y
@@ -2623,6 +2694,7 @@ CONFIG_CRYPTO_SHA1=y
 #
 CONFIG_CRYPTO_AES=y
 CONFIG_CRYPTO_AES_586=y
+# CONFIG_CRYPTO_AES_NI_INTEL is not set
 # CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_ARC4=y
 # CONFIG_CRYPTO_BLOWFISH is not set
@@ -2651,6 +2723,8 @@ CONFIG_CRYPTO_DES=y
 # Random Number Generation
 #
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_USER_API_HASH is not set
+# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
 CONFIG_CRYPTO_HW=y
 # CONFIG_CRYPTO_DEV_PADLOCK is not set
 # CONFIG_CRYPTO_DEV_GEODE is not set
@@ -2681,11 +2755,22 @@ CONFIG_CRC32=y
 CONFIG_AUDIT_GENERIC=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_LZO_DECOMPRESS=y
+CONFIG_XZ_DEC=y
+CONFIG_XZ_DEC_X86=y
+CONFIG_XZ_DEC_POWERPC=y
+CONFIG_XZ_DEC_IA64=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_SPARC=y
+CONFIG_XZ_DEC_BCJ=y
+# CONFIG_XZ_DEC_TEST is not set
 CONFIG_DECOMPRESS_GZIP=y
 CONFIG_DECOMPRESS_BZIP2=y
 CONFIG_DECOMPRESS_LZMA=y
+CONFIG_DECOMPRESS_XZ=y
 CONFIG_DECOMPRESS_LZO=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
 CONFIG_NLATTR=y
+CONFIG_AVERAGE=y



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-16  1:01 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-16  1:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0175e06dde18562a7a21e171298564e0e5169f20
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Jun 16 01:20:35 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Jun 16 01:20:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=0175e06d

Changed Stage3 and Portage snapshot URLs to reliable self-hosted ones

---
 create_image.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 5b7340a..8ce4f98 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -19,8 +19,8 @@ LOG_FILE="${IMAGE_WORK_PATH}/log.txt"
 TOOL_RES_PATH=`pwd`/res
 
 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"
+STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
+PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
 BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
 EMERGE_PROXY="http://127.0.0.1:3128"
 



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-06-16  1:01 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-06-16  1:01 UTC (permalink / raw
  To: gentoo-commits

commit:     86651715df0b54f2acaa7b9962c9670967b29aa9
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Jun 16 01:10:52 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Jun 16 01:10:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=86651715

Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/gentoaster


 create_image.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08  2:45 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08  2:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9d971158f5fb4888f8ac33540c85801a6064bcda
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 02:44:09 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 02:44:09 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=9d971158

Added basic Gearman worker/client

Client is only for testing purposes, real client will be part of WebUI
Worker needs better error handling, does work in current form though
Added progress reporting hack in create_image.sh, going to replace this with a better system soon

---
 .gitignore      |    5 +++
 client.php      |   33 ++++++++++++++++++
 create_image.sh |  100 +++++++++++++++++++++++++++---------------------------
 daemon.php      |   61 +++++++++++++++++++++++++++++++++
 4 files changed, 149 insertions(+), 50 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f8cf34d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+move_test.sh
+res/bzImage
+res/kernelmodules/
+res/portage-latest.tar.bz2
+res/stage3.tar.bz2

diff --git a/client.php b/client.php
new file mode 100644
index 0000000..0110d3b
--- /dev/null
+++ b/client.php
@@ -0,0 +1,33 @@
+<?php
+
+        // Gentoaster build daemon client
+        // Licensed under GPL v3, see COPYING file
+
+	$client= new GearmanClient();
+	$client->addServer();
+
+	echo "Sending job\n";
+
+	do {
+		$result = $client->do("invoke_image_build", file_get_contents("configs/minimal.ini"));
+		switch($client->returnCode()) {
+			case GEARMAN_WORK_DATA:
+				break;
+			case GEARMAN_WORK_STATUS:
+				list($numerator, $denominator)= $client->doStatus();
+				$progress = ceil($numerator/$denominator*100);
+				echo "Status: $progress% complete\n";
+      				break;
+    			case GEARMAN_SUCCESS:
+      				echo "Job finished!\n";
+      				echo $result;
+      				break;
+    			default:
+      				echo "Return code: " . $client->returnCode() . "\n";
+      				exit;
+  		}
+	}
+
+	while($client->returnCode() != GEARMAN_SUCCESS);
+
+?>

diff --git a/create_image.sh b/create_image.sh
index 03466b1..3cee693 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -14,8 +14,11 @@ hash qemu-img 2>&- || { echo >&2 "Gentoaster requires qemu-img, but it's not ins
 hash extlinux 2>&- || { echo >&2 "Gentoaster requires extlinux, but it's not installed."; exit 1; }
 hash sfdisk 2>&- || { echo >&2 "Gentoaster requires sfdisk, but it's not installed."; exit 1; }
 
+# Figure out where we are
+RUNNING_DIRECTORY=$(cd `dirname $0` && pwd)
+
 # Load shflags to parse flags
-. ./lib/shflags
+. ${RUNNING_DIRECTORY}/lib/shflags
 
 DEFINE_string 'config' '' 'configuration to build from' 
 DEFINE_string 'proxy' '' 'HTTP proxy to use for emerges'
@@ -30,7 +33,7 @@ if [ -z ${FLAGS_config} ]; then
 fi
 
 # Parse the configuration we took as an arg
-source parse_config.sh ${FLAGS_config}
+source ${RUNNING_DIRECTORY}/parse_config.sh ${FLAGS_config}
 
 # Generate a few helper variables using the configuration file
 
@@ -40,7 +43,7 @@ IMAGE_BYTES=$(( ${IMAGE_MEGABYTES} * 1024 * 1024 ))
 IMAGES_OUTPUT_PATH=`pwd`
 IMAGE_WORK_PATH="${IMAGES_OUTPUT_PATH}/${BUILD_ID}"
 LOG_FILE="${IMAGE_WORK_PATH}/log.txt"
-TOOL_RES_PATH=`pwd`/res
+TOOL_RES_PATH=${RUNNING_DIRECTORY}/res
 
 NUM_JOBS=$(( `grep -c processor /proc/cpuinfo`+1 ))
 STAGE3_URL="http://distribution.hexxeh.net/gentoo/stage3-i686-latest.tar.bz2"
@@ -48,34 +51,33 @@ PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
 BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
 EMERGE_PROXY="${FLAGS_proxy}"
 
-echo "Creating build working directory"
+echo "Step 1: Creating build working directory"
 mkdir -p ${IMAGE_WORK_PATH}
 cd ${IMAGE_WORK_PATH}
-
-echo "Starting log at ${LOG_FILE}..."
 echo "" > ${LOG_FILE}
 
 # Create disk iamge
 BYTES_PER_CYLINDER=$(( 512*63*255 ))
 CYLINDERS=$(( ${IMAGE_BYTES}/${BYTES_PER_CYLINDER} ))
 REAL_IMAGE_BYTES=$(( (${CYLINDERS}+1)*${BYTES_PER_CYLINDER} ))
-echo "Creating image ${IMAGE_NAME}, size ${REAL_IMAGE_BYTES} bytes"
+echo "Step 2: Creating image ${IMAGE_NAME}, size ${REAL_IMAGE_BYTES} bytes"
 qemu-img create -f raw ${IMAGE_NAME} ${REAL_IMAGE_BYTES} &>> ${LOG_FILE}
 
 # Clean up old mounts
 cleanup_mounts() {
-	echo "Cleaning up old mounts"
-	umount -d ${IMAGE_WORK_PATH}/rootfs/dev/pts &>> ${LOG_FILE}
-	umount -d ${IMAGE_WORK_PATH}/rootfs/dev/shm &>> ${LOG_FILE}
-	umount -d ${IMAGE_WORK_PATH}/rootfs/dev &>> ${LOG_FILE}
-	umount -d ${IMAGE_WORK_PATH}/rootfs/proc &>> ${LOG_FILE}
-	umount -d ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE}
-	umount -d ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE}
+	sleep 2
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev/pts &>> ${LOG_FILE}
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev/shm &>> ${LOG_FILE}
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev &>> ${LOG_FILE}
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs/proc &>> ${LOG_FILE}
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE}
+	umount -d -f ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE}
+	sleep 2
 }
 cleanup_mounts
 
 # Create partition table
-echo "Writing partition table"
+echo "Step 3: Writing partition table"
 echo -e "\x55\xaa" | dd bs=1 count=2 seek=510 of=${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE}
 LOOP_DEV_IMAGE=`losetup -f`
 losetup --sizelimit ${REAL_IMAGE_BYTES} ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
@@ -89,7 +91,7 @@ sleep 2
 losetup -d ${LOOP_DEV_IMAGE}
 
 # Mounting new root and boot
-echo "Creating filesystems"
+echo "Step 4: Creating filesystems"
 
 LOOP_DEV_BOOT=`losetup -f`
 losetup -o $(( 512 * 2048 )) --sizelimit $(( ${BOOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
@@ -109,7 +111,7 @@ mkswap ${LOOP_DEV_SWAP} &>> ${LOG_FILE}
 sleep 2 
 losetup -d ${LOOP_DEV_SWAP}
 
-echo "Mounting fileystems"
+echo "Step 5: Mounting fileystems"
 
 mkdir -p rootfs
 mount -o loop,offset=$(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
@@ -125,7 +127,7 @@ then
 	wget ${STAGE3_URL} -O ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE}
 fi
 
-echo "Extracting Stage 3"
+echo "Step 6: Extracting Stage 3"
 tar jxf ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE}
 
 if [ ! -f ${TOOL_RES_PATH}/portage-latest.tar.bz2 ];
@@ -134,17 +136,17 @@ then
 	wget ${PORTAGE_URL} -O ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE}
 fi
 
-echo "Extracting Portage snapshot"
+echo "Step 7: Extracting Portage snapshot"
 cd usr
 tar jxf ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE}
 
-echo "Setting up chroot"
+echo "Step 8: Setting up chroot"
 cd ..
 mount -t proc /proc proc
 mount --rbind /dev dev
 cp -L /etc/resolv.conf etc/resolv.conf
 
-echo "Setting up make.conf"
+echo "Step 9: 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
@@ -158,67 +160,66 @@ if [[ ${OUTPUT_FORMAT} = "vbox" ]]; then
 fi
 
 if [ -n $EMERGE_PROXY ]; then
-	echo "Enabling HTTP proxy"
+	echo "Enabling HTTP proxy" &>> ${LOG_FILE}
 	echo "http_proxy=\"${EMERGE_PROXY}\"" >> etc/make.conf
 fi
 
-echo "Setting up package.use"
+echo "Step 10: Setting up package.use"
 mkdir -p etc/portage
 echo ${PACKAGE_USE} >> etc/portage/package.use
 
-echo "Setting up package.accept_keywords"
+echo "Step 11: Setting up package.accept_keywords"
 echo ${PACKAGE_ACCEPT_KEYWORDS} >> etc/portage/package.accept_keywords
 
-echo "Entering chroot"
+echo "Step 12: Chroot setup"
 linux32 chroot . env-update &>> ${LOG_FILE}
-
-echo "Loading profile"
 linux32 chroot . /bin/bash /etc/profile &>> ${LOG_FILE}
 
-echo "Setting timezone to ${TIMEZONE}"
+echo "Step 13: Setting timezone to ${TIMEZONE}"
 linux32 chroot . cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime &>> ${LOG_FILE}
 
-echo "Setting hostname to ${HOSTNAME}"
+echo "Step 14: Setting hostname to ${HOSTNAME}"
 linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
 
-echo "Copying new fstab"
+echo "Step 15: Copying new fstab"
 cp ${TOOL_RES_PATH}/fstab etc/fstab &>> ${LOG_FILE}
 
-echo "Setting up networking"
+echo "Step 16: 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 &>> ${LOG_FILE}
 
+echo "Step 17: Setting up kernel"
 # If we got the flag, used a cached kernel to reduce build times for testing
-if [[ ${FLAGS_cachedkernel} = ${FLAGS_true} ]]; then
-	echo "Using cached kernel"
+if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then
+	echo "Using cached kernel" &>> ${LOG_FILE}
 	cp ${TOOL_RES_PATH}/bzImage boot/kernel
 	cp -R ${TOOL_RES_PATH}/kernelmodules/* lib/modules/
 else
-	echo "Downloading/installing kernel sources"
+	echo "Downloading/installing kernel sources" &>> ${LOG_FILE}
 	linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE}
 
-	echo "Copying kernel configuration"
+	echo "Copying kernel configuration" &>> ${LOG_FILE}
 	cp ${TOOL_RES_PATH}/kernelconfig usr/src/linux/.config
 
-	echo "Building kernel"
+	echo "Building kernel" &>> ${LOG_FILE}
 	linux32 chroot . make -C /usr/src/linux -j${NUM_JOBS} &>> ${LOG_FILE}
 
-	echo "Installing kernel"
+	echo "Installing kernel" &>> ${LOG_FILE}
 	linux32 chroot . make -C /usr/src/linux modules_install &>> ${LOG_FILE}
 	usr/src/linux/arch/i386/boot/bzImage boot/kernel &>> ${LOG_FILE}
 fi
 
-echo "Setting root password"
+echo "Step 18: Setting root password"
 linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE}
 
-echo "Processing packages list"
+echo "Step 19: Processing packages list"
 for PACKAGE in ${PACKAGES_LIST}; do
-	echo "Installing ${PACKAGE}"
+	echo "Installing ${PACKAGE}" &>> ${LOG_FILE}
 	linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE}
 done
 
-echo "Adding default user"
+echo "Step 20: Adding default user"
 linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME}
 linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | chpasswd" &>> ${LOG_FILE}
 
@@ -231,32 +232,31 @@ then
 	linux32 chroot . usermod -a vboxguest ${DEFAULT_USERNAME}
 fi
 
-echo "Cleaning up make.conf"
+echo "Step 21: Cleaning up make.conf"
 if [ -n ${EMERGE_PROXY} ]; then
 	sed -i '/http_proxy/ d' etc/make.conf
 fi
 sed -i '/MAKEOPTS/ d' etc/make.conf
 
-echo "Installing extlinux"
-extlinux --heads 255 --sectors 63 --install boot
-dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc
+echo "Step 22: Installing extlinux"
+extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE}
+dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE}
 cp ${TOOL_RES_PATH}/extlinux.conf boot/
 cd  ..
 cleanup_mounts
-
 case "${OUTPUT_FORMAT}" in
 	"raw" )
-		echo "Already in raw format, not converting"
+		echo "Already in raw format, not converting" &>> ${LOG_FILE}
 		IMAGE_OUT="${BUILD_ID}.image"
 		;;
 	"vbox" )
-		echo "Converting image from RAW to VDI"
+		echo "Converting image from RAW to VDI" &>> ${LOG_FILE}
 		qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vdi"
 		;;
 	"vmware" )
-		echo "Converting image from RAW to VMDK"
+		echo "Converting image from RAW to VMDK" &>> ${LOG_FILE}
 		qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vmdk"
@@ -266,6 +266,6 @@ mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}
 mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log
 rm -rf ${IMAGE_WORK_PATH}
 
-echo "Image build completed!"
+echo "Step 23: Image build completed!"
 echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"
 echo "Your log file is here: ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"

diff --git a/daemon.php b/daemon.php
new file mode 100644
index 0000000..deeb0d6
--- /dev/null
+++ b/daemon.php
@@ -0,0 +1,61 @@
+<?php
+
+	// Gentoaster build daemon worker
+	// Licensed under GPL v3, see COPYING file
+
+	$configurations_path = "/var/www/gentoaster";
+	$gentoaster_path = "/usr/share/gentoaster";
+	$tool_name = "create_image.sh";
+
+	// DO NOT EDIT BELOW THIS LINE
+
+	$progress_magic = 23;
+
+	$worker = new GearmanWorker();
+	$worker->addServer();
+	$worker->addFunction("invoke_image_build", "image_build");
+	while ($worker->work());
+
+	function image_build($job) {
+		global $configurations_path, $gentoaster_path, $tool_name, $progress_magic;
+
+		echo "Got job ID ".$job->handle(). "(".md5($job->handle()).")\n";
+
+		$configuration_string = $job->workload();
+		$configuration_array = parse_ini_string($configuration_string);
+
+		if($configuration_array !== FALSE) {
+			$build_id = $configuration_array["BUILD_ID"];
+			$build_path = $configurations_path."/".$build_id;
+			mkdir($build_path);
+
+			if(is_writable($build_path)) {
+				chdir($build_path);
+				file_put_contents("config.ini", $configuration_string);
+				$tool_args = "--config config.ini --cachedkernel";
+				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args, "r");
+
+				$nonstatus_output = "";
+
+				while(!feof($process_handle)) {
+					$progress_line = fgets($process_handle);
+					preg_match("/Step (.+):/", $progress_line, $matches);
+					if(sizeof($matches) > 0) {
+						$job->sendStatus($matches[1], $progress_magic);
+					} else {
+						$nonstatus_output .= $progress_line;
+					}
+				}
+
+				pclose($process_handle);
+
+				return $nonstatus_output;
+			} else {
+				echo "Configured build path is not writable";
+			}
+		} else {
+			echo "Configuration string is not valid";
+		}
+	}
+
+?>



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08 17:27 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08 17:27 UTC (permalink / raw
  To: gentoo-commits

commit:     240a321b053dfd244b696ab2b456e1c264c9456a
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 17:26:05 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 17:26:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=240a321b

Added more robust error handling (we're not going to zombie onwards now when things fail)

Return codes and messages are now making it into a database, and job handles are mapped to handle hashes to prevent job hijacking

---
 client.php      |   28 +++--------
 create_image.sh |  132 ++++++++++++++++++++++++++++++------------------------
 daemon.php      |   29 +++++++++---
 status.php      |   29 ++++++++++++
 4 files changed, 131 insertions(+), 87 deletions(-)

diff --git a/client.php b/client.php
index 0110d3b..b289a34 100644
--- a/client.php
+++ b/client.php
@@ -8,26 +8,14 @@
 
 	echo "Sending job\n";
 
-	do {
-		$result = $client->do("invoke_image_build", file_get_contents("configs/minimal.ini"));
-		switch($client->returnCode()) {
-			case GEARMAN_WORK_DATA:
-				break;
-			case GEARMAN_WORK_STATUS:
-				list($numerator, $denominator)= $client->doStatus();
-				$progress = ceil($numerator/$denominator*100);
-				echo "Status: $progress% complete\n";
-      				break;
-    			case GEARMAN_SUCCESS:
-      				echo "Job finished!\n";
-      				echo $result;
-      				break;
-    			default:
-      				echo "Return code: " . $client->returnCode() . "\n";
-      				exit;
-  		}
-	}
+	$handle = $client->doBackground("invoke_image_build", file_get_contents("configs/crashtest.ini"));
+	$handlehash = md5($handle);
 
-	while($client->returnCode() != GEARMAN_SUCCESS);
+	echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n";
 
+	$db = mysql_connect("localhost","gentoaster","");
+	if(!$db) die("Could not connect to database ".mysql_error());
+	mysql_select_db("gentoaster");
+	mysql_query("INSERT INTO builds (id, handle) VALUES('".$handlehash."','".$handle."')");
+	echo "Job handle mapping added to database\n";
 ?>

diff --git a/create_image.sh b/create_image.sh
index 3cee693..d70cda5 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -5,14 +5,20 @@
 # Usage: ./create_image.sh <configuration file path>
 # Prerequisites: extlinux, qemu-img, sfdisk
 
+# Early error handling (we'll override this later)
+
+handle_error() {
+	echo $1
+	exit 1
+}
+
 # Do some sanity checks first
 if [ "$(id -u)" != "0" ]; then
-   echo "Gentoaster must run with root permissions!" 1>&2
-   exit 1
+   handle_error "Gentoaster must run with root permissions!"
 fi
-hash qemu-img 2>&- || { echo >&2 "Gentoaster requires qemu-img, but it's not installed."; exit 1; }
-hash extlinux 2>&- || { echo >&2 "Gentoaster requires extlinux, but it's not installed."; exit 1; }
-hash sfdisk 2>&- || { echo >&2 "Gentoaster requires sfdisk, but it's not installed."; exit 1; }
+hash qemu-img 2>&- || handle_error "Gentoaster requires qemu-img, but it's not installed."
+hash extlinux 2>&- || handle_error "Gentoaster requires extlinux, but it's not installed."
+hash sfdisk 2>&- || handle_error "Gentoaster requires sfdisk, but it's not installed."
 
 # Figure out where we are
 RUNNING_DIRECTORY=$(cd `dirname $0` && pwd)
@@ -28,12 +34,11 @@ FLAGS "$@" || exit 1
 eval set -- "${FLAGS_ARGV}"
 
 if [ -z ${FLAGS_config} ]; then
-	echo  >&2 "Gentoaster requires a valid configuration to be passed using the --config flag"
-	exit 1
+	handle_error "Gentoaster requires a valid configuration to be passed using the --config flag"
 fi
 
 # Parse the configuration we took as an arg
-source ${RUNNING_DIRECTORY}/parse_config.sh ${FLAGS_config}
+source ${RUNNING_DIRECTORY}/parse_config.sh ${FLAGS_config} 2>/dev/null || handle_error "Error parsing build configuration"
 
 # Generate a few helper variables using the configuration file
 
@@ -51,18 +56,6 @@ PORTAGE_URL="http://distribution.hexxeh.net/gentoo/portage-latest.tar.bz2"
 BINHOST_URL="http://tinderbox.dev.gentoo.org/default-linux/x86"
 EMERGE_PROXY="${FLAGS_proxy}"
 
-echo "Step 1: Creating build working directory"
-mkdir -p ${IMAGE_WORK_PATH}
-cd ${IMAGE_WORK_PATH}
-echo "" > ${LOG_FILE}
-
-# Create disk iamge
-BYTES_PER_CYLINDER=$(( 512*63*255 ))
-CYLINDERS=$(( ${IMAGE_BYTES}/${BYTES_PER_CYLINDER} ))
-REAL_IMAGE_BYTES=$(( (${CYLINDERS}+1)*${BYTES_PER_CYLINDER} ))
-echo "Step 2: Creating image ${IMAGE_NAME}, size ${REAL_IMAGE_BYTES} bytes"
-qemu-img create -f raw ${IMAGE_NAME} ${REAL_IMAGE_BYTES} &>> ${LOG_FILE}
-
 # Clean up old mounts
 cleanup_mounts() {
 	sleep 2
@@ -74,13 +67,34 @@ cleanup_mounts() {
 	umount -d -f ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE}
 	sleep 2
 }
+
+# Handle some errors
+handle_error() {
+	echo "$1" 
+	cd ${IMAGE_WORK_PATH}
+	cleanup_mounts
+	rm -rf ${IMAGE_WORK_PATH}
+	exit 1
+}
+
+echo "Step 1: Creating build working directory"
+mkdir -p ${IMAGE_WORK_PATH} || handle_error "Error creating working directory"
+cd ${IMAGE_WORK_PATH}
+echo "" > ${LOG_FILE} || handle_error "Error creating log file"
 cleanup_mounts
 
+# Create disk iamge
+BYTES_PER_CYLINDER=$(( 512*63*255 ))
+CYLINDERS=$(( ${IMAGE_BYTES}/${BYTES_PER_CYLINDER} ))
+REAL_IMAGE_BYTES=$(( (${CYLINDERS}+1)*${BYTES_PER_CYLINDER} ))
+echo "Step 2: Creating image ${IMAGE_NAME}, size ${REAL_IMAGE_BYTES} bytes"
+qemu-img create -f raw ${IMAGE_NAME} ${REAL_IMAGE_BYTES} &>> ${LOG_FILE} || handle_error "Error creating disk image file"
+
 # Create partition table
 echo "Step 3: Writing partition table"
 echo -e "\x55\xaa" | dd bs=1 count=2 seek=510 of=${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE}
 LOOP_DEV_IMAGE=`losetup -f`
-losetup --sizelimit ${REAL_IMAGE_BYTES} ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE}
+losetup --sizelimit ${REAL_IMAGE_BYTES} ${LOOP_DEV_IMAGE} ${IMAGE_NAME} &>> ${LOG_FILE} || handle_error "Error loop mounting disk image"
 
 sfdisk ${LOOP_DEV_IMAGE} -H64 -S32 &>> ${LOG_FILE} << EOF
 1,${BOOT_MEGABYTES},83,*
@@ -88,35 +102,35 @@ $(( 1+ ${BOOT_MEGABYTES} )),${SWAP_MEGABYTES},82,-
 $(( 1+ ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} )),${ROOT_MEGABYTES},83,-
 EOF
 sleep 2
-losetup -d ${LOOP_DEV_IMAGE}
+losetup -d ${LOOP_DEV_IMAGE} || handle_error "Error destroying disk image loop device"
 
 # Mounting new root and boot
 echo "Step 4: Creating filesystems"
 
 LOOP_DEV_BOOT=`losetup -f`
-losetup -o $(( 512 * 2048 )) --sizelimit $(( ${BOOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME}
-mkfs -t ext2 ${LOOP_DEV_BOOT} &>> ${LOG_FILE}
+losetup -o $(( 512 * 2048 )) --sizelimit $(( ${BOOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_BOOT} ${IMAGE_NAME} || handle_error "Error loop mounting boot partition"
+mkfs -t ext2 ${LOOP_DEV_BOOT} &>> ${LOG_FILE} || handle_error "Error formatting boot filesystem"
 sleep 2
-losetup -d ${LOOP_DEV_BOOT}
+losetup -d ${LOOP_DEV_BOOT} || handle_error "Error destroying boot partition loop device"
 
 LOOP_DEV_ROOT=`losetup -f`
-losetup -o $(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${ROOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_ROOT} ${IMAGE_NAME}
-mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE}
+losetup -o $(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${ROOT_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_ROOT} ${IMAGE_NAME} || handle_error "Error loop mounting root partition"
+mkfs -t ext3 ${LOOP_DEV_ROOT} &>> ${LOG_FILE} || handle_error "Error formatting root filesystem"
 sleep 2
-losetup -d ${LOOP_DEV_ROOT}
+losetup -d ${LOOP_DEV_ROOT} || handle_error "Error destroying root partition loop device"
 
 LOOP_DEV_SWAP=`losetup -f`
-losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${SWAP_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_SWAP} ${IMAGE_NAME}
+losetup -o $(( ( 512 * 2048 ) + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) )) --sizelimit $(( ${SWAP_MEGABYTES} * 1024 * 1024 )) ${LOOP_DEV_SWAP} ${IMAGE_NAME} || handle_error "Error loop mounting swap partition"
 mkswap ${LOOP_DEV_SWAP} &>> ${LOG_FILE}
 sleep 2 
-losetup -d ${LOOP_DEV_SWAP}
+losetup -d ${LOOP_DEV_SWAP} || handle_error "Error destroying swap partition loop device"
 
 echo "Step 5: Mounting fileystems"
 
 mkdir -p rootfs
-mount -o loop,offset=$(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs
+mount -o loop,offset=$(( ( 512 * 2048 )  + ( ${BOOT_MEGABYTES} * 1024 * 1024 ) + ( ${SWAP_MEGABYTES} * 1024 * 1024 ) )) ${IMAGE_NAME} rootfs  || handle_error "Error mounting root filesystem"
 mkdir -p rootfs/boot
-mount -o loop,offset=$(( 512 * 2048 )) ${IMAGE_NAME} rootfs/boot
+mount -o loop,offset=$(( 512 * 2048 )) ${IMAGE_NAME} rootfs/boot || handle_error "Error mounting boot filesystem"
 cd rootfs
 
 # Setup Gentoo
@@ -124,27 +138,27 @@ cd rootfs
 if [ ! -f ${TOOL_RES_PATH}/stage3.tar.bz2 ];
 then
 	echo "Downloading Stage 3"
-	wget ${STAGE3_URL} -O ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE}
+	wget ${STAGE3_URL} -O ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE} || handle_error "Error downloading Stage3 tarball"
 fi
 
 echo "Step 6: Extracting Stage 3"
-tar jxf ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE}
+tar jxf ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE} || handle_error "Error extracting Stage3 tarball"
 
 if [ ! -f ${TOOL_RES_PATH}/portage-latest.tar.bz2 ];
 then
 	echo "Downloading Portage snapshot"
-	wget ${PORTAGE_URL} -O ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE}
+	wget ${PORTAGE_URL} -O ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE} || handle_error "Error downloading Portage snapshot"
 fi
 
 echo "Step 7: Extracting Portage snapshot"
 cd usr
-tar jxf ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE}
+tar jxf ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE} || handle_error "Error extracting Portage snapshot"
 
 echo "Step 8: Setting up chroot"
 cd ..
-mount -t proc /proc proc
-mount --rbind /dev dev
-cp -L /etc/resolv.conf etc/resolv.conf
+mount -t proc /proc proc || handle_error "Error mounting /proc"
+mount --rbind /dev dev || handle_error "Error mounting /dev"
+cp -L /etc/resolv.conf etc/resolv.conf || handle_error "Error setting up resolv.conf"
 
 echo "Step 9: Setting up make.conf"
 mkdir -p usr/portage/packages
@@ -193,40 +207,40 @@ echo "Step 17: Setting up kernel"
 # If we got the flag, used a cached kernel to reduce build times for testing
 if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then
 	echo "Using cached kernel" &>> ${LOG_FILE}
-	cp ${TOOL_RES_PATH}/bzImage boot/kernel
-	cp -R ${TOOL_RES_PATH}/kernelmodules/* lib/modules/
+	cp ${TOOL_RES_PATH}/bzImage boot/kernel || handle_error "Error copying cached kernel"
+	cp -R ${TOOL_RES_PATH}/kernelmodules/* lib/modules/ || handle_error "Error copying cached kernel modules"
 else
 	echo "Downloading/installing kernel sources" &>> ${LOG_FILE}
-	linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE}
+	linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE} || handle_error "Error emerging kernel sources"
 
 	echo "Copying kernel configuration" &>> ${LOG_FILE}
-	cp ${TOOL_RES_PATH}/kernelconfig usr/src/linux/.config
+	cp ${TOOL_RES_PATH}/kernelconfig usr/src/linux/.config || handle_error "Error copying kernel config"
 
 	echo "Building kernel" &>> ${LOG_FILE}
-	linux32 chroot . make -C /usr/src/linux -j${NUM_JOBS} &>> ${LOG_FILE}
+	linux32 chroot . make -C /usr/src/linux -j${NUM_JOBS} &>> ${LOG_FILE} || handle_error "Error building kernel"
 
 	echo "Installing kernel" &>> ${LOG_FILE}
-	linux32 chroot . make -C /usr/src/linux modules_install &>> ${LOG_FILE}
-	usr/src/linux/arch/i386/boot/bzImage boot/kernel &>> ${LOG_FILE}
+	linux32 chroot . make -C /usr/src/linux modules_install &>> ${LOG_FILE} || handle_error "Error installing kernel modules"
+	cp usr/src/linux/arch/i386/boot/bzImage boot/kernel &>> ${LOG_FILE} || handle_error "Error copying kernel"
 fi
 
 echo "Step 18: Setting root password"
-linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE}
+linux32 chroot . /bin/bash -c "echo 'root:${ROOT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting root password"
 
 echo "Step 19: Processing packages list"
 for PACKAGE in ${PACKAGES_LIST}; do
 	echo "Installing ${PACKAGE}" &>> ${LOG_FILE}
-	linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE}
+	linux32 chroot . emerge --jobs=${NUM_JOBS} ${PACKAGE} &>> ${LOG_FILE} || handle_error "Error emerging ${PACKAGE}"
 done
 
 echo "Step 20: Adding default user"
-linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME}
-linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | chpasswd" &>> ${LOG_FILE}
+linux32 chroot . useradd -g users -G lp,wheel,audio,cdrom,portage -m ${DEFAULT_USERNAME} || handle_error "Error adding default user"
+linux32 chroot . /bin/bash -c "echo '${DEFAULT_USERNAME}:${DEFAULT_PASSWORD}' | chpasswd" &>> ${LOG_FILE} || handle_error "Error setting default user password"
 
 if [[ ${OUTPUT_FORMAT} = "vbox" ]]
 then
 	echo "Installing VirtualBox additions/drivers"
-	linux32 chroot . emerge xf86-video-virtualbox xf86-input-virtualbox virtualbox-guest-additions &>> ${LOG_FILE}
+	linux32 chroot . emerge xf86-video-virtualbox xf86-input-virtualbox virtualbox-guest-additions &>> ${LOG_FILE} || handle_error "Error emerging VirtualBox extras"
 	linux32 chroot . rc-update add virtualbox-guest-additions default &>> ${LOG_FILE}
 	mv etc/X11/xorg.conf etc/X11/xorg.conf.bak &>> ${LOG_FILE}
 	linux32 chroot . usermod -a vboxguest ${DEFAULT_USERNAME}
@@ -239,9 +253,9 @@ fi
 sed -i '/MAKEOPTS/ d' etc/make.conf
 
 echo "Step 22: Installing extlinux"
-extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE}
-dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE}
-cp ${TOOL_RES_PATH}/extlinux.conf boot/
+extlinux --heads 255 --sectors 63 --install boot &>> ${LOG_FILE} || handle_error "Error installing extlinux"
+dd if=/usr/lib/extlinux/mbr.bin of=../${IMAGE_NAME} conv=notrunc &>> ${LOG_FILE} || handle_error "Error copying extlinux MBR"
+cp ${TOOL_RES_PATH}/extlinux.conf boot/ || handle_error "Error copying extlinux configuration"
 cd  ..
 cleanup_mounts
 case "${OUTPUT_FORMAT}" in
@@ -251,20 +265,20 @@ case "${OUTPUT_FORMAT}" in
 		;;
 	"vbox" )
 		echo "Converting image from RAW to VDI" &>> ${LOG_FILE}
-		qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi
+		qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi || handle_error "Error converting disk image to VDI format"
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vdi"
 		;;
 	"vmware" )
 		echo "Converting image from RAW to VMDK" &>> ${LOG_FILE}
-		qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk
+		qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk || handle_error "Error converting disk image to VMDK format"
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vmdk"
 		;;
 esac
-mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}
-mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log
-rm -rf ${IMAGE_WORK_PATH}
+mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT} || handle_error "Error moving finished image"
+mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log || handle_error "Error moving log file"
+rm -rf ${IMAGE_WORK_PATH} || handle_error "Error removing working directory"
 
 echo "Step 23: Image build completed!"
 echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"

diff --git a/daemon.php b/daemon.php
index deeb0d6..a7090f5 100644
--- a/daemon.php
+++ b/daemon.php
@@ -16,24 +16,37 @@
 	$worker->addFunction("invoke_image_build", "image_build");
 	while ($worker->work());
 
+	function update_result($handle, $returncode, $result) {
+		$result = trim($result);
+		echo "A job finished with return code ".$returncode.": ".$result."\n";
+	        $db = mysql_connect("localhost","gentoaster","");
+        	if(!$db) die("Could not connect to database ".mysql_error());
+        	mysql_select_db("gentoaster");
+		mysql_query("UPDATE builds SET result = '".mysql_real_escape_string($result)."', returncode = '".$returncode."' WHERE handle = '".mysql_real_escape_string($handle)."'");
+		return serialize(array($returncode, $result));
+	}
+
 	function image_build($job) {
 		global $configurations_path, $gentoaster_path, $tool_name, $progress_magic;
 
-		echo "Got job ID ".$job->handle(). "(".md5($job->handle()).")\n";
+		$handle = $job->handle();
+		$handlehash = md5($handle);
+
+		echo "Processing job handle hash ".$handlehash."\n";
 
 		$configuration_string = $job->workload();
 		$configuration_array = parse_ini_string($configuration_string);
 
-		if($configuration_array !== FALSE) {
+		if($configuration_array !== FALSE && isset($configuration_array["BUILD_ID"])) {
 			$build_id = $configuration_array["BUILD_ID"];
 			$build_path = $configurations_path."/".$build_id;
-			mkdir($build_path);
+			@mkdir($build_path, 0777, true);
 
 			if(is_writable($build_path)) {
 				chdir($build_path);
 				file_put_contents("config.ini", $configuration_string);
 				$tool_args = "--config config.ini --cachedkernel";
-				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args, "r");
+				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args." 2>&1", "r");
 
 				$nonstatus_output = "";
 
@@ -47,14 +60,14 @@
 					}
 				}
 
-				pclose($process_handle);
+				$returncode = pclose($process_handle);
 
-				return $nonstatus_output;
+				return update_result($handle, $returncode, $nonstatus_output);
 			} else {
-				echo "Configured build path is not writable";
+				return update_result($handle, -2, "Configured build path is not writable");
 			}
 		} else {
-			echo "Configuration string is not valid";
+			return update_result($handle, -3, "Configuration string is not valid");
 		}
 	}
 

diff --git a/status.php b/status.php
new file mode 100644
index 0000000..37db751
--- /dev/null
+++ b/status.php
@@ -0,0 +1,29 @@
+<?php
+	if(!isset($argv[1])) die("No handle hash given\n");
+        $db = mysql_connect("localhost","gentoaster","");
+        if(!$db) die("Could not connect to database ".mysql_error()."\n");
+        mysql_select_db("gentoaster");
+        $result = mysql_query("SELECT handle FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
+	if(mysql_num_rows($result) == 1) {
+		$handles = mysql_fetch_array($result);
+		$handle = $handles[0];
+		$client = new GearmanClient();
+		$client->addServer();
+
+		$status = $client->jobStatus($handle);
+		if($status[0]) {
+			echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n";
+		} else {
+			$result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
+			$jobres = mysql_fetch_array($result);
+			if($jobres[0] != NULL) {
+				echo "Job returned with code ".$jobres[0].": ".$jobres[1]."\n";
+			} else {
+				echo "Job failed\n";
+			}
+		}
+	} else {
+		echo "Invalid handle hash\n";
+	}
+
+?>



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08 18:27 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08 18:27 UTC (permalink / raw
  To: gentoo-commits

commit:     336a7138d7c1cfc8d4db234ed65eb66adb3689d2
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 18:26:47 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 18:26:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=336a7138

Added a README with some basic installation/running instructions, removed cachedkernel as default in daemon

---
 README          |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 create_image.sh |    2 -
 daemon.php      |    2 +-
 3 files changed, 69 insertions(+), 3 deletions(-)

diff --git a/README b/README
new file mode 100644
index 0000000..3019ba6
--- /dev/null
+++ b/README
@@ -0,0 +1,68 @@
+=====================
+= Gentoaster README =
+=====================
+
+Foreword
+=======
+Right now I'm developing this on Ubuntu/Debian, so the following instructions are for those platforms. This will eventually run on Gentoo, of course.
+
+
+Prerequisites
+=============
+
+php5-cli
+php5-dev
+php5-mysql
+gearman-job-server
+gearman-php-ext
+qemu-utils
+extlinux
+sfdisk
+git
+
+There might be more, I'll update this list at some point. Install these as follows: sudo apt-get install php5-cli php5-dev php5-mysql gearman-job-server qemu-utils extlinux sfdisk git
+
+The Gearman PHP extension has to be installed manually, as follows:
+
+wget http://pecl.php.net/get/gearman-0.7.0.tgz
+tar xvf gearman-0.7.0.tgz
+cd gearman-0.7.0
+phpize
+./configure
+make
+sudo make install
+
+Add "extension=gearman.so" to your php.ini (probably /etc/php5/cli/php.ini)
+
+Installation
+============
+
+cd /usr/share
+git clone http://git.overlays.gentoo.org/gitroot/proj/gentoaster.git
+
+
+Running
+=======
+
+There's no init script for the daemon yet, so simply run as follows:
+
+cd /usr/share/gentoaster
+sudo php5 daemon.php
+
+Note the use of sudo, the daemon MUST be ran as root for it to work, otherwise all builds will fail.
+
+Now that the daemon is running, you can try a build, using the sample client:
+
+php5 client.php
+
+This will give you some output similar to the following:
+
+Job sent, handle was H:lucidity:3 - hash 6085655f187a8442f82c43ebf98e5fdb
+
+You can check on the status of that build by running the following:
+
+php5 status.php <handle hash>
+
+Where <handle hash> is the hash returned by client.php (for example 6085655f187a8442f82c43ebf98e5fdb)
+
+If the build is still running, you'll get a progress percentage. If it's finished, the return code and result message will be shown.

diff --git a/create_image.sh b/create_image.sh
index d70cda5..b2d264c 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -137,7 +137,6 @@ cd rootfs
 
 if [ ! -f ${TOOL_RES_PATH}/stage3.tar.bz2 ];
 then
-	echo "Downloading Stage 3"
 	wget ${STAGE3_URL} -O ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE} || handle_error "Error downloading Stage3 tarball"
 fi
 
@@ -146,7 +145,6 @@ tar jxf ${TOOL_RES_PATH}/stage3.tar.bz2 &>> ${LOG_FILE} || handle_error "Error e
 
 if [ ! -f ${TOOL_RES_PATH}/portage-latest.tar.bz2 ];
 then
-	echo "Downloading Portage snapshot"
 	wget ${PORTAGE_URL} -O ${TOOL_RES_PATH}/portage-latest.tar.bz2 &>> ${LOG_FILE} || handle_error "Error downloading Portage snapshot"
 fi
 

diff --git a/daemon.php b/daemon.php
index a7090f5..8f58076 100644
--- a/daemon.php
+++ b/daemon.php
@@ -45,7 +45,7 @@
 			if(is_writable($build_path)) {
 				chdir($build_path);
 				file_put_contents("config.ini", $configuration_string);
-				$tool_args = "--config config.ini --cachedkernel";
+				$tool_args = "--config config.ini";
 				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args." 2>&1", "r");
 
 				$nonstatus_output = "";



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08 18:35 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     9b8810388d633def0bd2dd711751b184e9d8fa50
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 18:35:25 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 18:35:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=9b881038

Delete config after the build has finished in daemon

---
 daemon.php |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/daemon.php b/daemon.php
index 8f58076..3665abc 100644
--- a/daemon.php
+++ b/daemon.php
@@ -62,6 +62,8 @@
 
 				$returncode = pclose($process_handle);
 
+				unlink("config.ini");
+
 				return update_result($handle, $returncode, $nonstatus_output);
 			} else {
 				return update_result($handle, -2, "Configured build path is not writable");



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08 18:47 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     6e55dab2366ee4acb427837496261478c76e35e6
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 18:47:07 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 18:47:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=6e55dab2

Changed Gearman test client to accept config path as an argument, added waiting case in status checker

---
 README     |    7 +++----
 client.php |    4 +++-
 status.php |    6 +++++-
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/README b/README
index 3019ba6..ddf981e 100644
--- a/README
+++ b/README
@@ -46,14 +46,13 @@ Running
 
 There's no init script for the daemon yet, so simply run as follows:
 
-cd /usr/share/gentoaster
-sudo php5 daemon.php
+sudo php5 /usr/share/gentoaster/daemon.php &
 
 Note the use of sudo, the daemon MUST be ran as root for it to work, otherwise all builds will fail.
 
 Now that the daemon is running, you can try a build, using the sample client:
 
-php5 client.php
+php5 /usr/share/gentoaster/client.php /usr/share/gentoaster/configs/minimal.ini
 
 This will give you some output similar to the following:
 
@@ -61,7 +60,7 @@ Job sent, handle was H:lucidity:3 - hash 6085655f187a8442f82c43ebf98e5fdb
 
 You can check on the status of that build by running the following:
 
-php5 status.php <handle hash>
+php5 /usr/share/gentoaster/status.php <handle hash>
 
 Where <handle hash> is the hash returned by client.php (for example 6085655f187a8442f82c43ebf98e5fdb)
 

diff --git a/client.php b/client.php
index b289a34..ec7e354 100644
--- a/client.php
+++ b/client.php
@@ -3,12 +3,14 @@
         // Gentoaster build daemon client
         // Licensed under GPL v3, see COPYING file
 
+	if(!isset($argv[1])) die("No config file provided\n");
+
 	$client= new GearmanClient();
 	$client->addServer();
 
 	echo "Sending job\n";
 
-	$handle = $client->doBackground("invoke_image_build", file_get_contents("configs/crashtest.ini"));
+	$handle = $client->doBackground("invoke_image_build", file_get_contents($argv[1]));
 	$handlehash = md5($handle);
 
 	echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n";

diff --git a/status.php b/status.php
index 37db751..f5b5da0 100644
--- a/status.php
+++ b/status.php
@@ -12,7 +12,11 @@
 
 		$status = $client->jobStatus($handle);
 		if($status[0]) {
-			echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n";
+			if($status[3] != 0) {
+				echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n";
+			} else {
+				echo "Task has not yet been processed\n";
+			}
 		} else {
 			$result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
 			$jobres = mysql_fetch_array($result);



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-08 22:41 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-08 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     a5205c200d4c7085037d9679d8182e751a8f30c6
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul  8 22:41:21 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul  8 22:41:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=a5205c20

Moving to non-calcuated RootFS size (this makes more sense if we're using a two part slider on the WebUI)

---
 create_image.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index b2d264c..0cc7f4f 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -43,7 +43,7 @@ source ${RUNNING_DIRECTORY}/parse_config.sh ${FLAGS_config} 2>/dev/null || handl
 # Generate a few helper variables using the configuration file
 
 IMAGE_NAME="${BUILD_ID}.image"
-ROOT_MEGABYTES=$(( ${IMAGE_MEGABYTES} - ( ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} + 1 ) ))
+IMAGE_MEGABYTES=$(( ${BOOT_MEGABYTES} + ${SWAP_MEGABYTES} + ${ROOT_MEGABYTES} + 1 ))
 IMAGE_BYTES=$(( ${IMAGE_MEGABYTES} * 1024 * 1024 ))
 IMAGES_OUTPUT_PATH=`pwd`
 IMAGE_WORK_PATH="${IMAGES_OUTPUT_PATH}/${BUILD_ID}"



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-10 23:53 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-10 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     1bae2a947fb5db183361f3cda1440d0192abec3a
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sun Jul 10 23:53:34 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sun Jul 10 23:53:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=1bae2a94

Added compress flag to build tool

---
 create_image.sh |   13 +++++++++++--
 daemon.php      |    2 +-
 status.php      |    2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 0cc7f4f..94004a8 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -29,6 +29,7 @@ RUNNING_DIRECTORY=$(cd `dirname $0` && pwd)
 DEFINE_string 'config' '' 'configuration to build from' 
 DEFINE_string 'proxy' '' 'HTTP proxy to use for emerges'
 DEFINE_boolean 'cachedkernel' false 'use a cached kernel (shortens build time)'
+DEFINE_boolean 'compress' false 'compressed the finished image'
 
 FLAGS "$@" || exit 1
 eval set -- "${FLAGS_ARGV}"
@@ -263,21 +264,29 @@ case "${OUTPUT_FORMAT}" in
 		;;
 	"vbox" )
 		echo "Converting image from RAW to VDI" &>> ${LOG_FILE}
-		qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi || handle_error "Error converting disk image to VDI format"
+		qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi &>> ${LOG_FILE} || handle_error "Error converting disk image to VDI format"
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vdi"
 		;;
 	"vmware" )
 		echo "Converting image from RAW to VMDK" &>> ${LOG_FILE}
-		qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk || handle_error "Error converting disk image to VMDK format"
+		qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk &>> ${LOG_FILE} || handle_error "Error converting disk image to VMDK format"
 		rm -rf ${IMAGE_NAME}
 		IMAGE_OUT="${BUILD_ID}.vmdk"
 		;;
 esac
+
 mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT} || handle_error "Error moving finished image"
 mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log || handle_error "Error moving log file"
+LOG_FILE="${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"
 rm -rf ${IMAGE_WORK_PATH} || handle_error "Error removing working directory"
 
+if [[ ${FLAGS_compress} -eq ${FLAGS_TRUE} ]]; then
+	cd ${IMAGES_OUTPUT_PATH}
+	tar czvf "${BUILD_ID}.tar.gz" "${IMAGE_OUT}" &>> ${LOG_FILE} || handle_error "Error compressing image"
+	IMAGE_OUT="${BUILD_ID}.tar.gz"
+fi
+
 echo "Step 23: Image build completed!"
 echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"
 echo "Your log file is here: ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"

diff --git a/daemon.php b/daemon.php
index 3665abc..af7143b 100644
--- a/daemon.php
+++ b/daemon.php
@@ -45,7 +45,7 @@
 			if(is_writable($build_path)) {
 				chdir($build_path);
 				file_put_contents("config.ini", $configuration_string);
-				$tool_args = "--config config.ini";
+				$tool_args = "--config config.ini --compress";
 				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args." 2>&1", "r");
 
 				$nonstatus_output = "";

diff --git a/status.php b/status.php
index f5b5da0..e5624dd 100644
--- a/status.php
+++ b/status.php
@@ -20,7 +20,7 @@
 		} else {
 			$result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
 			$jobres = mysql_fetch_array($result);
-			if($jobres[0] != NULL) {
+			if($jobres[0] !== NULL) {
 				echo "Job returned with code ".$jobres[0].": ".$jobres[1]."\n";
 			} else {
 				echo "Job failed\n";



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-07-11 14:00 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-07-11 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     cb7c822b0284d11d16b49023162820d1ffca6fdd
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Mon Jul 11 13:59:51 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Mon Jul 11 13:59:51 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=cb7c822b

Fixed hostname setting and changed Gearman daemon/client to meet Zend coding standard

---
 client.php      |   34 +++++++-----
 create_image.sh |    1 +
 daemon.php      |  158 ++++++++++++++++++++++++++++++-------------------------
 status.php      |   65 ++++++++++++----------
 4 files changed, 141 insertions(+), 117 deletions(-)

diff --git a/client.php b/client.php
index ec7e354..ce4bc1f 100644
--- a/client.php
+++ b/client.php
@@ -1,23 +1,27 @@
 <?php
 
-        // Gentoaster build daemon client
-        // Licensed under GPL v3, see COPYING file
+    // Gentoaster build daemon client
+    // Licensed under GPL v3, see COPYING file
 
-	if(!isset($argv[1])) die("No config file provided\n");
+    if(!isset($argv[1])) die("No config file provided\n");
 
-	$client= new GearmanClient();
-	$client->addServer();
+    $client= new GearmanClient();
+    $client->addServer();
 
-	echo "Sending job\n";
+    echo "Sending job\n";
 
-	$handle = $client->doBackground("invoke_image_build", file_get_contents($argv[1]));
-	$handlehash = md5($handle);
+    $iniString = file_get_contents($argv[1]);
 
-	echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n";
+    $handle = $client->doBackground("invoke_image_build", $iniString);
+    $handlehash = md5($handle);
+
+    echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n";
+
+    $db = mysql_connect("localhost", "gentoaster", "");
+    if(!$db) die("Could not connect to database ".mysql_error());
+    mysql_select_db("gentoaster");
+    $query = "INSERT INTO builds (id, handle)".
+            ." VALUES('".$handlehash."','".$handle."')";
+    mysql_query($query);
+    echo "Job handle mapping added to database\n";
 
-	$db = mysql_connect("localhost","gentoaster","");
-	if(!$db) die("Could not connect to database ".mysql_error());
-	mysql_select_db("gentoaster");
-	mysql_query("INSERT INTO builds (id, handle) VALUES('".$handlehash."','".$handle."')");
-	echo "Job handle mapping added to database\n";
-?>

diff --git a/create_image.sh b/create_image.sh
index 94004a8..f87e507 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -192,6 +192,7 @@ echo "Step 13: Setting timezone to ${TIMEZONE}"
 linux32 chroot . cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime &>> ${LOG_FILE}
 
 echo "Step 14: Setting hostname to ${HOSTNAME}"
+linux32 chroot . /bin/bash -c "echo hostname='${HOSTNAME}' > /etc/conf.d/hostname" &>> ${LOG_FILE}
 linux32 chroot . /bin/bash -c "echo 127.0.0.1 ${HOSTNAME}.local ${HOSTNAME} localhost > /etc/hosts" &>> ${LOG_FILE}
 
 echo "Step 15: Copying new fstab"

diff --git a/daemon.php b/daemon.php
index af7143b..a8b36a5 100644
--- a/daemon.php
+++ b/daemon.php
@@ -1,76 +1,90 @@
 <?php
 
-	// Gentoaster build daemon worker
-	// Licensed under GPL v3, see COPYING file
+    // Gentoaster build daemon worker
+    // Licensed under GPL v3, see COPYING file
+
+    $configurationsPath = "/var/www/gentoaster";
+    $gentoasterPath = "/usr/share/gentoaster";
+    $toolName = "create_image.sh";
+
+    // DO NOT EDIT BELOW THIS LINE
+
+    $progressMagic = 23;
+
+    $worker = new GearmanWorker();
+    $worker->addServer();
+    $worker->addFunction("invoke_image_build", "image_build");
+    while ($worker->work());
+
+    function update_result($handle, $returncode, $result)
+    {
+        $result = trim($result);
+        echo "A job finished with return code ".$returncode.": ".$result."\n";
+        $db = mysql_connect("localhost", "gentoaster", "");
+        if(!$db) die("Could not connect to database ".mysql_error());
+        mysql_select_db("gentoaster");
+        $result = mysql_real_escape_string($result);
+        $query = "UPDATE builds".
+        " SET result = '".$result."', returncode = '".$returncode
+        "' WHERE handle = '".mysql_real_escape_string($handle)."'";
+        mysql_query($query);
+        return serialize(array($returncode, $result));
+    }
+
+    function image_build($job)
+    {
+        global $configurationsPath, $gentoasterPath, $toolName, $progressMagic;
+
+        $handle = $job->handle();
+        $handlehash = md5($handle);
+
+        echo "Processing job handle hash ".$handlehash."\n";
+
+        $configurationString = $job->workload();
+        $configurationArray = parse_ini_string($configurationString);
+
+        if ($configurationArray !== FALSE) {
+            if (isset($configurationArray["BUILD_ID"])) {
+                $buildID = $configurationArray["BUILD_ID"];
+                $buildPath = $configurationsPath."/".$buildID;
+                @mkdir($buildPath, 0777, true);
+    
+                if (is_writable($buildPath)) {
+                    chdir($buildPath);
+                    file_put_contents("config.ini", $configurationString);
+                    $toolArgs = "--config config.ini --compress";
+                    $cmd = $gentoasterPath."/".$toolName." ".$toolArgs;
+                    $processHandle = popen($cmd." 2>&1", "r");
+    
+                    $nonstatusOutput = "";
+    
+                    while (!feof($processHandle)) {
+                        $progressLine = fgets($processHandle);
+                        preg_match("/Step (.+):/", $progressLine, $matches);
+                        if (sizeof($matches) > 0) {
+                            $job->sendStatus($matches[1], $progressMagic);
+                        } else {
+                            $nonstatusOutput .= $progressLine;
+                        }
+                    }
+    
+                    $returncode = pclose($processHandle);
+    
+                    unlink("config.ini");
+    
+                    return update_result($handle, $returncode, $nonstatusOutput);
+                } else {
+                    $error = "Configured build path is not writable";
+                    return update_result($handle, -2, $error);
+                }
+            } else {
+                $error = "Configuration file is incomplete";
+                return update_result($handle, -3, $error);
+            }
+        } else {
+            $error = "Configuration string is not valid";
+            return update_result($handle, -4, $error);
+        }
+    }
 
-	$configurations_path = "/var/www/gentoaster";
-	$gentoaster_path = "/usr/share/gentoaster";
-	$tool_name = "create_image.sh";
 
-	// DO NOT EDIT BELOW THIS LINE
-
-	$progress_magic = 23;
-
-	$worker = new GearmanWorker();
-	$worker->addServer();
-	$worker->addFunction("invoke_image_build", "image_build");
-	while ($worker->work());
-
-	function update_result($handle, $returncode, $result) {
-		$result = trim($result);
-		echo "A job finished with return code ".$returncode.": ".$result."\n";
-	        $db = mysql_connect("localhost","gentoaster","");
-        	if(!$db) die("Could not connect to database ".mysql_error());
-        	mysql_select_db("gentoaster");
-		mysql_query("UPDATE builds SET result = '".mysql_real_escape_string($result)."', returncode = '".$returncode."' WHERE handle = '".mysql_real_escape_string($handle)."'");
-		return serialize(array($returncode, $result));
-	}
-
-	function image_build($job) {
-		global $configurations_path, $gentoaster_path, $tool_name, $progress_magic;
-
-		$handle = $job->handle();
-		$handlehash = md5($handle);
-
-		echo "Processing job handle hash ".$handlehash."\n";
-
-		$configuration_string = $job->workload();
-		$configuration_array = parse_ini_string($configuration_string);
-
-		if($configuration_array !== FALSE && isset($configuration_array["BUILD_ID"])) {
-			$build_id = $configuration_array["BUILD_ID"];
-			$build_path = $configurations_path."/".$build_id;
-			@mkdir($build_path, 0777, true);
-
-			if(is_writable($build_path)) {
-				chdir($build_path);
-				file_put_contents("config.ini", $configuration_string);
-				$tool_args = "--config config.ini --compress";
-				$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args." 2>&1", "r");
-
-				$nonstatus_output = "";
-
-				while(!feof($process_handle)) {
-					$progress_line = fgets($process_handle);
-					preg_match("/Step (.+):/", $progress_line, $matches);
-					if(sizeof($matches) > 0) {
-						$job->sendStatus($matches[1], $progress_magic);
-					} else {
-						$nonstatus_output .= $progress_line;
-					}
-				}
-
-				$returncode = pclose($process_handle);
-
-				unlink("config.ini");
-
-				return update_result($handle, $returncode, $nonstatus_output);
-			} else {
-				return update_result($handle, -2, "Configured build path is not writable");
-			}
-		} else {
-			return update_result($handle, -3, "Configuration string is not valid");
-		}
-	}
-
-?>

diff --git a/status.php b/status.php
index e5624dd..a69bc35 100644
--- a/status.php
+++ b/status.php
@@ -1,33 +1,38 @@
 <?php
-	if(!isset($argv[1])) die("No handle hash given\n");
-        $db = mysql_connect("localhost","gentoaster","");
-        if(!$db) die("Could not connect to database ".mysql_error()."\n");
-        mysql_select_db("gentoaster");
-        $result = mysql_query("SELECT handle FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
-	if(mysql_num_rows($result) == 1) {
-		$handles = mysql_fetch_array($result);
-		$handle = $handles[0];
-		$client = new GearmanClient();
-		$client->addServer();
+    if (!isset($argv[1])) die("No handle hash given\n");
+    $db = mysql_connect("localhost", "gentoaster", "");
+    if (!$db) die("Could not connect to database ".mysql_error()."\n");
+    mysql_select_db("gentoaster");
+    $query = "SELECT handle FROM builds ".
+             "WHERE id = '".mysql_real_escape_string($argv[1])."'";
+    $result = mysql_query($query);
+    if (mysql_num_rows($result) == 1) {
+        $handles = mysql_fetch_array($result);
+        $handle = $handles[0];
+        $client = new GearmanClient();
+        $client->addServer();
 
-		$status = $client->jobStatus($handle);
-		if($status[0]) {
-			if($status[3] != 0) {
-				echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n";
-			} else {
-				echo "Task has not yet been processed\n";
-			}
-		} else {
-			$result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
-			$jobres = mysql_fetch_array($result);
-			if($jobres[0] !== NULL) {
-				echo "Job returned with code ".$jobres[0].": ".$jobres[1]."\n";
-			} else {
-				echo "Job failed\n";
-			}
-		}
-	} else {
-		echo "Invalid handle hash\n";
-	}
+        $status = $client->jobStatus($handle);
+        if ($status[0]) {
+            if ($status[3] != 0) {
+                echo "Running: " . ($status[1] ? "true" : "false");
+                echo ", progress: ".ceil($status[2]/$status[3]*100) . "%, ";
+                echo $status[2] . "/" . $status[3] . "\n";
+            } else {
+                echo "Task has not yet been processed\n";
+            }
+        } else {
+            $query = "SELECT returncode, result FROM builds ".
+                     "WHERE id = '".mysql_real_escape_string($argv[1])."'";
+            $result = mysql_query($query);
+            $jobres = mysql_fetch_array($result);
+            if ($jobres[0] !== NULL) {
+                echo "Job returned with code ".$jobres[0].": ".$jobres[1]."\n";
+            } else {
+                echo "Job failed\n";
+            }
+        }
+    } else {
+        echo "Invalid handle hash\n";
+    }
 
-?>



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-12 23:17 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-12 23:17 UTC (permalink / raw
  To: gentoo-commits

commit:     0318eec2f613ed905363c31316fd50ee8bdde85d
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul 15 20:40:31 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul 15 20:40:31 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=0318eec2

Let's try not to nuke /dev if things go wrong

---
 create_image.sh |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index f87e507..77664f1 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -64,8 +64,8 @@ cleanup_mounts() {
 	umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev/shm &>> ${LOG_FILE}
 	umount -d -f ${IMAGE_WORK_PATH}/rootfs/dev &>> ${LOG_FILE}
 	umount -d -f ${IMAGE_WORK_PATH}/rootfs/proc &>> ${LOG_FILE}
-	umount -d -f ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE}
-	umount -d -f ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE}
+	umount -d -f -l  ${IMAGE_WORK_PATH}/rootfs/boot &>> ${LOG_FILE}
+	umount -d -f -l ${IMAGE_WORK_PATH}/rootfs &>> ${LOG_FILE}
 	sleep 2
 }
 
@@ -73,8 +73,7 @@ cleanup_mounts() {
 handle_error() {
 	echo "$1" 
 	cd ${IMAGE_WORK_PATH}
-	cleanup_mounts
-	rm -rf ${IMAGE_WORK_PATH}
+	cleanup_mounts && rm -rf ${IMAGE_WORK_PATH}
 	exit 1
 }
 



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
  2011-07-15 20:41 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
@ 2011-08-12 23:17 ` Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-12 23:17 UTC (permalink / raw
  To: gentoo-commits

commit:     5010a66fb5f1213650410f6fa737dc6db96d8b37
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Jul 15 20:41:32 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Jul 15 20:41:32 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=5010a66f

Also, let's NOT trash the log file when things go wrong. REALLY bad idea.

---
 create_image.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 77664f1..cc4e366 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -73,6 +73,7 @@ cleanup_mounts() {
 handle_error() {
 	echo "$1" 
 	cd ${IMAGE_WORK_PATH}
+	mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log || handle_error "Error moving log file"
 	cleanup_mounts && rm -rf ${IMAGE_WORK_PATH}
 	exit 1
 }



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-12 23:17 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-12 23:17 UTC (permalink / raw
  To: gentoo-commits

commit:     b044891e43062274aee969118a52f05091edc80d
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Jul 28 01:52:53 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Jul 28 04:05:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=b044891e

Add depmod for cachedkernel

---
 create_image.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index cc4e366..30084ba 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -207,8 +207,10 @@ echo "Step 17: Setting up kernel"
 # If we got the flag, used a cached kernel to reduce build times for testing
 if [[ ${FLAGS_cachedkernel} -eq ${FLAGS_TRUE} ]]; then
 	echo "Using cached kernel" &>> ${LOG_FILE}
-	cp ${TOOL_RES_PATH}/bzImage boot/kernel || handle_error "Error copying cached kernel"
-	cp -R ${TOOL_RES_PATH}/kernelmodules/* lib/modules/ || handle_error "Error copying cached kernel modules"
+	KERNEL=`ls -l lib/modules/ | cut -d" " -f9`
+	cp ${TOOL_RES_PATH}/kernel boot/kernel || handle_error "Error copying cached kernel"
+	cp -R ${TOOL_RES_PATH}/modules/* lib/modules/ || handle_error "Error copying cached kernel modules"
+	linux32 chroot . depmod -a ${KERNEL}
 else
 	echo "Downloading/installing kernel sources" &>> ${LOG_FILE}
 	linux32 chroot . emerge gentoo-sources &>> ${LOG_FILE} || handle_error "Error emerging kernel sources"



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-12 23:18 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-12 23:18 UTC (permalink / raw
  To: gentoo-commits

commit:     12d52e1b1505d415e448193fd1b16c59b6219c23
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Aug 11 20:25:50 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Aug 11 20:25:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=12d52e1b

If the kernel config is out of date, try to use defaults to stop the build from failing

---
 create_image.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/create_image.sh b/create_image.sh
index 3858dac..f83c1e3 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -232,6 +232,7 @@ else
 	cp ${TOOL_RES_PATH}/kernelconfig usr/src/linux/.config || handle_error "Error copying kernel config"
 
 	echo "Building kernel" &>> ${LOG_FILE}
+	yes "" | linux32 chroot . make -C /usr/src/linux oldconfig &>> ${LOG_FILE} || handle_error "Error configuring kernel"
 	linux32 chroot . make -C /usr/src/linux -j${NUM_JOBS} &>> ${LOG_FILE} || handle_error "Error building kernel"
 
 	echo "Installing kernel" &>> ${LOG_FILE}



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
  2011-08-11 20:31 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
@ 2011-08-12 23:18 ` Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-12 23:18 UTC (permalink / raw
  To: gentoo-commits

commit:     20aaffd05379b748bb7455bdbbee2d92a13c370a
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Thu Aug 11 20:19:05 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Thu Aug 11 20:19:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=20aaffd0

Added basic installer script and updated README appropriately

---
 README      |   14 +++++++----
 install.php |   74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+), 5 deletions(-)

diff --git a/README b/README
index ddf981e..7a06bf4 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@
 
 Foreword
 =======
-Right now I'm developing this on Ubuntu/Debian, so the following instructions are for those platforms. This will eventually run on Gentoo, of course.
+Right now I'm developing this on Ubuntu/Debian, so the following instructions are for those platforms. If you install the appropriate prerequisites, it will work on Gentoo too, of course.
 
 
 Prerequisites
@@ -39,16 +39,18 @@ Installation
 
 cd /usr/share
 git clone http://git.overlays.gentoo.org/gitroot/proj/gentoaster.git
-
+Configure settings in config.php and web/config.php as appropriate
+Run php5 install.php as root
+Configure a webserver of your choice to server the web folder on the address you specified
 
 Running
 =======
 
-There's no init script for the daemon yet, so simply run as follows:
+The installer will start the daemon for you automatically, but if you need to do this yourself later, run the following as root:
 
-sudo php5 /usr/share/gentoaster/daemon.php &
+/etc/init.d/gentoaster start
 
-Note the use of sudo, the daemon MUST be ran as root for it to work, otherwise all builds will fail.
+The daemon MUST be ran as root for it to work, otherwise all builds will fail.
 
 Now that the daemon is running, you can try a build, using the sample client:
 
@@ -65,3 +67,5 @@ php5 /usr/share/gentoaster/status.php <handle hash>
 Where <handle hash> is the hash returned by client.php (for example 6085655f187a8442f82c43ebf98e5fdb)
 
 If the build is still running, you'll get a progress percentage. If it's finished, the return code and result message will be shown.
+
+If you've setup a webserver, you can also use the WebUI at the address you've configured

diff --git a/install.php b/install.php
new file mode 100644
index 0000000..8bb3515
--- /dev/null
+++ b/install.php
@@ -0,0 +1,74 @@
+<?
+
+    // Gentoaster installer
+    // Licensed under GPL v3, see COPYING file
+    
+    // Check we're running as root
+    $processUser = posix_getpwuid(posix_geteuid());
+    if($processUser['name'] != "root") {
+    	die("This installer must be run as root\n");
+    }
+    
+    // Load the configurations (the web config chainloads the daemon config)
+    echo "Loading configuration\n";
+    require_once "web/config.php";
+    
+    // Basic configuration path sanity checks
+    echo "Checking configuration sanity\n";
+    if(!file_exists(GENTOASTER_PATH."/install.php")) {
+    	die("GENTOASTER_PATH is set incorrectly\n");
+    }
+    
+    // Check database configuration is sane 
+    echo "Connecting to database\n";
+    $db = new mysqli(
+        MYSQL_HOSTNAME, 
+        MYSQL_USERNAME,
+        MYSQL_PASSWORD
+    );
+        
+    if (mysqli_connect_errno()) {
+       die("Could not connect to MySQL server: ".mysqli_connect_error()."\n");
+    }
+    
+    // If we reached here, MySQL details are fine
+    echo "Database connection is OK\n";
+    
+    
+    // Make sure we have a dump file to use
+    if (file_exists(GENTOASTER_PATH."/gentoaster.sql")) {
+    	// Prep MySQL details for shell args
+	    $mysqlHostname = escapeshellarg(MYSQL_HOSTNAME);
+	    $mysqlUsername = escapeshellarg(MYSQL_USERNAME);
+	    $mysqlDatabase = mysql_escape_string(MYSQL_DATABASE);
+	    
+	    // Create shell component for password if required
+	    if (strlen(MYSQL_PASSWORD) > 0) {
+	    	$mysqlPassword = " -p ".escapeshellarg(MYSQL_PASSWORD)." ";
+	    } else {
+	    	$mysqlPassword = " ";
+	    }
+	    
+	    // Drop any existing database here
+	    system('echo "DROP DATABASE IF EXISTS '.$mysqlDatabase.';" | mysql -u '.$mysqlUsername.$mysqlPassword);
+	    
+	    // Create a new database
+	    system('echo "CREATE DATABASE '.$mysqlDatabase.';" | mysql -u '.$mysqlUsername.$mysqlPassword);
+	    
+	    // Import the database dump into that database
+	    system('mysql -u '.$mysqlUsername.$mysqlPassword.$mysqlDatabase.' < gentoaster.sql');
+    } else {
+    	die("SQL file not found, check GENTOASTER_PATH\n");
+    }
+    
+    // Add the initscript for the daemon
+    echo "Adding initscript symlink\n";
+    system("rm -f /etc/init.d/gentoaster");
+    system("ln -s ".GENTOASTER_PATH."/gentoaster /etc/init.d/gentoaster");
+    system("chmod +x ".GENTOASTER_PATH."/gentoaster");
+    
+    echo "Starting Gentoaster daemon\n";
+    exec("/etc/init.d/gentoaster start");
+    
+   	echo "If you didn't see any errors, the install was successful\n";
+   	echo "Try visiting the site at ".GENTOASTER_URL." to make sure everything works\n";
\ No newline at end of file



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-14 15:46 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-14 15:46 UTC (permalink / raw
  To: gentoo-commits

commit:     52c5529495d49f958a89b0a99fddfb4e4d01c1b3
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sun Aug 14 15:46:05 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sun Aug 14 15:46:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=52c55294

Short tags are bad, change to a full tag

---
 install.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.php b/install.php
index 8bb3515..82fd732 100644
--- a/install.php
+++ b/install.php
@@ -1,4 +1,4 @@
-<?
+<?php
 
     // Gentoaster installer
     // Licensed under GPL v3, see COPYING file
@@ -71,4 +71,4 @@
     exec("/etc/init.d/gentoaster start");
     
    	echo "If you didn't see any errors, the install was successful\n";
-   	echo "Try visiting the site at ".GENTOASTER_URL." to make sure everything works\n";
\ No newline at end of file
+   	echo "Try visiting the site at ".GENTOASTER_URL." to make sure everything works\n";



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-15  1:54 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-15  1:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ef8ab5227e92ce1b2a6eec14277bbb1b237ce201
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Mon Aug 15 01:53:48 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Mon Aug 15 01:53:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=ef8ab522

Add Websockify instructions to README

---
 README |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/README b/README
index 7a06bf4..3a3c223 100644
--- a/README
+++ b/README
@@ -19,6 +19,7 @@ qemu-utils
 extlinux
 sfdisk
 git
+websockify
 
 There might be more, I'll update this list at some point. Install these as follows: sudo apt-get install php5-cli php5-dev php5-mysql gearman-job-server qemu-utils extlinux sfdisk git
 
@@ -34,6 +35,12 @@ sudo make install
 
 Add "extension=gearman.so" to your php.ini (probably /etc/php5/cli/php.ini)
 
+Websockify can be installed as follows:
+
+cd /usr/share
+git clone https://github.com/kanaka/websockify.git
+ln -s /usr/share/websockify/websockify /usr/bin/websockify
+
 Installation
 ============
 



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-15  2:00 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-15  2:00 UTC (permalink / raw
  To: gentoo-commits

commit:     885bf33e611611678021bbb84339d8bb0f744e10
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Mon Aug 15 02:00:17 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Mon Aug 15 02:00:17 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=885bf33e

Fix broken CLI status tool

---
 status.php |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/status.php b/status.php
index 2a49fd8..f7b33e5 100644
--- a/status.php
+++ b/status.php
@@ -27,6 +27,7 @@
     $stmt->store_result();
     if ($stmt->num_rows == 1) {
         $stmt->bind_result($handle);
+        $stmt->fetch();
         $stmt->close();
         $client = new GearmanClient();
         $client->addServer();



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-15  2:24 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-15  2:24 UTC (permalink / raw
  To: gentoo-commits

commit:     064ac4ba6b06b6f1ca532749c785d4af5d8d2306
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Mon Aug 15 02:24:38 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Mon Aug 15 02:24:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=064ac4ba

Add Gentoo README (not too different, for now)

---
 README                  |   19 ++++++-------------
 README => README.debian |    0
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/README b/README
index 3a3c223..cceed2c 100644
--- a/README
+++ b/README
@@ -2,28 +2,21 @@
 = Gentoaster README =
 =====================
 
-Foreword
-=======
-Right now I'm developing this on Ubuntu/Debian, so the following instructions are for those platforms. If you install the appropriate prerequisites, it will work on Gentoo too, of course.
-
-
 Prerequisites
 =============
 
 php5-cli
 php5-dev
 php5-mysql
-gearman-job-server
+gearmand
 gearman-php-ext
-qemu-utils
-extlinux
+qemu-img
+syslinux
 sfdisk
 git
 websockify
 
-There might be more, I'll update this list at some point. Install these as follows: sudo apt-get install php5-cli php5-dev php5-mysql gearman-job-server qemu-utils extlinux sfdisk git
-
-The Gearman PHP extension has to be installed manually, as follows:
+PHP must be configured with mysqli support. The Gearman PHP extension has to be installed manually, as follows:
 
 wget http://pecl.php.net/get/gearman-0.7.0.tgz
 tar xvf gearman-0.7.0.tgz
@@ -33,7 +26,7 @@ phpize
 make
 sudo make install
 
-Add "extension=gearman.so" to your php.ini (probably /etc/php5/cli/php.ini)
+Add "extension=gearman.so" to your php.ini (for both CLI and CGI if you have separate configs)
 
 Websockify can be installed as follows:
 
@@ -48,7 +41,7 @@ cd /usr/share
 git clone http://git.overlays.gentoo.org/gitroot/proj/gentoaster.git
 Configure settings in config.php and web/config.php as appropriate
 Run php5 install.php as root
-Configure a webserver of your choice to server the web folder on the address you specified
+Configure a webserver of your choice (I'd recommend nginx with PHP-FPM) to server the web folder on the address you specified
 
 Running
 =======

diff --git a/README b/README.debian
similarity index 100%
copy from README
copy to README.debian



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-19 13:09 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-19 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     25036aff1278fed48a4e78da46e802ec0b5081ac
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Fri Aug 19 13:09:23 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Fri Aug 19 13:09:23 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=25036aff

Fix broken initscript

---
 gentoaster |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gentoaster b/gentoaster
index c625b55..701af52 100755
--- a/gentoaster
+++ b/gentoaster
@@ -7,7 +7,7 @@ GENTOASTER_LOG=/var/log/gentoaster.log
 
 start() {
       ebegin "Starting Gentoaster"
-      start-stop-daemon --start --background --make-pidfile --pidfile ${GENTOASTER_PID} --user "${USER}" --stdout ${GENTOASTER_LOG} --exec /usr/bin/php --$
+      start-stop-daemon --start --background --make-pidfile --pidfile ${GENTOASTER_PID} --user "${USER}" --stdout ${GENTOASTER_LOG} --exec /usr/bin/php -- -f $GENTOASTER
       eend $?
 }
 



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [gentoo-commits] proj/gentoaster:master commit in: /
@ 2011-08-23 21:29 Liam McLoughlin
  0 siblings, 0 replies; 29+ messages in thread
From: Liam McLoughlin @ 2011-08-23 21:29 UTC (permalink / raw
  To: gentoo-commits

commit:     b518e0664feb843a989f872fa9b41b6056aa64f9
Author:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Tue Aug 23 21:29:38 2011 +0000
Commit:     Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Tue Aug 23 21:29:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=b518e066

Add a TODO list

---
 TODO |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/TODO b/TODO
new file mode 100644
index 0000000..7a7b11d
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+Here's a short list of things that need doing or could be done to improve Gentoaster:
+
+* test hardened profile support and create sample config
+* improve package selection system (package name auto-complete, checks that the package set requested can be emerged)
+* fix the keyboard layout list (couldn't find a complete list for this)



^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2011-08-23 21:29 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15  1:54 [gentoo-commits] proj/gentoaster:master commit in: / Liam McLoughlin
  -- strict thread matches above, loose matches on Subject: below --
2011-08-23 21:29 Liam McLoughlin
2011-08-19 13:09 Liam McLoughlin
2011-08-15  2:24 Liam McLoughlin
2011-08-15  2:00 Liam McLoughlin
2011-08-14 15:46 Liam McLoughlin
2011-08-12 23:18 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-11 20:31 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:18 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-15 20:41 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-11 14:00 Liam McLoughlin
2011-07-10 23:53 Liam McLoughlin
2011-07-08 22:41 Liam McLoughlin
2011-07-08 18:47 Liam McLoughlin
2011-07-08 18:35 Liam McLoughlin
2011-07-08 18:27 Liam McLoughlin
2011-07-08 17:27 Liam McLoughlin
2011-07-08  2:45 Liam McLoughlin
2011-06-16  1:01 Liam McLoughlin
2011-06-16  1:01 Liam McLoughlin
2011-06-14 21:28 Liam McLoughlin
2011-06-14 21:03 Liam McLoughlin
2011-06-14 20:44 Liam McLoughlin
2011-06-08  0:06 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-04  3:47 Liam McLoughlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox