pbuilder ======== Que es pbuilder =============== pbuilder [0][1] es el personal builder (generador personal) de paquetes binarios debian a partir del paquete fuente debian. Es personal en el sentido de uso privado por una sola persona, sobre todo porque corre bajo el usuario root. [0] http://packages.debian.org/unstable/devel/pbuilder [1] http://packages.qa.debian.org/pbuilder Por ejemplo, el paquete fuente debian nfs-utils [2] version 1:1.0.7-3 consta de tres ficheros (los que aparecen abajo del todo y a la derecha en [2]): · nfs-utils_1.0.7-3.dsc · nfs-utils_1.0.7.orig.tar.gz · nfs-utils_1.0.7-3.diff.gz [2] http://packages.qa.debian.org/n/nfs-utils.html Los paquetes binarios que se generan de ese paquete fuente debian usando pbuilder en la architectura de hardware i386 son: · nfs-common_1.0.7-3_i386.deb · nfs-kernel-server_1.0.7-3_i386.deb · nhfsstone_1.0.7-3_i386.deb Por que usar pbuilder ===================== 1. Comprobar que las dependencias para generar los paquetes binarios estan correctas y no falta ninguna. 2. No tener que instalar todas las dependencias en mi maquina debian. Durante las transiciones que hemos tenido en unstable recientemente, al intentar instalar algunas dependencias, dpkg queria borrar un numero considerable de paquetes. Una solucion a ese problema es pbuilder. 3. Para generar paquetes binarios para una de las distribucciones debian oldstable/stable/unstable desde otra distribuccion debian o desde una distribuccion de linux basada en debian, por ejemplo ubuntu. 4. Para probar si todos los paquetes fuentes de debian no fallan generando los paquetes binarios. Como usar pbuilder ================== pbuilder crea un systema chroot y genera los paquetes binarios en el chroot. Usa apt [3][4] y un mirror de debian. [3] http://packages.debian.org/unstable/admin/apt [4] http://packages.qa.debian.org/apt En /etc/pbuilderrc se configura el mirror de debian. La imagen comprimida del chroot y los resultados apareceran en /var/cache/pbuilder/base.tgz y /var/cache/pbuilder/result/, respectivamente. Para crear el chroot, pbuilder usa debootstrap/cdebootstrap [5][6] y el comando es: pbuilder create Para actualizar la imagen comprimida del chroot: pbuilder update Para generar los paquetes binarios: pbuilder build Por ejemplo: pbuilder build nfs-utils_1.0.7-3.dsc [5] http://packages.debian.org/unstable/admin/debootstrap [6] http://packages.debian.org/unstable/admin/cdebootstrap Ejemplos de pbuilder ==================== Junichi Uekawa en [7] muestra como cambiar una imagen chroot stable de pbuilder a una imagen chroot unstable: pbuilder create --distribution sarge pbuilder update --distribution sid --override-config [7] http://lists.debian.org/debian-devel/2005/07/msg00649.html En [8] Junichi da un ejemplo para instalar gnupg en una imagen stable de pbuilder: pbuilder create --distribution sarge pbuilder login --save-after-login chroot# vi /etc/apt/sources.list # and edit it to point to sid chroot# apt-get update chroot# apt-get install apt gnupg chroot# apt-get update chroot# exit [8] http://lists.debian.org/debian-devel/2005/07/msg00706.html En [9] Blars Blarson indica como usar pbuilder para generar los paquetes binarios manualmente: pbuilder login sed -i~ -e 's/#//g' /etc/apt/sources.list cd /tmp/build apt-get build-dep $package apt-get source $package cd $package-ver dpkg-buildpackage -us -uc [9] http://lists.debian.org/debian-devel/2005/10/msg00782.html Otros enlaces ============= · pbuilder man page http://compsoc.dur.ac.uk/cgi-bin/man/man2html?pbuilder+8 · pbuilder User's Manual http://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html · Testing package building with pbuilder http://www.debian-administration.org/articles/114/print · Junichi's DebConf4 pbuilder paper http://www.netfort.gr.jp/~dancer/column/data/20040505-pbuiler-paper.pdf · pbuilder en ubuntu https://wiki.ubuntu.com/PbuilderHowto Este documento esta disponible en: http://people.debian.org/~anibal/talks/20050910-debian-peru.txt Copyright (c) 2005 Anibal Monsalve Salazar Permission is hereby granted, free of charge, to any person obtaining a copy of this document (the "Document"), to deal in the Document without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Document, and to permit persons to whom the Document is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Document. THE DOCUMENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DOCUMENT OR THE USE OR OTHER DEALINGS IN THE DOCUMENT.