/[smeserver]/builds_bin/build_ISO
ViewVC logotype

Annotation of /builds_bin/build_ISO

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


Revision 1.19 - (hide annotations) (download)
Thu Dec 27 15:23:15 2007 UTC (16 years, 10 months ago) by slords
Branch: MAIN
Changes since 1.18: +2 -2 lines
Fix zsync

1 gordonr 1.1 #!/bin/sh
2    
3 slords 1.17 distname='SME Server'
4     disttag='smeserver'
5     distvers=$(basename $(pwd))
6     distrel=${distvers:0:1}
7     distarch=$(uname -i)
8    
9     if ! [ -d $distarch ]
10 slords 1.15 then
11 slords 1.17 echo "No $distarch directory?"
12     exit 1
13     fi
14    
15     for img in product updates
16     do
17     if [ "$distrel" == "7" ]
18     then
19     /usr/bin/mkcramfs \
20     $(pwd)/$distarch/$img \
21     $(pwd)/$distarch/SME/base/$img.img
22     else
23     /sbin/mksquashfs \
24     $(pwd)/$distarch/$img \
25     $(pwd)/$distarch/images/$img.img \
26     -all-root -no-fragments -noappend
27     sudo chmod 664 $(pwd)/$distarch/images/$img.img
28     fi
29     done
30    
31     if [ "$distrel" == "7" ]
32     then
33     PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
34     --productpath SME \
35     --withnumbers \
36     $(pwd)/$distarch/
37    
38     PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \
39     --product SME \
40     $(pwd)/$distarch \
41 slords 1.18 $distarch > pkgorder.$distarch
42 slords 1.17
43     PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
44     --productpath SME \
45     --withnumbers \
46 slords 1.18 --fileorder pkgorder.$distarch \
47 slords 1.17 $(pwd)/$distarch/
48     fi
49    
50     rm -f ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso ../iso/$distrel/$distarch/$disttag.iso
51    
52     if [ "$distrel" == "7" ]
53     then
54     createrepo $(pwd)/$distarch/
55     else
56     createrepo -g repodata/comps.xml -u "media://$(head -1 $distarch/.discinfo)" $(pwd)/$distarch/
57     fi
58     sync; rm -rf $(pwd)/$distarch/.olddata
59     repoview $(pwd)/$distarch/
60     sync; rm -rf $(pwd)/$distarch/.repodata
61    
62     bootimg='isolinux/isolinux.bin'
63     bootcat='isolinux/boot.cat'
64     mkisopts='-v -U -J -r -T'
65     today="$(date '+%d %b %Y')"
66     mkisofs $mkisopts \
67     -V "$distname $distvers" \
68     -A "$distname created on $today" \
69     -b "$bootimg" \
70     -c "$bootcat" \
71     -no-emul-boot -boot-load-size 4 -boot-info-table \
72     -x lost+found \
73     -x CVS \
74     -o ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso \
75     $(pwd)/$distarch/
76    
77     /usr/lib/anaconda-runtime/implantisomd5 ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
78     dd if=/dev/zero bs=2048 count=150 >> ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
79     md5sum ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso > ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.md5sum
80     sha1sum ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso > ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.sha1sum
81 slords 1.19 zsyncmake -u $disttag-$distvers-$distarch.iso -o ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.zsync ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
82 slords 1.17 mv ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso ../iso/$distrel/$distarch/$disttag.iso
83     ln -sf $disttag.iso ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
84    
85     if [ -d SRPMS -a "$distarch" == "i386" ]
86     then
87     rm -f ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso ../iso/$distrel/source/$disttag-SRPMS.iso
88    
89     mkisofs $mkisopts \
90     -V "$distname $distvers SRPMS" \
91     -A "$distname SRPMS created on $today" \
92     -x lost+found \
93     -x CVS \
94     -o ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso \
95     --graft-points \
96     ./SRPMS=SRPMS \
97     GPL=$distarch/GPL \
98     RPM-GPG-KEY-SMEServer=$distarch/RPM-GPG-KEY-SMEServer
99    
100     md5sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.md5sum
101     sha1sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.sha1sum
102 slords 1.19 zsyncmake -u $disttag-$distvers-SRPMS.iso -o ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.zsync ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso
103 slords 1.17 mv ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso ../iso/$distrel/source/$disttag-SRPMS.iso
104     ln -sf $disttag-SRPMS.iso ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso
105 slords 1.15 fi
106 gordonr 1.5
107 gordonr 1.1 # That's it.
108 gordonr 1.3

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