Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Dengler <martin@martindengler.com>2009-08-24 15:44:24 (GMT)
committer Martin Dengler <martin@martindengler.com>2009-08-24 15:44:24 (GMT)
commit9d8af7195d3192e4456939cdcf7e7efdc9ea4766 (patch)
tree5b5ffefad51e317c31a890b26fad37df6442193a
parentd4fd1e3c17474b71e7a9ce21efad0e295463416c (diff)
create both SoaS and SoaS-XO imagesforsdz
-rw-r--r--Makefile24
-rwxr-xr-xannounce6
-rwxr-xr-xbuild6
-rw-r--r--soas-aslo-and-content.ks9
-rw-r--r--soas-base.ks303
-rw-r--r--soas-liveuserscripts-eliminate.ks450
-rw-r--r--soas-sugar.ks227
-rw-r--r--soas-xo.ks340
-rw-r--r--soas.ks64
9 files changed, 656 insertions, 773 deletions
diff --git a/Makefile b/Makefile
index ac07efe..bb22f9c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,37 @@
-%.done: %.iso %.removable.img.tar.lzma %.tree.tar.lzma %.img %.plc
+soas%.done: soas%.iso soas%.removable.img.tar.lzma soas%.tree.tar.lzma soasxo%.tree.tar.lzma soasxo%.img soasxo%.plc
touch $@
-%.iso:
- livecd-creator --skip-compression --cache=../cache --fslabel $* -c ../soas-xo.ks
+soasxo%.iso:
+ livecd-creator --skip-compression --cache=../cache --fslabel soasxo$* -c ../soas-xo.ks
md5sum $@ > $@.md5sum
sha1sum $@ > $@.sha1sum
-%.tree: %.iso
+soas%.iso:
+ livecd-creator --skip-compression --cache=../cache --fslabel soas$* -c ../soas.ks
+ md5sum $@ > $@.md5sum
+ sha1sum $@ > $@.sha1sum
+soas%.tree: soas%.iso
../livecd-iso-to-bootable-tree.sh $^ $@
du -sk $@ | cut -f 1 > $@.size.txt
chroot $@ rpm -qa | sort > $@.packages.txt
chroot $@ rpm -qa --queryformat="%10{SIZE}\t%{NAME}\n" | sort -k1,1n > $@.packages-sizes.txt
-%.tree.tar.lzma: %.tree
+soas%.tree.tar.lzma: soas%.tree
tar -c -C $^ . | lzma -1 > $@
md5sum $@ > $@.md5sum
sha1sum $@ > $@.sha1sum
-%.removable.img: %.tree
+soas%.removable.img: soas%.tree
../bootable-tree-to-removable-img.sh $^ $@
du -sk $@ | cut -f 1 > $@.size.txt
-%.removable.img.tar.lzma: %.removable.img
+soas%.removable.img.tar.lzma: soas%.removable.img
tar -c $^ | lzma -1 > $@
md5sum $@ > $@.md5sum
sha1sum $@ > $@.sha1sum
-%.img: %.tree
+soasxo%.img: soasxo%.tree
../bootable-tree-to-xo.sh $^ $@
du -sk $@ | cut -f 1 > $@.size.txt
md5sum $@ > $@.md5sum
sha1sum $@ > $@.sha1sum
-%.plc: %.img
+soasxo%.plc: soasxo%.img
../image-digestor.sh $^
-.PRECIOUS: %.iso %.removable.img %.removable.img.tar.lzma %.tree %.tree.tar.lzma %.img %.plc
+.PRECIOUS: soas%.iso soas%.removable.img soas%.removable.img.tar.lzma soas%.tree soas%.tree.tar.lzma soas%.img soas%.plc
diff --git a/announce b/announce
index 022894e..78e651f 100755
--- a/announce
+++ b/announce
@@ -16,10 +16,10 @@ treesizechange=$(<$builddir/$buildname.tree.size-change.txt)
cat > $announcefile <<EOF
-A new SoaS-on-XO-1 build $buildname is available.
+A new SoaS build $buildname is available.
-NAND size / change in size: $nandsizechange
-ext3 size / change in size: $treesizechange
+total generic ext3 size / change in size: $treesizechange (change)
+total XO-1 NAND size / change in size: $nandsizechange (change)
Package changes:
diff --git a/build b/build
index 7351332..e01580f 100755
--- a/build
+++ b/build
@@ -12,12 +12,12 @@ buildname=$buildstem$nextbuild
date ; date >> ${buildname}.buildlog
echo building $buildname ; echo building $buildname >> ${buildname}.buildlog
/usr/bin/time nice setarch i586 \
- make -j 3 -f ../Makefile ${buildname}.done >> ${buildname}.buildlog 2>&1
+ make -f ../Makefile ${buildname}.done >> ${buildname}.buildlog 2>&1
-for ext in tree removable.img img ; do
+for ext in tree removable.img xo.img ; do
prevsize=$(< $prevbuild.$ext.size.txt)
nextsize=$(< $buildname.$ext.size.txt)
- python -c "oldk = $prevsize ; newk = $nextsize ; print '%0.2fM / %dK /' % (newk / 1024.0, newk - oldk)" > $buildname.$ext.size-change.txt
+ python -c "oldk = $prevsize ; newk = $nextsize ; print '%0.2fM / %dK' % (newk / 1024.0, newk - oldk)" > $buildname.$ext.size-change.txt
done
diff -U 1 $prevbuild.tree.packages.txt $buildname.tree.packages.txt | grep -v ^@@ > $buildname.tree.package-changes.txt
diff --git a/soas-aslo-and-content.ks b/soas-aslo-and-content.ks
index b4326f3..a383806 100644
--- a/soas-aslo-and-content.ks
+++ b/soas-aslo-and-content.ks
@@ -8,7 +8,6 @@ ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/file/25894/bro
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4027" # turtleart
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4028" # read
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4032" # imageviewer
-ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4035" # read e-texts
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4041" # pippy
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4043" # terminal
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4045" # jukebox
@@ -18,8 +17,10 @@ ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4076" #
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4201" # write
# Honey subset
+ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4026" # Typing Turtle
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4029" # IRC
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4034" # Moon
+ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4035" # read e-texts
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4037" # CartoonBuilder
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4038" # Speak
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4039" # ViewSlides
@@ -44,7 +45,9 @@ ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4081" #
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4082" # Paint
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4088" # Tux Paint
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4089" # Library
+ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4091" # Clock
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4193" # Physics
+ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4194" # Get Internet Archive Books
ASLO="$ASLO http://activities.sugarlabs.org/en-US/sugar/downloads/latest/4204" # Arithmetic
WD=$PWD
@@ -88,10 +91,14 @@ done
# get the script to install the activities
cp -p $WD/../install-activity.py .
+chmod a+x ./install-activity.py
# get sample content setup script directly from git
cp -p $WD/../copy-to-datastore.py .
+chmod a+x ./copy-to-datastore.py
+# FIXME: this should be the same uid as CREATE_USERNAME *in the chroot*,
+# but is hardcoded here for simplicity
chown -R 500:500 $BUNDLES_DIR
cd $WD
diff --git a/soas-base.ks b/soas-base.ks
index ef152df..0000504 100644
--- a/soas-base.ks
+++ b/soas-base.ks
@@ -6,7 +6,9 @@ selinux --disabled
firewall --disabled
xconfig --startxonboot
bootloader --timeout=1
-part / --size 1536
+#part / --size 1536
+# FIXME: bring down below 2G for 2G removable images
+part / --size 3536
services --enabled=abrt,NetworkManager --disabled=acpid,auditd,cups,dnsmasq,exim,ip6tables,iptables,irda,kerneloops,mdmonitor,netfs,network,nfs,nfslock,nscd,portreserve,rpcbind,rpcgssd,rpcidmapd,sshd
# We're on Rawhide now. Switch to F12 Alpha.
@@ -17,7 +19,6 @@ repo --name=rawhide --baseurl=http://kojipkgs.fedoraproject.org/mash/rawhide-200
@base-x
@core
@hardware-support
-kernel
# save some space
-cracklib-dicts
@@ -113,309 +114,15 @@ generic-release-notes
# bits to set up the livecd while anaconda has been removed here
isomd5sum
+
%end
%post
-# FIXME: it'd be better to get this installed from a package
-cat > /etc/rc.d/init.d/livesys << EOF
-#!/bin/bash
-#
-# live: Init script for live image
-#
-# chkconfig: 345 00 99
-# description: Init script for live image.
-
-. /etc/init.d/functions
-
-if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
- exit 0
-fi
-
-if [ -e /.liveimg-configured ] ; then
- configdone=1
-fi
-
-exists() {
- which \$1 >/dev/null 2>&1 || return
- \$*
-}
-
-touch /.liveimg-configured
-
-# mount live image
-if [ -b \`readlink -f /dev/live\` ]; then
- mkdir -p /mnt/live
- mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
-fi
-
-livedir="LiveOS"
-for arg in \`cat /proc/cmdline\` ; do
- if [ "\${arg##live_dir=}" != "\${arg}" ]; then
- livedir=\${arg##live_dir=}
- return
- fi
-done
-
-# enable swaps unless requested otherwise
-swaps=\`blkid -t TYPE=swap -o device\`
-if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
- for s in \$swaps ; do
- action "Enabling swap partition \$s" swapon \$s
- done
-fi
-if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/\${livedir}/swap.img ] ; then
- action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
-fi
-
-mountPersistentHome() {
- # support label/uuid
- if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
- homedev=\`/sbin/blkid -o device -t "\$homedev"\`
- fi
-
- # if we're given a file rather than a blockdev, loopback it
- if [ "\${homedev##mtd}" != "\${homedev}" ]; then
- # mtd devs don't have a block device but get magic-mounted with -t jffs2
- mountopts="-t jffs2"
- elif [ ! -b "\$homedev" ]; then
- loopdev=\`losetup -f\`
- if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
- action "Remounting live store r/w" mount -o remount,rw /mnt/live
- fi
- losetup \$loopdev \$homedev
- homedev=\$loopdev
- fi
-
- # if it's encrypted, we need to unlock it
- if [ "\$(/lib/udev/vol_id -t \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
- echo
- echo "Setting up encrypted /home device"
- plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
- homedev=/dev/mapper/EncHome
- fi
-
- # and finally do the mount
- mount \$mountopts \$homedev /home
- # if we have /home under what's passed for persistent home, then
- # we should make that the real /home. useful for mtd device on liveuser
- if [ -d /home/home ]; then mount --bind /home/home /home ; fi
- [ -x /sbin/restorecon ] && /sbin/restorecon /home
- if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
-}
-
-findPersistentHome() {
- for arg in \`cat /proc/cmdline\` ; do
- if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
- homedev=\${arg##persistenthome=}
- return
- fi
- done
-}
-
-if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
- findPersistentHome
-elif [ -e /mnt/live/\${livedir}/home.img ]; then
- homedev=/mnt/live/\${livedir}/home.img
-fi
-
-# if we have a persistent /home, then we want to go ahead and mount it
-if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
- action "Mounting persistent /home" mountPersistentHome
-fi
-
-# make it so that we don't do writing to the overlay for things which
-# are just tmpdirs/caches
-mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
-mount -t tmpfs tmp /tmp
-mount -t tmpfs vartmp /var/tmp
-[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
-
-if [ -n "\$configdone" ]; then
- exit 0
-fi
-
-# add soas user with no passwd
-/usr/sbin/useradd -m -c "soas user" -G audio,wheel liveuser
-/usr/bin/passwd -d liveuser
-
-# allow sudo for liveuser user
-echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-
-# don't start yum-updatesd for livecd boots
-chkconfig --level 345 yum-updatesd off 2>/dev/null
-
-# turn off mdmonitor by default
-chkconfig --level 345 mdmonitor off 2>/dev/null
-
-# turn off setroubleshoot on the live image to preserve resources
-chkconfig --level 345 setroubleshoot off 2>/dev/null
-
-# don't do packagekit checking by default
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_upgrades never >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_refresh_cache never >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_available false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_distro_upgrades false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null
-
-
-# don't start cron/at as they tend to spawn things which are
-# disk intensive that are painful on a live image
-chkconfig --level 345 crond off 2>/dev/null
-chkconfig --level 345 atd off 2>/dev/null
-chkconfig --level 345 anacron off 2>/dev/null
-chkconfig --level 345 readahead_early off 2>/dev/null
-chkconfig --level 345 readahead_later off 2>/dev/null
-
-# Stopgap fix for RH #217966; should be fixed in HAL instead
-touch /media/.hal-mtab
-
-# workaround clock syncing on shutdown that we don't want (#297421)
-sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
-
-# and hack so that we eject the cd on shutdown if we're using a CD...
-if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
- cat >> /sbin/halt.local << FOE
-#!/bin/bash
-# we want to eject the cd on halt, but let's also try to avoid
-# io errors due to not being able to get files...
-cat /sbin/halt > /dev/null
-cat /sbin/reboot > /dev/null
-/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
-echo "Please remove the CD from your drive and press Enter to finish restarting"
-read -t 30 < /dev/console
-FOE
-chmod +x /sbin/halt.local
-fi
-
-EOF
-
-# bah, hal starts way too late
-cat > /etc/rc.d/init.d/livesys-late << EOF
-#!/bin/bash
-#
-# live: Late init script for live image
-#
-# chkconfig: 345 99 01
-# description: Late init script for live image.
-
-. /etc/init.d/functions
-
-if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
- exit 0
-fi
-
-exists() {
- which \$1 >/dev/null 2>&1 || return
- \$*
-}
-
-touch /.liveimg-late-configured
-
-# read some variables out of /proc/cmdline
-for o in \`cat /proc/cmdline\` ; do
- case \$o in
- ks=*)
- ks="\${o#ks=}"
- ;;
- xdriver=*)
- xdriver="--set-driver=\${o#xdriver=}"
- ;;
- esac
-done
-
-# this is a bad hack to work around #460581 for the geode
-# purely to help move testing along for now
-if [ \`grep -c Geode /proc/cpuinfo\` -ne 0 ]; then
- cat > /etc/X11/xorg.conf <<FOE
-Section "ServerLayout"
- Identifier "Default Layout"
- Screen 0 "Screen0" 0 0
- InputDevice "Keyboard0" "CoreKeyboard"
-EndSection
-
-Section "InputDevice"
-# keyboard added by rhpxl
- Identifier "Keyboard0"
- Driver "kbd"
- Option "XkbModel" "pc105"
- Option "XkbLayout" "us"
-EndSection
-
-Section "Monitor"
- Identifier "Monitor0"
- HorizSync 30-67
- VertRefresh 48-52
- DisplaySize 152 114
- Mode "1200x900"
- DotClock 57.275
- HTimings 1200 1208 1216 1240
- VTimings 900 905 908 912
- Flags "-HSync" "-VSync"
- EndMode
-EndSection
-
-Section "Device"
- Identifier "Videocard0"
- Driver "amd"
- VendorName "Advanced Micro Devices, Inc."
- BoardName "AMD Geode GX/LX"
-
- Option "AccelMethod" "EXA"
- Option "NoCompression" "true"
- Option "MigrationHeuristic" "greedy"
- Option "PanelGeometry" "1200x900"
-EndSection
-
-Section "Screen"
- Identifier "Screen0"
- Device "Videocard0"
- Monitor "Monitor0"
- DefaultDepth 16
- SubSection "Display"
- Depth 16
- Modes "1200x900"
- EndSubSection
-EndSection
-FOE
-
-echo "Xft.dpi: 150" > /home/liveuser/.Xresources
-
-fi
-
-# if liveinst or textinst is given, start anaconda
-if strstr "\`cat /proc/cmdline\`" liveinst ; then
- plymouth --quit
- /usr/sbin/liveinst \$ks
-fi
-if strstr "\`cat /proc/cmdline\`" textinst ; then
- plymouth --quit
- /usr/sbin/liveinst --text \$ks
-fi
-
-# configure X, allowing user to override xdriver
-if [ -n "\$xdriver" ]; then
- exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
-fi
-
-EOF
# workaround avahi segfault (#279301)
touch /etc/resolv.conf
/sbin/restorecon /etc/resolv.conf
-chmod 755 /etc/rc.d/init.d/livesys
-/sbin/restorecon /etc/rc.d/init.d/livesys
-/sbin/chkconfig --add livesys
-
-chmod 755 /etc/rc.d/init.d/livesys-late
-/sbin/restorecon /etc/rc.d/init.d/livesys-late
-/sbin/chkconfig --add livesys-late
-
# work around for poor key import UI in PackageKit
rm -f /var/lib/rpm/__db*
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
@@ -423,8 +130,6 @@ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
# go ahead and pre-make the man -k cache (#455968)
/usr/sbin/makewhatis -w
-# save a little bit of space at least...
-rm -f /boot/initrd*
# make sure there aren't core files lying around
rm -f /core*
diff --git a/soas-liveuserscripts-eliminate.ks b/soas-liveuserscripts-eliminate.ks
new file mode 100644
index 0000000..5954abf
--- /dev/null
+++ b/soas-liveuserscripts-eliminate.ks
@@ -0,0 +1,450 @@
+
+%post
+
+CREATE_USERNAME=liveuser
+
+# FIXME: this script should go away unless we are going to support read-only media
+cat > /etc/rc.d/init.d/livesys << EOF
+#!/bin/bash
+#
+# live: Init script for live image
+#
+# chkconfig: 345 00 99
+# description: Init script for live image.
+
+. /etc/init.d/functions
+
+if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
+ exit 0
+fi
+
+if [ -e /.liveimg-configured ] ; then
+ configdone=1
+fi
+
+exists() {
+ which \$1 >/dev/null 2>&1 || return
+ \$*
+}
+
+touch /.liveimg-configured
+
+# mount live image
+if [ -b \`readlink -f /dev/live\` ]; then
+ mkdir -p /mnt/live
+ mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
+fi
+
+livedir="LiveOS"
+for arg in \`cat /proc/cmdline\` ; do
+ if [ "\${arg##live_dir=}" != "\${arg}" ]; then
+ livedir=\${arg##live_dir=}
+ return
+ fi
+done
+
+# enable swaps unless requested otherwise
+swaps=\`blkid -t TYPE=swap -o device\`
+if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
+ for s in \$swaps ; do
+ action "Enabling swap partition \$s" swapon \$s
+ done
+fi
+if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/\${livedir}/swap.img ] ; then
+ action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
+fi
+
+mountPersistentHome() {
+ # support label/uuid
+ if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
+ homedev=\`/sbin/blkid -o device -t "\$homedev"\`
+ fi
+
+ # if we're given a file rather than a blockdev, loopback it
+ if [ "\${homedev##mtd}" != "\${homedev}" ]; then
+ # mtd devs don't have a block device but get magic-mounted with -t jffs2
+ mountopts="-t jffs2"
+ elif [ ! -b "\$homedev" ]; then
+ loopdev=\`losetup -f\`
+ if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
+ action "Remounting live store r/w" mount -o remount,rw /mnt/live
+ fi
+ losetup \$loopdev \$homedev
+ homedev=\$loopdev
+ fi
+
+ # if it's encrypted, we need to unlock it
+ if [ "\$(/lib/udev/vol_id -t \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
+ echo
+ echo "Setting up encrypted /home device"
+ plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
+ homedev=/dev/mapper/EncHome
+ fi
+
+ # and finally do the mount
+ mount \$mountopts \$homedev /home
+ # if we have /home under what's passed for persistent home, then
+ # we should make that the real /home. useful for mtd device on $CREATE_USERNAME
+ if [ -d /home/home ]; then mount --bind /home/home /home ; fi
+ [ -x /sbin/restorecon ] && /sbin/restorecon /home
+ if [ -d /home/$CREATE_USERNAME ]; then USERADDARGS="-M" ; fi
+}
+
+findPersistentHome() {
+ for arg in \`cat /proc/cmdline\` ; do
+ if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
+ homedev=\${arg##persistenthome=}
+ return
+ fi
+ done
+}
+
+if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
+ findPersistentHome
+elif [ -e /mnt/live/\${livedir}/home.img ]; then
+ homedev=/mnt/live/\${livedir}/home.img
+fi
+
+# if we have a persistent /home, then we want to go ahead and mount it
+if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
+ action "Mounting persistent /home" mountPersistentHome
+fi
+
+# make it so that we don't do writing to the overlay for things which
+# are just tmpdirs/caches
+mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
+mount -t tmpfs tmp /tmp
+mount -t tmpfs vartmp /var/tmp
+[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
+
+if [ -n "\$configdone" ]; then
+ exit 0
+fi
+
+# add soas user with no passwd
+/usr/sbin/useradd -m -c "SoaS user" -G audio,wheel $CREATE_USERNAME
+/usr/bin/passwd -d $CREATE_USERNAME
+chown -R $CREATE_USERNAME:$CREATE_USERNAME /home/$CREATE_USERNAME
+
+# allow sudo for CREATE_USERNAME user
+echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+# don't start yum-updatesd for livecd boots
+chkconfig --level 345 yum-updatesd off 2>/dev/null
+
+# turn off mdmonitor by default
+chkconfig --level 345 mdmonitor off 2>/dev/null
+
+# turn off setroubleshoot on the live image to preserve resources
+chkconfig --level 345 setroubleshoot off 2>/dev/null
+
+# don't do packagekit checking by default
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_upgrades never >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_refresh_cache never >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_available false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_distro_upgrades false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null
+
+
+# don't start cron/at as they tend to spawn things which are
+# disk intensive that are painful on a live image
+chkconfig --level 345 crond off 2>/dev/null
+chkconfig --level 345 atd off 2>/dev/null
+chkconfig --level 345 anacron off 2>/dev/null
+chkconfig --level 345 readahead_early off 2>/dev/null
+chkconfig --level 345 readahead_later off 2>/dev/null
+
+# Stopgap fix for RH #217966; should be fixed in HAL instead
+touch /media/.hal-mtab
+
+# workaround clock syncing on shutdown that we don't want (#297421)
+sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
+
+# and hack so that we eject the cd on shutdown if we're using a CD...
+if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
+ cat >> /sbin/halt.local << FOE
+#!/bin/bash
+# we want to eject the cd on halt, but let's also try to avoid
+# io errors due to not being able to get files...
+cat /sbin/halt > /dev/null
+cat /sbin/reboot > /dev/null
+/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
+echo "Please remove the CD from your drive and press Enter to finish restarting"
+read -t 30 < /dev/console
+FOE
+chmod +x /sbin/halt.local
+fi
+
+EOF
+
+
+
+
+# workaround hal starting late
+cat > /etc/rc.d/init.d/livesys-late << EOF
+#!/bin/bash
+#
+# live: Late init script for live image
+#
+# chkconfig: 345 99 01
+# description: Late init script for live image.
+
+. /etc/init.d/functions
+
+if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
+ exit 0
+fi
+
+exists() {
+ which \$1 >/dev/null 2>&1 || return
+ \$*
+}
+
+touch /.liveimg-late-configured
+
+# read some variables out of /proc/cmdline
+for o in \`cat /proc/cmdline\` ; do
+ case \$o in
+ ks=*)
+ ks="\${o#ks=}"
+ ;;
+ xdriver=*)
+ xdriver="--set-driver=\${o#xdriver=}"
+ ;;
+ esac
+done
+
+# this is a bad hack to work around #460581 for the geode
+# purely to help move testing along for now
+if [ \`grep -c Geode /proc/cpuinfo\` -ne 0 ]; then
+ cat > /etc/X11/xorg.conf <<FOE
+Section "ServerLayout"
+ Identifier "Default Layout"
+ Screen 0 "Screen0" 0 0
+ InputDevice "Keyboard0" "CoreKeyboard"
+EndSection
+
+Section "InputDevice"
+# keyboard added by rhpxl
+ Identifier "Keyboard0"
+ Driver "kbd"
+ Option "XkbModel" "pc105"
+ Option "XkbLayout" "us"
+EndSection
+
+Section "Monitor"
+ Identifier "Monitor0"
+ HorizSync 30-67
+ VertRefresh 48-52
+ DisplaySize 152 114
+ Mode "1200x900"
+ DotClock 57.275
+ HTimings 1200 1208 1216 1240
+ VTimings 900 905 908 912
+ Flags "-HSync" "-VSync"
+ EndMode
+EndSection
+
+Section "Device"
+ Identifier "Videocard0"
+ Driver "amd"
+ VendorName "Advanced Micro Devices, Inc."
+ BoardName "AMD Geode GX/LX"
+
+ Option "AccelMethod" "EXA"
+ Option "NoCompression" "true"
+ Option "MigrationHeuristic" "greedy"
+ Option "PanelGeometry" "1200x900"
+EndSection
+
+Section "Screen"
+ Identifier "Screen0"
+ Device "Videocard0"
+ Monitor "Monitor0"
+ DefaultDepth 16
+ SubSection "Display"
+ Depth 16
+ Modes "1200x900"
+ EndSubSection
+EndSection
+FOE
+
+echo "Xft.dpi: 150" > /home/$CREATE_USERNAME/.Xresources
+
+fi
+
+# if liveinst or textinst is given, start anaconda
+if strstr "\`cat /proc/cmdline\`" liveinst ; then
+ plymouth --quit
+ /usr/sbin/liveinst \$ks
+fi
+if strstr "\`cat /proc/cmdline\`" textinst ; then
+ plymouth --quit
+ /usr/sbin/liveinst --text \$ks
+fi
+
+# configure X, allowing user to override xdriver
+if [ -n "\$xdriver" ]; then
+ exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
+fi
+
+EOF
+
+chmod 755 /etc/rc.d/init.d/livesys
+/sbin/restorecon /etc/rc.d/init.d/livesys
+/sbin/chkconfig --add livesys
+
+chmod 755 /etc/rc.d/init.d/livesys-late
+/sbin/restorecon /etc/rc.d/init.d/livesys-late
+/sbin/chkconfig --add livesys-late
+
+
+
+##################
+# BEGIN avoid livesys script at every boot
+
+# put /tmp on tmpfs
+# FIXME: should be unnecessary
+cat >> /etc/fstab <<EOF
+/tmp /tmp tmpfs rw 0 0
+EOF
+
+# add user CREATE_USERNAME
+/usr/sbin/useradd -m -c "SoaS user" -G audio,wheel $CREATE_USERNAME
+/usr/bin/passwd -d $CREATE_USERNAME
+chown -R $CREATE_USERNAME:$CREATE_USERNAME /home/$CREATE_USERNAME
+
+# allow sudo for CREATE_USERNAME user
+echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+# make sure the fonts are not too big in Sugar
+# FIXME: remove when http://dev.laptop.org/ticket/9331 is fixed
+echo "Xft.dpi: 201" > /home/$CREATE_USERNAME/.Xresources
+chown $CREATE_USERNAME:$CREATE_USERNAME /home/$CREATE_USERNAME/.Xresources
+
+# make sure the fonts are not too big in GNOME
+# FIXME: remove when http://dev.laptop.org/ticket/9331 is fixed
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t float /desktop/gnome/font_rendering/dpi 201 >/dev/null
+
+# install activities
+BUNDLES_DIR=/usr/share/sugar/bundles
+ACTIVITIES_DIR=/home/$CREATE_USERNAME/Activities
+chown -R $CREATE_USERNAME:$CREATE_USERNAME $BUNDLES_DIR
+mkdir /home/$CREATE_USERNAME/Activities
+chown -R $CREATE_USERNAME:$CREATE_USERNAME $ACTIVITIES_DIR
+cd $BUNDLES_DIR
+for file in *.xo; do
+ su $CREATE_USERNAME -c "./install-activity.py $file"
+done
+rm -f install-activity.py
+
+# execute sample content script and clean up afterwards
+su $CREATE_USERNAME -c ./copy-to-datastore.py
+rm -f *.pdf copy-to-datastore.py
+
+# END avoid livesys scripts at every boot
+##################
+
+
+##################
+# BEGIN CREATE_USERNAME .xsession
+
+cat >> /home/$CREATE_USERNAME/.xsession <<EOF
+
+# full debugging on
+export LM_DEBUG=net
+export GABBLE_DEBUG=all
+export GABBLE_LOGFILE=/home/$CREATE_USERNAME/.sugar/default/logs/telepathy-gabble.log
+export SALUT_DEBUG=all
+export SALUT_LOGFILE=/home/$CREATE_USERNAME/.sugar/default/logs/telepathy-salut.log
+export GIBBER_DEBUG=all
+export PRESENCESERVICE_DEBUG=1
+export SUGAR_LOGGER_LEVEL=debug
+
+# Uncomment the following line to enable core dumps
+#ulimit -c unlimited
+
+# Uncomment the following line to debug sugar startup problems
+#exec xterm
+
+# If you drop out of this script, the normal olpc-session will proceed
+# Uncomment the following line to prevent it
+#exit 0
+
+# xcompmgr is disabled in SoaS Strawberry because it is lightly tested
+# and known to cause undesired visual artifacts; for example, palettes
+# can fail to disappear often enough to be very annoying
+#
+#(sleep 5 ; xcompmgr ) &
+
+EOF
+
+# END olpc .xsession
+##################
+
+
+
+##################
+# BEGIN Xclients setup
+# FIXME: this should be unnecessary and might break things
+cat >> /home/$CREATE_USERNAME/.Xclients << FOE
+xsetroot -def
+
+eval \\\$(dbus-launch --sh-syntax --exit-with-session)
+
+RESOLUTION=\\\$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")
+if [ "\\\$RESOLUTION" -gt 150 ]; then
+ SUGAR_SCALING=100
+else
+ SUGAR_SCALING=72
+fi
+
+SUGAR_SCALING=\\\$SUGAR_SCALING sugar
+FOE
+
+chmod a+x /home/$CREATE_USERNAME/.Xclients
+chown $CREATE_USERNAME:$CREATE_USERNAME /home/$CREATE_USERNAME/.Xclients
+# END Xclients setup
+##################
+
+
+
+##################
+# BEGIN make sugar default
+cat > /home/$CREATE_USERNAME/.dmrc <<EOF
+[Desktop]
+Layout=olpc
+Session=sugar
+EOF
+# END make sugar default
+##################
+
+
+
+##################
+# BEGIN make /var/log/messages a+r so Log activity can see it
+chmod a+r /var/log/messages
+# END make /var/log/messages a+r so Log activity can see it
+##################
+ive
+
+##################
+# BEGIN setup services
+for service in auditd cpuspeed cups dnsmasq exim firstboot iptables ip6tables irda mdmonitor netfs network nfs nfslock nscd portreserve rpcbind rpcgssd rpcidmapd ; do
+ /sbin/chkconfig --level 2345 $service off
+done
+
+for service in avahi-daemon sshd ; do
+ /sbin/chkconfig --level 2345 $service on
+done
+# something triggers prompting, so just turn it off with a big hammer
+sed -i -e 's/PROMPT=yes/PROMPT=no/;' /etc/sysconfig/init
+# END setup services
+##################
+
+%end
diff --git a/soas-sugar.ks b/soas-sugar.ks
index 79292bb..6aa4baa 100644
--- a/soas-sugar.ks
+++ b/soas-sugar.ks
@@ -1,4 +1,5 @@
%include soas-base.ks
+%include soas-aslo-and-content.ks
repo --name=sugar --baseurl=http://download.sugarlabs.org/soas/repositories/3/
@@ -15,22 +16,12 @@ csound-python
espeak
gnome-python2-evince
libffi
-libxml2-python
+libxml2-python
metacity
numpy
pyabiword
pygame
-# additional packages
-DeviceKit-disks
-evince-djvu
-gdm
-gvfs
-vte
-
-# e-mail client
-alpine
-
# multimedia implementations
gnash-plugin
@@ -40,136 +31,21 @@ plymouth-theme-soas
# allow better power management
gnome-power-manager
-# additional wifi support
-b43-openfwwf
-
# enable automatic bug reporting
abrt*
-kerneloops
-# include first boot configuration
-firstboot
-smolt-firstboot
-
-# get ready for installer support
-gparted
-zyx-liveinstaller
-
-# sound
-pulseaudio
-alsa-plugins-pulseaudio
-alsa-utils
-gstreamer-plugins-good
-gstreamer-plugins-espeak
-
-# fonts
-google-droid-fonts-common
-google-droid-sans-fonts
-google-droid-sans-mono-fonts
-google-droid-serif-fonts
-
-%end
-
-%post --nochroot
-
-# fructose collection
-ASLO="$ASLO 4024" # Browse
-ASLO="$ASLO 4027" # Turtle Art
-ASLO="$ASLO 4028" # Read
-ASLO="$ASLO 4032" # Imageviewer
-ASLO="$ASLO 4041" # Pippy
-ASLO="$ASLO 4043" # Terminal
-ASLO="$ASLO 4045" # Jukebox
-ASLO="$ASLO 4056" # Log
-ASLO="$ASLO 4069" # Chat
-ASLO="$ASLO 4076" # Calculator
-ASLO="$ASLO 4201" # Write
-
-# honey selection
-ASLO="$ASLO 4026" # Typing Turtle
-ASLO="$ASLO 4029" # IRC
-ASLO="$ASLO 4034" # Moon
-ASLO="$ASLO 4035" # Read ETexts
-ASLO="$ASLO 4037" # CartoonBuilder
-ASLO="$ASLO 4038" # Speak
-ASLO="$ASLO 4039" # ViewSlides
-ASLO="$ASLO 4041" # Pippy
-ASLO="$ASLO 4042" # InfoSlicer
-ASLO="$ASLO 4044" # FlipSticks
-ASLO="$ASLO 4046" # JigsawPuzzle
-ASLO="$ASLO 4047" # SliderPuzzle
-ASLO="$ASLO 4050" # Colors
-ASLO="$ASLO 4054" # FreeCell
-ASLO="$ASLO 4063" # Memorize
-ASLO="$ASLO 4064" # JokeMachine
-ASLO="$ASLO 4073" # StoryBuilder
-ASLO="$ASLO 4074" # Poll
-ASLO="$ASLO 4078" # Labyrinth
-ASLO="$ASLO 4081" # Record
-ASLO="$ASLO 4082" # Paint
-ASLO="$ASLO 4089" # Library
-ASLO="$ASLO 4191" # Clock
-ASLO="$ASLO 4193" # Physics
-ASLO="$ASLO 4194" # Get Internet Archive Books
-ASLO="$ASLO 4204" # Arithmetic
-
-WD=$PWD
-BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/bundles
-
-mkdir -p $BUNDLES_DIR
-cd $BUNDLES_DIR
-
-for id in $ASLO ; do
- wget http://activities.sugarlabs.org/en-US/sugar/downloads/latest/$id
-done
-
-# get the script to install the activities
-wget http://git.sugarlabs.org/projects/soas/repos/mainline/blobs/raw/2d1057e6d8e74aecfa82c0b8e51a2c8d772a7923/install-activity.py
-
-# pull sample content for the journal
-PDFS="$PDFS south_america.pdf"
-PDFS="$PDFS africa.pdf"
-PDFS="$PDFS asia.pdf"
-PDFS="$PDFS central_america.pdf"
-PDFS="$PDFS europe.pdf"
-PDFS="$PDFS middle_east.pdf"
-PDFS="$PDFS north_america.pdf"
-PDFS="$PDFS oceania.pdf"
-PDFS="$PDFS southeast_asia.pdf"
-
-for pdf in $PDFS ; do
- wget http://dev.sugarlabs.org/raw-attachment/ticket/840/$pdf
-done
-
-# get sample content setup script directly from git
-wget http://git.sugarlabs.org/projects/soas/repos/mainline/blobs/raw/8ad00566985860f9891aea714c74e5430e9c395d/copy-to-datastore.py
-
-chown -R 500:500 $BUNDLES_DIR
-cd $WD
-
%end
%post
-# make sure to include date of compose
-echo `date -R` >> /etc/redhat-release
+# make sure to include date of composition
+echo `date -R` >> /etc/fedora-release
# setup e-mail for bug reports
sed -i 's/root@localhost/feedback@sugarlabs.org/g' /etc/abrt/plugins/Mailx.conf
-cat >> /etc/rc.d/init.d/livesys << EOF
-
-# try to work-around issues with NM and APs
-rm -f /etc/NetworkManager/dispatcher.d/05-netfs
-
-# fix issues with dbus and ck
-rm -f /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh
-
-# permanently set %__dbi_cdb rpm macro to work around jffs2's lack of writeable mmap()
-mkdir -p /etc/rpm
-echo "%__dbi_cdb create private nommap" > /etc/rpm/macros.rpmdb
-
-# add Sugar repository to yum
+# add yum repos
cat >> /etc/yum.repos.d/sugar.repo << FOE
[sugar]
name=Sugar
@@ -179,29 +55,6 @@ enabled=1
gpgcheck=0
FOE
-# fix permissions on home directory
-chown liveuser /home/liveuser
-chgrp liveuser /home/liveuser
-
-# setup Xclients
-cat >> /home/liveuser/.Xclients << FOE
-xsetroot -def
-
-eval \\\$(dbus-launch --sh-syntax --exit-with-session)
-
-RESOLUTION=\\\$(xdpyinfo | grep resolution | sed "s/.* \\([0-9][0-9]*\\)x.*/\\1/")
-if [ "\\\$RESOLUTION" -gt 150 ]; then
- SUGAR_SCALING=100
-else
- SUGAR_SCALING=72
-fi
-
-SUGAR_SCALING=\\\$SUGAR_SCALING sugar
-FOE
-
-chmod a+x /home/liveuser/.Xclients
-chown liveuser:liveuser /home/liveuser/.Xclients
-
# disable the logout menu item in Sugar
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/show_logout false >/dev/null
@@ -226,38 +79,46 @@ vu.lux.olpc.Speak
org.worldwideworkshop.olpc.JigsawPuzzle
FOE
-# unzip activities and clean up
-cd /usr/share/sugar/bundles
-ACTIVITY_DIR=/home/liveuser/Activities
-mkdir -p \$ACTIVITY_DIR
-chown -R 500:500 \$ACTIVITY_DIR
-
-chmod a+x install-activity.py
-for file in *.xo; do
- su liveuser -c "./install-activity.py \$file"
- rm -f \$file
-done
-
-# execute sample content script and clean up afterwards
-chmod a+x copy-to-datastore.py
-su liveuser -c ./copy-to-datastore.py
-rm -f *.pdf
-
-# check modules and themes and run firstboot
-rm -f /usr/share/firstboot/modules/create_user.*
-rm -f /usr/share/firstboot/modules/date.*
-rm -f /usr/share/firstboot/modules/eula.*
-
-touch /etc/reconfigSys
-chkconfig --level 345 firstboot on 2>/dev/null
-
-# set up auto-login
-cat >> /etc/gdm/custom.conf << FOE
-[daemon]
-AutomaticLoginEnable=true
-AutomaticLogin=liveuser
-FOE
+# invoke ntpdate when network comes up
+ntpdate_file=/etc/NetworkManager/dispatcher.d/42-ntpdate
+if [ ! -e $ntpdate_file ] ; then
+ cat > $ntpdate_file <<EOF
+#!/bin/bash
+
+if [ "\$2" = "up" ] ; then
+ sleep 5
+ /usr/sbin/ntpdate 0.pool.ntp.org >> /tmp/ntpdate.log 2>&1
+fi
EOF
+chmod u+rx $ntpdate_file
+fi
+
+
+
+# invoke smolt a few seconds after network comes up
+smolt_file=/etc/NetworkManager/dispatcher.d/43-smolt
+if [ ! -e $smolt_file ] ; then
+ cat > $smolt_file <<EOF
+#!/bin/bash
+
+export PATH=/bin:/usr/bin
+
+if [ "\$2" = "up" ] ; then
+ sleep 15
+ ( nice /usr/bin/smoltSendProfile -a --submitOnly -b -c || /usr/sbin/smoltSendProfile -a --submitOnly -b ) >> /tmp/smolt.log 2>&1
+fi
+EOF
+
+fi
+
+chmod u+rx $smolt_file
+
+
+
+
%end
+
+
+%include soas-liveuserscripts-eliminate.ks \ No newline at end of file
diff --git a/soas-xo.ks b/soas-xo.ks
index 2cb44ed..3c70271 100644
--- a/soas-xo.ks
+++ b/soas-xo.ks
@@ -1,7 +1,6 @@
%include soas-sugar.ks
-%include soas-aslo-and-content.ks
-##repo --name=olpc-kernel-xo-1 --cost=5 --baseurl=http://dev.laptop.org/~mdengler/xo-1
+repo --name=olpc-kernel-xo-1 --cost=5 --baseurl=http://dev.laptop.org/~mdengler/xo-1
#repo --name=olpc-kernel --cost=5 --baseurl=http://dev.laptop.org/~dilinger/olpc-2.6.30-xo1
repo --name=olpc --cost=3 --baseurl=http://dev.laptop.org/~dsd/xo1-rpms
@@ -20,12 +19,67 @@ yum-presto
%end
+
+
%post
+# add ofw mount point & fstab entry
+cat >> /etc/fstab <<EOF
+none /ofw promfs defaults 0 0
+EOF
+mkdir /ofw
+
+
+
+# permanently set %__dbi_cdb rpm macro to work around jffs2's lack of writeable mmap()
+mkdir -p /etc/rpm
+echo "%__dbi_cdb create private nommap" > /etc/rpm/macros.rpmdb
+
+
+
+# amend build string
+sed -i -e 's/SoaS/SoaS-XO/g' /etc/fedora-release
+
+
+
+# disable screensaver locking
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
-##################
-# BEGIN olpc.fth
+
+# nicer console font for our little screen
+# FIXME: olpc-configure sets this up too, but it's too late for first boot.
+# but perhaps we could fix that so that it gets applied.
+echo "SYSFONT=sun12x22" >> /etc/sysconfig/i18n
+
+
+
+# use smaller font size for XO
+# FIXME: fix upstream at http://dev.sugarlabs.org/ticket/954
+sed -i -e 's/Sans Serif 10/Sans Serif 7/g' /usr/share/sugar/data/sugar-100.gtkrc
+
+
+
+# dpms settings
+# FIXME: get olpc-powerd to do this
+cat >> /home/$CREATE_USERNAME/.xsession <<EOF
+
+# unset dpms and screensaver (blanking) to avoid confusion and
+# conflict with olpc-powerd, which is taking care of that type of
+# behavior
+xset -dpms s off
+
+EOF
+
+
+
+# set sugar power management on
+# FIXME: get olpc-powerd to do this
+gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/power/automatic True >/dev/null
+
+
+
+# set up olpc.fth
cat > /boot/olpc.fth <<EOF
\ olpc.fth
@@ -66,21 +120,14 @@ olpc-fth-boot-me
EOF
-# END olpc.fth
-##################
-
-
-
-##################
-# BEGIN dcon-unfreeze-failsafe
+# add dcon-unfreeze-failsafe script
cat > /etc/event.d/dcon-unfreeze-failsafe <<EOF
# this service unfreezes the DCON
# Sugar should do this but a) it might not; and b) we might not be running Sugar
#
-
description "unfreeze DCON"
author "Martin Dengler <martin@martindengler.com>"
@@ -99,227 +146,9 @@ EOF
chmod a+rx /etc/event.d/dcon-unfreeze-failsafe
-# END dcon-unfreeze-failsafe
-##################
-
-
-
-CREATE_USERNAME=liveuser
-
-##################
-# BEGIN avoid livesys script at every boot
-
-
-cat >> /etc/fstab <<EOF
-/tmp /tmp tmpfs rw 0 0
-none /ofw promfs defaults 0 0
-EOF
-
-mkdir /ofw
-
-
-/usr/sbin/useradd -m -c "SoaS user" -G audio,wheel $CREATE_USERNAME
-/usr/bin/passwd -d $CREATE_USERNAME
-
-# allow sudo for olpc user
-echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-
-# permanently set %__dbi_cdb rpm macro to work around jffs2's lack of writeable mmap()
-mkdir -p /etc/rpm
-echo "%__dbi_cdb create private nommap" > /etc/rpm/macros.rpmdb
-
-
-# amend build
-sed -i -e 's/SoaS/SoaS-XO/g' /etc/fedora-release
-
-
-# disable screensaver locking
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
-# disable the logout menu item in Sugar
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/show_logout false >/dev/null
-
-
-# nicer console font for our little screen
-# FIXME: olpc-configure sets this up too, but it's too late for first boot.
-# but perhaps we could fix that so that it gets applied.
-echo "SYSFONT=sun12x22" >> /etc/sysconfig/i18n
-
-
-# make sure the fonts are not too big in GNOME
-# FIXME: remove when http://dev.laptop.org/ticket/9331 is fixed
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t float /desktop/gnome/font_rendering/dpi 201 >/dev/null
-
-
-# make sure the fonts are not too big in Sugar
-# FIXME: remove when http://dev.laptop.org/ticket/9331 is fixed
-echo "Xft.dpi: 201" > /home/$CREATE_USERNAME/.Xresources
-chown $CREATE_USERNAME:$CREATE_USERNAME /home/$CREATE_USERNAME/.Xresources
-
-
-# use smaller font size for XO
-# FIXME: fix upstream at http://dev.sugarlabs.org/ticket/954
-sed -i -e 's/Sans Serif 10/Sans Serif 7/g' /usr/share/sugar/data/sugar-100.gtkrc
-
-
-# install activities
-BUNDLES_DIR=/usr/share/sugar/bundles
-ACTIVITIES_DIR=/home/$CREATE_USERNAME/Activities
-chown -R $CREATE_USERNAME:$CREATE_USERNAME $BUNDLES_DIR
-mkdir /home/$CREATE_USERNAME/Activities
-chown -R $CREATE_USERNAME:$CREATE_USERNAME $ACTIVITIES_DIR
-cd $BUNDLES_DIR
-chmod a+x install-activity.py
-for file in *.xo; do
- su $CREATE_USERNAME -c "./install-activity.py $file"
-done
-rm -f install-activity.py
-
-# execute sample content script and clean up afterwards
-chmod a+x copy-to-datastore.py
-su $CREATE_USERNAME -c ./copy-to-datastore.py
-rm -f *.pdf copy-to-datastore.py
-
-
-# add more activities to the favorites
-cat > /usr/share/sugar/data/activities.defaults << FOE
-com.garycmartin.Moon
-org.laptop.AbiWordActivity
-org.laptop.Calculate
-org.laptop.Chat
-org.laptop.Memorize
-org.laptop.Pippy
-org.laptop.TurtleArtActivity
-org.laptop.WebActivity
-org.vpri.EtoysActivity
-org.laptop.Oficina
-org.laptop.RecordActivity
-org.gnome.Labyrinth
-org.laptop.physics
-vu.lux.olpc.Speak
-org.worldwideworkshop.olpc.JigsawPuzzle
-FOE
-
-# END avoid livesys scripts at every boot
-##################
-
-
-##################
-# BEGIN liveuser .xsession
-
-cat >> /home/$CREATE_USERNAME/.xsession <<EOF
-
-# full debugging on
-export LM_DEBUG=net
-export GABBLE_DEBUG=all
-export GABBLE_LOGFILE=/home/$CREATE_USERNAME/.sugar/default/logs/telepathy-gabble.log
-export SALUT_DEBUG=all
-export SALUT_LOGFILE=/home/$CREATE_USERNAME/.sugar/default/logs/telepathy-salut.log
-export GIBBER_DEBUG=all
-export PRESENCESERVICE_DEBUG=1
-export SUGAR_LOGGER_LEVEL=debug
-
-# Uncomment the following line to enable core dumps
-#ulimit -c unlimited
-
-# Uncomment the following line to debug sugar startup problems
-#exec xterm
-
-# If you drop out of this script, the normal olpc-session will proceed
-# Uncomment the following line to prevent it
-#exit 0
-
-
-# xcompmgr is disabled in SoaS Strawberry because it is lightly tested
-# and known to cause undesired visual artifacts; for example, palettes
-# can fail to disappear often enough to be very annoying
-#
-#(sleep 5 ; xcompmgr ) &
-
-
-# unset dpms and screensaver (blanking) to avoid confusion and
-# conflict with olpc-powerd, which is taking care of that type of
-# behavior
-xset -dpms s off
-
-
-EOF
-
-# END olpc .xsession
-##################
-
-
-
-##################
-# BEGIN ntpdate
-
-ntpdate_file=/etc/NetworkManager/dispatcher.d/42-ntpdate
-if [ ! -e $ntpdate_file ] ; then
- cat > $ntpdate_file <<EOF
-#!/bin/bash
-
-if [ "\$2" = "up" ] ; then
- sleep 5
- /usr/sbin/ntpdate 0.pool.ntp.org >> /tmp/ntpdate.log 2>&1
-fi
-EOF
-
-chmod u+rx $ntpdate_file
-
-fi
-
-# END ntpdate
-##################
-
-
-
-##################
-# BEGIN smolt
-
-smolt_file=/etc/NetworkManager/dispatcher.d/43-smolt
-if [ ! -e $smolt_file ] ; then
- cat > $smolt_file <<EOF
-#!/bin/bash
-
-export PATH=/bin:/usr/bin
-
-if [ "\$2" = "up" ] ; then
- sleep 15
- ( nice /usr/bin/smoltSendProfile -a --submitOnly -b -c || /usr/sbin/smoltSendProfile -a --submitOnly -b ) >> /tmp/smolt.log 2>&1
-fi
-EOF
-
-fi
-
-chmod u+rx $smolt_file
-
-# END smolt
-##################
-
-
-##################
-# BEGIN make sugar default
-cat > /home/$CREATE_USERNAME/.dmrc <<EOF
-[Desktop]
-Layout=olpc
-Session=sugar
-EOF
-# END make sugar default
-##################
-
-
-
-##################
-# BEGIN set sugar power management on
-gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/power/automatic True >/dev/null
-# END set sugar power management on
-##################
-
-
-
-##################
-# BEGIN enable serial console
+# enable serial console
echo ttyS0 >> /etc/securetty
@@ -338,29 +167,9 @@ respawn
exec agetty ttyS0 115200
EOF
-# END enable serial console
-##################
-
-
-
-##################
-# BEGIN make /var/log/messages a+r so Log activity can see it
-chmod a+r /var/log/messages
-# END make /var/log/messages a+r so Log activity can see it
-##################
-##################
-# BEGIN add yum repos
-cat >> /etc/yum.repos.d/sugar.repo << FOE
-[sugar]
-name=Sugar
-failovermethod=priority
-baseurl=http://download.sugarlabs.org/soas/repositories/2/
-enabled=1
-gpgcheck=0
-FOE
-
+# add yum repos
cat >> /etc/yum.repos.d/olpc-xo-1.repo << FOE
[olpc-xo-1]
name=OLPC XO-1
@@ -379,23 +188,15 @@ enabled=1
gpgcheck=0
FOE
-# END add yum repos
-##################
-##################
-# BEGIN setup services
-for service in auditd cpuspeed cups dnsmasq exim firstboot iptables ip6tables irda mdmonitor netfs network nfs nfslock nscd portreserve rpcbind rpcgssd rpcidmapd ; do
- /sbin/chkconfig --level 2345 $service off
-done
-
-##################
-# BEGIN configure powerd
-
-#FIXME olpc-utils needs a patch to fix ttyS0 not starting, without which rtcwake is broken
+# FIXME: olpc-utils needs a patch to fix ttyS0 not starting, without which rtcwake is broken
# see http://lists.sugarlabs.org/archive/sugar-devel/2009-August/018378.html
sed -i -e 's/start on stopped prefdm/start on stopped prefdm\n\n#FIXME remove when olpc-utils is patched or\n# http:\/\/lists.sugarlabs.org\/archive\/sugar-devel\/2009-August\/018378.html\n# is otherwise fixed\nstart on runlevel [2345]/' /etc/event.d/ttyS0
+
+
+# configure powerd
mv /etc/powerd/powerd.conf /etc/powerd/standard.conf
ln -s soas.conf /etc/powerd/powerd.conf
cat > /etc/powerd/soas.conf <<FOE
@@ -463,18 +264,10 @@ FOE
-for service in avahi-daemon sshd ; do
- /sbin/chkconfig --level 2345 $service on
-done
-# something triggers prompting, so just turn it off with a big hammer
-sed -i -e 's/PROMPT=yes/PROMPT=no/;' /etc/sysconfig/init
-# END setup services
-##################
-
%end
-##################
+# install olpc kernel (again...this is a terrible kludge)
# FIXME: remove when it's clear why non-OLPC kernel's being installed
# (and installed second)
%post --nochroot
@@ -486,4 +279,3 @@ ls -l /boot
rpm -ivh --force $(/bin/ls /kernel-2.6.30_xo1*.rpm | tail -1)
ls -l /boot
%end
-##################
diff --git a/soas.ks b/soas.ks
new file mode 100644
index 0000000..5ebac2d
--- /dev/null
+++ b/soas.ks
@@ -0,0 +1,64 @@
+%include soas-sugar.ks
+
+%packages
+
+####
+# packages for non-XO SoaS
+####
+
+
+# general
+kernel
+DeviceKit-disks
+evince-djvu
+gdm
+gvfs
+vte
+
+# e-mail client
+alpine
+
+# additional wifi support
+b43-openfwwf
+
+# include first boot configuration
+firstboot
+smolt-firstboot
+
+# get ready for installer support
+gparted
+zyx-liveinstaller
+
+# sound
+pulseaudio
+alsa-plugins-pulseaudio
+alsa-utils
+gstreamer-plugins-good
+gstreamer-plugins-espeak
+
+# fonts
+google-droid-fonts-common
+google-droid-sans-fonts
+google-droid-sans-mono-fonts
+google-droid-serif-fonts
+
+%end
+
+%post
+
+# check modules and themes and run firstboot
+rm -f /usr/share/firstboot/modules/create_user.*
+rm -f /usr/share/firstboot/modules/date.*
+rm -f /usr/share/firstboot/modules/eula.*
+
+touch /etc/reconfigSys
+chkconfig --level 345 firstboot on 2>/dev/null
+
+# set up auto-login
+cat >> /etc/gdm/custom.conf << FOE
+[daemon]
+AutomaticLoginEnable=true
+AutomaticLogin=liveuser
+FOE
+
+%end \ No newline at end of file