/[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.8 by slords, Mon Jan 22 16:37:24 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  yum-arch .          /usr/lib/anaconda-runtime/implantisomd5 $disttag-$distvers.iso
60  createrepo .          dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso
61  repoview .          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 "../$disttag-$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 $disttag-$distvers.iso                          -o "$disttag-$distvers-SRPMS".iso \
81  dd if=/dev/zero bs=2048 count=150 >> $disttag-$distvers.iso                          --graft-points \
82  md5sum $disttag-$distvers.iso > $disttag-$distvers.iso.md5sum                          ./SRPMS=SRPMS \
83  ls -lRt > $disttag-$distvers.iso.ls-lRt                          GPL=cdrom.image/GPL \
84  zsyncmake $disttag-$distvers.iso                          RPM-GPG-KEY-SMEServer7=cdrom.image/RPM-GPG-KEY-SMEServer
85  mv $disttag-$distvers.iso $disttag.iso  
86  ln -sf $disttag.iso $disttag-$distvers.iso                  md5sum $disttag-$distvers-SRPMS.iso > $disttag-$distvers-SRPMS.iso.md5sum
87                    zsyncmake $disttag-$distvers-SRPMS.iso
88  echo "Building SRPMS ISO"                  mv $disttag-$distvers-SRPMS.iso $disttag-SRPMS.iso
89                    ln -sf $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso
90  rm -f $disttag-SRPMS.iso $disttag-$distvers-SRPMS.iso          fi
91    fi
 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  
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