/[smeserver]/builds_bin/build_ISO
ViewVC logotype

Contents of /builds_bin/build_ISO

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.7 - (show annotations) (download)
Tue Jan 16 18:18:19 2007 UTC (17 years, 3 months ago) by slords
Branch: MAIN
Changes since 1.6: +1 -0 lines
Update tools

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 disttag='smeserver'
31 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 rm -f $disttag-$distvers.iso smeserver.iso
58
59 cd cdrom.image
60
61 yum-arch .
62 createrepo .
63 repoview .
64
65 bootimg='isolinux/isolinux.bin'
66 bootcat='isolinux/boot.cat'
67 #mkisopts='-r -N -L -d -D -J'
68 mkisopts='-r -J'
69 today="$(date '+%d %b %Y')"
70 mkisofs $mkisopts \
71 -V "$distname $distvers" \
72 -A "$distname created on $today" \
73 -b "$bootimg" \
74 -c "$bootcat" \
75 -no-emul-boot -boot-load-size 4 -boot-info-table \
76 -x lost+found \
77 -x CVS \
78 -o "../$disttag-$distvers".iso \
79 .
80
81 cd ..
82 /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso
83 dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso
84 md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum
85 ls -lRt > $disttag-$distvers.iso.ls-lRt
86 zsyncmake $disttag-$distvers.iso
87 mv $disttag-$distvers.iso $disttag.iso
88 ln -sf $disttag.iso $disttag-$distvers.iso
89
90 echo "Building SRPMS ISO"
91
92 rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
93
94 mkisofs $mkisopts \
95 -V "$distname $distvers SRPMS" \
96 -A "$distname SRPMS created on $today" \
97 -x lost+found \
98 -x CVS \
99 -x cdrom.image \
100 -o "$disttag-$distvers-SRPMS".iso \
101 --graft-points \
102 ./SRPMS=SRPMS \
103 GPL=cdrom.image/GPL \
104 RPM-GPG-KEY=cdrom.image/RPM-GPG-KEY \
105 RPM-GPG-KEY-centos4=cdrom.image/RPM-GPG-KEY-centos4 \
106 RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer7
107
108 md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum
109 zsyncmake $disttag-$distvers-SRPMS.iso
110 mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso
111 ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
112
113 # That's it.
114

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed