[CentOS-devel] [CentOS] jigdo images

Scott Dowdle dowdle at montanalinux.org
Thu May 7 16:44:32 UTC 2009


Shad,

----- "Shad L. Lords" <slords at lordsfam.net> wrote:

> Scott Dowdle wrote:
> > Shad,
> > 
> > ----- "Shad L. Lords" <slords at lordsfam.net> wrote:
> >>  From the os directory something like this should produce jigdo 
> >> files/templates for all associated iso files.
> >>
> >> for arch in i386 x86_64
> >> do
> >>      rsync -a --delete --delete-excluded \
> >>          --exclude 'repodata/' --exclude 'EULA' \
> >>          --exclude 'GPL' --exclude 'NOTES/' \
> >>          --exclude 'RELEASE-NOTES*' --exclude 'RPM-GPG-KEY*' \
> >>          --link-dest=../$arch/ $arch/ ${arch}.jigdo/
> >>
> >>      for iso in $(find ../isos/i386/ -name '*.iso' -size +100000)
> >>      do
> >>          jigdo-file make-template --force -i $iso \
> >>              -j ${iso%.iso}.jigdo -t ${iso%.iso}.template \
> >>              --label CentOS=$arch.jigdo/ \
> >>              --uri
> CentOS=http://mirror.centos.org/centos/5/os/$arch/
> >> \
> >>              ${arch}.jigdo//
> >>      done
> >> done
> >>
> >> After the files/templates are created they can be moved to a 
> >> different/better location as well as updating the Servers section if 
> >> desired.
> > 
> > Thanks for the recipe.  Worked for me.  My only complaint is that the
> > .template files are about 2/3rds the size of the .iso they are for...
> > so you end up downloading 2/3rds of an ISO as a template, then all of
> > the files that make up the media... and then have to process it for
> > your own .iso.
> > 
> > If you have a local copy of a the repos it pulls from that is handy...
> > but if not, it seems to be significantly more downloading for the
> > end user than just the .iso media... and the only transfer savings
> > for the provider of the .jigdo (rather than providing the .isos)
> > is that 1/3rd-ish savings over the .iso.
> > 
> > Is that how it is supposed to work?
> 
> I don't have the DVD iso so I'm not sure about that one but when I ran it 
> for the CD iso's I got a template of about 15MB for disc1 and < 1MB for 
> each of the other discs.  If you remove the exclude for NOTES/ from the 
> rsync then the template drops to < 5MB (but you have to download all
> the  release notes).
> 
> Are you sure you had a complete rsync of the os directory without excluding 
> anything prior to running the above command?  This was really more a recipe 
> for the CentOS folks to as an example of how easy it would be to create 
> jigdo/template files from their master area that could then be pushed
> to the mirrors for everyone to enjoy.

Yes, I had complete os/ trees.  I basically mounted the DVD iso and copied everything from it.  Here's the results I get after running your script:

[root at img i386]# pwd
/var/www/html/linux/centos/5/isos/i386
[root at img i386]# ls -lha
total 13G
drwxr-xr-x 2 root root 4.0K May  6 14:37 .
drwxr-xr-x 4 root root 4.0K Mar 27 11:58 ..
-rw-r--r-- 1 root root 624M Mar 21 10:17 CentOS-5.3-i386-bin-1of6.iso
-rw-r--r-- 1 root root  13K May  6 14:48 CentOS-5.3-i386-bin-1of6.jigdo
-rw-r--r-- 1 root root 482M May  6 14:48 CentOS-5.3-i386-bin-1of6.template
-rw-r--r-- 1 root root 637M Mar 21 10:18 CentOS-5.3-i386-bin-2of6.iso
-rw-r--r-- 1 root root  13K May  6 15:22 CentOS-5.3-i386-bin-2of6.jigdo
-rw-r--r-- 1 root root 411M May  6 15:22 CentOS-5.3-i386-bin-2of6.template
-rw-r--r-- 1 root root 635M Mar 21 10:19 CentOS-5.3-i386-bin-3of6.iso
-rw-r--r-- 1 root root  25K May  6 14:43 CentOS-5.3-i386-bin-3of6.jigdo
-rw-r--r-- 1 root root 388M May  6 14:43 CentOS-5.3-i386-bin-3of6.template
-rw-r--r-- 1 root root 632M Mar 21 10:20 CentOS-5.3-i386-bin-4of6.iso
-rw-r--r-- 1 root root  14K May  6 15:12 CentOS-5.3-i386-bin-4of6.jigdo
-rw-r--r-- 1 root root 354M May  6 15:12 CentOS-5.3-i386-bin-4of6.template
-rw-r--r-- 1 root root 638M Mar 21 10:21 CentOS-5.3-i386-bin-5of6.iso
-rw-r--r-- 1 root root 5.1K May  6 15:07 CentOS-5.3-i386-bin-5of6.jigdo
-rw-r--r-- 1 root root 383M May  6 15:07 CentOS-5.3-i386-bin-5of6.template
-rw-r--r-- 1 root root 625M Mar 21 10:22 CentOS-5.3-i386-bin-6of6.iso
-rw-r--r-- 1 root root 3.3K May  6 15:16 CentOS-5.3-i386-bin-6of6.jigdo
-rw-r--r-- 1 root root 599M May  6 15:16 CentOS-5.3-i386-bin-6of6.template
-rw-r--r-- 1 root root 3.7G Mar 31 08:38 CentOS-5.3-i386-bin-DVD.iso
-rw-r--r-- 1 root root  71K May  6 15:04 CentOS-5.3-i386-bin-DVD.jigdo
-rw-r--r-- 1 root root 2.6G May  6 15:04 CentOS-5.3-i386-bin-DVD.template
-rw-r--r-- 1 root root 8.3M Mar 21 09:05 CentOS-5.3-i386-netinstall.iso
-rw-r--r-- 1 root root  505 Mar 31 08:33 md5sum.txt
-rw-r--r-- 1 root root  741 Mar 31 08:33 md5sum.txt.asc
-rw-r--r-- 1 root root  569 Mar 31 08:33 sha1sum.txt
-rw-r--r-- 1 root root  805 Mar 31 08:33 sha1sum.txt.asc

As you can see, my .template files are about 2/3rds the size of the .iso they are for.  What's up with that?

When I ran your script I was inside of the os/ dir... and there are i386 and x86_64 dirs there... and it as part of the process created i386.jigdo/ and x86_64.jigdo/ directories... and copied everything from the i386 and the x86_64 dirs into the .jigdo directories... so maybe I'm doing something wrong?

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]


More information about the CentOS-devel mailing list