]>
Commit | Line | Data |
---|---|---|
3e6a3a30 PZ |
1 | #!/bin/bash |
2 | ||
3 | ORIGDIR=`pwd` | |
4 | COMPONENT="" | |
5 | DEBUG="" | |
6 | ||
7 | if [ "$1" == "--debug" ]; then | |
8 | DEBUG="--debug" | |
9 | shift | |
10 | fi | |
11 | ||
12 | if [ "$1" == "--comp" ]; then | |
13 | COMPONENT=$2 | |
14 | shift; shift | |
15 | fi | |
16 | ||
17 | if [ -z "$1" ]; then | |
18 | echo "upd-instroot: updates instimage from a Red Hat RPMS directory" | |
19 | echo "usage: $0 --comp <comp> <packagedir> [templatedir] [instroot]" | |
20 | exit 1 | |
21 | fi | |
22 | ||
23 | if [ ! -d $1 ]; then | |
24 | if [ -z "$ARCH" ]; then | |
25 | echo "ARCH must be set" >&2 | |
26 | exit 1 | |
27 | fi | |
3e6a3a30 PZ |
28 | fi |
29 | ||
30 | PACKAGEDIR=$1 | |
31 | ||
32 | if [ -z "$ARCH" ]; then | |
33 | ARCH=`rpm --nodigest --nosignature -qp --qf "%{ARCH}" $PACKAGEDIR/anaconda-runtime*.rpm` | |
34 | fi | |
35 | ||
36 | if [ $ARCH = x86_64 -o $ARCH = s390x ]; then | |
37 | LIBDIR=lib64 | |
38 | else | |
39 | LIBDIR=lib | |
40 | fi | |
41 | ||
42 | NEEDGR=yes | |
43 | ||
44 | prunePackageList() { | |
45 | PACKAGEPATH=$1 | |
46 | PACKAGES="$2" | |
47 | ||
3e6a3a30 PZ |
48 | PATTERN="" |
49 | PACKAGEFILES="" | |
50 | for PKG in $PACKAGES; do | |
51 | PATTERN="${PATTERN:+${PATTERN}|}(^$PKG )" | |
52 | PACKAGEFILES="$PACKAGEFILES $(ls $PACKAGEPATH/$PKG*{$ARCH,noarch}.rpm 2>/dev/null)" | |
53 | done | |
54 | ||
55 | # gtk+, enough said | |
56 | PATTERN=$(echo $PATTERN | sed 's,[\+\*],\\&,g') | |
57 | ||
58 | PACKAGEFILES=$(ls $PACKAGEFILES | sort -u) | |
59 | ||
60 | rpm --nodigest --nosignature --qf "%{NAME} $PACKAGEPATH/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n" \ | |
61 | -qp $PACKAGEFILES | egrep "$PATTERN" | sed 's/.* //' | |
62 | } | |
63 | ||
64 | expandPackageSet() { | |
65 | RPMS=$1 | |
66 | PKGDEST=$2 | |
67 | KEEPFILES=$3 | |
68 | ||
69 | [ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST" | |
70 | for n in $RPMS; do | |
71 | [ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." $(basename $n) | |
81a99973 | 72 | if [ "$(rpm --nosignature --nodigest -qp --qf '%{NAME}' $n)" = "tzdata" ] ; then |
3e6a3a30 PZ |
73 | TZDATA=$n |
74 | fi | |
75 | rpm2cpio $n | (cd $PKGDEST; cpio -E $KEEPFILES --quiet -iumd) | |
76 | [ -n "$DEBUG" ] && echo -ne "\rExpanding packages..." "$(basename $n | sed 's/./ /g')" | |
77 | done | |
78 | pushd $PKGDEST/$LIBDIR >/dev/null 2>&1 | |
79 | if [ -d obsolete/linuxthreads/ ]; then | |
80 | for x in obsolete/linuxthreads/*-* ; do | |
81 | lib_base=$(basename $x | cut -d- -f1) | |
82 | rm -f ./$lib_base[.-]* | |
83 | mv -f obsolete/linuxthreads/$lib_base[.-]* . | |
84 | done | |
85 | rmdir obsolete/linuxthreads obsolete | |
86 | fi | |
87 | popd >/dev/null 2>&1 | |
88 | } | |
89 | ||
90 | die () { | |
91 | echo "$@" | |
92 | echo "Aborting instroot creation..." | |
93 | exit 1 | |
94 | } | |
95 | ||
96 | if [ -z "$2" ]; then | |
97 | DEST=/tmp/upd-instroot | |
98 | else | |
99 | DEST=$2 | |
100 | fi | |
101 | ||
102 | if [ -z "$3" ]; then | |
103 | DESTGR=/tmp/upd-instroot | |
104 | else | |
105 | DESTGR=$3 | |
106 | fi | |
107 | ||
108 | rm -rf $DEST $DESTGR | |
109 | mkdir -p $DEST | |
110 | mkdir -p $DESTGR | |
111 | ||
81a99973 ER |
112 | PACKAGES="glibc glibc-common setup openssl python newt slang libselinux |
113 | libsepol libtermcap zlib ash e2fsprogs util-linux raidtools popt | |
70769ef1 | 114 | procps rpm rpm-lib XFree86 Xconfigurator anaconda tzdata |
81a99973 | 115 | anaconda-runtime kudzu hwdata bzip2 beecrypt mdadm libsemanage |
c7487dae | 116 | bzip2-libs dosfstools pciutils reiserfsprogs parted sed |
70769ef1 ER |
117 | busybox-anaconda python-rpm python-booty hdparm lvm2 beecrypt device-mapper dlm |
118 | python-rhpl pyxf86config libxml2 python-libxml2 glib2 sqlite neon | |
81a99973 ER |
119 | elfutils-libelf krb5-libs convertdb1 jfsutils |
120 | xfsprogs xfsdump dmapi libacl libattr attr acl python-urlgrabber | |
70769ef1 | 121 | policy policycoreutils pyparted X11 X11-tools selinux-policy-targeted |
81a99973 ER |
122 | libstdc++ expat libgcc readline ncurses yum python-sqlite |
123 | python-elementtree pykickstart e2fsprogs-libs iscsi-initiator-utils | |
70769ef1 | 124 | db4 bash glibc-misc python-libs python-parted python-xf86config" |
81a99973 ER |
125 | |
126 | if [ $ARCH = i386 -o $ARCH = x86_64 ]; then | |
c7487dae | 127 | PACKAGES="$PACKAGES pcmciautils pcmcia-cs" |
3e6a3a30 PZ |
128 | fi |
129 | ||
130 | if [ $ARCH = ia64 ]; then | |
131 | PACKAGES="$PACKAGES elilo" | |
132 | fi | |
133 | ||
134 | if [ $ARCH = s390 -o $ARCH = s390x ]; then | |
135 | PACKAGES="$PACKAGES s390utils binutils libgcc tcp_wrappers | |
136 | sed net-tools xinetd openssl openssh openssh-server coreutils | |
137 | login initscripts XFree86-xauth bash portmap pam | |
138 | telnet-server login mount grep modutils gawk | |
139 | XFree86-libs strace xorg-x11-xauth xorg-x11-libs" | |
140 | fi | |
141 | ||
81a99973 ER |
142 | if [ $ARCH != s390 -a $ARCH != s390x ]; then |
143 | PACKAGES="$PACKAGES python-pyblock" | |
144 | fi | |
145 | ||
3e6a3a30 | 146 | if [ $ARCH = ppc -o $ARCH = ppc64 ]; then |
81a99973 | 147 | PACKAGES="$PACKAGES pcmciautils pdisk yaboot hfsutils" |
3e6a3a30 PZ |
148 | fi |
149 | ||
150 | # xpm is missing | |
151 | ||
152 | # Some packages are listed twice, but that's okay | |
153 | # | |
154 | # The packages in this list are needed for the graphical installer to run | |
155 | # | |
156 | # Extra stuff we want for rescue mode should go in PACKAGESRESCUE | |
157 | # | |
81a99973 ER |
158 | PACKAGESGR="anaconda XFree86-libs libpng XFree86-75dpi-fonts |
159 | XFree86-ISO8859-2-75dpi-fonts gtk2 libglade2 | |
160 | XFree86-ISO8859-9-75dpi-fonts | |
161 | XFree86-100dpi-fonts fonts-ISO8859-2 fonts-ISO8859-9 | |
162 | XFree86-xfs e2fsprogs coreutils glibc glibc-common | |
163 | popt specspo util-linux rpm rpm-libs tzdata | |
164 | procps bash cpio gpm pygtk2-libglade | |
165 | XFree86 Xconfigurator pygtk2 gdk-pixbuf | |
166 | XFree86-KOI8-R XFree86-KOI8-R-75dpi-fonts pam libpixman | |
c7487dae | 167 | reiserfsprogs atk pango freetype gnome-python2-canvas cairo |
81a99973 ER |
168 | libgnomecanvas libart_lgpl libgcc libacl libattr libstdc++ expat |
169 | anaconda-images anaconda-help XFree86-base-fonts | |
170 | ttfonts-ko taipeifonts XFree86-ISO8859-15-75dpi-fonts rhpl | |
171 | system-config-keyboard Xft fontconfig gtk2-engines gnome-themes | |
172 | gtkhtml2 gnome-python2-gtkhtml2 gail | |
173 | ttfonts-ja ttfonts-zh_TW bitmap-fonts-cjk urw-fonts fonts-arabic | |
174 | comps-extras XFree86-libs-data convertdb1 fonts-bengali | |
175 | vnc-server libjpeg tcp_wrappers system-config-date | |
176 | xfsprogs xfsdump dmapi attr acl policy policycoreutils | |
177 | selinux-policy-targeted ttfonts-zh_CN redhat-artwork audit-libs | |
178 | xorg-x11-libs xorg-x11-ISO8859-2-75dpi-fonts | |
179 | xorg-x11-ISO8859-9-75dpi-fonts xorg-x11-100dpi-fonts | |
180 | xorg-x11-xfs xorg-x11 xorg-x11-KOI8-R xorg-x11-KOI8-R-75dpi-fonts | |
181 | xorg-x11-base-fonts xorg-x11-ISO8859-15-75dpi-fonts | |
182 | fonts-xorg-ISO8859-2-75dpi fonts-xorg-ISO8859-15-75dpi | |
183 | fonts-xorg-ISO8859-9-75dpi fonts-xorg-100dpi | |
184 | fonts-xorg-KOI8-R fonts-xorg-KOI8-R-75dpi fonts-xorg-base | |
185 | xorg-x11-base xorg-x11-ISO8859-15-75dpi system-logos | |
186 | xorg-x11-libs-data xorg-x11-xfs prelink redhat-logos fedora-logos | |
187 | ttfonts-ta ttfonts-bn ttfonts-gu ttfonts-hi ttfonts-pa | |
188 | fonts-japanese fonts-chinese fonts-korean fonts-indic | |
189 | fonts-gujarati fonts-hindi fonts-punjabi fonts-tamil synaptics | |
515b7697 ER |
190 | firstboot rhpxl pycairo pirut bitstream-vera-fonts |
191 | X11-fonts-100dpi-ISO8859-15 | |
192 | X11-fonts-100dpi-ISO8859-2 | |
193 | X11-fonts-100dpi-ISO8859-9 | |
194 | X11-fonts-ISO8859-15 | |
195 | X11-fonts-ISO8859-2 | |
196 | X11-fonts-ISO8859-9 | |
197 | " | |
81a99973 | 198 | |
3e6a3a30 PZ |
199 | # |
200 | # stuff ONLY included for rescue mode | |
201 | # | |
202 | # these packages are combined with the PACKAGES and PACKAGESGR for big stage 2 | |
203 | # | |
204 | PACKAGESRESCUE="bzip2 bzip2-libs dump | |
c7487dae | 205 | findutils ftp gzip iputils joe krb5-libs less man man-config man-pages |
3e6a3a30 | 206 | modutils mtools mt-st mtr net-tools open |
81a99973 | 207 | openssh openssh-clients pciutils rsh traceroute tar rsync" |
3e6a3a30 | 208 | |
81a99973 ER |
209 | if [ $ARCH = i386 -o $ARCH = x86_64 ]; then |
210 | PACKAGESRESCUE="$PACKAGESRESCUE gpart grub" | |
3e6a3a30 PZ |
211 | fi |
212 | ||
213 | # turn off options we dont want, ie. set package list to something harmless | |
214 | if [ -z "$NEEDGR" ]; then | |
215 | PACKAGESGR="bash" | |
216 | PACKAGESRESCUE="bash" | |
217 | fi | |
218 | ||
81a99973 ER |
219 | # dmraid stuff |
220 | if [ $ARCH != s390 -a $ARCH != s390x ]; then | |
221 | PACKAGESRESCUE="$PACKAGESRESCUE device-mapper dmraid" | |
222 | fi | |
223 | ||
3e6a3a30 PZ |
224 | # |
225 | # add bootloader for particular arch | |
226 | # | |
227 | if [ $ARCH = sparc ]; then | |
228 | PACKAGESGR="$PACKAGESGR tilo silo" | |
229 | fi | |
230 | ||
81a99973 | 231 | if [ $ARCH = i386 -o $ARCH = x86_64 ]; then |
3e6a3a30 PZ |
232 | PACKAGESGR="$PACKAGESGR syslinux memtest86+" |
233 | fi | |
234 | ||
235 | if [ $ARCH = alpha ]; then | |
236 | PACKAGESGR="$PACKAGESGR aboot" | |
237 | fi | |
238 | ||
239 | if [ $ARCH = ia64 ]; then | |
240 | PACKAGESGR="$PACKAGESGR elilo" | |
241 | fi | |
242 | ||
243 | if [ $ARCH = ppc ]; then | |
244 | PACKAGESGR="$PACKAGESGR fbset yaboot ppc64-utils" | |
245 | fi | |
246 | ||
81a99973 ER |
247 | # dogtail stuff... |
248 | PACKAGESGR="$PACKAGESGR gail at-spi libbonobo ORBit2" | |
249 | ||
250 | # dmraid stuff | |
251 | if [ $ARCH != s390 -a $ARCH != s390x ]; then | |
252 | PACKAGESGR="$PACKAGESGR python-pyblock" | |
253 | fi | |
254 | ||
255 | # modular xorg... | |
256 | XORGLIBS="libICE libSM libX11 libXcursor libXext libXfixes libXft libXi libxkbfile libXmu libXpm libXrandr libXrender libXt libXxf86misc libXaw liblbxutil libXfont libfontenc libXau libXdmcp libXfont libXinerama" | |
257 | XORGDRIVERS="xorg-x11-drv-acecad xorg-x11-drv-aiptek xorg-x11-drv-apm xorg-x11-drv-ark xorg-x11-drv-ati xorg-x11-drv-calcomp xorg-x11-drv-chips xorg-x11-drv-cirrus xorg-x11-drv-citron xorg-x11-drv-cyrix xorg-x11-drv-digitaledge xorg-x11-drv-dmc xorg-x11-drv-dummy xorg-x11-drv-dynapro xorg-x11-drv-elo2300 xorg-x11-drv-elographics xorg-x11-drv-evdev xorg-x11-drv-fbdev xorg-x11-drv-fpit xorg-x11-drv-glint xorg-x11-drv-hyperpen xorg-x11-drv-i128 xorg-x11-drv-i740 xorg-x11-drv-i810 xorg-x11-drv-jamstudio xorg-x11-drv-joystick xorg-x11-drv-keyboard xorg-x11-drv-magellan xorg-x11-drv-magictouch xorg-x11-drv-mga xorg-x11-drv-microtouch xorg-x11-drv-mouse xorg-x11-drv-mutouch xorg-x11-drv-neomagic xorg-x11-drv-nsc xorg-x11-drv-nv xorg-x11-drv-palmax xorg-x11-drv-penmount xorg-x11-drv-rendition xorg-x11-drv-s3 xorg-x11-drv-s3virge xorg-x11-drv-savage xorg-x11-drv-siliconmotion xorg-x11-drv-sis xorg-x11-drv-sisusb xorg-x11-drv-spaceorb xorg-x11-drv-summa xorg-x11-drv-tdfx xorg-x11-drv-tek4957 xorg-x11-drv-trident xorg-x11-drv-tseng xorg-x11-drv-v4l xorg-x11-drv-vesa xorg-x11-drv-vga xorg-x11-drv-via xorg-x11-drv-vmware xorg-x11-drv-void xorg-x11-drv-voodoo" | |
258 | XORGFONTS="xorg-x11-fonts-75dpi xorg-x11-fonts-base xorg-x11-fonts-cyrillic xorg-x11-fonts-ISO8859-15-75dpi xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-ISO8859-2-75dpi xorg-x11-fonts-ISO8859-9-75dpi xorg-x11-fonts-misc xorg-x11-fonts-ethiopic" | |
259 | XORG="$XORGLIBS $XORGDRIVERS $XORGFONTS xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-font-utils xorg-x11-xkb-utils xorg-x11-xkbdata xorg-x11-server-utils" | |
260 | ||
261 | PACKAGESGR="$PACKAGESGR $XORG" | |
262 | ||
263 | ||
3e6a3a30 PZ |
264 | # |
265 | # KEEPFILE is all files to keep from the packages in PACKAGES | |
266 | # | |
267 | # This is what is present in http, ftp, and hard drive installs, and is | |
268 | # supposed to be a small image because these methods keep it in RAM. | |
269 | # | |
270 | # It also is the base on which the other install images build on top of, | |
271 | # so if something is needed by all images it should go here | |
272 | # | |
273 | KEEPFILE=/tmp/keepfile.$$ | |
274 | ||
275 | cat > $KEEPFILE <<EOF | |
276 | boot/efi/EFI/redhat/elilo.efi | |
277 | bin/ash | |
278 | bin/fdisk* | |
279 | bin/mkfs* | |
280 | bin/sed | |
281 | etc/group | |
282 | etc/passwd | |
81a99973 ER |
283 | etc/iscsid.conf |
284 | etc/pcmcia/* | |
3e6a3a30 PZ |
285 | etc/protocols |
286 | etc/services | |
287 | etc/selinux/targeted/booleans | |
288 | etc/selinux/targeted/policy/policy.* | |
81a99973 ER |
289 | etc/selinux/targeted/contexts/files/* |
290 | etc/selinux/targeted/contexts/* | |
291 | etc/selinux/targeted/* | |
292 | usr/share/selinux/targeted/* | |
3e6a3a30 PZ |
293 | etc/security/selinux/policy.* |
294 | etc/security/selinux/file_contexts | |
295 | $LIBDIR/libc[-.]* | |
296 | $LIBDIR/libm[-.]* | |
297 | $LIBDIR/libpthread* | |
298 | $LIBDIR/librt[-.]* | |
299 | $LIBDIR/ld*.so* | |
300 | $LIBDIR/libblkid* | |
301 | $LIBDIR/libcom_err* | |
302 | $LIBDIR/libcrypt* | |
81a99973 | 303 | $LIBDIR/libdb-* |
3e6a3a30 PZ |
304 | $LIBDIR/libdevmapper* |
305 | $LIBDIR/libdl* | |
306 | $LIBDIR/libe2p* | |
81a99973 | 307 | $LIBDIR/libexpat* |
3e6a3a30 PZ |
308 | $LIBDIR/libext2fs* |
309 | $LIBDIR/liblvm-10.so* | |
310 | $LIBDIR/libgcc_s* | |
311 | $LIBDIR/libnsl* | |
312 | $LIBDIR/libnss_dns* | |
313 | $LIBDIR/libnss_files* | |
314 | $LIBDIR/libresolv* | |
315 | $LIBDIR/libselinux* | |
81a99973 | 316 | $LIBDIR/libsemanage* |
3e6a3a30 PZ |
317 | $LIBDIR/libsepol* |
318 | $LIBDIR/libss* | |
319 | $LIBDIR/libtermcap* | |
320 | $LIBDIR/libhandle* | |
321 | $LIBDIR/libattr* | |
322 | $LIBDIR/libdm* | |
323 | $LIBDIR/libutil* | |
324 | $LIBDIR/libuuid* | |
325 | sbin/badblocks | |
326 | sbin/busybox.anaconda | |
327 | sbin/clock | |
328 | sbin/debugfs | |
329 | sbin/e2fsck | |
330 | sbin/e2fsadm | |
331 | sbin/e2label | |
332 | sbin/fsck.ext2 | |
333 | sbin/fsck.ext3 | |
334 | sbin/fsck.jfs | |
335 | sbin/fsck.xfs | |
336 | sbin/fdisk | |
337 | sbin/hdparm | |
338 | sbin/hwclock | |
339 | sbin/jfs_tune | |
340 | sbin/ldconfig | |
341 | sbin/lvm* | |
342 | sbin/mdadm | |
343 | sbin/mkdosfs | |
344 | sbin/mke2fs | |
345 | sbin/mkfs.ext2 | |
346 | sbin/mkfs.ext3 | |
347 | sbin/mkfs.jfs | |
348 | sbin/mkfs.xfs | |
349 | sbin/mkfs.msdos | |
350 | sbin/mkfs.vfat | |
351 | sbin/mkreiserfs | |
352 | sbin/mkraid | |
353 | sbin/mkswap | |
354 | sbin/parted | |
81a99973 | 355 | sbin/pcmcia-socket-startup |
3e6a3a30 PZ |
356 | sbin/pdisk |
357 | sbin/probe | |
81a99973 | 358 | sbin/reiserfstune |
3e6a3a30 PZ |
359 | sbin/resize2fs |
360 | sbin/sfdisk | |
361 | sbin/tune2fs | |
362 | sbin/xfsdump | |
363 | sbin/xfsrestore | |
364 | sbin/xfs_repair | |
365 | usr/sbin/xfs_db | |
366 | usr/sbin/xfs_check | |
367 | usr/sbin/xfs_copy | |
81a99973 ER |
368 | sbin/iscsid |
369 | sbin/iscsiadm | |
3e6a3a30 PZ |
370 | usr/bin/python |
371 | usr/bin/python?.? | |
372 | usr/bin/hmount | |
373 | usr/bin/humount | |
374 | usr/bin/hcopy | |
375 | usr/bin/hattrib | |
376 | usr/bin/hformat | |
377 | usr/lib/anaconda-runtime/* | |
378 | usr/lib/anaconda/* | |
379 | usr/lib/anaconda/installclasses/* | |
380 | usr/lib/anaconda/textw/* | |
3e6a3a30 PZ |
381 | usr/lib/booty/* |
382 | usr/kerberos/$LIBDIR/libkrb5.so* | |
383 | usr/kerberos/$LIBDIR/libkrb5support.so* | |
384 | usr/kerberos/$LIBDIR/libk5crypto.so* | |
385 | usr/kerberos/$LIBDIR/libcom_err.so* | |
386 | usr/kerberos/$LIBDIR/libgssapi_krb5.so* | |
387 | usr/$LIBDIR/libkrb5.so* | |
388 | usr/$LIBDIR/libkrb5support.so* | |
389 | usr/$LIBDIR/libk5crypto.so* | |
390 | usr/$LIBDIR/libcom_err.so* | |
391 | usr/$LIBDIR/libgssapi_krb5.so* | |
392 | usr/$LIBDIR/gconv/ISO8859-1.so | |
393 | usr/$LIBDIR/gconv/gconv-modules | |
394 | usr/$LIBDIR/libbeecrypt* | |
3e6a3a30 PZ |
395 | usr/$LIBDIR/libglib* |
396 | usr/$LIBDIR/libgmodule* | |
397 | usr/$LIBDIR/libgobject* | |
398 | usr/$LIBDIR/libgthread* | |
399 | usr/$LIBDIR/libssl* | |
400 | usr/$LIBDIR/libcrypto* | |
401 | usr/$LIBDIR/libbz2* | |
402 | usr/$LIBDIR/libelf* | |
403 | usr/$LIBDIR/libncurses* | |
404 | usr/$LIBDIR/libnewt* | |
405 | usr/$LIBDIR/libparted* | |
406 | usr/$LIBDIR/libpopt* | |
407 | usr/$LIBDIR/libpython* | |
408 | usr/$LIBDIR/libneon* | |
409 | usr/$LIBDIR/libsqlite3* | |
410 | usr/$LIBDIR/librpm-*4.?.so* | |
411 | usr/$LIBDIR/librpmbuild-*4.?.so* | |
412 | usr/$LIBDIR/librpmdb*4.?.so* | |
413 | usr/$LIBDIR/librpmio*4.?.so* | |
414 | usr/$LIBDIR/libslang* | |
415 | usr/$LIBDIR/libstdc++.so.6* | |
416 | usr/$LIBDIR/libxml2.so* | |
417 | usr/$LIBDIR/libz.* | |
3e6a3a30 PZ |
418 | usr/$LIBDIR/libreadline* |
419 | usr/$LIBDIR/python?.?/* | |
81a99973 | 420 | usr/$LIBDIR/python?.?/email/* |
3e6a3a30 PZ |
421 | usr/$LIBDIR/python?.?/site-packages/libxml2* |
422 | usr/$LIBDIR/python?.?/site-packages/*kudzu* | |
423 | usr/$LIBDIR/python?.?/site-packages/rpmmodule.so | |
424 | usr/$LIBDIR/python?.?/site-packages/partedmodule.so | |
425 | usr/$LIBDIR/python?.?/site-packages/ixf86configmodule.so | |
426 | usr/$LIBDIR/python?.?/site-packages/xf86config.py | |
81a99973 | 427 | usr/$LIBDIR/python?.?/site-packages/*sqlite* |
3e6a3a30 | 428 | usr/$LIBDIR/python?.?/site-packages/rhpl |
81a99973 ER |
429 | usr/$LIBDIR/python?.?/site-packages/cElementTree.so |
430 | usr/$LIBDIR/python?.?/site-packages/block | |
b512e470 | 431 | usr/share/locale/* |
81a99973 ER |
432 | usr/lib/python?.?/site-packages/elementtree/* |
433 | usr/lib/python?.?/site-packages/rpmUtils/* | |
3e6a3a30 | 434 | usr/lib/python?.?/site-packages/urlgrabber/* |
81a99973 ER |
435 | usr/lib/python?.?/site-packages/yum/* |
436 | usr/lib/python?.?/site-packages/repomd/* | |
437 | usr/lib/python?.?/site-packages/pirut/* | |
438 | usr/lib/python?.?/site-packages/pykickstart/* | |
3e6a3a30 PZ |
439 | usr/lib/rpm/macros |
440 | usr/lib/rpm/rpmpopt | |
441 | usr/lib/rpm/rpmrc | |
442 | usr/lib/yaboot/addnote | |
443 | usr/lib/yaboot/ofboot | |
444 | usr/lib/yaboot/yaboot | |
445 | usr/libexec/convertdb1 | |
446 | usr/share/locale/*/LC_MESSAGES/anaconda.mo | |
447 | usr/share/locale/locale.alias | |
448 | usr/sbin/anaconda | |
449 | usr/sbin/ddcprobe | |
450 | usr/sbin/dmidecode | |
451 | usr/sbin/mkofboot | |
452 | usr/sbin/ofpath | |
453 | usr/sbin/ybin | |
454 | usr/sbin/load_policy | |
81a99973 ER |
455 | usr/sbin/semodule |
456 | usr/sbin/genhomedircon | |
457 | usr/sbin/setfiles | |
3e6a3a30 PZ |
458 | usr/sbin/lvm |
459 | usr/sbin/build-locale-archive | |
3e6a3a30 | 460 | usr/share/anaconda/anaconda.conf |
81a99973 | 461 | usr/share/selinux/targeted/base.pp |
3e6a3a30 PZ |
462 | usr/share/terminfo/b/bterm |
463 | usr/share/terminfo/l/linux | |
464 | usr/share/terminfo/v/vt100 | |
465 | usr/share/terminfo/v/vt100-nav | |
3e6a3a30 | 466 | usr/share/hwdata/pci.ids |
81a99973 ER |
467 | usr/share/hwdata/videoaliases |
468 | usr/share/hwdata/videoaliases/* | |
469 | usr/share/hwdata/videodrivers | |
3e6a3a30 | 470 | usr/share/hwdata/MonitorsDB |
3e6a3a30 PZ |
471 | EOF |
472 | ||
473 | if [ $ARCH = s390 -o $ARCH = s390x ]; then | |
474 | cat >> $KEEPFILE <<EOF | |
475 | usr/share/terminfo/a/ansi | |
476 | usr/share/terminfo/d/dumb | |
477 | usr/share/terminfo/k/kterm | |
478 | usr/share/terminfo/s/screen | |
479 | usr/share/terminfo/v/vt100 | |
480 | usr/share/terminfo/v/vt100-nav | |
481 | usr/share/terminfo/v/vt102 | |
482 | usr/share/terminfo/x/xterm | |
483 | usr/share/terminfo/x/xterm-color | |
484 | usr/bin/strace | |
485 | usr/bin/ldd | |
486 | usr/sbin/chroot | |
487 | usr/sbin/sshd | |
488 | usr/sbin/glibc_post_upgrade | |
489 | usr/sbin/in.telnetd | |
490 | usr/sbin/xinetd | |
491 | sbin/cmsfslst | |
492 | sbin/cmsfscat | |
493 | sbin/busybox.anaconda | |
494 | sbin/ifconfig | |
495 | sbin/route | |
496 | sbin/portmap | |
497 | sbin/fdasd | |
498 | sbin/dasdfmt | |
499 | sbin/swapon | |
500 | sbin/swapoff | |
501 | sbin/mkswap | |
502 | bin/bash | |
503 | bin/dd | |
504 | bin/gawk | |
505 | bin/mount | |
506 | bin/umount | |
507 | bin/mknod | |
508 | bin/sleep | |
509 | bin/login | |
510 | bin/cat | |
511 | bin/chmod | |
512 | bin/sort | |
513 | $LIBDIR/libpam.so* | |
514 | $LIBDIR/libdl.so* | |
515 | $LIBDIR/libdl-*.so* | |
516 | usr/$LIBDIR/libz.so* | |
517 | $LIBDIR/libnsl.so* | |
518 | $LIBDIR/libnsl-*.so* | |
519 | $LIBDIR/libnss* | |
520 | $LIBDIR/libutil.so* | |
521 | $LIBDIR/libutil-*.so* | |
522 | $LIBDIR/libcrypt* | |
523 | $LIBDIR/libc.so* | |
524 | $LIBDIR/libc-*so* | |
525 | lib/ld*.so* | |
526 | $LIBDIR/ld*.so* | |
527 | $LIBDIR/libresolv.so* | |
528 | $LIBDIR/libresolv-*.so* | |
529 | $LIBDIR/libvtoc*.so* | |
530 | lib/modules/ibm/* | |
531 | etc/xinetd.conf | |
532 | etc/pam.d/sshd | |
533 | etc/pam.d/other | |
534 | etc/security/limits.conf | |
535 | etc/security/pam_env.conf | |
536 | lib/security | |
537 | $LIBDIR/security/pam_* | |
538 | usr/$LIBDIR/libwrap.so* | |
81a99973 ER |
539 | usr/$LIBDIR/libXmuu.so* |
540 | usr/$LIBDIR/libX11.so* | |
541 | usr/$LIBDIR/libXext.so* | |
542 | usr/$LIBDIR/libXxf86misc.so* | |
543 | usr/bin/xauth | |
3e6a3a30 PZ |
544 | EOF |
545 | fi | |
546 | ||
547 | # | |
548 | # KEEPFILEGR is all files to keep from the packages in PACKAGESGR | |
549 | # | |
550 | # This defines the files in addition to KEEPFILE that make up the install | |
551 | # images for NFS and CD/DVD based installs. This image is not loaded into | |
552 | # memory so it can be considerably larger. | |
553 | # | |
554 | # The rescue mode of anaconda uses these files as well as those defined | |
555 | # by KEEPFILERESCUE below. The total size of this image should be | |
556 | # under the size of the miniature CD used for the rescue CD (around 68MB). | |
557 | # | |
558 | KEEPFILEGR=/tmp/keepfilegr.$$ | |
559 | cp $KEEPFILE $KEEPFILEGR | |
560 | cat >> $KEEPFILEGR <<EOF | |
561 | boot/efi/EFI/redhat/elilo.efi | |
562 | boot/memtest86* | |
563 | bin/bash | |
564 | bin/cat | |
565 | bin/chmod | |
566 | bin/cp | |
567 | bin/cpio | |
568 | bin/dd | |
569 | bin/df | |
570 | bin/du | |
571 | bin/ln | |
572 | bin/ls | |
573 | bin/mkdir | |
574 | bin/mv | |
575 | bin/ps | |
576 | bin/rm | |
577 | bin/rpm | |
578 | bin/touch | |
579 | boot/*.b | |
580 | boot/bootlx | |
581 | etc/fb.modes | |
582 | etc/gtk-2.0/gtkrc* | |
583 | etc/im_palette.pal | |
584 | etc/imrc | |
585 | etc/man.config | |
586 | etc/pango/* | |
587 | etc/fonts/* | |
588 | etc/prelink.conf | |
589 | etc/rpm/macros.prelink | |
590 | $LIBDIR/libacl* | |
591 | $LIBDIR/libattr* | |
592 | $LIBDIR/libaudit*.so* | |
593 | $LIBDIR/libgcc* | |
594 | $LIBDIR/libnss_dns* | |
595 | $LIBDIR/libpam* | |
596 | $LIBDIR/libproc* | |
597 | sbin/addRamDisk | |
598 | sbin/addSystemMap | |
599 | sbin/debugfs | |
600 | sbin/e2fsck | |
601 | sbin/e2label | |
602 | sbin/reiserfsck | |
81a99973 | 603 | sbin/reiserfstune |
3e6a3a30 PZ |
604 | sbin/fsck |
605 | sbin/fsck.ext2 | |
606 | sbin/fsck.ext3 | |
607 | sbin/fsck.jfs | |
608 | sbin/fsck.reiserfs | |
609 | sbin/parted | |
610 | sbin/silo | |
611 | sbin/tune2fs | |
81a99973 ER |
612 | usr/bin/Xorg |
613 | usr/bin/setxkbmap | |
614 | usr/bin/xkbcomp | |
615 | usr/share/X11/XKeysymDB | |
616 | usr/share/X11/fonts/misc/6x13* | |
617 | usr/share/X11/fonts/misc/fonts* | |
618 | usr/share/X11/fonts/misc/cursor* | |
619 | usr/share/X11/fonts/misc/olcursor* | |
620 | usr/share/X11/fonts/Type1/l047013t* | |
621 | usr/share/X11/fonts/Type1/* | |
622 | usr/share/X11/fonts/TTF/GohaTibebZemen.ttf | |
623 | usr/share/X11/locale/* | |
624 | usr/share/X11/rgb* | |
625 | usr/share/X11/xkb/* | |
626 | usr/$LIBDIR/xserver/SecurityPolicy | |
627 | usr/$LIBDIR/libICE* | |
628 | usr/$LIBDIR/libSM* | |
629 | usr/$LIBDIR/libXaw.so* | |
630 | usr/$LIBDIR/libX11* | |
631 | usr/$LIBDIR/libXcursor* | |
632 | usr/$LIBDIR/libXext* | |
633 | usr/$LIBDIR/libXfixes* | |
634 | usr/$LIBDIR/libXft* | |
635 | usr/$LIBDIR/libXi* | |
636 | usr/$LIBDIR/libxkbfile* | |
637 | usr/$LIBDIR/libXmu* | |
638 | usr/$LIBDIR/libXpm* | |
639 | usr/$LIBDIR/libXrandr* | |
640 | usr/$LIBDIR/libXrender* | |
641 | usr/$LIBDIR/libXt* | |
642 | usr/$LIBDIR/libXxf86misc* | |
643 | usr/$LIBDIR/liblbxutil* | |
644 | usr/$LIBDIR/libXfont* | |
645 | usr/$LIBDIR/libfontenc* | |
646 | usr/$LIBDIR/libXau* | |
647 | usr/$LIBDIR/libXdmcp* | |
648 | usr/$LIBDIR/xorg/modules/* | |
649 | usr/$LIBDIR/xorg/modules/input/* | |
3e6a3a30 PZ |
650 | usr/bin/chattr* |
651 | usr/bin/fc-cache | |
652 | usr/bin/gtk-query* | |
653 | usr/bin/gdk-pixbuf-query-loaders* | |
654 | usr/bin/head | |
655 | usr/bin/lsattr* | |
656 | usr/bin/maketilo | |
657 | usr/bin/mini-wm | |
658 | usr/bin/pango* | |
659 | usr/bin/syslinux | |
660 | usr/bin/mkzimage | |
661 | usr/bin/tac | |
662 | usr/bin/tail | |
663 | usr/bin/tilo | |
664 | usr/bin/uniq | |
665 | usr/bin/Xvnc | |
666 | usr/bin/vncconfig | |
667 | usr/bin/vncpasswd | |
668 | usr/bin/reduce-font | |
3e6a3a30 | 669 | usr/lib/anaconda/iw |
3e6a3a30 | 670 | usr/$LIBDIR/gconv/* |
81a99973 | 671 | usr/$LIBDIR/gdk-pixbuf/loaders/*xpm* |
3e6a3a30 PZ |
672 | usr/$LIBDIR/gdk-pixbuf/loaders/*png* |
673 | usr/$LIBDIR/gdk-pixbuf/loaders/*la* | |
674 | usr/$LIBDIR/gtk-2.0/*/engines/libclearlooks.so | |
81a99973 | 675 | usr/$LIBDIR/gtk-2.0/*/loaders/*xpm* |
3e6a3a30 PZ |
676 | usr/$LIBDIR/gtk-2.0/*/loaders/*png* |
677 | usr/$LIBDIR/gtk-2.0/*/loaders/*la* | |
678 | usr/$LIBDIR/gtk-2.0/immodules/ | |
679 | usr/$LIBDIR/libImlib* | |
680 | usr/$LIBDIR/libXft* | |
681 | usr/$LIBDIR/libart* | |
682 | usr/$LIBDIR/libatk* | |
683 | usr/$LIBDIR/libaudio* | |
81a99973 ER |
684 | usr/$LIBDIR/libpixman* |
685 | usr/$LIBDIR/libcairo* | |
3e6a3a30 PZ |
686 | usr/$LIBDIR/libesd* |
687 | usr/$LIBDIR/libfontconfig* | |
688 | usr/$LIBDIR/libfreetype* | |
81a99973 | 689 | usr/$LIBDIR/libgailutil* |
3e6a3a30 PZ |
690 | usr/$LIBDIR/libgdk* |
691 | usr/$LIBDIR/libglade* | |
692 | usr/$LIBDIR/libgnomecanvas* | |
693 | usr/$LIBDIR/libgnomeui* | |
694 | usr/$LIBDIR/libgpm* | |
695 | usr/$LIBDIR/libgtk* | |
696 | usr/$LIBDIR/libjpeg* | |
697 | usr/$LIBDIR/libpango* | |
698 | usr/$LIBDIR/libpng.so.3* | |
699 | usr/$LIBDIR/libpng12.so* | |
700 | usr/$LIBDIR/libstdc++.so.* | |
701 | usr/$LIBDIR/libwrap* | |
702 | usr/$LIBDIR/pango/* | |
81a99973 | 703 | usr/$LIBDIR/python?.?/site-packages/cairo/* |
3e6a3a30 | 704 | usr/$LIBDIR/python?.?/site-packages/gtk*/gtk/* |
81a99973 | 705 | usr/$LIBDIR/python?.?/site-packages/gtk*/* |
3e6a3a30 PZ |
706 | usr/$LIBDIR/rpm/rpmpopt |
707 | usr/lib/syslinux/* | |
708 | usr/lib/yaboot/* | |
81a99973 | 709 | usr/lib/python?.?/site-packages/rhpxl/* |
3e6a3a30 PZ |
710 | usr/sbin/chroot |
711 | usr/sbin/ddcprobe | |
712 | usr/sbin/fbset | |
713 | usr/sbin/prelink | |
714 | usr/sbin/smartctl | |
715 | usr/share/anaconda/* | |
81a99973 | 716 | usr/share/firstboot/firstboot_module_window* |
3e6a3a30 PZ |
717 | usr/share/icons/default/* |
718 | usr/share/icons/gnome/cursors/* | |
719 | usr/share/icons/gnome/*/stock/* | |
720 | usr/share/icons/gnome/index.theme | |
81a99973 ER |
721 | usr/share/icons/Bluecurve/cursors/* |
722 | usr/share/icons/Bluecurve/*/stock/* | |
723 | usr/share/icons/Bluecurve/index.theme | |
724 | usr/share/fonts/bitstream-vera/Vera.ttf | |
725 | usr/share/fonts/bitstream-vera/VeraBd.ttf | |
726 | usr/share/fonts/bitstream-vera/VeraMono.ttf | |
3e6a3a30 PZ |
727 | usr/share/fonts/default/Type1/n019003l* |
728 | usr/share/fonts/default/Type1/n019004l* | |
729 | usr/share/fonts/default/Type1/n019023l* | |
730 | usr/share/fonts/default/Type1/n019024l* | |
731 | usr/share/fonts/default/Type1/n021003l* | |
732 | usr/share/fonts/default/Type1/n021004l* | |
733 | usr/share/fonts/default/Type1/n021023l* | |
734 | usr/share/fonts/default/Type1/n021024l* | |
735 | usr/share/fonts/korean/TrueType/dotum.ttf | |
81a99973 ER |
736 | usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf |
737 | usr/share/fonts/chinese/TrueType/uming*.ttf | |
3e6a3a30 PZ |
738 | usr/share/fonts/bengali/MuktiNarrow.ttf |
739 | usr/share/fonts/arabic/KacstFarsi.ttf | |
740 | usr/share/fonts/arabic/KacstQura.ttf | |
741 | usr/share/fonts/tamil/lohit_ta.ttf | |
742 | usr/share/fonts/gujarati/lohit_gu.ttf | |
743 | usr/share/fonts/bengali/lohit_bn.ttf | |
744 | usr/share/fonts/hindi/lohit_hi.ttf | |
745 | usr/share/fonts/panjabi/lohit_pa.ttf | |
746 | usr/share/fonts/punjabi/lohit_pa.ttf | |
747 | usr/share/locale/*/LC_MESSAGES/anaconda.mo | |
748 | usr/share/locale/*/LC_MESSAGES/system-config-date.mo | |
749 | usr/share/locale/*/LC_MESSAGES/redhat-dist.mo | |
750 | usr/share/locale/*/LC_MESSAGES/system-config-keyboard.mo | |
751 | usr/share/locale/*/LC_MESSAGES/gtk20.mo | |
752 | usr/share/locale/*/LC_MESSAGES/libc.mo | |
753 | usr/share/locale/*/LC_MESSAGES/rhpl.mo | |
81a99973 | 754 | usr/share/locale/*/LC_MESSAGES/rhpxl.mo |
3e6a3a30 | 755 | usr/share/locale/*/LC_MESSAGES/parted.mo |
81a99973 ER |
756 | usr/share/locale/*/LC_MESSAGES/pirut.mo |
757 | usr/share/pirut/* | |
3e6a3a30 PZ |
758 | usr/share/pixmaps/comps/*.png |
759 | usr/share/pixmaps/gnome-default-dlg.png | |
760 | usr/share/pixmaps/gnome-error.png | |
761 | usr/share/pixmaps/gnome-info.png | |
762 | usr/share/pixmaps/gnome-question.png | |
763 | usr/share/pixmaps/gnome-warning.png | |
764 | usr/share/pixmaps/no.xpm | |
765 | usr/share/pixmaps/yes.xpm | |
81a99973 | 766 | usr/share/ppc64-utils/* |
3e6a3a30 | 767 | usr/share/system-config-keyboard/* |
81a99973 | 768 | usr/share/system-config-date/* |
3e6a3a30 PZ |
769 | usr/share/terminfo/l/linux |
770 | usr/share/terminfo/x/xterm | |
771 | usr/share/terminfo/v/vt100 | |
772 | usr/share/terminfo/v/vt100-nav | |
773 | usr/share/themes/Clearlooks/gtk-2.0/* | |
774 | usr/share/themes/Clearlooks/index.theme | |
775 | usr/share/vte/termcap/xterm | |
81a99973 ER |
776 | usr/share/xorg/extramodes |
777 | usr/share/xorg/vesamodes | |
3e6a3a30 PZ |
778 | usr/share/zoneinfo/zone.tab |
779 | EOF | |
780 | ||
781 | TIMEZONES=" | |
782 | usr/share/zoneinfo/Africa | |
783 | usr/share/zoneinfo/America | |
784 | usr/share/zoneinfo/Antarctica | |
785 | usr/share/zoneinfo/Arctic | |
786 | usr/share/zoneinfo/Asia | |
787 | usr/share/zoneinfo/Atlantic | |
788 | usr/share/zoneinfo/Australia | |
789 | usr/share/zoneinfo/Canada | |
790 | usr/share/zoneinfo/Europe | |
791 | usr/share/zoneinfo/Indian | |
792 | usr/share/zoneinfo/Japan | |
793 | usr/share/zoneinfo/Mideast | |
794 | usr/share/zoneinfo/Pacific | |
795 | usr/share/zoneinfo/US | |
796 | " | |
797 | ||
81a99973 ER |
798 | # more dogtail stuff... |
799 | cat >> $KEEPFILEGR <<EOF | |
800 | usr/$LIBDIR/gtk-2.0/modules/libatk-bridge.so | |
801 | usr/$LIBDIR/gtk-2.0/modules/libgail.so | |
802 | usr/libexec/bonobo-activation-server | |
803 | usr/libexec/at-spi-registryd | |
804 | usr/$LIBDIR/libORBit* | |
805 | usr/$LIBDIR/libbonobo* | |
806 | usr/$LIBDIR/libspi* | |
807 | usr/$LIBDIR/libcspi* | |
808 | usr/$LIBDIR/bonobo/servers/* | |
809 | usr/$LIBDIR/libXevie* | |
3e6a3a30 | 810 | EOF |
81a99973 ER |
811 | |
812 | ||
3e6a3a30 PZ |
813 | |
814 | # | |
815 | # KEEPFILERESCUE is all files to keep from the packages in PACKAGESRESCUE | |
816 | # | |
817 | # This defines the files in addition to KEEPFILE and KEEPFILEGR that make up | |
818 | # the install images for NFS and CD/DVD based rescue mode installs. This | |
819 | # image is not loaded into memory so it can be considerably larger. | |
820 | # | |
821 | # NOTE: hd, ftp, and http rescue mode use and image based on KEEPFILE since | |
822 | # it has to be much smaller due to memory usage. | |
823 | # | |
824 | KEEPFILERESCUE=/tmp/keepfilerescue.$$ | |
825 | cat > $KEEPFILERESCUE <<EOF | |
826 | bin/gunzip | |
827 | bin/gzip | |
828 | bin/mt | |
829 | bin/ping | |
830 | bin/sync | |
831 | bin/tar | |
832 | bin/zcat | |
833 | etc/joe/* | |
834 | sbin/arp | |
835 | sbin/depmod | |
836 | sbin/dump | |
837 | sbin/ifconfig | |
838 | sbin/insmod | |
839 | sbin/lsmod | |
840 | sbin/lspci | |
841 | sbin/modinfo | |
842 | sbin/modprobe | |
843 | sbin/netstat | |
844 | sbin/restore | |
845 | sbin/rrestore | |
846 | sbin/rmmod | |
847 | sbin/route | |
848 | usr/bin/bunzip2 | |
849 | usr/bin/bzcat | |
850 | usr/bin/bzip2 | |
851 | usr/bin/emacs | |
852 | usr/bin/find | |
853 | usr/bin/ftp | |
854 | usr/bin/jmacs | |
855 | usr/bin/joe | |
856 | usr/bin/jpico | |
857 | usr/bin/less | |
858 | usr/bin/mattrib | |
859 | usr/bin/mbadblocks | |
860 | usr/bin/mcd | |
861 | usr/bin/mcopy | |
862 | usr/bin/mdel | |
863 | usr/bin/mdeltree | |
864 | usr/bin/mdir | |
865 | usr/bin/mdu | |
866 | usr/bin/mformat | |
867 | usr/bin/minfo | |
868 | usr/bin/mlabel | |
869 | usr/bin/mmd | |
870 | usr/bin/mmount | |
871 | usr/bin/mmove | |
872 | usr/bin/mpartition | |
873 | usr/bin/mrd | |
874 | usr/bin/mread | |
875 | usr/bin/mren | |
876 | usr/bin/mshowfat | |
877 | usr/bin/mtools | |
878 | usr/bin/mtype | |
879 | usr/bin/mzip | |
880 | usr/bin/open | |
881 | usr/bin/rcp | |
882 | usr/bin/rlogin | |
883 | usr/bin/rsh | |
81a99973 | 884 | usr/bin/rsync |
3e6a3a30 PZ |
885 | usr/bin/scp |
886 | usr/bin/sftp | |
887 | usr/bin/shred | |
888 | usr/bin/ssh | |
889 | usr/bin/termidx | |
890 | usr/bin/xargs | |
891 | usr/kerberos/$LIBDIR/libgssapi* | |
892 | usr/kerberos/$LIBDIR/libkrb5* | |
893 | usr/kerberos/$LIBDIR/libk5crypto* | |
894 | usr/kerberos/$LIBDIR/libcom_err* | |
895 | usr/sbin/mtr | |
896 | usr/sbin/traceroute | |
897 | EOF | |
898 | ||
81a99973 ER |
899 | # dmraid stuff |
900 | if [ $ARCH != s390 -a $ARCH != s390x ]; then | |
901 | cat >> $KEEPFILERESCUE <<-EOF | |
902 | sbin/dmraid.static | |
903 | sbin/dmsetup.static | |
904 | EOF | |
905 | fi | |
906 | ||
907 | if [ $ARCH = i386 -o $ARCH = x86_64 ]; then | |
908 | cat >> $KEEPFILERESCUE <<-EOF | |
909 | boot/grub | |
910 | sbin/grub | |
911 | sbin/grub-install | |
912 | sbin/grub-md5-crypt | |
913 | sbin/grub-set-default | |
914 | usr/bin/gpart | |
915 | usr/bin/mbchk | |
916 | usr/share/grub/* | |
917 | EOF | |
918 | fi | |
919 | ||
3e6a3a30 PZ |
920 | echo "Assembling package list..." |
921 | RPMS=$(prunePackageList $PACKAGEDIR "$PACKAGES") | |
922 | [ -n "$DEBUG" ] && echo "RPMS are $RPMS" | |
923 | RPMSGR=$(prunePackageList $PACKAGEDIR "$PACKAGESGR $PACKAGESRESCUE") | |
924 | [ -n "$DEBUG" ] && echo "RPMSGR are $RPMSGR" | |
925 | ||
926 | rm -rf $DEST; mkdir -p $DEST/usr/sbin | |
927 | rm -rf $DESTGR; mkdir -p $DESTGR/usr/sbin $DESTGR/var/lib $DESTGR/boot | |
928 | ln -s /tmp $DESTGR/var/lib/xkb | |
929 | ||
930 | # | |
931 | # concat KEEPFILEGR and KEEPFILERESCUE lists | |
932 | # | |
933 | cat $KEEPFILERESCUE >> $KEEPFILEGR | |
934 | ||
935 | # | |
936 | # filter paths in keepfile lists for use by cpio | |
937 | # | |
938 | for file in $KEEPFILE $KEEPFILEGR; do | |
939 | cat $file | awk '{print $1 "\n./" $1}' > $file- | |
940 | mv -f $file- $file | |
941 | done | |
942 | ||
943 | echo "Expanding text packages..." | |
944 | expandPackageSet "$RPMS" $DEST $KEEPFILE | |
945 | ||
946 | (cd $DEST; tar cSpf - .) | (cd $DESTGR; tar xSpf -) | |
947 | ||
948 | echo "Expanding graphical packages..." | |
949 | expandPackageSet "$RPMSGR" $DESTGR $KEEPFILEGR | |
950 | ||
951 | echo "retrieving timezones" | |
952 | TZDIR=/tmp/glibc-timezone-$$ | |
953 | mkdir -p $TZDIR/usr/share/zoneinfo | |
954 | rpm2cpio $TZDATA | (cd $TZDIR; cpio --quiet -iumd usr/share/zoneinfo ./usr/share/zoneinfo ./usr/share/zoneinfo/* usr/share/zoneinfo/*) | |
955 | [ $? = 0 ] || die "ERROR: Unable to expand timezone data ($TZDATA)" | |
956 | (cd $TZDIR; tar cSpf - $TIMEZONES) | (cd $DEST; tar xSpf -) | |
957 | (cd $TZDIR; tar cSpf - $TIMEZONES) | (cd $DESTGR; tar xSpf -) | |
958 | ||
959 | chown -R root:root $DEST $DESTGR | |
960 | chmod -R a+rX-w $DEST $DESTGR | |
961 | if [ $ARCH = s390 -o $ARCH = s390x ]; then | |
962 | for i in $DEST $DESTGR; do | |
963 | mv $i/bin/sed $i/bin/sed_save | |
964 | mv $i/bin/sort $i/bin/sort_save | |
965 | done | |
81a99973 ER |
966 | else |
967 | for i in $DEST $DESTGR; do | |
968 | # there's never a case with only one of these... | |
969 | if [ -f $i/sbin/dmraid.static ]; then | |
970 | mv $i/sbin/dmraid.static $i/sbin/dmraid | |
971 | mv $i/sbin/dmsetup.static $i/sbin/dmsetup | |
972 | fi | |
973 | done | |
3e6a3a30 PZ |
974 | fi |
975 | ||
976 | # change mtimes to 0 (to match what happens on the cramfs) | |
977 | for p in $DEST $DESTGR; do | |
978 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
979 | runroot $COMPONENT --onlyone --arch $ARCH "cd $p\; usr/lib/anaconda-runtime/fixmtime.py $DEBUG $p" | |
980 | else | |
981 | $p/usr/lib/anaconda-runtime/fixmtime.py $DEBUG $p | |
982 | fi | |
983 | done | |
984 | ||
985 | # Remove locales unused during the install | |
c7487dae | 986 | cat $DESTGR/usr/lib/anaconda/lang-table* | gawk ' |
3e6a3a30 PZ |
987 | { gsub("-", "", $4); |
988 | print $4; | |
989 | print gensub(/\..*$/,"","",$4); | |
990 | print gensub(/_.*$/,"","",$4); | |
991 | if (split ($4, a, ".") > 1) { | |
992 | print gensub(/\..*$/,tolower("." a[2]),"",$4); | |
993 | }; | |
81a99973 | 994 | print $2; |
3e6a3a30 PZ |
995 | } |
996 | ' | LC_ALL=C sort -u > $DESTGR/locales | |
b512e470 | 997 | for p in share; do ( |
3e6a3a30 PZ |
998 | cd $DESTGR/usr/$p/locale && { |
999 | ls | grep -v locale.alias | LC_ALL=C sort > $DESTGR/locales.list | |
1000 | LC_ALL=C comm -13 $DESTGR/locales $DESTGR/locales.list | xargs rm -rf | |
1001 | } | |
1002 | ); done | |
1003 | rm -f $DESTGR/locales $DESTGR/locales.list | |
1004 | ||
1005 | # now, create a locale archive and nuke the locale dirs since | |
1006 | # that ends up taking less space | |
b512e470 ER |
1007 | #for p in $DEST $DESTGR; do |
1008 | # echo "Building locale archive" | |
1009 | # if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1010 | # runroot $COMPONENT --onlyone --arch $ARCH "/usr/sbin/chroot $p /usr/sbin/build-locale-archive" | |
1011 | # else | |
1012 | # /usr/sbin/chroot $p /usr/sbin/build-locale-archive | |
1013 | # fi | |
1014 | # mv $p/usr/lib/locale/locale-archive $p/usr/lib/locale-archive | |
1015 | # rm -rf $p/usr/lib/locale/* | |
1016 | # rm -f $p/usr/sbin/build-locale-archive | |
1017 | # mv $p/usr/lib/locale-archive $p/usr/lib/locale/locale-archive | |
1018 | #done | |
3e6a3a30 PZ |
1019 | |
1020 | # Remove unneeded XFree86 modules | |
1021 | rm -rf $DESTGR/usr/X11R6/$LIBDIR/modules/dri | |
1022 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/libscanpci.a | |
1023 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/libxf1bpp.a | |
1024 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/fonts/libspeedo.a | |
1025 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/drivers/linux/v4l_drv.o | |
1026 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/extensions/libdri.a | |
1027 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/extensions/libxtrap.a | |
1028 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/extensions/librecord.a | |
1029 | ||
1030 | rm -f $DESTGR/usr/X11R6/$LIBDIR/modules/extensions/lib{GLcore,glx,pex5}* | |
1031 | ||
1032 | # fixup joe links | |
1033 | ln -fs jpicorc $DESTGR/etc/joe/picorc | |
81a99973 ER |
1034 | ln -fs jpicorc $DESTGR/etc/joe/jnanorc |
1035 | ln -fs jpicorc $DESTGR/etc/joe/nanorc | |
3e6a3a30 PZ |
1036 | ln -fs jmacsrc $DESTGR/etc/joe/emacsrc |
1037 | ln -fs jmacs $DESTGR/usr/bin/emacs | |
1038 | ln -fs jpico $DESTGR/usr/bin/pico | |
81a99973 ER |
1039 | ln -fs jpico $DESTGR/usr/bin/nano |
1040 | ||
1041 | # create selinux config | |
1042 | if [ -e $DEST/etc/selinux/targeted ]; then | |
1043 | cat > $DEST/etc/selinux/config <<EOF | |
1044 | SELINUX=permissive | |
1045 | SELINUXTYPE=targeted | |
1046 | EOF | |
1047 | cp $DEST/etc/selinux/config $DESTGR/etc/selinux/config | |
1048 | fi | |
1049 | ||
1050 | cat > $DEST/etc/shells <<EOF | |
1051 | /bin/sh | |
1052 | EOF | |
3e6a3a30 PZ |
1053 | |
1054 | echo "Creating nsswitch.conf" | |
1055 | cat > $DEST/etc/nsswitch.conf <<EOF | |
1056 | # munged nsswitch.conf with just what anaconda needs | |
1057 | # created by upd-instroot | |
1058 | # | |
1059 | passwd: files | |
1060 | shadow: files | |
1061 | group: files | |
1062 | hosts: files dns | |
1063 | ethers: files | |
1064 | netmasks: files | |
1065 | networks: files | |
1066 | protocols: files | |
1067 | rpc: files | |
1068 | services: files | |
1069 | netgroup: files | |
1070 | automount: files | |
1071 | aliases: files | |
1072 | EOF | |
1073 | ||
81a99973 | 1074 | cp $DEST/etc/shells $DESTGR/etc/shells |
3e6a3a30 PZ |
1075 | cp $DEST/etc/nsswitch.conf $DESTGR/etc/nsswitch.conf |
1076 | ||
1077 | # fixup man.config to point into /mnt/sysimage for rescue | |
1078 | echo "Fixing up /etc/man.config to point into /mnt/sysimage" | |
1079 | if [ -n "$NEEDGR" ]; then | |
1080 | mv $DESTGR/etc/man.config $DESTGR/etc/man.config-old | |
1081 | cat $DESTGR/etc/man.config-old | sed 's^/usr/bin^/mnt/sysimage/usr/bin^' | sed 's^/bin/cat^/mnt/sysimage/usr/bin/cat^' > $DESTGR/etc/man.config | |
1082 | rm -f $DESTGR/etc/man.config-old | |
1083 | fi | |
1084 | ||
3e6a3a30 PZ |
1085 | echo "Running mkfontdir..." |
1086 | if [ -n "$NEEDGR" ]; then | |
70c49891 | 1087 | /usr/X11R6/bin/mkfontdir $DESTGR/usr/share/fonts/* |
81a99973 ER |
1088 | fi |
1089 | ||
1090 | echo "Creating SELinux policy..." | |
1091 | if [ -x $DESTGR/usr/sbin/semodule -a -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1092 | runroot $COMPONENT --onlyone --arch $ARCH "/usr/sbin/chroot $DESTGR /usr/sbin/semodule -b /usr/share/selinux/targeted/base.pp -n -s targeted" | |
1093 | else | |
1094 | /usr/sbin/chroot $DESTGR /usr/sbin/semodule -b /usr/share/selinux/targeted/base.pp -n -s targeted | |
3e6a3a30 | 1095 | fi |
81a99973 ER |
1096 | rm -rf $DEST/etc/selinux |
1097 | mkdir $DEST/etc/selinux | |
1098 | cp -r $DESTGR/etc/selinux/* $DEST/etc/selinux/ | |
3e6a3a30 PZ |
1099 | |
1100 | echo "Getting pango modules" | |
1101 | if [ -n "$NEEDGR" ]; then | |
3e6a3a30 PZ |
1102 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then |
1103 | runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/pango-querymodules 2> $DESTGR/etc/pango/pango.modules" | |
1104 | else | |
1105 | LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/pango-querymodules > $DESTGR/etc/pango/pango.modules | |
1106 | fi | |
1107 | rm -f $DESTGR/usr/bin/pango-querymodules | |
1108 | # more sick hackery since it doesn't fall back to this like owen thought | |
1109 | cat > $DESTGR/etc/pango/pangorc <<EOF | |
1110 | [Pango] | |
1111 | ModuleFiles=/etc/pango/pango.modules | |
1112 | EOF | |
1113 | fi | |
1114 | ||
aa398f49 ER |
1115 | host=`rpm -E %{_host}` |
1116 | ||
3e6a3a30 PZ |
1117 | |
1118 | case "$host" in | |
1119 | *linux) canonhost="$host-gnu" | |
1120 | ;; | |
1121 | *) canonhost=$host | |
1122 | ;; | |
1123 | esac | |
1124 | ||
1125 | # autoconf uses powerpc not ppc | |
1126 | HOSTTRIPLET=`echo $canonhost | sed "s/^ppc/powerpc/"` | |
1127 | ||
1128 | ||
1129 | mkdir -p $DESTGR/etc/gtk-2.0/$HOSTTRIPLET | |
1130 | ||
1131 | echo "Getting gtk2 input method modules" | |
1132 | if [ -n "$NEEDGR" ]; then | |
3e6a3a30 PZ |
1133 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then |
1134 | runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gtk-query-immodules-2.0 2> $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gtk.immodules" | |
1135 | else | |
1136 | LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gtk-query-immodules-2.0 > $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gtk.immodules | |
1137 | fi | |
1138 | rm -f $DESTGR/usr/bin/gtk-query-immodules-2.0 | |
1139 | fi | |
1140 | ||
1141 | echo "Getting gtk2 gdk-pixbuf loaders" | |
1142 | if [ -n "$NEEDGR" ]; then | |
3e6a3a30 PZ |
1143 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then |
1144 | runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gdk-pixbuf-query-loaders 2> $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gdk-pixbuf.loaders" | |
1145 | else | |
1146 | LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/gdk-pixbuf-query-loaders > $DESTGR/etc/gtk-2.0/$HOSTTRIPLET/gdk-pixbuf.loaders | |
1147 | fi | |
1148 | rm -f $DESTGR/usr/bin/gdk-pixbuf-query-loaders | |
1149 | fi | |
1150 | ||
1151 | rm -f $KEEPFILE $KEEPFILEGR $KEEPFILERESCUE | |
1152 | ||
1153 | for p in $DEST $DESTGR; do | |
1154 | echo "Scrubbing trees..." "$p" | |
aa398f49 | 1155 | install -d $p/usr/bin |
3e6a3a30 PZ |
1156 | cp $p/usr/lib/anaconda/raidstart-stub $p/usr/bin/raidstart |
1157 | cp $p/usr/lib/anaconda/raidstop-stub $p/usr/bin/raidstop | |
1158 | cp $p/usr/lib/anaconda/losetup-stub $p/usr/bin/losetup | |
1159 | cp $p/usr/lib/anaconda/pump-stub $p/usr/bin/pump | |
1160 | cp $p/usr/lib/anaconda/list-harddrives-stub $p/usr/bin/list-harddrives | |
1161 | cp $p/usr/lib/anaconda/kudzu-probe-stub $p/usr/bin/kudzu-probe | |
1162 | cp $p/usr/lib/anaconda/loadkeys-stub $p/usr/bin/loadkeys | |
1163 | cp $p/usr/lib/anaconda/mknod-stub $p/usr/bin/mknod | |
1164 | cp $p/usr/lib/anaconda/rescue-startx-stub $p/usr/bin/rescue-startx | |
1165 | mv $p/usr/sbin/anaconda $p/usr/bin/anaconda | |
1166 | mv $p/usr/lib/anaconda-runtime/lib* $p/usr/$LIBDIR | |
1167 | ||
1168 | # we only want the libunicode-lite stuff on the minimal image | |
1169 | if [ $p = $DESTGR ]; then | |
1170 | rm -f $p/usr/$LIBDIR/libunicode-lite* | |
1171 | fi | |
1172 | ||
1173 | find $p -type d | xargs chmod 755 | |
1174 | ||
1175 | if [ -f $p/bin/bash ]; then | |
1176 | rm -f $p/bin/ash | |
1177 | ln -s bash $p/bin/sh | |
1178 | else | |
1179 | ln -sf busybox $p/bin/sh | |
1180 | fi | |
1181 | ||
1182 | [ -d $p/bin ] || die "ERROR: directory missing: $p/bin" | |
1183 | [ -d $p/sbin ] || die "ERROR: directory missing: $p/sbin" | |
1184 | (cd $p/bin; find) | (cd $p/bin; /bin/cpio --quiet -pdmu $p/usr/bin) | |
1185 | (cd $p/sbin; find) | (cd $p/sbin; /bin/cpio --quiet -pdmu $p/usr/sbin) | |
1186 | rm -rf $p/bin | |
1187 | rm -rf $p/sbin | |
1188 | ||
1189 | # copy bootloader files for sparc | |
1190 | if [ $ARCH = sparc -a $p = $DESTGR ]; then | |
1191 | mkdir -p $p/usr/lib/anaconda-runtime/boot | |
1192 | [ -d $p/boot ] || die "ERROR: directory missing: $p/boot" | |
1193 | (cd $p/boot; find -name "*.b") | (cd $p/boot; /bin/cpio --quiet -pdmu $p/usr/lib/anaconda-runtime/boot) | |
1194 | fi | |
1195 | ||
1196 | # copy bootloader file for alpha | |
1197 | if [ $ARCH = alpha -a $p = $DESTGR ]; then | |
1198 | mkdir -p $p/usr/lib/anaconda-runtime/boot | |
1199 | cp -af $p/boot/bootlx $p/usr/lib/anaconda-runtime/boot | |
1200 | fi | |
1201 | ||
1202 | # copy bootloader files for ia64 | |
1203 | if [ $ARCH = ia64 -a $p = $DESTGR ]; then | |
1204 | mkdir -p $p/usr/lib/anaconda-runtime/boot | |
1205 | cp -af $p/boot/efi/EFI/redhat//* $p/usr/lib/anaconda-runtime/boot | |
1206 | fi | |
1207 | ||
1208 | # copy bootloader files for i386/x86_64 | |
c7487dae | 1209 | if [ $ARCH = i386 -o $ARCH = i686 -o $ARCH = x86_64 ]; then |
3e6a3a30 PZ |
1210 | if [ $p = $DESTGR ]; then |
1211 | mkdir -p $p/usr/lib/anaconda-runtime/boot | |
1212 | cp -af $p/boot/memtest* $p/usr/lib/anaconda-runtime/boot | |
1213 | fi | |
1214 | fi | |
1215 | ||
1216 | rm -rf $p/boot $p/home $p/root $p/tmp | |
1217 | ||
1218 | find $p -name "*.a" | grep -v "usr/X11R6/$LIBDIR/modules" | xargs rm -rf | |
1219 | find $p -name "lib*.la" |grep -v "usr/$LIBDIR/gtk-2.0" | xargs rm -rf | |
1220 | for f in newt popt rpm rpmio; do | |
1221 | rm -f $p/usr/$LIBDIR/lib$f.so | |
1222 | done | |
1223 | ||
1224 | # nuke some python stuff we don't need | |
81a99973 | 1225 | for d in idle distutils bsddb lib-old hotshot doctest.py pydoc.py site-packages/japanese site-packages/japanese.pth ; do |
3e6a3a30 PZ |
1226 | rm -rf $p/$d |
1227 | done | |
1228 | ||
1229 | if [ "$ARCH" != "s390" -a "$ARCH" != "s390x" ]; then | |
81a99973 | 1230 | (cd $p/lib* && rm -f libnss_files.so.1 libnss_dns.so.1) |
3e6a3a30 PZ |
1231 | fi |
1232 | ||
1233 | if [ -d $DEST/usr/share/zoneinfo ]; then | |
1234 | (cd $DEST/usr/share/zoneinfo; find . -type f -or -type l | | |
1235 | grep '^./[A-Z]' | sort | sed 's/^..//' | | |
1236 | gzip -9) > $p/usr/lib/timezones.gz | |
1237 | else | |
1238 | echo "ERROR: unable to explode tzdata for small images" | |
1239 | fi | |
1240 | ||
1241 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1242 | runroot $COMPONENT --onlyone --arch $ARCH "cd $p\; usr/lib/anaconda-runtime/scrubtree $DEBUG $p" | |
1243 | else | |
1244 | $p/usr/lib/anaconda-runtime/scrubtree $p | |
1245 | fi | |
1246 | done | |
1247 | ||
1248 | echo "Compressing .mo files in stage2 images..." | |
1249 | if [ -d $DEST/usr/share/locale ]; then | |
1250 | for i in `find $DEST/usr/share/locale -name anaconda.mo`; do | |
1251 | gzip -9 $i | |
1252 | mv -f $i.gz $i | |
1253 | done | |
1254 | fi | |
1255 | ||
1256 | echo "Creating fontconfig cache" | |
1257 | if [ -n "$NEEDGR" ]; then | |
1258 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1259 | runroot $COMPONENT --onlyone --arch $ARCH "LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/fc-cache" | |
1260 | else | |
1261 | LD_LIBRARY_PATH=/usr/X11R6/$LIBDIR:$LD_LIBRARY_PATH /usr/sbin/chroot $DESTGR /usr/bin/fc-cache | |
1262 | fi | |
1263 | rm -f $DESTGR/usr/bin/fc-cache | |
1264 | fi | |
1265 | ||
1266 | echo "Creating debug dir" | |
1267 | for p in $DEST $DESTGR ; do | |
1268 | mkdir -p $p/usr/lib/debug | |
81a99973 | 1269 | mkdir -p $p/usr/src/debug |
3e6a3a30 PZ |
1270 | done |
1271 | ||
1272 | if [ $ARCH = "alpha" ]; then | |
1273 | rm -rf $DEST/usr/share/locale | |
1274 | rm -rf $DEST/usr/$LIBDIR/locale | |
1275 | fi | |
1276 | ||
1277 | echo "Patching python library..." | |
1278 | ||
1279 | # always use passive mode for ftp installs | |
1280 | cd $DEST/usr/$LIBDIR/python2.4 | |
1281 | patch -p0 > /dev/null <<EOF | |
1282 | --- urllib.py.orig Thu Oct 25 17:05:06 2001 | |
1283 | +++ urllib.py Thu Oct 25 17:05:34 2001 | |
1284 | @@ -453,6 +453,7 @@ | |
1285 | path, attrs = splitattr(path) | |
1286 | path = unquote(path) | |
1287 | dirs = path.split('/') | |
1288 | + dirs[0] = '/' + dirs[0] | |
1289 | dirs, file = dirs[:-1], dirs[-1] | |
1290 | if dirs and not dirs[0]: dirs = dirs[1:] | |
1291 | if dirs and not dirs[0]: dirs[0] = '/' | |
1292 | @@ -707,6 +708,7 @@ | |
1293 | self.ftp = ftplib.FTP() | |
1294 | self.ftp.connect(self.host, self.port) | |
1295 | self.ftp.login(self.user, self.passwd) | |
1296 | + self.ftp.set_pasv(1) | |
1297 | for dir in self.dirs: | |
1298 | self.ftp.cwd(dir) | |
1299 | EOF | |
1300 | cd - | |
1301 | ||
1302 | echo -n -e "Removing unused python files in hdimage... " | |
1303 | ||
1304 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1305 | runroot $COMPONENT --onlyone --arch $ARCH "cd $DEST\; usr/lib/anaconda-runtime/pythondeps $DEST" | |
1306 | else | |
1307 | $DEST/usr/lib/anaconda-runtime/pythondeps $DEST | |
1308 | fi | |
1309 | echo "done." | |
1310 | ||
1311 | for p in $DEST $DESTGR; do | |
1312 | find $p -name "*.py" | while read fn; do | |
1313 | rm -f ${fn}o | |
1314 | rm -f ${fn}c | |
1315 | ln -sf /dev/null ${fn}c | |
1316 | done | |
1317 | done | |
1318 | ||
1319 | # do some stripping of debugging symbols | |
1320 | if [ -x /usr/bin/runroot -a -n "$COMPONENT" ]; then | |
1321 | runroot $COMPONENT --onlyone --arch $ARCH "\"find $DEST -type f -name '*.so' -exec strip -g '{}' ';'\"" | |
1322 | runroot $COMPONENT --onlyone --arch $ARCH "\"find $DESTGR -type f -name '*.so' -exec strip -g '{}' ';'\"" | |
1323 | else | |
1324 | find $DEST -type f -name '*.so' |xargs strip -g | |
1325 | find $DESTGR -type f -name '*.so' |xargs strip -g | |
1326 | fi | |
1327 | ||
1328 | # some python stuff we don't need for stage2 | |
81a99973 ER |
1329 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/distutils/ |
1330 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/lib-dynload/japanese | |
1331 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/encodings/ | |
1332 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/compiler/ | |
1333 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/email/test/ | |
1334 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/curses/ | |
1335 | rm -rf $DESTGR/usr/$LIBDIR/python?.?/site-packages/pydoc.py | |
3e6a3a30 PZ |
1336 | |
1337 | # clean up tzdata | |
1338 | rm -rf $TZDIR | |
1339 | ||
1340 | # this is only for the minimal second stage | |
1341 | echo "Cleaning ramdisk install images..." | |
1342 | rm -rf $DEST/usr/lib/anaconda-runtime |