1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
|
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
|
|
|
|
3 |
distname='SME Server' |
distname='SME Server' |
4 |
distvers=$(basename $(pwd)) |
distvers=$(basename $(pwd)) |
5 |
|
distrel=${distvers:0:1} |
6 |
distarch=$(uname -i) |
distarch=$(uname -i) |
7 |
|
|
8 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
if ! [ -d $distarch ] |
9 |
|
then |
10 |
|
echo "No $distarch directory?" |
11 |
|
exit 1 |
12 |
|
fi |
13 |
|
|
14 |
|
if [ "$distrel" == "7" ] |
15 |
|
then |
16 |
|
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
17 |
|
--productpath SME \ |
18 |
--withnumbers \ |
--withnumbers \ |
19 |
$(pwd)/cdrom.image/ |
$(pwd)/$distarch/ |
20 |
|
|
21 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
22 |
$(pwd)/cdrom.image \ |
--product SME \ |
23 |
$distarch > pkgorder |
$(pwd)/$distarch \ |
24 |
|
$distarch > pkgorder.$distarch |
25 |
PACKAGES="glibc glibc-common setup openssl python newt slang libselinux |
|
26 |
libsepol libtermcap zlib ash e2fsprogs util-linux raidtools popt mdadm |
for PKG in /releases/$distrel/smeextras/$distarch/RPMS/*.rpm |
27 |
procps rpm rpm-libs XFree86 Xconfigurator anaconda tzdata |
do |
28 |
anaconda-runtime kudzu hwdata bzip2 beecrypt ncurses readline |
PKGFILE=$(basename $PKG) |
29 |
bzip2-libs dosfstools pciutils reiserfs-utils parted sed |
if [ ! -f $(pwd)/$distarch/SME/RPMS/$PKGFILE ] |
30 |
busybox-anaconda rpm-python booty hdparm lvm2 beecrypt device-mapper |
then |
31 |
rhpl pyxf86config libxml2 libxml2-python glib2 audit-libs |
ln -sf $PKG $(pwd)/$distarch/SME/RPMS/ |
|
elfutils-libelf bogl-bterm bogl krb5-libs convertdb1 jfsutils |
|
|
xfsprogs xfsdump dmapi libacl libattr attr acl bogl-devel |
|
|
policy policycoreutils pyparted xorg-x11 selinux-policy-targeted |
|
|
kernel-pcmcia-cs kernel-utils" |
|
|
|
|
|
PACKAGESGR="anaconda XFree86-libs libpng XFree86-75dpi-fonts |
|
|
XFree86-ISO8859-2-75dpi-fonts gtk2 |
|
|
XFree86-ISO8859-9-75dpi-fonts esound audiofile libgnome |
|
|
XFree86-100dpi-fonts fonts-ISO8859-2 fonts-ISO8859-9 |
|
|
XFree86-xfs e2fsprogs coreutils glibc glibc-common |
|
|
readline popt specspo util-linux rpm rpm-libs tzdata |
|
|
procps ncurses bash cpio gpm |
|
|
XFree86 Xconfigurator gnome-python2 pygtk2 gdk-pixbuf |
|
|
XFree86-KOI8-R XFree86-KOI8-R-75dpi-fonts pam |
|
|
reiserfs-utils atk pango freetype gnome-python2-canvas |
|
|
libgnomecanvas libart_lgpl libgcc libacl libattr libstdc++ expat |
|
|
anaconda-images anaconda-help XFree86-base-fonts |
|
|
ttfonts-ko taipeifonts XFree86-ISO8859-15-75dpi-fonts rhpl |
|
|
system-config-keyboard Xft fontconfig redhat-artwork audit-libs |
|
|
ttfonts-ja ttfonts-zh_TW bitmap-fonts-cjk urw-fonts fonts-arabic |
|
|
comps-extras XFree86-libs-data convertdb1 fonts-bengali |
|
|
vnc-server libjpeg tcp_wrappers system-config-date |
|
|
xfsprogs xfsdump dmapi attr acl policy policycoreutils |
|
|
selinux-policy-targeted ttfonts-zh_CN |
|
|
xorg-x11-libs xorg-x11-ISO8859-2-75dpi-fonts |
|
|
xorg-x11-ISO8859-9-75dpi-fonts xorg-x11-100dpi-fonts |
|
|
xorg-x11-xfs xorg-x11 xorg-x11-KOI8-R xorg-x11-KOI8-R-75dpi-fonts |
|
|
xorg-x11-base-fonts xorg-x11-ISO8859-15-75dpi-fonts |
|
|
fonts-xorg-ISO8859-2-75dpi fonts-xorg-ISO8859-15-75dpi |
|
|
fonts-xorg-ISO8859-9-75dpi fonts-xorg-100dpi |
|
|
fonts-xorg-KOI8-R fonts-xorg-KOI8-R-75dpi fonts-xorg-base |
|
|
xorg-x11-base xorg-x11-ISO8859-15-75dpi |
|
|
xorg-x11-libs-data xorg-x11-xfs prelink redhat-logos fedora-logos |
|
|
ttfonts-ta ttfonts-bn ttfonts-gu ttfonts-hi ttfonts-pa |
|
|
syslinux memtest86+" |
|
|
|
|
|
PACKAGESRESCUE="bzip2 bzip2-libs dump |
|
|
findutils ftp gzip iputils joe krb5-libs less man |
|
|
modutils mtools mt-st mtr net-tools open |
|
|
openssh openssh-clients pciutils rsh traceroute tar" |
|
|
|
|
|
for PKG in $PACKAGES $PACKAGESGR $PACKAGESRESCUE |
|
|
do |
|
|
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/.* //') |
|
|
if [ -n "$PACKAGEFILES" ]; |
|
|
then |
|
|
for PKGFILE in $PACKAGEFILES |
|
|
do |
|
|
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE ]; |
|
|
then |
|
|
ln -sf /mirrors/centos/4/updates/$distarch/RPMS/$PKGFILE $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE |
|
|
fi |
|
|
done |
|
|
else |
|
|
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/.* //') |
|
|
if [ -n "$PACKAGEFILES" ]; |
|
|
then |
|
|
for PKGFILE in $PACKAGEFILES |
|
|
do |
|
|
if [ ! -f $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE ]; |
|
|
then |
|
|
ln -sf /mirrors/centos/4/os/$distarch/CentOS/RPMS/$PKGFILE $(pwd)/cdrom.image/CentOS/RPMS/$PKGFILE |
|
|
fi |
|
|
done |
|
32 |
fi |
fi |
33 |
fi |
done |
|
done |
|
34 |
|
|
35 |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
36 |
--comp dist-4.3 \ |
--product "$distname" \ |
37 |
--pkgorder pkgorder \ |
--version "$distrel.0" \ |
38 |
--release "$distname" \ |
--release "$distname" \ |
39 |
|
--prodpath SME \ |
40 |
|
--pkgorder pkgorder.$distarch \ |
41 |
|
$(pwd)/$distarch/ |
42 |
|
|
43 |
|
sed -i 's@1,2,3@1@' $(pwd)/$distarch/.discinfo |
44 |
|
else |
45 |
|
for PKG in /releases/testing/$distrel/smeextras/$distarch/RPMS/*.rpm |
46 |
|
do |
47 |
|
PKGFILE=$(basename $PKG) |
48 |
|
if [ ! -f $(pwd)/$distarch/SME/$PKGFILE ] |
49 |
|
then |
50 |
|
ln -sf $PKG $(pwd)/$distarch/SME/ |
51 |
|
fi |
52 |
|
done |
53 |
|
|
54 |
|
PYTHONPATH=/usr/lib/anaconda/ sudo /usr/lib/anaconda-runtime/buildinstall \ |
55 |
--product "$distname" \ |
--product "$distname" \ |
56 |
--version 7.0 \ |
--version "$distrel.0" \ |
57 |
$(pwd)/cdrom.image/ |
--release "$distname" \ |
58 |
|
--prodpath SME \ |
59 |
|
--bugurl http://bugs.contribs.org/ \ |
60 |
|
$(pwd)/$distarch/ |
61 |
|
fi |
62 |
|
|
63 |
# Remove previous linked files |
# Remove previous linked files |
64 |
find $(pwd)/cdrom.image/CentOS/RPMS/ -type l | xargs rm -f |
find $(pwd)/$distarch/SME/ -type l | xargs rm -f |
65 |
|
|
66 |
# Copy updated isolinux files |
# Copy updated isolinux files |
67 |
sudo cp -f /builds/isolinux/* $(pwd)/cdrom.image/isolinux/ |
sudo cp -f /stage/extra/isolinux/$distrel/* $(pwd)/$distarch/isolinux/ |
68 |
|
|
69 |
|
sudo chown -R 9000:9001 $(pwd)/$distarch/ |
70 |
|
sudo chmod -R u+rwX,g+rwX,o+rX,o-w $(pwd)/$distarch/ |
71 |
|
|
72 |
echo "You now need to run /builds/bin/build_ISO as non-root" |
echo "You now need to run /stage/bin/build_ISO as non-root" |
73 |
|
|
74 |
# That's it. |
# That's it. |