/[smeserver]/builds_bin/build_ISO
ViewVC logotype

Diff of /builds_bin/build_ISO

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

Revision 1.10 by slords, Sat May 19 21:55:09 2007 UTC Revision 1.19 by slords, Thu Dec 27 15:23:15 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
 [ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1)  
   
3  distname='SME Server'  distname='SME Server'
4  disttag='smeserver'  disttag='smeserver'
5  distvers=$(basename $(pwd))  distvers=$(basename $(pwd))
6    distrel=${distvers:0:1}
7    distarch=$(uname -i)
8    
9  [ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda  if ! [ -d $distarch ]
10    then
11        echo "No $distarch directory?"
12        exit 1
13    fi
14    
15  for img in product updates  for img in product updates
16  do  do
17        if [ "$distrel" == "7" ]
18        then
19          /usr/bin/mkcramfs \          /usr/bin/mkcramfs \
20          $(pwd)/cdrom.image/$img \          $(pwd)/$distarch/$img \
21          $(pwd)/cdrom.image/CentOS/base/$img.img          $(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  done
30    
31  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \  if [ "$distrel" == "7" ]
32    then
33        PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
34            --productpath SME \
35          --withnumbers \          --withnumbers \
36          $(pwd)/cdrom.image/          $(pwd)/$distarch/
37    
38  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \      PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \
39          $(pwd)/cdrom.image \          --product SME \
40          $(uname -i) > pkgorder          $(pwd)/$distarch \
41            $distarch > pkgorder.$distarch
42    
43  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \      PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
44            --productpath SME \
45          --withnumbers \          --withnumbers \
46          --fileorder pkgorder \          --fileorder pkgorder.$distarch \
47          $(pwd)/cdrom.image/          $(pwd)/$distarch/
48    fi
49  rm -f $disttag-$distvers.iso smeserver.iso  
50    rm -f ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso ../iso/$distrel/$distarch/$disttag.iso
51  cd cdrom.image  
52    if [ "$distrel" == "7" ]
53  createrepo .  then
54  repoview .      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'  bootimg='isolinux/isolinux.bin'
63  bootcat='isolinux/boot.cat'  bootcat='isolinux/boot.cat'
64  #mkisopts='-r -N -L -d -D -J'  mkisopts='-v -U -J -r -T'
 mkisopts='-r -J'  
65  today="$(date '+%d %b %Y')"  today="$(date '+%d %b %Y')"
66  mkisofs $mkisopts \  mkisofs $mkisopts \
67          -V "$distname $distvers" \      -V "$distname $distvers" \
68          -A "$distname created on $today" \      -A "$distname created on $today" \
69          -b "$bootimg" \      -b "$bootimg" \
70          -c "$bootcat" \      -c "$bootcat" \
71          -no-emul-boot -boot-load-size 4 -boot-info-table \      -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    zsyncmake -u $disttag-$distvers-$distarch.iso -o ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.zsync ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
82    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 \          -x lost+found \
93          -x CVS \          -x CVS \
94          -o "../$disttag-$distvers".iso \          -o ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso \
95          .          --graft-points \
96            ./SRPMS=SRPMS \
97  cd ..          GPL=$distarch/GPL \
98  /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso          RPM-GPG-KEY-SMEServer=$distarch/RPM-GPG-KEY-SMEServer
99  dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso  
100  md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum      md5sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.md5sum
101  ls -lRt > $disttag-$distvers.iso.ls-lRt      sha1sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.sha1sum
102  zsyncmake $disttag-$distvers.iso      zsyncmake -u $disttag-$distvers-SRPMS.iso -o ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.zsync ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso
103  mv $disttag-$distvers.iso $disttag.iso      mv ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso ../iso/$distrel/source/$disttag-SRPMS.iso
104  ln -sf $disttag.iso $disttag-$distvers.iso      ln -sf $disttag-SRPMS.iso ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso
105    fi
 [ -d SRPMS ] || (echo "No SRPMS directory?"; exit 1)  
   
 echo "Building SRPMS ISO"  
   
 rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso  
   
 mkisofs $mkisopts \  
         -V "$distname $distvers SRPMS" \  
         -A "$distname SRPMS created on $today" \  
         -x lost+found \  
         -x CVS \  
         -x cdrom.image \  
         -o "$disttag-$distvers-SRPMS".iso \  
         --graft-points \  
         ./SRPMS=SRPMS \  
         GPL=cdrom.image/GPL \  
         RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer  
   
 md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum  
 zsyncmake $disttag-$distvers-SRPMS.iso  
 mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso  
 ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso  
106    
107  # That's it.  # That's it.
108    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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