/[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.4 by gordonr, Fri Jun 30 23:01:26 2006 UTC Revision 1.15 by slords, Thu Jul 19 19:59:15 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  # Charlie Brady wrote on smeserver-developer:  if [ -d cdrom.image ]
4  # [I'm sure I've said this before, but ...] there's no new anaconda SRPM.  then
5  # The cdrom image I've been using comes directly from a CentOS one.          distname='SME Server'
6            disttag='smeserver'
7  #          distvers=$(basename $(pwd))
8  # What I've done is:  
9  #          [ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda
10  # - add CentOS/base/updates.img, made using mkcramfs from the updates directory  
11  # - delete unwanted RPMs          for img in product updates
12  # - add wanted RPMs          do
13  # - replace comps.xml                  /usr/bin/mkcramfs \
14  # - add install.cfg and update.cfg                  $(pwd)/cdrom.image/$img \
15  # - edit isolinux/isolinux.cfg                  $(pwd)/cdrom.image/SME/base/$img.img
16  #          done
17  # Run this in the a 7.0alphaXX directory, containing cdrom.image  
18  # which contains the directory tree:          PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
19                    --productpath SME \
20                    --withnumbers \
21  echo "Checking packages not installed in CentOS workstation group"                  $(pwd)/cdrom.image/
22  for package in anaconda anaconda-runtime bogl booty createrepo mkisofs zsync  
23  do          PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \
24      rpm -q $package || exit "$package must be installed"                  --product SME \
25  done                  $(pwd)/cdrom.image \
26                    $(uname -i) > pkgorder
27  [ -d cdrom.image ] || (echo "No cdrom.image directory?"; exit 1)  
28            PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \
29  distname='SME Server'                  --productpath SME \
30  disttag='smeserver'                  --withnumbers \
31  distvers=$(basename $(pwd))                  --fileorder pkgorder \
32                    $(pwd)/cdrom.image/
33  [ -f cdrom.image/updates/anaconda ] && chmod a+rx cdrom.image/updates/anaconda  
34            rm -f $disttag-$distvers.iso smeserver.iso
35  chmod -R a+rX cdrom.image  
36            cd cdrom.image
37  for img in product updates  
38  do          createrepo .
39          /usr/bin/mkcramfs \          sync; rm -rf .olddata
40          $(pwd)/cdrom.image/$img \          repoview .
41          $(pwd)/cdrom.image/CentOS/base/$img.img          sync; rm -rf .repodata
42  done  
43            bootimg='isolinux/isolinux.bin'
44  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \          bootcat='isolinux/boot.cat'
45          --withnumbers \          mkisopts='-v -U -J -r -T'
46          $(pwd)/cdrom.image/          today="$(date '+%d %b %Y')"
47            mkisofs $mkisopts \
48  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \                  -V "$distname $distvers" \
49          $(pwd)/cdrom.image \                  -A "$distname created on $today" \
50          i386 > pkgorder                  -b "$bootimg" \
51                    -c "$bootcat" \
52  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \                  -no-emul-boot -boot-load-size 4 -boot-info-table \
53          --withnumbers \                  -x lost+found \
54          --fileorder pkgorder \                  -x CVS \
55          $(pwd)/cdrom.image/                  -o "../$disttag-$distvers".iso \
56                    .
57  rm -f $disttag-$distvers.iso smeserver.iso  
58            cd ..
59  cd cdrom.image          /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso
60            dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso
61  yum-arch .          md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum
62  createrepo .          ls -lRt > $disttag-$distvers.iso.ls-lRt
63            zsyncmake $disttag-$distvers.iso
64  bootimg='isolinux/isolinux.bin'          mv $disttag-$distvers.iso $disttag.iso
65  bootcat='isolinux/boot.cat'          ln -sf $disttag.iso $disttag-$distvers.iso
66  #mkisopts='-r -N -L -d -D -J'  
67  mkisopts='-r -J'          if [ -d SRPMS ]
68  today="$(date '+%d %b %Y')"          then
69  mkisofs $mkisopts \          echo "Building SRPMS ISO"
70          -V "$distname $distvers" \  
71          -A "$distname created on $today" \                  distvers=$(echo $distvers | sed 's/-i386//;s/-x86_64//')
72          -b "$bootimg" \                  rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
73          -c "$bootcat" \  
74          -no-emul-boot -boot-load-size 4 -boot-info-table \                  mkisofs $mkisopts \
75          -x lost+found \                          -V "$distname $distvers SRPMS" \
76          -x CVS \                          -A "$distname SRPMS created on $today" \
77          -o "../$disttag-$distvers".iso \                          -x lost+found \
78          .                          -x CVS \
79                            -x cdrom.image \
80  cd ..                          -o "$disttag-$distvers-SRPMS".iso \
81  /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso                          --graft-points \
82  dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso                          ./SRPMS=SRPMS \
83  md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum                          GPL=cdrom.image/GPL \
84  ls -lRt > $disttag-$distvers.iso.ls-lRt                          RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer
85  zsyncmake $disttag-$distvers.iso  
86  mv $disttag-$distvers.iso $disttag.iso                  md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum
87  ln -sf $disttag.iso $disttag-$distvers.iso                  zsyncmake $disttag-$distvers-SRPMS.iso
88                    mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso
89  echo "Building SRPMS ISO"                  ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
90            fi
91  mkisofs $mkisopts \  fi
         -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  
92    
93  # That's it.  # That's it.
94    


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