1 |
#!/bin/sh |
2 |
|
3 |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
4 |
|
5 |
distname='SME Server' |
6 |
distvers=$(basename $(pwd)) |
7 |
distarch=$(uname -i) |
8 |
|
9 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
10 |
--withnumbers \ |
11 |
$(pwd)/cdrom.image/ |
12 |
|
13 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
14 |
$(pwd)/cdrom.image \ |
15 |
$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 |
for PKG in $PACKAGES $PACKAGESGR $PACKAGESRESCUE |
66 |
do |
67 |
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 |
if [ -n "$PACKAGEFILES" ]; |
69 |
then |
70 |
for PKGFILE in $PACKAGEFILES |
71 |
do |
72 |
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE ]; |
73 |
then |
74 |
ln -sf /mirrors/centos/4/updates/$distarch/RPMS/$PKGFILE $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE |
75 |
fi |
76 |
done |
77 |
else |
78 |
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 |
if [ -n "$PACKAGEFILES" ]; |
80 |
then |
81 |
for PKGFILE in $PACKAGEFILES |
82 |
do |
83 |
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE ]; |
84 |
then |
85 |
ln -sf /mirrors/centos/4/os/$distarch/CentOS/RPMS/$PKGFILE $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE |
86 |
fi |
87 |
done |
88 |
fi |
89 |
fi |
90 |
done |
91 |
|
92 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
93 |
--comp dist-4.3 \ |
94 |
--pkgorder pkgorder \ |
95 |
--release "$distname" \ |
96 |
--product "$distname" \ |
97 |
--version 7.0 \ |
98 |
$(pwd)/cdrom.image/ |
99 |
|
100 |
# Remove previous linked files |
101 |
find $(pwd)/cdrom.image/CentOS/RPMS/ -type l | xargs rm -f |
102 |
|
103 |
# Copy updated isolinux files |
104 |
sudo cp -f /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
105 |
|
106 |
echo "You now need to run /builds/bin/build_ISO as non-root" |
107 |
|
108 |
# That's it. |