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