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