[software-management-guide/rebase] Primera versión

Guillermo Gómez gomix at fedoraproject.org
Thu Sep 9 14:19:28 UTC 2010


commit f62d2887f339149de8cc26555b049719f5576ba0
Author: Guillermo Gomez S. (Gomix) <guillermo.gomez at gmail.com>
Date:   Thu Sep 9 09:49:17 2010 -0430

    Primera versión

 es-ES/Gestion_avanzada_de_repositorios_yum.xml |  605 +++++++++++++++++++++++-
 1 files changed, 602 insertions(+), 3 deletions(-)
---
diff --git a/es-ES/Gestion_avanzada_de_repositorios_yum.xml b/es-ES/Gestion_avanzada_de_repositorios_yum.xml
index e0c646e..8fca20c 100644
--- a/es-ES/Gestion_avanzada_de_repositorios_yum.xml
+++ b/es-ES/Gestion_avanzada_de_repositorios_yum.xml
@@ -5,9 +5,608 @@
 ]>
 <chapter id="Gestión_avanzada_de_repositorios_yum">
 	<title>Gestión avanzada de repositorios yum</title>
-	<para>
-		This is a test paragraph
-	</para>
+	<para>A continuación se detallarán herramientas destinadas a la gestión de los repositorios yum.</para>
+<section>
+	<title>Consultar repositorios con repoquery</title>
+	<para><application>repoquery</application> es un programa para consultar información en los repositorios Yum, éstas son similares a las consultas rpm.</para>
+	<para><application>repoquery</application> es una herramienta yum que tiene un conjunto de opciones profundas y complicadas. Está pensada como una herramienta análoga a <command>rpm -q</command> pero ejecutada sobre los repositorios remotos. Esto explica el por qué de lo complicado y profundo. A continuación se muestran algunos usos comunes.</para>
+	<para>Por omisión <application>repoquery</application> actúa sobre los repositorios configurados y habilitados en su configuración yum. Puede habilitar/deshabilitar repositorios al vuelo usando las opciones <option>--enablerepo=repoid</option> y <option>--disablerepo=repoid</option>. Ocasionalmente sólo quiere consultar un repositorio en particular, use en esos casos la opción <option>--repoid=repoid</option>. En este último caso sólo ese repositorio será considerado sin importar la configuración de yum.</para>
+	<para>Ocurre con cierta frecuencia que se desea consultar un repositorio no configurado aún. <application>repoquery</application> maneja esta situación con el uso de la opción <option>--repofrompath</option>:</para>
+	<screen>
+$ repoquery  --repofrompath=nombredelrepo,http://ruta/al/repo --repoid=nombredelrepo  -q -a 
+</screen>
+<para><application>repoquery</application> puede trabajar sobre cualquier arquitectura, por omisión utiliza las arquitecturas del sistema sobre el que está siendo ejecutado. Sin embargo, usted puede especificar las arquitecturas utilizando la opción <option>--archlist</option>.</para>
+<para>Sólo paquetes i686:</para>
+<screen>$ repoquery -q --archlist=i686 -a </screen>
+<para>Sólo paquetes i686 e i386:</para>
+<screen>$ repoquery -q --archlist=i686,i386 -a </screen>
+<para>Sólo paquetes fuente srpms:</para>
+<screen>$ repoquery -q --archlist=src -a </screen>
+<para>Listar el contenido de un paquete dado.</para>
+<screen>
+$ repoquery --list iftop
+/usr/sbin/iftop
+/usr/share/doc/iftop-0.17
+/usr/share/doc/iftop-0.17/COPYING
+/usr/share/doc/iftop-0.17/ChangeLog
+/usr/share/doc/iftop-0.17/README
+/usr/share/doc/iftop-0.17/TODO
+/usr/share/man/man8/iftop.8.gz
+</screen>
+<para>Listar paquetes dueños de un archivo instalado dado.</para>
+<screen>
+$ repoquery -q --file /usr/bin/yum
+yum-0:3.2.25-1.fc12.noarch
+yum-0:3.2.27-3.fc12.noarch
+</screen>
+<para>Uso de <application>repoquery</application> limitándolo a los paquetes instalados.</para>
+<screen>
+$ repoquery --pkgnarrow=installed -q --whatrequires --alldeps lsof
+rkhunter-0:1.3.6-7.fc12.noarch
+rkhunter-0:1.3.4-8.fc12.noarch
+libguestfs-1:1.0.75-1.fc12.i686
+libguestfs-1:1.2.7-1.fc12.1.i686
+</screen>
+<para>Si necesita averiguar cuáles srpms tienen un requerimiento de construcción sobre un paquete en particular, ejecute:</para>
+<screen>
+$ repoquery --archlist=src --repoid=fedora-source -q --whatrequires lsof
+libguestfs-1:1.0.75-1.fc12.src 
+</screen>
+<para>Si necesita una lista formateada de paquetes, con su url y el repositorio de donde proviene puede usar repoquery así:</para>
+<screen>$ repoquery -q --qf=&quot;%{name}&nbsp;%{repoid}&nbsp;%{location}&quot; pkg1 pkg2 pkg3 </screen>
+<para>Consulta de paquetes por patrón a un repositorio específico:</para>
+<screen>
+$ repoquery -q --repoid=updates-testing fw*
+fwsnort-0:1.0.6-7.fc13.noarch
+</screen>
+<para>Para más detalles vea la página del manual al respecto, <command>man repoquery</command>.</para>
+</section>
+
+<section><title>Creación de repositorios con createrepo</title>
+	<para>En esta sección se creará un repositorio yum de ejemplo a partir de un conjunto de paquetes rpm. Antes es necesario instalar la herramienta <application>createrepo</application>.</para>
+	<screen># yum install createrepo </screen>
+	<screen>
+# createrepo -h
+Usage: genpkgmetadata.py [options]
+
+Options:
+  --version             show program's version number and exit
+  -h, --help            show this help message and exit
+  -q, --quiet           output nothing except for serious errors
+  -v, --verbose         output more debugging info.
+  --profile             output timing/profile info.
+  -x EXCLUDES, --excludes=EXCLUDES
+                        files to exclude
+  --basedir=BASEDIR     basedir for path to directories
+  -u BASEURL, --baseurl=BASEURL
+                        baseurl to append on all files
+  -g GROUPFILE, --groupfile=GROUPFILE
+                        path to groupfile to include in metadata
+  -s SUMTYPE, --checksum=SUMTYPE
+                        specify the checksum type to use (default: sha256)
+  -p, --pretty          make sure all xml generated is formatted
+  -c CACHEDIR, --cachedir=CACHEDIR
+                        set path to cache dir
+  -C, --checkts         check timestamps on files vs the metadata to seeif we
+                        need to update
+  -d, --database        create sqlite database files
+  --update              use the existing repodata to speed up creation of new
+  --update-md-path=UPDATE_MD_PATH
+                        use the existing repodata  for --update from this path
+  --skip-stat           skip the stat() call on a --update, assumes if the
+                        filename is the same then the file is still the
+                        same(only use this if you're fairly trusting or
+                        gullible)
+  --split               generate split media
+  -i PKGLIST, --pkglist=PKGLIST
+                        use only the files listed in this file from
+                        thedirectory specified
+  -n INCLUDEPKG, --includepkg=INCLUDEPKG
+                        add this pkg to the list - can be specified multiple
+                        times
+  -o OUTPUTDIR, --outputdir=OUTPUTDIR
+                        &lt;dir&gt; = optional directory to output to
+  -S, --skip-symlinks   ignore symlinks of packages
+  --changelog-limit=CHANGELOG_LIMIT
+                        only import the last N changelog entries
+  --unique-md-filenames
+                        include the file's checksum in the filename,helps with
+                        proxies
+  --distro=DISTRO       distro tag and optional cpeid:
+                        --distro'cpeid,textname'
+  --content=CONTENT_TAGS
+                        tags for the content in the repository
+  --revision=REVISION   user-specified revision for this repository
+  --deltas              create delta rpms and metadata
+  --oldpackagedirs=OLDPACKAGE_PATHS
+                        paths to look for older pkgs to delta against
+  --num-deltas=NUM_DELTAS
+                        the number of older versions to make deltas against
+
+</screen>
+<para>El procedimiento es simple, hay que crear un directorio para alojar el repositorio, colocar allí los rpms provistos por los desarrolladores y empaquetadores, ejecutar <command>createrepo</command> especificando el directorio donde se encuentran los rpms.</para>
+
+<screen>
+# mkdir /var/www/html/x86_64/
+# cp -ar /home/makerpm/rpmbuild/RPMS/x86_64/*rpm /var/www/html/x86_64/
+# createrepo --verbose /var/www/html/x86_64/
+1/14 - dhcp_probe-1.3.0-2.fc13.x86_64.rpm
+2/14 - dhcp_probe-debuginfo-1.3.0-2.fc13.x86_64.rpm
+3/14 - rubygem-pg-0.9.0-1.fc13.x86_64.rpm
+4/14 - dhcp_probe-1.3.0-4.fc13.x86_64.rpm
+5/14 - iptables-debuginfo-1.4.5-1.fc12.x86_64.rpm
+6/14 - passenger-debuginfo-2.2.15-1.fc13.x86_64.rpm
+7/14 - iptables-ipv6-1.4.5-1.fc12.x86_64.rpm
+8/14 - dhcp_probe-debuginfo-1.3.0-4.fc13.x86_64.rpm
+9/14 - iptables-devel-1.4.5-1.fc12.x86_64.rpm
+10/14 - dhcp_probe-debuginfo-1.3.0-3.fc13.x86_64.rpm
+11/14 - dhcp_probe-1.3.0-3.fc13.x86_64.rpm
+12/14 - dhcp_probe-debuginfo-1.3.0-1.fc13.x86_64.rpm
+13/14 - passenger-2.2.15-1.fc13.x86_64.rpm
+14/14 - iptables-1.4.5-1.fc12.x86_64.rpm
+
+Saving Primary metadata
+Saving file lists metadata
+Saving other metadata
+</screen>
+
+<para>Se puede verificar fácilmente que el proceso previo ha creado un directorio <filename class="directory">repodata</filename> con los metadatos que representan y conforman al nuevo repositorio.</para>
+
+<screen>
+# ls /var/www/html/x86_64/repodata/
+filelists.xml.gz  other.xml.gz  primary.xml.gz  repomd.xml
+</screen>
+
+<para>Una vez creada la metadata del repositorio yum es hora de disponibilizar el repositorio. En este ejemplo se creará una configuración local utilizando el método de acceso <uri>file:///</uri> que permitirá acceder al repositorio recién creado.</para>
+
+<para><filename>/etc/yum.repos.d/rubyera.repo</filename></para>
+<screen>
+[rubyera]
+name=Rubyera repo
+baseurl=file:///var/www/html/x86_64
+enabled=1
+gpgcheck=0
+</screen>
+
+<para>Para verificar la disponibilidad del nuevo repositorio puede utilizar la herramienta <application>repoquery</application> y consultarlo.</para>
+
+<screen>
+# repoquery -q --repoid=rubyera -a
+dhcp_probe-0:1.3.0-4.fc13.x86_64
+dhcp_probe-debuginfo-0:1.3.0-4.fc13.x86_64
+iptables-0:1.4.5-1.fc12.x86_64
+iptables-debuginfo-0:1.4.5-1.fc12.x86_64
+iptables-devel-0:1.4.5-1.fc12.x86_64
+iptables-ipv6-0:1.4.5-1.fc12.x86_64
+passenger-0:2.2.15-1.fc13.x86_64
+passenger-debuginfo-0:2.2.15-1.fc13.x86_64
+rubygem-pg-0:0.9.0-1.fc13.x86_64
+</screen>
+</section>
+
+<section><title>yum-groups-manager</title>
+
+	<para><application>yum-groups-manager</application> se usa para crear o editar el archivo de metadata de grupos para un repositorio yum. Usar esta herramienta es frecuentemente mucho más fácil que editar el XML correspondiente a mano. <application>yum-groups-manager</application> puede cargar un archivo entero de metadatos de grupo o crear uno nuevo o editar un grupo existente y luego escribir los metadatos como salida.</para>
+
+
+	<para>Antes de poder utilizar esta herramienta necesita que los paquetes que se vayan a agregar a los grupos correspondientes estén disponibles vía yum, es decir, deben ya estar disponibles en los repositorios configurados.</para>
+	
+	<para><emphasis>Creación del grupo yum Rubyera</emphasis></para>
+	<screen>
+# yum-groups-manager -n &quot;Rubyera&quot; --id=rubyera --description=&quot;Rubyera, paquetes producidos por...&quot; --save=comps.xml --mandatory passenger
+</screen>
+<screen>
+# cat comps.xml 
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE comps PUBLIC &quot;-//Red Hat, Inc.//DTD Comps info//EN&quot; &quot;comps.dtd&quot;&gt;
+&lt;comps&gt;
+        
+  &lt;group&gt;
+   &lt;id&gt;rubyera&lt;/id&gt;
+   &lt;default&gt;false&lt;/default&gt;
+   &lt;uservisible&gt;true&lt;/uservisible&gt;
+   &lt;display_order&gt;1024&lt;/display_order&gt;
+   &lt;name&gt;Rubyera&lt;/name&gt;
+   &lt;description&gt;Rubyera, paquetes producidos por...&lt;/description&gt;
+    &lt;packagelist&gt;
+      &lt;packagereq type=&quot;mandatory&quot;&gt;passenger&lt;/packagereq&gt;
+    &lt;/packagelist&gt;
+  &lt;/group&gt;
+&lt;/comps&gt;
+</screen>
+
+<para>Una vez creado el archivo comps.xml y colocándolo en el mismo directorio donde se encuentran los rpms, se debe volver a ejecutar el comando createrepo especificando ahora el nombre del archivo que define los grupos. </para>
+
+<screen>
+# createrepo --verbose -g comps.xml /var/www/html/x86_64/
+</screen>
+
+<para>Ahora el grupo se encuentra disponible.</para>
+
+<screen>
+# yum clean metadata
+# yum groupinfo Rubyera 
+Complementos cargados:download-order, downloadonly, filter-data, list-data, presto, verify
+Configurando el proceso de grupo
+...
+rubyera                                                                                                                              | 1.9 kB     00:00 ... 
+rubyera/group_gz                                                                                                                     |  341 B     00:00 ... 
+
+Grupo: Rubyera
+ Descripción: Rubyera, paquetes producidos por ...
+ Paquetes obligatorios:
+   passenger
+</screen>
+
+<para>No se pueden agregar aplicaciones mandatorias y opcionales o por omisión en una sola línea de comando, por lo que debe hacerse en comandos separados, por ejemplo, para agregar paquetes opcionales se puede hacer:</para>
+
+<screen>
+# yum-groups-manager --id=rubyera --load=repodata/comps.xml --save=comps.xml --optional dhcp_probe
+</screen>
+
+<para>Note que no se puede operar sobre el mismo archivo de entrada y de salida. La opción <option>--load</option> carga el archivo <filename>comps.xml</filename> producido previamente por <application>createrepo</application> mientras que <option>--save</option> está operando sobre el directorio donde se encuentran los rpms, en este caso en <filename class="directory">/var/www/html/x86_64</filename>.</para>
+
+<para>Una vez se tiene el nuevo archivo <filename>comps.xml</filename>, que se muestra abajo, se debe reconstruir el repositorio yum con <command>createrepo</command>.</para>
+
+<screen>
+# cat rubyera.xml
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE comps PUBLIC &quot;-//Red Hat, Inc.//DTD Comps info//EN&quot; &quot;comps.dtd&quot;&gt;
+&lt;comps&gt;
+        
+  &lt;group&gt;
+   &lt;id&gt;rubyera&lt;/id&gt;
+   &lt;default&gt;false&lt;/default&gt;
+   &lt;uservisible&gt;true&lt;/uservisible&gt;
+   &lt;display_order&gt;1024&lt;/display_order&gt;
+   &lt;name&gt;Rubyera&lt;/name&gt;
+   &lt;description&gt;Rubyera, paquetes producidos por...&lt;/description&gt;
+    &lt;packagelist&gt;
+      &lt;packagereq type=&quot;optional&quot;&gt;dhcp_probe&lt;/packagereq&gt;
+      &lt;packagereq type=&quot;mandatory&quot;&gt;passenger&lt;/packagereq&gt;
+    &lt;/packagelist&gt;
+  &lt;/group&gt;
+&lt;/comps&gt;
+</screen>
+<screen>
+# createrepo --verbose -g comps.xml /var/www/html/x86_64/
+</screen>
+<para>Verificación de la nueva composición del grupo Rubyera.</para>
+<screen>
+# yum clean metadata
+# yum groupinfo Rubyera 
+...
+Grupo: Rubyera
+ Descripción: Rubyera, paquetes producidos por ...
+ Paquetes obligatorios:
+   passenger
+ Paquetes opcionales:
+   dhcp_probe
+</screen>
+<para>Para agregar un segundo grupo:</para>
+<screen>
+# yum-groups-manager --name=&quot;Rubyera debuginfo&quot; --id=rubyera-debuginfo --load=repodata/comps.xml --save=comps.xml dhcp_probe-debuginfo passenger-debuginfo
+</screen>
+<screen>
+# cat comps.xml 
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE comps PUBLIC &quot;-//Red Hat, Inc.//DTD Comps info//EN&quot; &quot;comps.dtd&quot;&gt;
+&lt;comps&gt;
+        
+  &lt;group&gt;
+   &lt;id&gt;rubyera&lt;/id&gt;
+   &lt;default&gt;false&lt;/default&gt;
+   &lt;uservisible&gt;true&lt;/uservisible&gt;
+   &lt;display_order&gt;1024&lt;/display_order&gt;
+   &lt;name&gt;Rubyera&lt;/name&gt;
+   &lt;description&gt;Rubyera, paquetes producidos por ...&lt;/description&gt;
+    &lt;packagelist&gt;
+      &lt;packagereq type=&quot;mandatory&quot;&gt;passenger&lt;/packagereq&gt;
+      &lt;packagereq type=&quot;optional&quot;&gt;dhcp_probe&lt;/packagereq&gt;
+    &lt;/packagelist&gt;
+  &lt;/group&gt;        
+  &lt;group&gt;
+   &lt;id&gt;rubyera-debuginfo&lt;/id&gt;
+   &lt;default&gt;false&lt;/default&gt;
+   &lt;uservisible&gt;true&lt;/uservisible&gt;
+   &lt;display_order&gt;1024&lt;/display_order&gt;
+   &lt;name&gt;Rubyera debuginfo&lt;/name&gt;
+   &lt;description&gt;&lt;/description&gt;
+    &lt;packagelist&gt;
+      &lt;packagereq type=&quot;default&quot;&gt;dhcp_probe-debuginfo&lt;/packagereq&gt;
+      &lt;packagereq type=&quot;default&quot;&gt;passenger-debuginfo&lt;/packagereq&gt;
+    &lt;/packagelist&gt;
+  &lt;/group&gt;
+&lt;/comps&gt;
+</screen>
+
+<screen>
+# yum groupinfo &quot;Rubyera debuginfo&quot;
+...
+Grupo: Rubyera debuginfo
+ Paquetes predeterminados:
+   dhcp_probe-debuginfo
+   passenger-debuginfo
+</screen>
+</section>
+<section><title>Repositorios explorables web con repoview</title>
+
+	<para><application>repoview</application> hace que el repositorio sea explorable creando una serie de páginas estáticas HTML. Utiliza el motor de plantillas kid para crear las páginas así que es personalizable. Antes de poder utilizarlo es necesaria su instalación.</para>
+	
+	<screen># yum install repoview </screen>
+	
+	<para><application>repoview</application> requiere que el repositorio tenga los metadatos en archivos sqlite, si no es así, obtendrá  un error como el siguiente.</para>
+
+<screen>
+# repoview /var/www/html/x86_64
+Examining repository...Sorry, sqlite files not found in the repository.
+Please rerun createrepo with a -d flag and try again.
+</screen>
+<para>Corrija y reconstruya su repositorio yum utilizando --database para que se generen los archivos sqlite.</para>
+
+<screen>
+# createrepo --verbose --database -g comps.xml /var/www/html/x86_64
+1/14 - dhcp_probe-1.3.0-2.fc13.x86_64.rpm
+2/14 - dhcp_probe-debuginfo-1.3.0-2.fc13.x86_64.rpm
+3/14 - rubygem-pg-0.9.0-1.fc13.x86_64.rpm
+4/14 - dhcp_probe-1.3.0-4.fc13.x86_64.rpm
+5/14 - iptables-debuginfo-1.4.5-1.fc12.x86_64.rpm
+6/14 - passenger-debuginfo-2.2.15-1.fc13.x86_64.rpm
+7/14 - iptables-ipv6-1.4.5-1.fc12.x86_64.rpm
+8/14 - dhcp_probe-debuginfo-1.3.0-4.fc13.x86_64.rpm
+9/14 - iptables-devel-1.4.5-1.fc12.x86_64.rpm
+10/14 - dhcp_probe-debuginfo-1.3.0-3.fc13.x86_64.rpm
+11/14 - dhcp_probe-1.3.0-3.fc13.x86_64.rpm
+12/14 - dhcp_probe-debuginfo-1.3.0-1.fc13.x86_64.rpm
+13/14 - passenger-2.2.15-1.fc13.x86_64.rpm
+14/14 - iptables-1.4.5-1.fc12.x86_64.rpm
+
+Saving Primary metadata
+Saving file lists metadata
+Saving other metadata
+Generating sqlite DBs
+Starting other db creation: Sun Aug 15 07:52:45 2010
+Ending other db creation: Sun Aug 15 07:52:46 2010
+Starting filelists db creation: Sun Aug 15 07:52:46 2010
+Ending filelists db creation: Sun Aug 15 07:52:46 2010
+Starting primary db creation: Sun Aug 15 07:52:46 2010
+Ending primary db creation: Sun Aug 15 07:52:48 2010
+Sqlite DBs complete
+</screen>
+<para>Ahora es posible ejecutar repoview con éxito, abajo un ejemplo simple.</para>
+<screen>
+# repoview --title &quot;rubyera repo for F13 x86_64&quot; /var/www/html/x86_64
+Examining repository...done
+Opening primary database...done
+Opening changelogs database...done
+Parsing comps.xml...done
+Examining state db...done
+Collecting letters...done
+Writing package dhcp_probe.html
+Writing package passenger.html
+Writing group rubyera.group.html
+Writing package dhcp_probe-debuginfo.html
+Writing package passenger-debuginfo.html
+Writing group rubyera-debuginfo.group.html
+Writing group letter_d.group.html
+Writing package iptables.html
+Writing package iptables-debuginfo.html
+Writing package iptables-devel.html
+Writing package iptables-ipv6.html
+Writing group letter_i.group.html
+Writing group letter_p.group.html
+Writing package rubygem-pg.html
+Writing group letter_r.group.html
+Collecting latest packages...done
+Writing index.html...done
+</screen>
+<screen>
+# ls
+comps.xml
+dhcp_probe-1.3.0-2.fc13.x86_64.rpm
+...
+passenger-2.2.15-1.fc13.x86_64.rpm
+repodata
+repoview                            &lt;&lt; directorio nuevo
+rubygem-pg-0.9.0-1.fc13.x86_64.rpm
+</screen>
+
+<para>Apuntando un explorador web al archivo <filename>/var/www/httml/x86_64/repoview/index.html</filename> podrá obtener el resultado visual similar al siguiente.</para>
+
+<mediaobject>
+	<imageobject>
+		<imagedata fileref="images/Repoview.png" />
+	</imageobject>
+	<textobject>
+		<phrase>Pantallazo de la salida de repoview</phrase>
+	</textobject>
+</mediaobject>
+</section>
+
+<section>
+	<title>repoclosure</title>
+	<para><application>Lee</application> los metadatos de una serie de repositorios y verifica todas las dependencias en todos los paquetes y su resolución. Imprime una lista de paquetes con dependencias no resueltas.</para>
+	<para><emphasis>Uso:</emphasis></para>
+<screen>
+$ repoclosure -h
+Usage: 
+    Read in the metadata of a series of repositories and check all the   
+    dependencies in all packages for resolution. Print out the list of
+    packages with unresolved dependencies
+    
+    /usr/bin/repoclosure [-c &lt;config file&gt;] [-a &lt;arch&gt;] [-r &lt;repoid&gt;] [-r &lt;repoid2&gt;]
+    
+Options:
+  -h, --help            show this help message and exit
+  -c CONFIG, --config=CONFIG
+                        config file to use (defaults to /etc/yum.conf)
+  -a ARCH, --arch=ARCH  check packages of the given archs, can be specified
+                        multiple times (default: current arch)
+  --basearch=BASEARCH   set the basearch for yum to run as
+  -b, --builddeps       check build dependencies only (needs source repos
+                        enabled)
+  -r REPOID, --repoid=REPOID
+                        specify repo ids to query, can be specified multiple
+                        times (default is all enabled)
+  -t, --tempcache       Use a temp dir for storing/accessing yum-cache
+  -q, --quiet           quiet (no output to stderr)
+  -n, --newest          check only the newest packages in the repos
+  --repofrompath=REPOFROMPATH
+                        specify repoid &amp; paths of additional repositories -
+                        unique repoid and path required, can be specified
+                        multiple times. Example.
+                        --repofrompath=myrepo,/path/to/repo
+  -p PKG, --pkg=PKG     check closure for this package only
+  -g GROUP, --group=GROUP
+                        check closure for packages in this group only
+</screen>
+<screen>
+# repoclosure -r rubyera
+Reading in repository metadata - please wait....
+Checking Dependencies
+Repos looked at: 1
+   rubyera
+Num Packages in Repos: 14
+package: dhcp_probe-1.3.0-2.fc13.x86_64 from rubyera
+  unresolved deps: 
+     libc.so.6(GLIBC_2.2.5)(64bit)
+     libc.so.6()(64bit)
+     rtld(GNU_HASH)
+     libc.so.6(GLIBC_2.3.4)(64bit)
+     libc.so.6(GLIBC_2.7)(64bit)
+     libc.so.6(GLIBC_2.4)(64bit)
+     libpcap.so.1()(64bit)
+     libnet.so.1()(64bit)
+package: dhcp_probe-1.3.0-3.fc13.x86_64 from rubyera
+  unresolved deps: 
+     libc.so.6(GLIBC_2.2.5)(64bit)
+     libc.so.6()(64bit)
+     rtld(GNU_HASH)
+     libc.so.6(GLIBC_2.3.4)(64bit)
+     libc.so.6(GLIBC_2.7)(64bit)
+     libc.so.6(GLIBC_2.4)(64bit)
+     libpcap.so.1()(64bit)
+     libnet.so.1()(64bit)
+</screen>
+</section>
+
+<section>
+	<title>Creando espejos yum con reposync</title>
+	<para><application>reposync</application> se utiliza para sincronizar un repositorio remoto yum con un directorio local utilizando yum para recuperar los paquetes.</para>
+	<para><emphasis>Uso:</emphasis></para>
+
+<screen>
+reposync [options]
+</screen>
+<para><emphasis>Opciones:</emphasis></para>
+
+<screen>
+Options:
+  -h, --help            show this help message and exit
+  -c CONFIG, --config=CONFIG
+                        config file to use (defaults to /etc/yum.conf)
+  -a ARCH, --arch=ARCH  act as if running the specified arch (default: current
+                        arch, note: does not override $releasever)
+  -r REPOID, --repoid=REPOID
+                        specify repo ids to query, can be specified multiple
+                        times (default is all enabled)
+  -e CACHEDIR, --cachedir=CACHEDIR
+                        directory in which to store metadata
+  -t, --tempcache       Use a temp dir for storing/accessing yum-cache
+  -d, --delete          delete local packages no longer present in repository
+  -p DESTDIR, --download_path=DESTDIR
+                        Path to download packages to: defaults to current dir
+  -g, --gpgcheck        Remove packages that fail GPG signature checking after
+                        downloading
+  -u, --urls            Just list urls of what would be downloaded, don't
+                        download
+  -n, --newest-only     Download only newest packages per-repo
+  -q, --quiet           Output as little as possible
+  -l, --plugins         enable yum plugin support
+</screen>
+
+<para>A partir del directorio local con los rpms, es trivial reconstruir los metadatos con <application>createrepo</application>.</para>
+<para>Ejemplo de uso para sincronizar con el repositorio ejemplo rubyera.</para>
+
+<screen>
+$ reposync --repoid=rubyera 
+rubyera                                              | 3.2 kB     00:00 ... 
+[rubyera: 1     of 14    ] Downloading dhcp_probe-1.3.0-2.fc13.x86_64.rpm
+[rubyera: 2     of 14    ] Downloading dhcp_probe-1.3.0-4.fc13.x86_64.rpm
+[rubyera: 3     of 14    ] Downloading dhcp_probe-1.3.0-3.fc13.x86_64.rpm
+[rubyera: 4     of 14    ] Downloading dhcp_probe-debuginfo-1.3.0-2.fc13.x86_64.rpm
+[rubyera: 5     of 14    ] Downloading dhcp_probe-debuginfo-1.3.0-4.fc13.x86_64.rpm
+[rubyera: 6     of 14    ] Downloading dhcp_probe-debuginfo-1.3.0-3.fc13.x86_64.rpm
+[rubyera: 7     of 14    ] Downloading dhcp_probe-debuginfo-1.3.0-1.fc13.x86_64.rpm
+[rubyera: 8     of 14    ] Downloading iptables-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 9     of 14    ] Downloading iptables-debuginfo-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 10    of 14    ] Downloading iptables-devel-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 11    of 14    ] Downloading iptables-ipv6-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 12    of 14    ] Downloading passenger-2.2.15-1.fc13.x86_64.rpm
+[rubyera: 13    of 14    ] Downloading passenger-debuginfo-2.2.15-1.fc13.x86_64.rpm
+[rubyera: 14    of 14    ] Downloading rubygem-pg-0.9.0-1.fc13.x86_64.rpm
+</screen>
+
+<para>Si intenta nuevamente sincronizar, <command>reposync</command> no volverá a descargar los paquetes existentes ahorrando ancho de banda.</para>
+
+<screen>
+$ reposync --repoid=rubyera 
+[rubyera: 1     of 14    ] Skipping existing dhcp_probe-1.3.0-2.fc13.x86_64.rpm
+[rubyera: 2     of 14    ] Skipping existing dhcp_probe-1.3.0-4.fc13.x86_64.rpm
+[rubyera: 3     of 14    ] Skipping existing dhcp_probe-1.3.0-3.fc13.x86_64.rpm
+[rubyera: 4     of 14    ] Skipping existing dhcp_probe-debuginfo-1.3.0-2.fc13.x86_64.rpm
+[rubyera: 5     of 14    ] Skipping existing dhcp_probe-debuginfo-1.3.0-4.fc13.x86_64.rpm
+[rubyera: 6     of 14    ] Skipping existing dhcp_probe-debuginfo-1.3.0-3.fc13.x86_64.rpm
+[rubyera: 7     of 14    ] Skipping existing dhcp_probe-debuginfo-1.3.0-1.fc13.x86_64.rpm
+[rubyera: 8     of 14    ] Skipping existing iptables-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 9     of 14    ] Skipping existing iptables-debuginfo-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 10    of 14    ] Skipping existing iptables-devel-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 11    of 14    ] Skipping existing iptables-ipv6-1.4.5-1.fc12.x86_64.rpm
+[rubyera: 12    of 14    ] Skipping existing passenger-2.2.15-1.fc13.x86_64.rpm
+[rubyera: 13    of 14    ] Skipping existing passenger-debuginfo-2.2.15-1.fc13.x86_64.rpm
+[rubyera: 14    of 14    ] Skipping existing rubygem-pg-0.9.0-1.fc13.x86_64.rpm
+</screen>
+<para>Un ejemplo de uso es crear un espejo local del repositorio fedora y otro del repositorio updates y usar dichos repositorios localmente. De esta forma sería sumamente rápido instalar y actualizar paquetes. Lo importante es mantener sincronizado regularmente nuestro repositorio con el repositorio maestro correspondiente llamando por ejemplo cada hora a <application>reposync</application> y a <application>createrepo</application>. Es importante notar que el archivo de grupos no es descargado por reposync. use <application>wget</application> o <application>curl</application> para descargarlo.</para>
+
+<para>Una de las ventajas de usar <application>reposync</application> en vez de por ejemplo espejado con rsync, ftp o http, es que <application>reposync</application> al trabajar con yum se beneficia del listado de espejos existentes en la definición del repositorio que se quiere espejar. A cambio, cuando se usa rsync,ftp o http, se depende de un servidor maestro único, que si falla, es más difícil recuperarse de dicha falla y manejarla, con <application>reposync</application> es totalmente transparente y simple de hacer.</para>
+</section>
+
+<section>
+	<title>repotrack</title>
+	<para><application>repotrack</application> se mantiene al tanto de cualquier paquete y sus dependencias. Descargará el o los paquetes que desea monitorear y todas sus dependencias.</para>
+	<para><emphasis>Uso:</emphasis></para>
+	
+<screen>
+repotrack [options] package1 [package2] [package..]    
+</screen>
+
+<para><emphasis>Opciones:</emphasis></para>
+
+<screen>
+  -h, --help            show this help message and exit
+  -c CONFIG, --config=CONFIG
+                        config file to use (defaults to /etc/yum.conf)
+  -a ARCH, --arch=ARCH  check as if running the specified arch (default:
+                        current arch)
+  -r REPOID, --repoid=REPOID
+                        specify repo ids to query, can be specified multiple
+                        times (default is all enabled)
+  -t, --tempcache       Use a temp dir for storing/accessing yum-cache
+  -p DESTDIR, --download_path=DESTDIR
+                        Path to download packages to
+  -u, --urls            Just list urls of what would be downloaded, don't
+                        download
+  -n, --newest          Toggle downloading only the newest packages(defaults
+                        to newest-only)
+  -q, --quiet           Output as little as possible
+</screen>
+</section>
+
+<section>
+	<title>repo-rss</title>
+	<para><application>repo-rss</application> es un programa para generar flujos RSS para uno o más repositorios Yum. Vea los detalles de su uso en <command>man repo-rss</command>.</para>
+
+</section>
 
 </chapter>
 


More information about the docs-commits mailing list