Changes between Version 7 and Version 8 of Build/6


Ignore:
Timestamp:
Nov 16, 2011 2:28:35 PM (12 years ago)
Author:
thomas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Build/6

    v7 v8  
    3737}}}
    3838
    39  * copy tree into a working directory
    40  * remove repodata.outside
    41  * remove Computational link and copy content from computational to Computational
    42  * createrepo has --split option
    43  * repo - primary.xml has <location xml:base="media://1287685157.683254#2" href="Packages/gnome-python2-gtkhtml2-2.25.3-23.fc14.1.i686.rpm"/>
    44   * where #2 is disc 2 and 128...254 is the media id for the disc.
     39Rsync the tree then remove things not needed on the dvd
     40{{{
     41[thomas@host puias]$ rm mirrorlist
     42[thomas@host puias]$ rm Computational
     43[thomas@host puias]$ rm repodata.outside
     44[thomas@host puias]$ rm PUIAS/repodata.outside
     45[thomas@host puias]$ rm -r PUIAS/repoview
     46}}}
     47
     48See redundant.
     49
     50{{{
     51[thomas@host puias]$ rm images/puias-6.1-x86_64-DVD*iso
     52}}}
     53
     54Make directories for the discs and move Addons to the 3rd disc.
     55{{{
     56[thomas@host puias]$ mkdir 1 2 3
     57[thomas@host puias]$ mv Addons 3
     58[thomas@host puias]$ mv EFI EULA GPL images isolinux mirrorlist Packages PUIAS repodata RPM-GPG-KEY-puias 1
     59[thomas@host puias]$ mkdir 2/Packages
     60[thomas@host puias]$ cd 1/Packages
     61}}}
     62
     63Move large packages over to second disc, trying to make disc 1 small enough for a DVD.
     64Move things that usually aren't required for a server build
     65
     66{{{
     67[thomas@host Packages]$ mv *-devel-* ../../2/Packages/
     68[thomas@host Packages]$ mv eclipse-* ../../2/Packages/
     69[thomas@host Packages]$ mv texlive-* ../../2/Packages/
     70[thomas@host Packages]$ mv openoffice.org-* ../../2/Packages/
     71}}}
     72
     73Go back up to the root.
     74{{{
     75[thomas@host Packages]$ cd ../../
     76}}}
     77
     78Remove the repodata in the root and then move the one from PUIAS to the root
     79
     80{{{
     81[thomas@host puias]$ rm 1/repodata
     82[thomas@host puias]$ mv 1/PUIAS/repodata 1
     83[thomas@host puias]$ ln -s ../repodata 1/PUIAS/repodata
     84}}}
     85
     86Start a createrepo with a split and media (cd path)
     87{{{
     88[thomas@host puias]$ createrepo -v -g repodata/comps-puias6.xml --split 1 2 -u 'media://1306249229.307081'
     89}}}
     90
     91Create a .discinfo and .treeinfo the numbers need to match here
     92.discinfo
     93{{{
     94--- BEGIN ---
     951306249229.307081
     96PUIAS Linux 6.1
     97x86_64
     981
     99
     100
     101
     102--- END ---
     103}}}
     104
     105.treeinfo
     106{{{
     107--- BEGIN ---
     108[general]
     109family = PUIAS Linux
     110timestamp = 1321026136.00
     111variant = PUIAS
     112totaldiscs = 1
     113version = 6.1
     114discnum = 1
     115packagedir =
     116arch = x86_64
     117
     118[images-x86_64]
     119kernel = images/pxeboot/vmlinuz
     120initrd = images/pxeboot/initrd.img
     121boot.iso = images/boot.iso
     122
     123[images-xen]
     124kernel = images/pxeboot/vmlinuz
     125initrd = images/pxeboot/initrd.img
     126
     127[stage2]
     128mainimage = images/install.img
     129--- END ---
     130}}}
     131
     132If you have time, make some checksums for a few things:
     133from yum.misc import checksum
     134checksum('sha256','images/pxeboot/vmlinuz')
     135then put that in the checksums section of .treeinfo
     136{{{
     137--- BEGIN ---
     138[checksums]
     139images/pxeboot/initrd.img = sha256:7dd1303afa583c00cba591d4c397f31df08f05c15f4947eb2143cbb7a0b32811
     140images/pxeboot/vmlinuz = sha256:a36343b3be796a3c8e05c59422d672c2a888004e1e05f994946d4ef61dd36a3a
     141images/efiboot.img = sha256:e8d8943f23f8c4f07b680f88d2b71f04b01e71a048c9ac268e9415a381f5b431
     142images/install.img = sha256:5fffc8cbaf2db03f59e3f8755f5ada67955f9de079c98abb08585fa0e4ccc8fb
     143images/README = sha256:b7ff2704f677c5fc1e41b548eb4d50b1802ff61f0bf3df43bbe4818084ab82bf
     144images/efidisk.img = sha256:55fb2e751ee12e7a6d7cc4aa1017c53077ec7cab1390fe4ffe9af3a4c5ad4b0f
     145repodata/repomd.xml = sha256:b4c730256ed3e41aaa70cdb0bd5b44d1f90b6325c4f37428e75f49000d332430
     146--- END ---
     147}}}
     148
     149Now remove all anaconda repo files.
     150{{{
     151[root@host puias]# cd images
     152[root@host images]# mkdir /mnt/install
     153[root@host images]# mount -o loop install.img /mnt/install
     154}}}
     155
     156(requires squashfs stuff installed)
     157
     158{{{
     159[root@host images]# cd /tmp; cp -a /mnt/install install
     160[root@host /tmp]# cd install
     161[root@host install]# rm etc/anaconda.repos.d/*
     162[root@host install]# mksquashfs * ../install.img:w
     163[root@host install]# cp /tmp/install.img ~/puias/1/images/
     164
     165}}}
     166Now make an iso out of those directories...
     167
     168{{{
     169[root@host puias]# cd 1
     170[root@host 1]# mkisofs -o /tmp/6.1-DVD-x86_64.iso -r -b isolinux/isolinux.bin -c isolinux/boot.msg -cache-inodes -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL .
     171[root@host 1]# cd ../2
     172[root@host 2]# mkisofs -o /tmp/6.1--DVD-2-x86_64.iso -r -cache-inodes -R -m TRANS.TBL .
     173}}}
     174
     175
     176=== Note: ===
     177There is a bug in createrepo that causes it to rewrite all the files incorrectly in primary.xml
     178There is a string replace that is unended, replaces all occurences of _reldir with '', which replaces 1 and 2 with nothing
     179
     180relpath = self.localpath.replace(self._reldir, '')
     181change the line to this:
     182relpath = self.localpath.replace(self._reldir, '',1)
     183in
     184/usr/lib/python2.6/site-packages/yum/packages.py