1 |
gordonr |
1.1 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
# Charlie Brady wrote on smeserver-developer: |
4 |
|
|
# [I'm sure I've said this before, but ...] there's no new anaconda SRPM. |
5 |
|
|
# The cdrom image I've been using comes directly from a CentOS one. |
6 |
|
|
|
7 |
|
|
# |
8 |
|
|
# What I've done is: |
9 |
|
|
# |
10 |
|
|
# - add CentOS/base/updates.img, made using mkcramfs from the updates directory |
11 |
|
|
# - delete unwanted RPMs |
12 |
|
|
# - add wanted RPMs |
13 |
|
|
# - replace comps.xml |
14 |
|
|
# - add install.cfg and update.cfg |
15 |
|
|
# - edit isolinux/isolinux.cfg |
16 |
|
|
# |
17 |
|
|
# Run this in the a 7.0alphaXX directory, containing cdrom.image |
18 |
|
|
# which contains the directory tree: |
19 |
|
|
|
20 |
|
|
|
21 |
|
|
echo "Checking packages not installed in CentOS workstation group" |
22 |
|
|
for package in anaconda anaconda-runtime bogl booty createrepo mkisofs zsync |
23 |
|
|
do |
24 |
|
|
rpm -q $package || exit "$package must be installed" |
25 |
|
|
done |
26 |
|
|
|
27 |
|
|
[ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1) |
28 |
|
|
|
29 |
|
|
distname='SME Server' |
30 |
gordonr |
1.4 |
disttag='smeserver' |
31 |
gordonr |
1.1 |
distvers=$(basename $(pwd)) |
32 |
|
|
|
33 |
|
|
[ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda |
34 |
|
|
|
35 |
|
|
chmod -R a+rX cdrom.image |
36 |
|
|
|
37 |
|
|
for img in product updates |
38 |
|
|
do |
39 |
|
|
/usr/bin/mkcramfs \ |
40 |
|
|
$(pwd)/cdrom.image/$img \ |
41 |
|
|
$(pwd)/cdrom.image/CentOS/base/$img.img |
42 |
|
|
done |
43 |
|
|
|
44 |
|
|
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
45 |
|
|
--withnumbers \ |
46 |
|
|
$(pwd)/cdrom.image/ |
47 |
|
|
|
48 |
|
|
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \ |
49 |
|
|
$(pwd)/cdrom.image \ |
50 |
|
|
i386 > pkgorder |
51 |
|
|
|
52 |
|
|
PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \ |
53 |
|
|
--withnumbers \ |
54 |
|
|
--fileorder pkgorder \ |
55 |
|
|
$(pwd)/cdrom.image/ |
56 |
|
|
|
57 |
gordonr |
1.4 |
rm -f $disttag-$distvers.iso smeserver.iso |
58 |
gordonr |
1.1 |
|
59 |
|
|
cd cdrom.image |
60 |
|
|
|
61 |
|
|
yum-arch . |
62 |
|
|
createrepo . |
63 |
|
|
|
64 |
|
|
bootimg='isolinux/isolinux.bin' |
65 |
|
|
bootcat='isolinux/boot.cat' |
66 |
|
|
#mkisopts='-r -N -L -d -D -J' |
67 |
|
|
mkisopts='-r -J' |
68 |
|
|
today="$(date '+%d %b %Y')" |
69 |
|
|
mkisofs $mkisopts \ |
70 |
|
|
-V "$distname $distvers" \ |
71 |
|
|
-A "$distname created on $today" \ |
72 |
|
|
-b "$bootimg" \ |
73 |
|
|
-c "$bootcat" \ |
74 |
|
|
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
75 |
|
|
-x lost+found \ |
76 |
|
|
-x CVS \ |
77 |
gordonr |
1.4 |
-o "../$disttag-$distvers".iso \ |
78 |
gordonr |
1.1 |
. |
79 |
|
|
|
80 |
|
|
cd .. |
81 |
gordonr |
1.4 |
/usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso |
82 |
|
|
dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso |
83 |
|
|
md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum |
84 |
|
|
ls -lRt > $disttag-$distvers.iso.ls-lRt |
85 |
|
|
zsyncmake $disttag-$distvers.iso |
86 |
|
|
mv $disttag-$distvers.iso $disttag.iso |
87 |
|
|
ln -sf $disttag.iso $disttag-$distvers.iso |
88 |
gordonr |
1.1 |
|
89 |
gordonr |
1.3 |
echo "Building SRPMS ISO" |
90 |
|
|
|
91 |
slords |
1.6 |
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
92 |
|
|
|
93 |
gordonr |
1.3 |
mkisofs $mkisopts \ |
94 |
|
|
-V "$distname $distvers SRPMS" \ |
95 |
|
|
-A "$distname SRPMS created on $today" \ |
96 |
|
|
-x lost+found \ |
97 |
|
|
-x CVS \ |
98 |
|
|
-x cdrom.image \ |
99 |
gordonr |
1.4 |
-o "$disttag-$distvers-SRPMS".iso \ |
100 |
gordonr |
1.3 |
--graft-points \ |
101 |
|
|
./SRPMS=SRPMS \ |
102 |
|
|
GPL=cdrom.image/GPL \ |
103 |
|
|
RPM-GPG-KEY=cdrom.image/RPM-GPG-KEY \ |
104 |
|
|
RPM-GPG-KEY-centos4=cdrom.image/RPM-GPG-KEY-centos4 \ |
105 |
|
|
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer7 |
106 |
|
|
|
107 |
gordonr |
1.5 |
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
108 |
|
|
zsyncmake $disttag-$distvers-SRPMS.iso |
109 |
|
|
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
110 |
|
|
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
111 |
|
|
|
112 |
gordonr |
1.1 |
# That's it. |
113 |
gordonr |
1.3 |
|