<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>17.2. Generación de un paquete deb para PyKota</title><link rel="stylesheet" href="./estilo.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.64.1" /><meta name="keywords" content="PyKota" /><link rel="home" href="index.html" title="Integración de redes con OpenLDAP, Samba, CUPS y PyKota" /><link rel="up" href="pykota-obtencion.html" title="Capítulo 17. Obtención del código fuente y generación de un paquete deb" /><link rel="previous" href="pykota-obtencion-introduccion.html" title="17.1. Introducción" /><link rel="next" href="pykota-instalacion.html" title="Capítulo 18. Instalación" /><meta xmlns="http://www.w3.org/TR/xhtml1/transitional" name="generator" content="Experimental LDP.XSL $Revision: 1.3 $"></meta>
  <!-- Generated by LDP XSLT customization layer
      based on Norman Walsh's DocBook XSL stylesheets.
      More information at http://www.linuxdoc.org/ -->
  </head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">17.2. Generación de un paquete deb para PyKota</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pykota-obtencion-introduccion.html">Anterior</a> </td><th width="60%" align="center">Capítulo 17. Obtención del código fuente y generación de un paquete deb</th><td width="20%" align="right"> <a accesskey="n" href="pykota-instalacion.html">Siguiente</a></td></tr></table><hr /></div><div class="sect1" lang="es" xml:lang="es"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pykota-obtencio-generacion"></a>17.2. Generación de un paquete <i class="emphasis">deb</i> para PyKota</h2></div></div><div></div></div><div class="sect2" lang="es" xml:lang="es"><div class="titlepage"><div><div><h3 class="title"><a id="pykota-obtencion-descarga"></a>17.2.1. Descarga del código fuente de PyKota</h3></div></div><div></div></div><p>Para obtener el código fuente de pykota, refiérase a la
		<a href="pykota-informacion-adicional-sobre-el-proyecto.html#pykota-como-obtener-pykota" title="16.4.2. Cómo obtener PyKota">Sección 16.4.2, “Cómo obtener PyKota”</a>.</p><p>Para la realización de esta documentación se ha elegido descargar
		el código fuente directamente del CVS. La versión que se ha empleado
		es la 1.19alpha20.</p></div><div class="sect2" lang="es" xml:lang="es"><div class="titlepage"><div><div><h3 class="title"><a id="pykota-obtencion-modificaciones"></a>17.2.2. Modificaciones para generar el paquete <i class="emphasis">deb</i></h3></div></div><div></div></div><p>Tal y como se obtiene PyKota del CVS no permite la generación de
		un paquete <i class="emphasis">deb</i>, por este motivo se han realizado
		una serie de modificaciones al código fuente para que si sea posible
		esta generación.</p><p>Las modificaciones realizadas las puede encontrar en el
		<a href="pykota-diff.html" title="Apéndice N. Parche para la generación de un paquete deb de PyKota">Apéndice N, <i>Parche para la generación de un paquete deb de PyKota</i></a>. Aplique el parche que se muestra en
		el apéndice anterior al código de la versión 1.19alpha20 de PyKota
		de la siguiente forma:</p><div class="example"><a id="pykota-obtencion-modificaciones-ex1"></a><p class="title"><b>Ejemplo 17.1. Aplicación del parche de modificaciones al código de PyKota</b></p><p>Sitúese en el directorio que contenga el código fuente de
			PyKota y teclee lo siguiente, suponiendo que el parche
			se encuentra en el directorio padre, se llama
			<tt class="filename">patch-pykota</tt> y está en texto plano:</p><table xmlns="http://www.w3.org/TR/xhtml1/transitional" border="0" bgcolor="#E0E0E0" width="90%"><tr><td><pre class="screen"><tt class="prompt">$</tt> <b class="userinput"><tt>/bin/cat ../patch-pykota | /usr/bin/patch -p1</tt></b>
<tt class="computeroutput">patching file cgi-bin/printquota.cgi
patching file debian/changelog
patching file debian/conffiles
patching file debian/control
patching file debian/cron.daily
patching file debian/dirs
patching file debian/docs
patching file debian/etc/default/printquota
patching file debian/etc/pykota.cron.daily
patching file debian/Makefile.docs
patching file debian/postinst
patching file debian/printquota-default
patching file debian/rules
patching file setup.py
patching file stylesheets/pykota.css</tt></pre></td></tr></table></div><p>Con la aplicación del parche ya se debería poder generar el paquete
		<i class="emphasis">deb</i> de pykota. La forma de hacerlo se verá en la siguiente
		sección.</p></div><div class="sect2" lang="es" xml:lang="es"><div class="titlepage"><div><div><h3 class="title"><a id="pykota-obtencion-generacion-deb"></a>17.2.3. Generación del paquete deb</h3></div></div><div></div></div><div class="example"><a id="pykota-obtencion-generacion-deb-ex1"></a><p class="title"><b>Ejemplo 17.2. Generando el paquete <i class="emphasis">deb</i> de PyKota</b></p><p>Sitúese en el directorio que contenga el código fuente de
			PyKota, asegúrese de que el archivo
			<tt class="filename">debian/rules</tt> tiene permisos de ejecución
			y teclee:</p><table xmlns="http://www.w3.org/TR/xhtml1/transitional" border="0" bgcolor="#E0E0E0" width="90%"><tr><td><pre class="screen"><tt class="prompt">$</tt> <b class="userinput"><tt>/usr/bin/dpkg-buildpackage -rfakeroot -us -uc -b</tt></b>
