View | Details | Raw Unified | Return to bug 15637
Collapse All | Expand All

(-)example1-orig/base/packages (-4 / +5 lines)
Lines 7-15 Link Here
7
interactivesystem
7
interactivesystem
8
kbd
8
kbd
9
kernel-image-ovz-smp
9
kernel-image-ovz-smp
10
kernel-modules-atl1-std-smp
10
#kernel-modules-atl1-std-smp
11
kernel-image-std-smp
11
kernel-image-std-smp
12
kernel-modules-atl1-ovz-smp
12
#kernel-modules-atl1-ovz-smp
13
lilo
13
lilo
14
setarch
14
setarch
15
shadow-suite
15
shadow-suite
Lines 20-26 Link Here
20
vim-console
20
vim-console
21
21
22
# network tools
22
# network tools
23
elinks-utf8-hack
23
#elinks-utf8-hack
24
hostinfo
24
hostinfo
25
iptables
25
iptables
26
iputils
26
iputils
Lines 61-64 Link Here
61
ve-base
61
ve-base
62
62
63
# alterator
63
# alterator
64
alterator-install3-server
64
#alterator-install3-server
65
installer-server-stage3
(-)example1-orig/disk/packages (-4 / +5 lines)
Lines 298-311 Link Here
298
look
298
look
299
lua5
299
lua5
300
lua5-doc
300
lua5-doc
301
nfs-clients
301
#nfs-clients
302
nfs-server
302
#nfs-server
303
openssh-askpass-common
303
openssh-askpass-common
304
openssl-doc
304
openssl-doc
305
pam0_timestamp
305
pam0_timestamp
306
pam-doc
306
pam-doc
307
pam_userpass-devel
307
pam_userpass-devel
308
pciutils-devel-static
308
#pciutils-devel-static
309
perl-full
309
perl-full
310
python-dev
310
python-dev
311
setproctitle-devel
311
setproctitle-devel
Lines 426-432 Link Here
426
dstat
426
dstat
427
enca
427
enca
428
mod_limitipconn
428
mod_limitipconn
429
mod_ssl mod_ssl-doc
429
mod_ssl
430
#mod_ssl-doc
430
monit
431
monit
431
webalizer
432
webalizer
432
wget
433
wget
(-)example1-orig/install2/image-scripts.d/999-system (+144 lines)
Line 0 Link Here
1
#!/bin/sh -ex
2
3
cd "$WORKDIR"
4
5
# stage1 need this
6
mkdir -p ./image
7
8
# setup stage2 as init
9
mv -f ./usr/sbin/install2-init ./sbin/init
10
11
# udev needed this
12
ln -s /proc/mounts /etc/mtab
13
14
# remove all docs
15
rm -rf ./usr/share/{doc,man,info,license,gfxboot}
16
17
# remove icons
18
rm -rf ./usr/share/icons/{hicolor,large,mini}
19
20
# remove PAM plugins
21
rm -rf ./lib*/security
22
23
# remove cpp
24
fakechroot "$WORKDIR/" rpmquery -a cpp\* gcc\* |
25
	xargs -r fakechroot "$WORKDIR/" rpmi -e --nodeps --
