blob: 54c817f2dfce51d448f55a95006eaaef48aae112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
%include soas-base.ks
repo --name=sugar --baseurl=http://download.sugarlabs.org/soas/repositories/1/
%packages
# @sugar-desktop
sugar-fructose
sugar-glucose
sugar-honey
# additional system stuff
alsa-utils
gtksourceview2
# e-mail client
alpine
# display manager
slim
# flash implementation
gnash-plugin
# support video streams in Browse
totem-mozplugin
# exclude input methods
-scim*
-m17n*
# dictionaries are big
-aspell-*
-hunspell-*
-man-pages-*
-words
# no printing
-system-config-printer
-cups*
-foomatic*
-gutenprint*
# remove SELinux stack
-setroubleshoot
-policycoreutils
-policycoreutils-gui
-checkpolicy
-selinux-policy*
-libselinux-python
-libselinux
# save more space
-anaconda
-firstboot
-bluez
-samba*
-smolt*
-solar-backgrounds
# strip fedora trademarks
-fedora-logos
generic-logos
%end
%post
cat > /etc/sysconfig/desktop <<EOF
DISPLAYMANAGER=/usr/bin/slim-dynwm
EOF
# 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
cat >> /etc/rc.d/init.d/livesys << EOF
chkconfig --level 5 setroubleshoot off 2>/dev/null
chkconfig --level 5 sendmail off 2>/dev/null
chkconfig --level 5 bluetooth off 2>/dev/null
chkconfig --level 5 cupsd off 2>/dev/null
# 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
# setup auto-login for slim
cat >> /etc/slim.conf << FOE
auto_login yes
default_user liveuser
FOE
# setup Xclients
echo "xsetroot -def" > /home/liveuser/.Xclients
echo "SUGAR_SCALING=72 sugar" >> /home/liveuser/.Xclients
chmod a+x /home/liveuser/.Xclients
chown liveuser:liveuser /home/liveuser/.Xclients
# setup support for QEMU
grep QEMU /sys/firmware/acpi/tables/APIC >/dev/null \
&& cat > /etc/X11/xorg.conf <<FOE
Section "ServerLayout"
Identifier "Default layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105+inet"
Option "XkbLayout" "us"
EndSection
Section "Monitor"
Identifier "Monitor0"
ModelName "Monitor 1024x768"
HorizSync 31.5 - 61.0
VertRefresh 50.0 - 75.0
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "cirrus"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
FOE
# setup activity directory
mkdir -p /home/liveuser/Activities
chown liveuser:liveuser /home/liveuser/Activities
for bundle in \`find /usr/share/sugar/bundles -maxdepth 1\` ; do
ln -s \$bundle /home/liveuser/Activities
done
# free the alsa
echo 'chmod 0666 /dev/snd/*' >> /etc/rc.d/rc.local
# if system doesn't support hardware mixing
aplay -l | grep '\/[0-9]\+$' | head -n1 | grep '\/1$' \
&& cat > /etc/asound.conf <<FOE
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_perm 0666
slave {
pcm "hw:\`aplay -l | grep -o '^card [0-9]\+' | head -n1 | awk '{print \$2}'\`,0"
period_time 0
period_size 1024
buffer_size 8192
}
}
bindings {
0 0
1 1
}
FOE
EOF
%end
%post --nochroot
ACTIVITIES="
http://dev.laptop.org/~cscott/bundles/Pippy-30.xo
http://sugarlabs.org/wiki/images/9/9f/InfoSlicer-1.xo
"
WD=$PWD
BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/bundles
mkdir -p $BUNDLES_DIR
cd $BUNDLES_DIR
for url in $ACTIVITIES ; do
curl -O $url
done
for file in *.xo ; do
unzip $file
rm $file
done
cd $WD
%end
|