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