1 |
#!/bin/sh |
#!/bin/sh |
2 |
|
|
3 |
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
if [ -d cdrom.image ] |
4 |
|
then |
5 |
distname='SME Server' |
distname='SME Server' |
6 |
disttag='smeserver' |
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 |
|
|
11 |
for img in product updates |
for img in product updates |
12 |
do |
do |
13 |
/usr/bin/mkcramfs \ |
/usr/bin/mkcramfs \ |
14 |
$(pwd)/cdrom.image/$img \ |
$(pwd)/cdrom.image/$img \ |
15 |
$(pwd)/cdrom.image/CentOS/base/$img.img |
$(pwd)/cdrom.image/SME/base/$img.img |
16 |
done |
done |
17 |
|
|
18 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
19 |
--withnumbers \ |
--productpath SME \ |
20 |
$(pwd)/cdrom.image/ |
--withnumbers \ |
21 |
|
$(pwd)/cdrom.image/ |
22 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
|
23 |
$(pwd)/cdrom.image \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
24 |
$(uname -i) > pkgorder |
--product SME \ |
25 |
|
$(pwd)/cdrom.image \ |
26 |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
$(uname -i) > pkgorder |
27 |
--withnumbers \ |
|
28 |
--fileorder pkgorder \ |
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
29 |
$(pwd)/cdrom.image/ |
--productpath SME \ |
30 |
|
--withnumbers \ |
31 |
rm -f $disttag-$distvers.iso smeserver.iso |
--fileorder pkgorder \ |
32 |
|
$(pwd)/cdrom.image/ |
33 |
cd cdrom.image |
|
34 |
|
rm -f $disttag-$distvers.iso smeserver.iso |
35 |
createrepo . |
|
36 |
sync; rm -rf .olddata |
cd cdrom.image |
37 |
repoview . |
|
38 |
sync; rm -rf .repodata |
createrepo . |
39 |
|
sync; rm -rf .olddata |
40 |
bootimg='isolinux/isolinux.bin' |
repoview . |
41 |
bootcat='isolinux/boot.cat' |
sync; rm -rf .repodata |
42 |
mkisopts='-v -U -J -R -T' |
|
43 |
today="$(date '+%d %b %Y')" |
bootimg='isolinux/isolinux.bin' |
44 |
mkisofs $mkisopts \ |
bootcat='isolinux/boot.cat' |
45 |
-V "$distname $distvers" \ |
mkisopts='-v -U -J -r -T' |
46 |
-A "$distname created on $today" \ |
today="$(date '+%d %b %Y')" |
47 |
-b "$bootimg" \ |
mkisofs $mkisopts \ |
48 |
-c "$bootcat" \ |
-V "$distname $distvers" \ |
49 |
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
-A "$distname created on $today" \ |
50 |
-x lost+found \ |
-b "$bootimg" \ |
51 |
-x CVS \ |
-c "$bootcat" \ |
52 |
-o "../$disttag-$distvers".iso \ |
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
53 |
. |
-x lost+found \ |
54 |
|
-x CVS \ |
55 |
cd .. |
-o "../$disttag-$distvers".iso \ |
56 |
/usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso |
. |
57 |
dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso |
|
58 |
md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum |
cd .. |
59 |
ls -lRt > $disttag-$distvers.iso.ls-lRt |
/usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso |
60 |
zsyncmake $disttag-$distvers.iso |
dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso |
61 |
mv $disttag-$distvers.iso $disttag.iso |
md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum |
62 |
ln -sf $disttag.iso $disttag-$distvers.iso |
ls -lRt > $disttag-$distvers.iso.ls-lRt |
63 |
|
zsyncmake $disttag-$distvers.iso |
64 |
[ -d SRPMS ] || (echo "No SRPMS directory?"; exit 1) |
mv $disttag-$distvers.iso $disttag.iso |
65 |
|
ln -sf $disttag.iso $disttag-$distvers.iso |
66 |
echo "Building SRPMS ISO" |
|
67 |
|
if [ -d SRPMS ] |
68 |
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
then |
69 |
|
echo "Building SRPMS ISO" |
70 |
mkisofs $mkisopts \ |
|
71 |
-V "$distname $distvers SRPMS" \ |
distvers=$(echo $distvers | sed 's/-i386//;s/-x86_64//') |
72 |
-A "$distname SRPMS created on $today" \ |
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
73 |
-x lost+found \ |
|
74 |
-x CVS \ |
mkisofs $mkisopts \ |
75 |
-x cdrom.image \ |
-V "$distname $distvers SRPMS" \ |
76 |
-o "$disttag-$distvers-SRPMS".iso \ |
-A "$distname SRPMS created on $today" \ |
77 |
--graft-points \ |
-x lost+found \ |
78 |
./SRPMS=SRPMS \ |
-x CVS \ |
79 |
GPL=cdrom.image/GPL \ |
-x cdrom.image \ |
80 |
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer |
-o "$disttag-$distvers-SRPMS".iso \ |
81 |
|
--graft-points \ |
82 |
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
./SRPMS=SRPMS \ |
83 |
zsyncmake $disttag-$distvers-SRPMS.iso |
GPL=cdrom.image/GPL \ |
84 |
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer |
85 |
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
|
86 |
|
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
87 |
|
zsyncmake $disttag-$distvers-SRPMS.iso |
88 |
|
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
89 |
|
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
90 |
|
fi |
91 |
|
fi |
92 |
|
|
93 |
# That's it. |
# That's it. |
94 |
|
|