<tt class="computeroutput">dpkg-buildpackage: source package is pykota
dpkg-buildpackage: source version is 1.19alpha20.cvs.20040611-1
dpkg-buildpackage: source maintainer is Sergio Gonz'alez Gonz'alez &lt;sergio.gonzalez@hispalinux.es&gt;
dpkg-buildpackage: host architecture is i386
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
/usr/bin/python setup.py clean --all
running clean

...

/usr/bin/python setup.py install --prefix=`pwd`/debian/tmp/usr --no-compile
Do you want to install
        conf/pykota.conf.sample as /etc/pykota/pykota.conf (y/N) ?</tt> <b class="userinput"><tt>y</tt></b>
<tt class="computeroutput">Configuration file /etc/pykota/pykota.conf and /etc/pykota/pykotadmin.conf installed.
Don't forget to adapt these files to your needs.
Please press ENTER when you have read the message above.</tt> <b class="userinput"><tt>[enter]</tt></b>
<tt class="computeroutput">You can now activate the database caching mechanism
which is disabled by default.
It is especially recommended with the LDAP backend.
You can now disable the preservation of the complete
job history which is enabled by default.
It is probably more useful with the LDAP backend.
PLEASE LOOK AT THE SAMPLE CONFIGURATION FILE conf/pykota.conf.sample
TO LEARN HOW TO DO
Please press ENTER when you have read the message above.</tt> <b class="userinput"><tt>[enter]</tt></b>
<tt class="computeroutput">
WARNING : IF YOU ARE UPGRADING FROM A PRE-1.19alpha17 TO 1.19alpha17 OR ABOVE
AND USE THE POSTGRESQL BACKEND, THEN YOU HAVE TO MODIFY YOUR
DATABASE SCHEMA USING initscripts/postgresql/upgrade-to-1.19.sql
PLEASE READ DOCUMENTATION IN initscripts/postgresql/ TO LEARN HOW TO DO.
YOU CAN DO THAT AFTER THE INSTALLATION IS FINISHED, OR PRESS CTRL+C NOW.


YOU DON'T HAVE ANYTHING SPECIAL TO DO IF THIS IS YOUR FIRST INSTALLATION
OR IF YOU ARE ALREADY RUNNING VERSION 1.19alpha17 OR ABOVE.

Please press ENTER when you have read the message above.</tt> <b class="userinput"><tt>[enter]</tt></b>
<tt class="computeroutput">

WARNING : IF YOU ARE UPGRADING FROM A PRE-1.19alpha10 TO 1.19alpha10 OR ABOVE
YOU **MUST** MODIFY YOUR /etc/pykota/pykota.conf FILE BECAUSE accounter
AND requester DIRECTIVES SUPPORTED VALUES HAVE CHANGED.

YOU CAN DO THAT AFTER THE INSTALLATION IS FINISHED, OR PRESS CTRL+C NOW.


YOU DON'T HAVE ANYTHING SPECIAL TO DO IF THIS IS YOUR FIRST INSTALLATION
OR IF YOU ARE ALREADY RUNNING VERSION 1.19alpha10 OR ABOVE.

Please press ENTER when you have read the message above.</tt> <b class="userinput"><tt>[enter]</tt></b>
<tt class="computeroutput">Checking for PygreSQL availability : NO.
ERROR : PygreSQL not available !
PygreSQL is mandatory if you want to use PostgreSQL as the quota storage backend.
You may continue safely if you don't need this functionnality.
PygreSQL is missing. Do you want to continue anyway (y/N) ?</tt> <b class="userinput"><tt>y</tt></b>
<tt class="computeroutput">Checking for mxDateTime availability : OK
Checking for Python-LDAP availability : OK
Checking for SNMP Tools availability : OK
Checking for Netatalk availability : OK
running install
running build
running build_py
running build_scripts
running install_lib

...

dpkg-deb --build debian/tmp ..
dpkg-deb: construyendo el paquete `pykota' en `../pykota_1.19alpha20.cvs.20040611-1_all.deb'.
 dpkg-genchanges -b
dpkg-genchanges: binary-only upload - not including any source code
dpkg-buildpackage: binary only upload (no source included)</tt></pre></td></tr></table></div><p>La acción anterior debería haber generado un archivo <i class="emphasis">deb</i>
		en el directorio padre del actual. El archivo en cuestión debería denominarse
		<tt class="filename">pykota_1.19alpha20.cvs.20040611-1_all.deb</tt>.</p><p>A partir de este momento, ya se está en disposición de instalar PyKota,
		el siguiente capítulo mostrará la forma de hacerlo.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pykota-obtencion-introduccion.html">Anterior</a> </td><td width="20%" align="center"><a accesskey="u" href="pykota-obtencion.html">Subir</a></td><td width="40%" align="right"> <a accesskey="n" href="pykota-instalacion.html">Siguiente</a></td></tr><tr><td width="40%" align="left" valign="top">17.1. Introducción </td><td width="20%" align="center"><a accesskey="h" href="index.html">Inicio</a></td><td width="40%" align="right" valign="top"> Capítulo 18. Instalación</td></tr></table></div></body></html>
