1 |
#!/bin/sh |
2 |
|
3 |
# Charlie Brady wrote on smeserver-developer: |
4 |
# [I'm sure I've said this before, but ...] there's no new anaconda SRPM. |
5 |
# The cdrom image I've been using comes directly from a CentOS one. |
6 |
|
7 |
# |
8 |
# What I've done is: |
9 |
# |
10 |
# - add CentOS/base/updates.img, made using mkcramfs from the updates directory |
11 |
# - delete unwanted RPMs |
12 |
# - add wanted RPMs |
13 |
# - replace comps.xml |
14 |
# - add install.cfg and update.cfg |
15 |
# - edit isolinux/isolinux.cfg |
16 |
# |
17 |
# Run this in the a 7.0alphaXX directory, containing cdrom.image |
18 |
# which contains the directory tree: |
19 |
|
20 |
|
21 |
echo "Checking packages not installed in CentOS workstation group" |
22 |
for package in anaconda anaconda-runtime bogl booty createrepo mkisofs zsync \ |
23 |
xorg-x11-font-utils netpbm-progs netpbm |
24 |
do |
25 |
rpm -q $package || exit "$package must be installed" |
26 |
done |
27 |
|
28 |
distname='SME Server' |
29 |
distvers=$(basename $(pwd)) |
30 |
|
31 |
for img in product updates |
32 |
do |
33 |
/usr/bin/mkcramfs \ |
34 |
$(pwd)/cdrom.image/$img \ |
35 |
$(pwd)/cdrom.image/CentOS/base/$img.img |
36 |
done |
37 |
|
38 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
39 |
--withnumbers \ |
40 |
$(pwd)/cdrom.image/ |
41 |
|
42 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
43 |
$(pwd)/cdrom.image \ |
44 |
i386 > pkgorder |
45 |
|
46 |
PACKAGES="acl anaconda anaconda-help anaconda-images anaconda-runtime ash |
47 |
atk attr audiofile audit-libs bash beecrypt bitmap-fonts-cjk bogl |
48 |
bogl-bterm booty busybox-anaconda bzip2 bzip2-libs comps-extras |
49 |
convertdb1 coreutils cpio device-mapper dmapi dosfstools dump |
50 |
e2fsprogs elfutils-libelf esound expat fedora-logos findutils |
51 |
fontconfig fonts-arabic fonts-bengali fonts-ISO8859-2 fonts-ISO8859-9 |
52 |
fonts-xorg-100dpi fonts-xorg-base fonts-xorg-ISO8859-15-75dpi |
53 |
fonts-xorg-ISO8859-2-75dpi fonts-xorg-ISO8859-9-75dpi fonts-xorg-KOI8-R |
54 |
fonts-xorg-KOI8-R-75dpi freetype ftp gdk-pixbuf glib2 glibc glibc-common |
55 |
gnome-python2 gnome-python2-canvas gpm gtk2 gzip hdparm hwdata iputils |
56 |
jfsutils joe kernel-pcmcia-cs kernel-utils krb5-libs kudzu less libacl |
57 |
libart_lgpl libattr libgcc libgnome libgnomecanvas libjpeg libpng |
58 |
libselinux libsepol libstdc++ libtermcap libxml2 libxml2-python lvm2 |
59 |
man mdadm memtest86+ modutils mtools mtr mt-st ncurses net-tools newt |
60 |
open openssh openssh-clients openssl pam pango parted pciutils policy |
61 |
policycoreutils popt prelink procps pygtk2 pyparted python pyxf86config |
62 |
raidtools readline redhat-artwork redhat-logos reiserfs-utils rhpl rpm |
63 |
rpm-libs rpm-python rsh sed selinux-policy-targeted setup slang specspo |
64 |
syslinux system-config-date system-config-keyboard taipeifonts tar |
65 |
tcp_wrappers traceroute ttfonts-bn ttfonts-gu ttfonts-hi ttfonts-ja |
66 |
ttfonts-ko ttfonts-pa ttfonts-ta ttfonts-zh_CN ttfonts-zh_TW tzdata |
67 |
urw-fonts util-linux vnc-server Xconfigurator XFree86 XFree86-100dpi-fonts |
68 |
XFree86-75dpi-fonts XFree86-base-fonts XFree86-ISO8859-15-75dpi-fonts |
69 |
XFree86-ISO8859-2-75dpi-fonts XFree86-ISO8859-9-75dpi-fonts |
70 |
XFree86-KOI8-R XFree86-KOI8-R-75dpi-fonts XFree86-libs XFree86-libs-data |
71 |
XFree86-xfs xfsdump xfsprogs Xft xorg-x11 xorg-x11-100dpi-fonts |
72 |
xorg-x11-base xorg-x11-base-fonts xorg-x11-ISO8859-15-75dpi |
73 |
xorg-x11-ISO8859-15-75dpi-fonts xorg-x11-ISO8859-2-75dpi-fonts |
74 |
xorg-x11-ISO8859-9-75dpi-fonts xorg-x11-KOI8-R xorg-x11-KOI8-R-75dpi-fonts |
75 |
xorg-x11-libs xorg-x11-libs-data xorg-x11-xfs zlib" |
76 |
|
77 |
for PKG in $PACKAGES; |
78 |
do |
79 |
PACKAGEFILE=$(rpm --qf "%{NAME} %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n" --nodigest --nosignature -qp /mirrors/centos/4.2/updates/i386/RPMS/$PKG*{i386,noarch}.rpm | egrep "^$PKG " | sed 's/.* //') |
80 |
if [ -n "$PACKAGEFILE" ]; |
81 |
then |
82 |
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE ]; |
83 |
then |
84 |
ln -sf /mirrors/centos/4.2/updates/i386/RPMS/$PACKAGEFILE $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE |
85 |
fi |
86 |
else |
87 |
PACKAGEFILE=$(rpm --qf "%{NAME} %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n" --nodigest --nosignature -qp /mirrors/centos/4.2/os/i386/CentOS/RPMS/$PKG*{i386,noarch}.rpm | egrep "^$PKG " | sed 's/.* //') |
88 |
if [ -n "$PACKAGEFILE" ]; |
89 |
then |
90 |
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE ]; |
91 |
then |
92 |
ln -sf /mirrors/centos/4.2/os/i386/CentOS/RPMS/$PACKAGEFILE $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE |
93 |
fi |
94 |
fi |
95 |
fi |
96 |
done |
97 |
|
98 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
99 |
--comp dist-4.1 \ |
100 |
--pkgorder pkgorder \ |
101 |
--release "$distname" \ |
102 |
--product "$distname" \ |
103 |
--version 7.0 \ |
104 |
$(pwd)/cdrom.image/ |
105 |
|
106 |
# Remove previous linked files |
107 |
find $(pwd)/cdrom.image/CentOS/RPMS/ -type l | xargs rm -f |
108 |
|
109 |
# Copy updated isolinux files |
110 |
sudo cp -fR /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
111 |
|
112 |
echo "You now need to run /builds/bin/build_ISO as non-root" |
113 |
|
114 |
# That's it. |