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


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