Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-xo.ks
diff options
context:
space:
mode:
Diffstat (limited to 'soas-xo.ks')
-rw-r--r--soas-xo.ks340
1 files changed, 66 insertions, 274 deletions
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
-##################