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 |
|
distrel=7 |
7 |
distvers=$(basename $(pwd)) |
distvers=$(basename $(pwd)) |
8 |
|
distarch=$(uname -i) |
|
for img in product updates |
|
|
do |
|
|
/usr/bin/mkcramfs \ |
|
|
$(pwd)/cdrom.image/$img \ |
|
|
$(pwd)/cdrom.image/CentOS/base/$img.img |
|
|
done |
|
9 |
|
|
10 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
11 |
--withnumbers \ |
--withnumbers \ |
13 |
|
|
14 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
15 |
$(pwd)/cdrom.image \ |
$(pwd)/cdrom.image \ |
16 |
i386 > pkgorder |
$distarch > pkgorder |
|
|
|
|
PACKAGES="acl anaconda anaconda-help anaconda-images anaconda-runtime ash |
|
|
atk attr audiofile audit-libs bash beecrypt bitmap-fonts-cjk bogl |
|
|
bogl-bterm booty busybox-anaconda bzip2 bzip2-libs comps-extras |
|
|
convertdb1 coreutils cpio device-mapper dmapi dosfstools dump |
|
|
e2fsprogs elfutils-libelf esound expat fedora-logos findutils |
|
|
fontconfig fonts-arabic fonts-bengali fonts-ISO8859-2 fonts-ISO8859-9 |
|
|
fonts-xorg-100dpi fonts-xorg-base fonts-xorg-ISO8859-15-75dpi |
|
|
fonts-xorg-ISO8859-2-75dpi fonts-xorg-ISO8859-9-75dpi fonts-xorg-KOI8-R |
|
|
fonts-xorg-KOI8-R-75dpi freetype ftp gdk-pixbuf glib2 glibc glibc-common |
|
|
gnome-python2 gnome-python2-canvas gpm gtk2 gzip hdparm hwdata iputils |
|
|
jfsutils joe kernel-pcmcia-cs kernel-utils krb5-libs kudzu less libacl |
|
|
libart_lgpl libattr libgcc libgnome libgnomecanvas libjpeg libpng |
|
|
libselinux libsepol libstdc++ libtermcap libxml2 libxml2-python lvm2 |
|
|
man mdadm memtest86+ modutils mtools mtr mt-st ncurses net-tools newt |
|
|
open openssh openssh-clients openssl pam pango parted pciutils policy |
|
|
policycoreutils popt prelink procps pygtk2 pyparted python pyxf86config |
|
|
raidtools readline redhat-artwork redhat-logos reiserfs-utils rhpl rpm |
|
|
rpm-libs rpm-python rsh sed selinux-policy-targeted setup slang specspo |
|
|
syslinux system-config-date system-config-keyboard taipeifonts tar |
|
|
tcp_wrappers traceroute ttfonts-bn ttfonts-gu ttfonts-hi ttfonts-ja |
|
|
ttfonts-ko ttfonts-pa ttfonts-ta ttfonts-zh_CN ttfonts-zh_TW tzdata |
|
|
urw-fonts util-linux vnc-server Xconfigurator XFree86 XFree86-100dpi-fonts |
|
|
XFree86-75dpi-fonts XFree86-base-fonts XFree86-ISO8859-15-75dpi-fonts |
|
|
XFree86-ISO8859-2-75dpi-fonts XFree86-ISO8859-9-75dpi-fonts |
|
|
XFree86-KOI8-R XFree86-KOI8-R-75dpi-fonts XFree86-libs XFree86-libs-data |
|
|
XFree86-xfs xfsdump xfsprogs Xft xorg-x11 xorg-x11-100dpi-fonts |
|
|
xorg-x11-base xorg-x11-base-fonts xorg-x11-ISO8859-15-75dpi |
|
|
xorg-x11-ISO8859-15-75dpi-fonts xorg-x11-ISO8859-2-75dpi-fonts |
|
|
xorg-x11-ISO8859-9-75dpi-fonts xorg-x11-KOI8-R xorg-x11-KOI8-R-75dpi-fonts |
|
|
xorg-x11-libs xorg-x11-libs-data xorg-x11-xfs zlib" |
|
17 |
|
|
18 |
for PKG in $PACKAGES; |
for PKG in /releases/$distrel/smeextras/$distarch/RPMS/*.rpm |
19 |
do |
do |
20 |
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/.* //') |
PKGFILE=$(basename $PKG) |
21 |
if [ -n "$PACKAGEFILE" ]; |
if [ ! -f $(pwd)/cdrom.image/SME/$PKGFILE ] |
22 |
then |
then |
23 |
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE ]; |
ln -sf $PKG $(pwd)/cdrom.image/SME/ |
|
then |
|
|
ln -sf /mirrors/centos/4.2/updates/i386/RPMS/$PACKAGEFILE $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE |
|
|
fi |
|
|
else |
|
|
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/.* //') |
|
|
if [ -n "$PACKAGEFILE" ]; |
|
|
then |
|
|
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE ]; |
|
|
then |
|
|
ln -sf /mirrors/centos/4.2/os/i386/CentOS/RPMS/$PACKAGEFILE $(pwd)/cdrom.image/CentOS/RPMS/$PACKAGEFILE |
|
|
fi |
|
|
fi |
|
24 |
fi |
fi |
25 |
done |
done |
26 |
|
|
27 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
|
--comp dist-4.1 \ |
|
|
--pkgorder pkgorder \ |
|
|
--release "$distname" \ |
|
28 |
--product "$distname" \ |
--product "$distname" \ |
29 |
--version 7.0 \ |
--version "$distrel.0" \ |
30 |
|
--release "$distname" \ |
31 |
|
--pkgorder pkgorder \ |
32 |
$(pwd)/cdrom.image/ |
$(pwd)/cdrom.image/ |
33 |
|
|
34 |
# Remove previous linked files |
# Remove previous linked files |
35 |
find $(pwd)/cdrom.image/CentOS/RPMS/ -type l | xargs rm -f |
find $(pwd)/cdrom.image/CentOS/RPMS/ -type l | xargs rm -f |
36 |
|
|
37 |
# Copy updated isolinux files |
# Copy updated isolinux files |
38 |
sudo cp -fR /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
sudo cp -f /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
39 |
|
|
40 |
|
sed -i 's@1,2,3@1@' $(pwd)/cdrom.image/.discinfo |
41 |
|
|
42 |
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" |
43 |
|
|