Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-base.ks
blob: dfd7c3af19d00d97fe3ed252c87a6607ebe6b24d (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
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
xconfig --startxonboot
bootloader --append="selinux=0"
part / --size 2048 --fstype ext4
services --enabled=NetworkManager --disabled=atd,auditd,dnsmasq,ip6tables,iptables,mdmonitor,netfs,network,nscd,sshd

# Fedora 12 is out now!
repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=i386 --excludepkgs=generic-logos
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=i386 --excludepkgs=generic-logos

%packages
@base
@base-x
@core
@hardware-support

# save some space
-cracklib-dicts
-nss_db
-acpid
-mailcap
-nano
-wavpack
-createrepo
-irqbalance
-specspo
-esc
-redhat-lsb
-sox
-numactl
-isdn4k-utils
-autofs

# exclude input methods
-scim*
-m17n*

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

# smartcards and finger print readers won't really work on the livecd.
-coolkey
-ccid
-fprintd

# duplicate functionality
-pinfo
-vorbis-tools

# lose the compat stuff
-compat*

# qlogic firmwares
-ql2100-firmware
-ql2200-firmware
-ql23xx-firmware
-ql2400-firmware
-ql2500-firmware

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

# no printing
-system-config-printer
-cups*
-foomatic*
-gutenprint*
-c2050
-c2070
-cjet
-ptouch-driver
-pbm2l2030
-pbm2l7k-990321
-hplip
-hpijs
-a2ps
-mpage
-printer-filters

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

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

# other random stuff
-PackageKit*
-bluez*
-pinentry
-*-backgrounds
-compiz-gnome
-efi*
-irda-utils
-ivtv-firmware

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

# bits to set up the livecd while anaconda has been removed here
isomd5sum

gstreamer-plugins-good
gstreamer-plugins-espeak

#Remove unneeded services
#Specify explicit smtp service
ssmtp
-nfs*
-rpcbind
-samba*
-rdate
-rdist
-talk
-yp*

%end

%post

set -x

# workaround avahi segfault (#279301)
touch /etc/resolv.conf
[ -x /sbin/restorecon ] && /sbin/restorecon /etc/resolv.conf

# 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

# go ahead and pre-make the man -k cache (#455968)
/usr/sbin/makewhatis -w

# make sure there aren't core files lying around
rm -f /core*


# set up olpc.fth
# won't hurt non-OFW machines, and is one less barrier to moving
# sticks between BIOS and OFW machines

OLPC_BOOT_FTH=/boot/olpc.fth

cat > $OLPC_BOOT_FTH <<EOF
\ olpc.fth

: set-path-macros  ( -- )
   button-o game-key?  if  " \boot-alt"  else  " \boot"  then  pn-buf place

   " /chosen" find-package  if                       ( phandle )
      " bootpath" rot  get-package-property  0=  if  ( propval$ )
         get-encoded-string                          ( bootpath$ )
         [char] \ left-parse-string  2nip            ( dn$ )
         dn-buf place                                ( )
      then
   then

   " nand"  dn-buf count  sindex  0>=   if
      " root=mtd0 rootfstype=jffs2"
   else
      " root=LABEL=OLPCRoot"
   then
   " ROOTDEV" \$set-macro
;

: olpc-fth-boot-me
   set-path-macros
   " ro \${ROOTDEV} console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22 rootwait selinux=0" expand$ to boot-file
   " \${DN}\${PN}\vmlinuz"    expand$ to boot-device

   \ don't use initrd if we're booting from NAND, cause dracut doesn't know about
   \ mtd root devices and will refuse to boot from one.
   \ FIXME: remove this once dracut is taught to love mtd devices
   " root=mtd0" " \${DN}" expand$ sindex -1 <> if
      " \${DN}\${PN}\initrd.img" expand$ to ramdisk
   then

   setup-smbios
   unfreeze
   dcon-unfreeze
   visible

   boot
;

olpc-fth-boot-me

EOF

# now we need to prepare for kernels that don't know how to update the
# OFW as to their presence...

# keep in sync with soas.ks's value
KERNEL_POSTINST_SCRIPT=/etc/kernel/postinst.d/olpc-fth-update
cat > $KERNEL_POSTINST_SCRIPT <<EOF
#!/bin/bash
version="\$1"
kernel="\$2"
boot_dir="\$(dirname \$kernel)"
# fragiler-than-being-upstream detection of appropriate initial ramdisk
initial_ramdisk=\$(basename \$(/bin/ls -tr \$boot_dir/initr*\$version.img | tail -1))

#FIXME: assumes \$boot_dir is just one level deep and previously started with "boot"
sed -i -e "s/\" \\boot/\" \\\$boot_dir/" $OLPC_BOOT_FTH
sed -i -e "s/vmlinuz.*\"/vmlinuz-\$version\"/" $OLPC_BOOT_FTH
sed -i -e "s/initr.*.img\"/\${initial_ramdisk}\"/" $OLPC_BOOT_FTH
EOF

chmod a+rx $KERNEL_POSTINST_SCRIPT

%end

%post --nochroot
set -x
ls $INSTALL_ROOT/usr/share/doc/
ls $INSTALL_ROOT/usr/share/doc/*-release-*
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL


# FIXME: only works on x86, x86_64
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
  if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
  cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi
%end