1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
|
# Charlie Brady wrote on smeserver-developer: |
|
|
# [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 |
|
|
do |
|
|
rpm -q $package || exit "$package must be installed" |
|
|
done |
|
|
|
|
3 |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
4 |
|
|
5 |
distname='SME Server' |
distname='SME Server' |
6 |
|
disttag='smeserver' |
7 |
distvers=$(basename $(pwd)) |
distvers=$(basename $(pwd)) |
8 |
|
|
9 |
[ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda |
[ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda |
10 |
|
|
|
chmod -R a+rX cdrom.image |
|
|
|
|
11 |
for img in product updates |
for img in product updates |
12 |
do |
do |
13 |
/usr/bin/mkcramfs \ |
/usr/bin/mkcramfs \ |
21 |
|
|
22 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
23 |
$(pwd)/cdrom.image \ |
$(pwd)/cdrom.image \ |
24 |
i386 > pkgorder |
$(uname -i) > pkgorder |
25 |
|
|
26 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
27 |
--withnumbers \ |
--withnumbers \ |
28 |
--fileorder pkgorder \ |
--fileorder pkgorder \ |
29 |
$(pwd)/cdrom.image/ |
$(pwd)/cdrom.image/ |
30 |
|
|
31 |
rm -f smeserver-$distvers.iso smeserver.iso |
rm -f $disttag-$distvers.iso smeserver.iso |
32 |
|
|
33 |
cd cdrom.image |
cd cdrom.image |
34 |
|
|
|
yum-arch . |
|
35 |
createrepo . |
createrepo . |
36 |
|
repoview . |
37 |
|
|
38 |
bootimg='isolinux/isolinux.bin' |
bootimg='isolinux/isolinux.bin' |
39 |
bootcat='isolinux/boot.cat' |
bootcat='isolinux/boot.cat' |
48 |
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
49 |
-x lost+found \ |
-x lost+found \ |
50 |
-x CVS \ |
-x CVS \ |
51 |
-o "../smeserver-$distvers".iso \ |
-o "../$disttag-$distvers".iso \ |
52 |
. |
. |
53 |
|
|
54 |
cd .. |
cd .. |
55 |
/usr/lib/anaconda-runtime/implantisomd5 smeserver-$distvers.iso |
/usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso |
56 |
dd if=/dev/zero bs=2048 count=150 >> smeserver-$distvers.iso |
dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso |
57 |
md5sum smeserver-$distvers.iso > smeserver-$distvers.iso.md5sum |
md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum |
58 |
ls -lRt > smeserver-$distvers.iso.ls-lRt |
ls -lRt > $disttag-$distvers.iso.ls-lRt |
59 |
zsyncmake smeserver-$distvers.iso |
zsyncmake $disttag-$distvers.iso |
60 |
mv smeserver-$distvers.iso smeserver.iso |
mv $disttag-$distvers.iso $disttag.iso |
61 |
ln -sf smeserver.iso smeserver-$distvers.iso |
ln -sf $disttag.iso $disttag-$distvers.iso |
62 |
|
|
63 |
|
[ -d SRPMS ] || (echo "No SRPMS directory?"; exit 1) |
64 |
|
|
65 |
|
echo "Building SRPMS ISO" |
66 |
|
|
67 |
|
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
68 |
|
|
69 |
|
mkisofs $mkisopts \ |
70 |
|
-V "$distname $distvers SRPMS" \ |
71 |
|
-A "$distname SRPMS created on $today" \ |
72 |
|
-x lost+found \ |
73 |
|
-x CVS \ |
74 |
|
-x cdrom.image \ |
75 |
|
-o "$disttag-$distvers-SRPMS".iso \ |
76 |
|
--graft-points \ |
77 |
|
./SRPMS=SRPMS \ |
78 |
|
GPL=cdrom.image/GPL \ |
79 |
|
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer |
80 |
|
|
81 |
|
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
82 |
|
zsyncmake $disttag-$distvers-SRPMS.iso |
83 |
|
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
84 |
|
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
85 |
|
|
86 |
# That's it. |
# That's it. |
87 |
|
|