26
27
# remove X11 dri modules
28
rm -rf ./usr/lib*/X11/modules/dri
29
rm -rf ./usr/lib*/X11/modules/multimedia
30
rm -rf ./usr/lib*/X11/mesa_gl
31
32
rm -f ./usr/lib*/X11/modules/extensions/libglx.so
33
rm -f ./usr/lib*/X11/modules/extensions/libdri.so
34
rm -f ./usr/lib*/X11/modules/extensions/libGLcore.so
35
36
# remove unneeded kernel modules
37
rm -rf ./lib/modules/*/kernel/arch
38
rm -rf ./lib/modules/*/kernel/crypto
39
rm -rf ./lib/modules/*/kernel/drivers/atm
40
rm -rf ./lib/modules/*/kernel/drivers/char/watchdog
41
rm -rf ./lib/modules/*/kernel/drivers/cpufreq
42
rm -rf ./lib/modules/*/kernel/drivers/edac
43
rm -rf ./lib/modules/*/kernel/drivers/firmware
44
rm -rf ./lib/modules/*/kernel/drivers/hwmon
45
rm -rf ./lib/modules/*/kernel/drivers/infiniband
46
rm -rf ./lib/modules/*/kernel/drivers/input/{gameport,joy*}
47
rm -rf ./lib/modules/*/kernel/drivers/isdn
48
rm -rf ./lib/modules/*/kernel/drivers/media
49
rm -rf ./lib/modules/*/kernel/drivers/mmc
50
rm -rf ./lib/modules/*/kernel/drivers/mtd*
51
rm -rf ./lib/modules/*/kernel/drivers/net/irda
52
rm -rf ./lib/modules/*/kernel/drivers/rtc
53
rm -rf ./lib/modules/*/kernel/drivers/spi
54
rm -rf ./lib/modules/*/kernel/drivers/telephony
55
rm -rf ./lib/modules/*/kernel/drivers/usb/{misc,mon}
56
rm -rf ./lib/modules/*/kernel/drivers/video
57
rm -rf ./lib/modules/*/kernel/drivers/w1
58
rm -rf ./lib/modules/*/kernel/fs/quota*
59
rm -rf ./lib/modules/*/kernel/fs/9p
60
rm -rf ./lib/modules/*/kernel/fs/adfs
61
rm -rf ./lib/modules/*/kernel/fs/affs
62
rm -rf ./lib/modules/*/kernel/fs/afs
63
rm -rf ./lib/modules/*/kernel/fs/autofs
64
rm -rf ./lib/modules/*/kernel/fs/autofs4
65
rm -rf ./lib/modules/*/kernel/fs/befs
66
rm -rf ./lib/modules/*/kernel/fs/bfs
67
rm -rf ./lib/modules/*/kernel/fs/cifs
68
rm -rf ./lib/modules/*/kernel/fs/coda
69
rm -rf ./lib/modules/*/kernel/fs/configfs
70
rm -rf ./lib/modules/*/kernel/fs/cramfs
71
rm -rf ./lib/modules/*/kernel/fs/efs
72
rm -rf ./lib/modules/*/kernel/fs/exportfs
73
rm -rf ./lib/modules/*/kernel/fs/freevxfs
74
rm -rf ./lib/modules/*/kernel/fs/fuse
75
rm -rf ./lib/modules/*/kernel/fs/hfs
76
rm -rf ./lib/modules/*/kernel/fs/hfsplus
77
rm -rf ./lib/modules/*/kernel/fs/hpfs
78
rm -rf ./lib/modules/*/kernel/fs/jffs
79
rm -rf ./lib/modules/*/kernel/fs/jffs2
80
rm -rf ./lib/modules/*/kernel/fs/lockd
81
rm -rf ./lib/modules/*/kernel/fs/minix
82
rm -rf ./lib/modules/*/kernel/fs/ncpfs
83
rm -rf ./lib/modules/*/kernel/fs/ocfs2
84
rm -rf ./lib/modules/*/kernel/fs/qnx4
85
rm -rf ./lib/modules/*/kernel/fs/smbfs
86
rm -rf ./lib/modules/*/kernel/fs/sysv
87
rm -rf ./lib/modules/*/kernel/fs/udf
88
rm -rf ./lib/modules/*/kernel/fs/ufs
89
rm -rf ./lib/modules/*/kernel/net/*/netfilter
90
rm -rf ./lib/modules/*/kernel/net/appletalk
91
rm -rf ./lib/modules/*/kernel/net/ax25
92
rm -rf ./lib/modules/*/kernel/net/bluetooth
93
rm -rf ./lib/modules/*/kernel/net/bridge
94
rm -rf ./lib/modules/*/kernel/net/dccp
95
rm -rf ./lib/modules/*/kernel/net/decnet
96
rm -rf ./lib/modules/*/kernel/net/econet
97
rm -rf ./lib/modules/*/kernel/net/ipv6
98
rm -rf ./lib/modules/*/kernel/net/ipx
99
rm -rf ./lib/modules/*/kernel/net/irda
100
rm -rf ./lib/modules/*/kernel/net/netfilter
101
rm -rf ./lib/modules/*/kernel/net/netrom
102
rm -rf ./lib/modules/*/kernel/net/rose
103
rm -rf ./lib/modules/*/kernel/net/sctp
104
rm -rf ./lib/modules/*/kernel/net/tipc
105
rm -rf ./lib/modules/*/kernel/net/x25
106
rm -rf ./lib/modules/*/kernel/sound
107
108
# remove blacklisted kernel modules
109
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' ./etc/modprobe.d/* |
110
	while read i; do
111
		/.host/find ./lib/modules/ -type f -name "$i.ko" -delete
112
	done
113
114
# remove rpm db
115
rm -rf ./var/lib/rpm/*
116
117
# remove apt data files
118
rm -rf ./var/cache/apt ./var/lib*/apt
119
120
# remove unneeded translations
121
/.host/find ./usr/share/locale/ -type f \! -name 'alterator*' -delete
122
123
# remove non-utf8 locales
124
/.host/find ./usr/lib*/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
125
	xargs -r0 rm -rf --
