[CentOS] [Fwd: Re: How to generate a .template and .jigdo from an iso image?]

Wed May 13 13:36:05 UTC 2009
Marcelo M. Garcia <marcelo.maia.garcia at googlemail.com>

Hi Ralph

I received this e-mail from Fedora Infrastructure list. My problem at 
that moment was a proper syntax for the jigdo-file command.

Using the their script as reference, I made a simpler one to test the 
command[1]. And it's working:
newt (Linux) $pwd; ls -l *.jigdo *.template
/users/newt2/mgarcia/iso/dvd
-rw-r--r-- 1 mgarcia slocate    214226 May 13 13:44 
CentOS-5.3-i386-bin-DVD.jigdo
-rw-r--r-- 1 mgarcia slocate 196853099 May 13 13:44 
CentOS-5.3-i386-bin-DVD.template
newt (Linux) $

I copy all the files in CentOS directory of the image to the directory 
"/users/newt2/mgarcia/iso/os", so I could export as NFS.

I don't know if there is a better way to test, but what I did was to 
create a centos.conf in /etc/httpd/conf.d[2]. Then in the machine called 
prost, issued the command:
[root at prost ~]# jigdo-lite http://newt/centos/CentOS-5.3-i386-bin-DVD.jigdo

Jigsaw Download "lite"
Copyright (C) 2001-2005  |  jigdo@
Richard Atterer          |  atterer.net
(...)

Regards

mg.



[1]
*=====*
#!/bin/sh

ISO_DIR=/newt2/mgarcia/iso/dvd/CentOS-5.3-i386-bin-DVD.iso
ARCH=i386

jigdo-file make-template \
   --image=${ISO_DIR} \
   /users/newt2/mgarcia/iso/os \
   --label "Base-${ARCH}"="/users/newt2/mgarcia/iso/os" \
   --uri "Base-${ARCH}"="http://mirror.centos.org/centos-5/5/os/i386" \
   --force
*=====*

[2]
Alias /centos "/users/newt2/mgarcia/iso/dvd/"

<Directory "/users/newt2/mgarcia/iso/dvd/">
   Options None
   Order allow,deny
   Allow from all
</Directory>


-------- Original Message --------
Subject: Re: How to generate a .template and .jigdo from an iso image?
Date: Sun, 10 May 2009 15:22:27 +0200
From: Jeroen van Meeuwen <kanarip at kanarip.com>
Reply-To: Fedora Infrastructure <fedora-infrastructure-list at redhat.com>
To: Fedora Infrastructure <fedora-infrastructure-list at redhat.com>
References: <4A034BEA.4000906 at googlemail.com> 
<1241740929.12122.349.camel at ignacio.lan>	<4A03D29D.7060408 at googlemail.com>

On 05/08/2009 08:35 AM, Marcelo M. Garcia wrote:
> Hi
>
> I read the man page. It says that I have to specify only one of the
> options "-i", "-j" or "-t". OK. If I use only -i, my template has the
> same size of image, then there is no point in using jigdo. There must be
> something more.
>
> My question is how Fedora generates the .template with only 11.1M? The
> command "jigdo-file -i CentOS-5.3-i386-bin-DVD.iso" it's not enough.
>

Attached is the script Fedora Unity uses to jigdofy it's Re-Spins. Note
the "function jigdofy()" in the top that may just help you get the
syntax right.

Note the double slash in the two directories passed to the "jigdo-file
make-template" command, which functions as a delimiter for jigdo-file,
so that in the --label parameter, we can 'label' the path and then
attach a URI (--uri) to be used in the resulting .jigdo file instead.

$1 is the (fully qualified) path to the .iso image,
$2 is the base architecture for the .iso image (i386, x86_64 or ppc in
our case), and
${version} is the Fedora $releasever (9 or 10 right now).

Also note that /data/os/distr/fedora is a local, full mirror and that
/data/os/archive/fedora is a local, full archive (with package files
that have been removed from the mirror because for example they've
expired and have been superseeded by another update to said package).

Kind regards,

Jeroen van Meeuwen
-kanarip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jigdofy_everything.sh
Type: application/x-sh
Size: 3793 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20090513/fa29edb7/attachment-0004.sh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
URL: <http://lists.centos.org/pipermail/centos/attachments/20090513/fa29edb7/attachment-0004.ksh>