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' |
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 \ |
32 |
|
|
33 |
cd cdrom.image |
cd cdrom.image |
34 |
|
|
|
yum-arch . |
|
35 |
createrepo . |
createrepo . |
36 |
|
sync; rm -rf .olddata |
37 |
|
repoview . |
38 |
|
sync; rm -rf .repodata |
39 |
|
|
40 |
bootimg='isolinux/isolinux.bin' |
bootimg='isolinux/isolinux.bin' |
41 |
bootcat='isolinux/boot.cat' |
bootcat='isolinux/boot.cat' |
42 |
#mkisopts='-r -N -L -d -D -J' |
mkisopts='-v -U -J -r -T' |
|
mkisopts='-r -J' |
|
43 |
today="$(date '+%d %b %Y')" |
today="$(date '+%d %b %Y')" |
44 |
mkisofs $mkisopts \ |
mkisofs $mkisopts \ |
45 |
-V "$distname $distvers" \ |
-V "$distname $distvers" \ |
61 |
mv $disttag-$distvers.iso $disttag.iso |
mv $disttag-$distvers.iso $disttag.iso |
62 |
ln -sf $disttag.iso $disttag-$distvers.iso |
ln -sf $disttag.iso $disttag-$distvers.iso |
63 |
|
|
64 |
|
[ -d SRPMS ] || (echo "No SRPMS directory?"; exit 1) |
65 |
|
|
66 |
echo "Building SRPMS ISO" |
echo "Building SRPMS ISO" |
67 |
|
|
68 |
|
rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
69 |
|
|
70 |
mkisofs $mkisopts \ |
mkisofs $mkisopts \ |
71 |
-V "$distname $distvers SRPMS" \ |
-V "$distname $distvers SRPMS" \ |
72 |
-A "$distname SRPMS created on $today" \ |
-A "$distname SRPMS created on $today" \ |
77 |
--graft-points \ |
--graft-points \ |
78 |
./SRPMS=SRPMS \ |
./SRPMS=SRPMS \ |
79 |
GPL=cdrom.image/GPL \ |
GPL=cdrom.image/GPL \ |
80 |
RPM-GPG-KEY=cdrom.image/RPM-GPG-KEY \ |
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer |
81 |
RPM-GPG-KEY-centos4=cdrom.image/RPM-GPG-KEY-centos4 \ |
|
82 |
RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer7 |
md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum |
83 |
|
zsyncmake $disttag-$distvers-SRPMS.iso |
84 |
|
mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso |
85 |
|
ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso |
86 |
|
|
87 |
# That's it. |
# That's it. |
88 |
|
|