126
127
# run depmod
128
if [ -x /usr/bin/fakechroot ]; then
129
	cat > .script.sh <<-EOF
130
	#!/bin/sh -x
131
	for i in /lib*/modules/*; do
132
		/sbin/depmod -a -F /boot/System.map-\${i##*/} \${i##*/}
133
	done
134
	EOF
135
	chmod +x .script.sh
136
	fakechroot /sbin/chroot "$WORKDIR/" /.script.sh
137
	rm -f .script.sh
138
fi
139
140
# remove ogfs
141
rm -f ./lib*/evms/*/ogfs*
142
143
# remove kernel images
144
rm -rf ./boot/*
(-)example1-orig/install2/packages (-1 / +2 lines)
Lines 19-22 Link Here
19
netcat
19
netcat
20
iproute2
20
iproute2
21
21
22
alterator-install2-server
22
#alterator-install2-server
23
installer-server-stage2
(-)example1-orig/install2/scripts.d/999-system (-141 lines)
Lines 1-141 Link Here
1
#!/bin/sh -ex
2
3
cd "$WORKDIR"
4
5
# stage1 need this
6
mkdir -p ./image
7
8
# setup stage2 as init
9
mv -f ./usr/sbin/install2-init ./sbin/init
10
11
# remove all docs
12
rm -rf ./usr/share/{doc,man,info,license,gfxboot}
13
14
# remove icons
15
rm -rf ./usr/share/icons/{hicolor,large,mini}
16
17
# remove PAM plugins
18
rm -rf ./lib*/security
19
20
# remove cpp
21
fakechroot "$WORKDIR/" rpmquery -a cpp\* gcc\* |
22
	xargs -r fakechroot "$WORKDIR/" rpmi -e --nodeps --
23
24
# remove X11 dri modules
25
rm -rf ./usr/lib*/X11/modules/dri
26
rm -rf ./usr/lib*/X11/modules/multimedia
27
rm -rf ./usr/lib*/X11/mesa_gl
28
29
rm -f ./usr/lib*/X11/modules/extensions/libglx.so
30
rm -f ./usr/lib*/X11/modules/extensions/libdri.so
31
rm -f ./usr/lib*/X11/modules/extensions/libGLcore.so
32
33
# remove unneeded kernel modules
34
rm -rf ./lib/modules/*/kernel/arch
35
rm -rf ./lib/modules/*/kernel/crypto
36
rm -rf ./lib/modules/*/kernel/drivers/atm
37
rm -rf ./lib/modules/*/kernel/drivers/char/watchdog
38
rm -rf ./lib/modules/*/kernel/drivers/cpufreq
39
rm -rf ./lib/modules/*/kernel/drivers/edac
40
rm -rf ./lib/modules/*/kernel/drivers/firmware
41
rm -rf ./lib/modules/*/kernel/drivers/hwmon
42
rm -rf ./lib/modules/*/kernel/drivers/infiniband
43
rm -rf ./lib/modules/*/kernel/drivers/input/{gameport,joy*}
44
rm -rf ./lib/modules/*/kernel/drivers/isdn
45
rm -rf ./lib/modules/*/kernel/drivers/media
46
rm -rf ./lib/modules/*/kernel/drivers/mmc
47
rm -rf ./lib/modules/*/kernel/drivers/mtd*
48
rm -rf ./lib/modules/*/kernel/drivers/net/irda
49
rm -rf ./lib/modules/*/kernel/drivers/rtc
50
rm -rf ./lib/modules/*/kernel/drivers/spi
51
rm -rf ./lib/modules/*/kernel/drivers/telephony
52
rm -rf ./lib/modules/*/kernel/drivers/usb/{misc,mon}
53
rm -rf ./lib/modules/*/kernel/drivers/video
54
rm -rf ./lib/modules/*/kernel/drivers/w1
55
rm -rf ./lib/modules/*/kernel/fs/quota*
56
rm -rf ./lib/modules/*/kernel/fs/9p
57
rm -rf ./lib/modules/*/kernel/fs/adfs
58
rm -rf ./lib/modules/*/kernel/fs/affs
59
rm -rf ./lib/modules/*/kernel/fs/afs
60
rm -rf ./lib/modules/*/kernel/fs/autofs
61
rm -rf ./lib/modules/*/kernel/fs/autofs4
62
rm -rf ./lib/modules/*/kernel/fs/befs
63
rm -rf ./lib/modules/*/kernel/fs/bfs
64
rm -rf ./lib/modules/*/kernel/fs/cifs
65
rm -rf ./lib/modules/*/kernel/fs/coda
66
rm -rf ./lib/modules/*/kernel/fs/configfs
67
rm -rf ./lib/modules/*/kernel/fs/cramfs
68
rm -rf ./lib/modules/*/kernel/fs/efs
69
rm -rf ./lib/modules/*/kernel/fs/exportfs
70
rm -rf ./lib/modules/*/kernel/fs/freevxfs
71
rm -rf ./lib/modules/*/kernel/fs/fuse
72
rm -rf ./lib/modules/*/kernel/fs/hfs
73
rm -rf ./lib/modules/*/kernel/fs/hfsplus
74
rm -rf ./lib/modules/*/kernel/fs/hpfs
75
rm -rf ./lib/modules/*/kernel/fs/jffs
76
rm -rf ./lib/modules/*/kernel/fs/jffs2
77
rm -rf ./lib/modules/*/kernel/fs/lockd
78
rm -rf ./lib/modules/*/kernel/fs/minix
79
rm -rf ./lib/modules/*/kernel/fs/ncpfs
80
rm -rf ./lib/modules/*/kernel/fs/ocfs2
81
rm -rf ./lib/modules/*/kernel/fs/qnx4
82
rm -rf ./lib/modules/*/kernel/fs/smbfs
83
rm -rf ./lib/modules/*/kernel/fs/sysv
84
rm -rf ./lib/modules/*/kernel/fs/udf
85
rm -rf ./lib/modules/*/kernel/fs/ufs
86
rm -rf ./lib/modules/*/kernel/net/*/netfilter
87
rm -rf ./lib/modules/*/kernel/net/appletalk
88
rm -rf ./lib/modules/*/kernel/net/ax25
89
rm -rf ./lib/modules/*/kernel/net/bluetooth
90
rm -rf ./lib/modules/*/kernel/net/bridge
91
rm -rf ./lib/modules/*/kernel/net/dccp
92
rm -rf ./lib/modules/*/kernel/net/decnet
93
rm -rf ./lib/modules/*/kernel/net/econet
94
rm -rf ./lib/modules/*/kernel/net/ipv6
95
rm -rf ./lib/modules/*/kernel/net/ipx
96
rm -rf ./lib/modules/*/kernel/net/irda
97
rm -rf ./lib/modules/*/kernel/net/netfilter
98
rm -rf ./lib/modules/*/kernel/net/netrom
99
rm -rf ./lib/modules/*/kernel/net/rose
100
rm -rf ./lib/modules/*/kernel/net/sctp
101
rm -rf ./lib/modules/*/kernel/net/tipc
102
rm -rf ./lib/modules/*/kernel/net/x25
103
rm -rf ./lib/modules/*/kernel/sound
104
105
# remove blacklisted kernel modules
106
sed -n 's/^blacklist[[:space:]]\+\([^[:space:]]\+\).*/\1/p' ./etc/modprobe.d/* |
107
	while read i; do
108
		/.host/find ./lib/modules/ -type f -name "$i.ko" -delete
109
	done
110
111
# remove rpm db
112
rm -rf ./var/lib/rpm/*
113
114
# remove apt data files
115
rm -rf ./var/cache/apt ./var/lib*/apt
116
117
# remove unneeded translations
118
/.host/find ./usr/share/locale/ -type f \! -name 'alterator*' -delete
119
120
# remove non-utf8 locales
121
/.host/find ./usr/lib*/locale -mindepth 1 -maxdepth 1 -type d \! -name '*.utf8' -print0 |
122
	xargs -r0 rm -rf --
123
124
# run depmod
125
if [ -x /usr/bin/fakechroot ]; then
126
	cat > .script.sh <<-EOF
127
	#!/bin/sh -x
128
	for i in /lib*/modules/*; do
129
		/sbin/depmod -a -F /boot/System.map-\${i##*/} \${i##*/}
130
	done
131
	EOF
132
	chmod +x .script.sh
133
	fakechroot /sbin/chroot "$WORKDIR/" /.script.sh
134
	rm -f .script.sh
135
fi
136
137
# remove ogfs
138
rm -f ./lib*/evms/*/ogfs*
139
140
# remove kernel images
141
rm -rf ./boot/*

Return to bug 15637