/[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.9 by slords, Sat Apr 14 21:21:22 2007 UTC Revision 1.16 by slords, Thu Jul 19 20:04:37 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  for img in product updates  
36  do          cd cdrom.image
37          /usr/bin/mkcramfs \  
38          $(pwd)/cdrom.image/$img \          createrepo .
39          $(pwd)/cdrom.image/CentOS/base/$img.img          sync; rm -rf .olddata
40  done          repoview .
41            sync; rm -rf .repodata
42  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \  
43          --withnumbers \          bootimg='isolinux/isolinux.bin'
44          $(pwd)/cdrom.image/          bootcat='isolinux/boot.cat'
45            mkisopts='-v -U -J -r -T'
46  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/pkgorder \          today="$(date '+%d %b %Y')"
47          $(pwd)/cdrom.image \          mkisofs $mkisopts \
48          i386 > pkgorder                  -V "$distname $distvers" \
49                    -A "$distname created on $today" \
50  PYTHONPATH=/usr/lib/anaconda/ /usr/lib/anaconda-runtime/genhdlist \                  -b "$bootimg" \
51          --withnumbers \                  -c "$bootcat" \
52          --fileorder pkgorder \                  -no-emul-boot -boot-load-size 4 -boot-info-table \
53          $(pwd)/cdrom.image/                  -x lost+found \
54                    -x CVS \
55  rm -f $disttag-$distvers.iso smeserver.iso                  -o "../$disttag-$distvers".iso \
56                    .
57  cd cdrom.image  
58            cd ..
59  createrepo .          /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso
60  repoview .          dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso
61            md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum
62  bootimg='isolinux/isolinux.bin'          ls -lRt > $disttag-$distvers.iso.ls-lRt
63  bootcat='isolinux/boot.cat'          zsyncmake $disttag-$distvers.iso
64  #mkisopts='-r -N -L -d -D -J'          mv $disttag-$distvers.iso $disttag.iso
65  mkisopts='-r -J'          ln -sf $disttag.iso $disttag-$distvers.iso
66  today="$(date '+%d %b %Y')"  
67  mkisofs $mkisopts \          if [ -d SRPMS ]
68          -V "$distname $distvers" \          then
69          -A "$distname created on $today" \                  echo "Building SRPMS ISO"
70          -b "$bootimg" \  
71          -c "$bootcat" \                  distvers=$(echo $distvers | sed 's/-i386//;s/-x86_64//')
72          -no-emul-boot -boot-load-size 4 -boot-info-table \                  rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
73          -x lost+found \  
74          -x CVS \                  mkisofs $mkisopts \
75          -o "../$disttag-$distvers".iso \                          -V "$distname $distvers SRPMS" \
76          .                          -A "$distname SRPMS created on $today" \
77                            -x lost+found \
78  cd ..                          -x CVS \
79  /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso                          -x cdrom.image \
80  dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso                          -o "$disttag-$distvers-SRPMS".iso \
81  md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum                          --graft-points \
82  ls -lRt > $disttag-$distvers.iso.ls-lRt                          ./SRPMS=SRPMS \
83  zsyncmake $disttag-$distvers.iso                          GPL=cdrom.image/GPL \
84  mv $disttag-$distvers.iso $disttag.iso                          RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer
85  ln -sf $disttag.iso $disttag-$distvers.iso  
86                    md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum
87  echo "Building SRPMS ISO"                  zsyncmake $disttag-$distvers-SRPMS.iso
88                    mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso
89  rm -f $disttag-SRPMS.iso $disttag-$distvers-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  
   
 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  
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