Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-appliance.ks
blob: 9b505ec6f928f4bf52cd7ae1f12012460d3e285c (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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
xconfig --startxonboot

bootloader --timeout=1 --append="acpi=force"
network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=abrt,network --disabled=acpid,avahi-daemon,auditd,cups,dnsmasq,exim, ip6tables,iptables,irda,kerneloops,mdmonitor,netfs,nfs,nfslock,nscd,portreserve,rpcbind,rpcgssd,rpcidmapd,sshd

device virtio_blk
device virtio_pci
device scsi_wait_scan

part / --size 1536 --fstype ext3 --ondisk sda

repo --name=sugar --baseurl=http://download.sugarlabs.org/soas/repositories/3/

# We're on Rawhide now. Switch to F12 Alpha.
repo --name=rawhide --baseurl=http://kojipkgs.fedoraproject.org/mash/rawhide-20090818/development/i386/os/ --excludepkgs=generic-release,generic-release-notes,kdebase-workspace,metacity,plymouth,plymouth-*,PolicyKit-kde

%packages

# basic package set
@base-x
@base
@core
kernel

# glucose modules
sugar
etoys
hulahop
squeak-vm

# sugar platform
csound-python
espeak
gnome-python2-evince
libffi
libxml2-python
metacity
numpy
pyabiword
pygame

# additional packages
DeviceKit-disks
evince-djvu
gvfs
olpc-utils
vte

# e-mail client
alpine

# multimedia implementations
gnash-plugin

# include to get better feedback
smolt

# work around for keyboard layout
system-config-keyboard

# pull plymouth theme
plymouth-theme-soas

# enable automatic bug reporting
abrt*
-kerneloops

# 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

# no need for kudzu if the hardware doesn't change
-kudzu
-prelink
-setserial
-ed

# Remove the authconfig pieces
-authconfig
-rhpl
-wireless-tools

# Remove the kbd bits
-kbd
-usermode

# these are all kind of overkill but get pulled in by mkinitrd ordering
-mkinitrd
-kpartx
-dmraid
-mdadm
-lvm2
-tar

# save some space
-cracklib-dicts
-nss_db
-acpid
-mailcap
-nano
-wavpack
-createrepo
-irqbalance
-specspo
-esc
-samba-client
-a2ps
-mpage
-redhat-lsb
-sox
-hplip
-hpijs
-numactl
-isdn4k-utils
-autofs

# exclude input methods
-scim*
-m17n*

# dictionaries are big
-aspell-*
-hunspell-*
-man-pages-*
-words

# smartcards won't really work on the livecd.
-coolkey
-ccid

# duplicate functionality
-pinfo
-vorbis-tools

# lose the compat stuff
-compat*

# scanning takes quite a bit of space :/
-xsane
-xsane-gimp
-sane-backends

# no printing
-system-config-printer
-cups*
-foomatic*
-gutenprint*

# attempt to remove dependencies on perl
-w3m
-logwatch
-lftp
-fbset
-exim
-deltarpm

# remove SELinux stack
-setroubleshoot
-policycoreutils
-policycoreutils-gui
-checkpolicy
-selinux-*
-libselinux-python
-libselinux

# other random stuff
-bluez*
-samba*
-*-backgrounds
-compiz-gnome
-PackageKit*
-firstboot

# strip fedora trademarks and use the soas release package
-fedora-logos
-fedora-release
-fedora-release-notes
generic-logos
generic-release
generic-release-notes

%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
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.

# unzip activities and clean up
cd /usr/share/sugar/bundles
ACTIVITY_DIR=/home/olpc/Activities
mkdir -p \$ACTIVITY_DIR
chown -R 500:500 \$ACTIVITY_DIR

chmod a+x install-activity.py
for file in *.xo; do
    su olpc -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 olpc -c ./copy-to-datastore.py
rm -f *.pdf

EOF

# make sure to include date of compose
echo `date -R` >> /etc/redhat-release

# enable script to install stuff at boot time
chmod 755 /etc/rc.d/init.d/livesys
/sbin/restorecon /etc/rc.d/init.d/livesys
/sbin/chkconfig --add livesys

# turn off firstboot service
chkconfig --level 345 firstboot off 2>/dev/null

# create soas user
/usr/sbin/useradd -m -c "soas user" -G audio,wheel olpc
/usr/bin/passwd -d olpc

# allow sudo for olpc user
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# make sure to own home directory
chown olpc /home/olpc
chgrp olpc /home/olpc

# setup olpc display manager and remove olpc-configure
rm -f /etc/rc.d/init.d/diskspacecheck
rm -f /etc/rc.d/init.d/diskspacerecover
rm -f /etc/rc.d/init.d/olpc-configure
rm -f /etc/X11/xorg-*.conf

echo "/usr/sbin/olpc-dm" > /etc/X11/prefdm

cat > /etc/sysconfig/desktop <<EOF
DISPLAYMANAGER=/usr/sbin/olpc-dm
EOF

# setup e-mail for bug reports
sed -i 's/root@localhost/feedback@sugarlabs.org/g' /etc/abrt/plugins/Mailx.conf

# try to work-around issues with NM and APs
rm -f /etc/NetworkManager/dispatcher.d/05-netfs

# fix issues with dbus and ck
rm /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh

# add Sugar repository to yum
cat >> /etc/yum.repos.d/sugar.repo << FOE
[sugar]
name=Sugar
failovermethod=priority
baseurl=http://download.sugarlabs.org/soas/repositories/3/
enabled=1
gpgcheck=0
FOE

# setup Xclients
cat > /home/olpc/.Xclients <<FOE

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

# fix some permissions
chmod a+x /home/olpc/.Xclients
chown olpc:olpc /home/olpc/.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

# 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.sugarlabs.InfoSlicer
org.sugarlabs.IRC
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