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