/[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.7 by slords, Tue Jan 16 18:18:19 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    
 # Charlie Brady wrote on smeserver-developer:  
 # [I'm sure I've said this before, but ...] there's no new anaconda SRPM.  
 # The cdrom image I've been using comes directly from a CentOS one.  
   
 #  
 # What I've done is:  
 #  
 # - add CentOS/base/updates.img, made using mkcramfs from the updates directory  
 # - delete unwanted RPMs  
 # - add wanted RPMs  
 # - replace comps.xml  
 # - add install.cfg and update.cfg  
 # - edit isolinux/isolinux.cfg  
 #  
 # Run this in the a 7.0alphaXX directory, containing cdrom.image  
 # which contains the directory tree:  
   
   
 echo "Checking packages not installed in CentOS workstation group"  
 for package in anaconda anaconda-runtime bogl booty createrepo mkisofs zsync  
 do  
     rpm -q $package || exit "$package must be installed"  
 done  
   
 [ -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  chmod -R a+rX cdrom.image      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        elif [ -d "$(pwd)/$distarch/$img" ]
23        then
24            /sbin/mksquashfs \
25                $(pwd)/$distarch/$img \
26                $(pwd)/$distarch/images/$img.img \
27                -all-root -no-fragments -noappend
28            sudo chmod 664 $(pwd)/$distarch/images/$img.img
29        fi
30  done  done
31    
32  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \  if [ "$distrel" == "7" ]
33    then
34        PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
35            --productpath SME \
36          --withnumbers \          --withnumbers \
37          $(pwd)/cdrom.image/          $(pwd)/$distarch/
38    
39  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \      PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \
40          $(pwd)/cdrom.image \          --product SME \
41          i386 > pkgorder          $(pwd)/$distarch \
42            $distarch > pkgorder.$distarch
43    
44  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \      PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
45            --productpath SME \
46          --withnumbers \          --withnumbers \
47          --fileorder pkgorder \          --fileorder pkgorder.$distarch \
48          $(pwd)/cdrom.image/          $(pwd)/$distarch/
49    fi
50  rm -f $disttag-$distvers.iso smeserver.iso  
51    rm -f ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso ../iso/$distrel/$distarch/$disttag.iso
52  cd cdrom.image  
53    if [ "$distrel" == "7" ]
54  yum-arch .  then
55  createrepo .      createrepo $(pwd)/$distarch/
56  repoview .  else
57        createrepo -g repodata/comps.xml -u "media://$(head -1 $distarch/.discinfo)" $(pwd)/$distarch/
58    fi
59    sync; rm -rf $(pwd)/$distarch/.olddata
60    repoview $(pwd)/$distarch/
61    sync; rm -rf $(pwd)/$distarch/.repodata
62    
63  bootimg='isolinux/isolinux.bin'  bootimg='isolinux/isolinux.bin'
64  bootcat='isolinux/boot.cat'  bootcat='isolinux/boot.cat'
65  #mkisopts='-r -N -L -d -D -J'  mkisopts='-v -U -J -r -T'
 mkisopts='-r -J'  
66  today="$(date '+%d %b %Y')"  today="$(date '+%d %b %Y')"
67  mkisofs $mkisopts \  mkisofs $mkisopts \
68          -V "$distname $distvers" \      -V "$distname $distvers" \
69          -A "$distname created on $today" \      -A "$distname created on $today" \
70          -b "$bootimg" \      -b "$bootimg" \
71          -c "$bootcat" \      -c "$bootcat" \
72          -no-emul-boot -boot-load-size 4 -boot-info-table \      -no-emul-boot -boot-load-size 4 -boot-info-table \
73        -x lost+found \
74        -x CVS \
75        -o ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso \
76        $(pwd)/$distarch/
77    
78    /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    md5sum ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso > ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.md5sum
81    sha1sum ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso > ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.sha1sum
82    zsyncmake -u $disttag-$distvers-$distarch.iso -o ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso.zsync ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
83    mv ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso ../iso/$distrel/$distarch/$disttag.iso
84    ln -sf $disttag.iso ../iso/$distrel/$distarch/$disttag-$distvers-$distarch.iso
85    
86    if [ -d SRPMS -a "$distarch" == "i386" ]
87    then
88        rm -f ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso ../iso/$distrel/source/$disttag-SRPMS.iso
89    
90        mkisofs $mkisopts \
91            -V "$distname $distvers SRPMS" \
92            -A "$distname SRPMS created on $today" \
93          -x lost+found \          -x lost+found \
94          -x CVS \          -x CVS \
95          -o "../$disttag-$distvers".iso \          -o ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso \
96          .          --graft-points \
97            ./SRPMS=SRPMS \
98  cd ..          GPL=$distarch/GPL \
99  /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso          RPM-GPG-KEY-SMEServer=$distarch/RPM-GPG-KEY-SMEServer
100  dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso  
101  md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum      md5sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.md5sum
102  ls -lRt > $disttag-$distvers.iso.ls-lRt      sha1sum ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso > ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso.sha1sum
103  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
104  mv $disttag-$distvers.iso $disttag.iso      mv ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso ../iso/$distrel/source/$disttag-SRPMS.iso
105  ln -sf $disttag.iso $disttag-$distvers.iso      ln -sf $disttag-SRPMS.iso ../iso/$distrel/source/$disttag-$distvers-SRPMS.iso
106    fi
 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=cdrom.image/RPM-GPG-KEY \  
         RPM-GPG-KEY-centos4=cdrom.image/RPM-GPG-KEY-centos4 \  
         RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer7  
   
 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  
107    
108  # That's it.  # That's it.
109    


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