Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-xo.ks
blob: 6ad3a37a8b09d09a8710a6971ebe72d80928eed3 (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
%include soas-sugar.ks

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 --excludepkgs=olpc-bootanim

%packages --excludedocs --instLangs en:es:ar:pl:pt_BR:pt:it:fr:ht:el:mn:mr_IN:th:am_ET:km_KH:ne_NP:ur_PK:rw:ja:de:tr:te:ps:fa_AF:si

libertas-usb8388-firmware

-kernel.i686
kernel*2.6.30_xo1*

olpc-powerd
olpc-kbdshim

dracut
dracut-modules-olpc

ntpdate
xcompmgr

# sound backend
-alsa-plugins-pulseaudio
-pulseaudio


# FIXME: remove when livecd-tools's perl dependency is split out
# http://lists.sugarlabs.org/archive/soas/2009-November/000383.html
# don't remove syslinux as the image otherwise won't built 
-livecd-tools
# -syslinux
-perl

%end



%post


# help OOM killer by changing Rainbow and tmpfs parameters per m_stone/cscott
sed -i -e "185s/''/'size=1M,nr_inodes=1024'/" /usr/lib/python2.*/site-packages/rainbow/inject.py
sed -i -e 's/RW_OPTIONS=/RW_OPTIONS="-o size=1M -o nr_inodes=1024"/' /etc/sysconfig/readonly-root


# 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



# 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



# 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



# enable serial console
# 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
echo ttyS0 >> /etc/securetty
cat > /etc/event.d/ttyS0 <<EOF
# ttyS0 - serial console
start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped prefdm
start on runlevel [2345]

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec agetty ttyS0 115200
EOF



# add yum repos
cat >> /etc/yum.repos.d/olpc-xo-1.repo << FOE
[olpc-xo-1]
name=OLPC XO-1
failovermethod=priority
baseurl=http://dev.laptop.org/~mdengler/xo-1
enabled=1
gpgcheck=0
FOE

cat >> /etc/yum.repos.d/olpc.repo << FOE
[olpc]
name=OLPC XO-1
failovermethod=priority
baseurl=http://dev.laptop.org/~dsd/xo1-rpms
enabled=1
gpgcheck=0
FOE


# ensure ul-warning only shows when shutting down
# FIXME: remove when dev.laptop.org #9452 is fixed
sed -ie 's/chkconfig: 5 1 0/chkconfig: 3 4 5 1 0/' /etc/init.d/ul-warning


# 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
#
# Config file for powerd
#
# config_BATTERY_TIME_{DIM,SLEEP,BLANK}
# config_EBOOK_TIME_{DIM,SLEEP,BLANK}
# config_PLUGGED_TIME_{DIM,SLEEP,BLANK}
# These are the time in seconds (measured from last user
# activity) until a) the laptop screen dims, b) the laptop
# sleeps, and c) the laptop screen blanks.  All three can be
# scheduled in any order.
#
# config_MAX_SLEEP_BEFORE_SHUTDOWN
#  Once the laptop sleeps and the screen is blank, it will shut
#  down after this amount of time.
#
# config_ALLOW_SHUTDOWN_WHEN_PLUGGED
#  If this is disabled, the laptop will never automatically shut
#  down when using external power.  (It may still sleep, however.)
#
# config_IDLE_DIM_LEVEL
#  Brightness level when the screen is automatically dimmed.  Set
#  to 15 to prevent dimming.  Set to 0 to allow the backlight to
#  go off completely.
#
# config_CONFIRM_SECONDS
#  How long the shutdown/suspend confirmation splash screen stays
#  visible before the laptop automatically suspends.
#
# config_WAKE_ON_WLAN
#  Allows wireless to continue operating when the laptop is
#  sleeping.  Note that the wireless configuration may allow
#  shutting down the wireless entirely (e.g., with
#  "echo 0 >/sys/power/wlan-enabled"), which may override this
#  setting.
#
# config_CPU_IDLE_LIMIT
#  If the cpu is idle less than this percentage, then the laptop
#  won't suspend.
#
# config_SLEEP_WHEN_LID_CLOSED
#  This is normally left enabled, and causes the laptop to go to sleep
#  when closed.  If disabled, it will stay awake when the lid is
#  closed, and will only sleep because of other timeouts.
#
config_BATTERY_TIME_DIM="180"
config_BATTERY_TIME_SLEEP="360"
config_BATTERY_TIME_BLANK="99999"
config_EBOOK_TIME_DIM="99999"
config_EBOOK_TIME_SLEEP="20"
config_EBOOK_TIME_BLANK="99999"
config_PLUGGED_TIME_DIM="99999"
config_PLUGGED_TIME_SLEEP="99999"
config_PLUGGED_TIME_BLANK="99999"
config_IDLE_DIM_LEVEL="0"
config_MESH_DURING_SUSPEND="no"
config_MAX_SLEEP_BEFORE_SHUTDOWN="99999"
config_ALLOW_SHUTDOWN_WHEN_PLUGGED="no"
config_CONFIRM_SECONDS="7"
config_CPU_IDLE_LIMIT="10"
config_SLEEP_WHEN_LID_CLOSED="yes"
FOE



%end


%post --nochroot

# olpc-utils ships 30-keymap-olpc.fdi, but we don't want all that olpc-utils brings
# FIXME: can be removed when https://bugzilla.redhat.com/show_bug.cgi?id=514081 is resolved better
curl -4 http://dev.laptop.org/git/projects/olpc-utils/plain/etc/hal/fdi/information/30-keymap-olpc.fdi >> $INSTALL_ROOT/etc/hal/fdi/information/30-keymap-olpc.fdi

%end