Cómo crear un paquete Debian en 3 pasos

paqueteExisten varias formas de crear un paquete Debian. En este artículo veremos cómo crearlo con las herramientas equivs, para la creación de un paquete sencillo (por ejemplo que se quiera empaquetar un binario). Sin preámbulos veamos el procedimiento:

Requisitos

Necesitaremos instalar previamente las herramientas que se usará, en particular:

aptitude install equivs

Procedimiento

A modo de ejemplo vamos a empaquetar unos scripts y una tarea programada en un archivo .deb. Estos son los pasos:

Crear el archivo plantilla. Para ello usaremos la orden equivs-control, la cual genera un archivo base que luego podremos editar para quitar los comentarios en las opciones de interes. Para generar la plantilla usamos la siguiente orden:

$ equivs-control backups

Editar la plantilla, que en este ejemplo se llama backups. Colocar los datos necesarios para la creación del paquete descomentando los campos que se necesiten editar:

### Commented entries have reasonable defaults.

### Uncomment to edit them.

# Source:Section: miscDPriority:

optionalHomepage: www.lgallardo.com

Standards-

Version: 3.9.2

Package: backupsVersion:

1.1Maintainer: Nombre del mantenedor <email@net.net>
# Pre-Depends:
# Depends:
# Recommends:
# Suggests:
# Provides:
# Replaces:Architecture: all
# Copyright:
# Changelog:Readme: README.Debian
# Extra-Files:

Files: backup.sh /usr/local/bin/ restore.sh /usr/local/bin/ backups-cron /etc/cron.d/
Description: Backups scripts Scripts for backuping up files on Debian systems

Para este ejemplo se debe tener creados los archivos backup.sh, restore.sh, backups-cron y README.debian, este último para que no coloque el README genérico.

Crear el paquete. Solo escribe la siguiente orden:

$equivs-build backups

Esto generará el paquete de nombre backups_1.1_all.deb. Para consultar la información del mismo podemos ejecutar los siguiente:

$ dpkg -I backups_1.1_all.deb

new debian package,
version 2.0.
size 2396 bytes: control archive=582 bytes. 25 bytes,
1 lines conffiles 302 bytes, 12 lines control 322 bytes, 5 lines md5sums
Package: backups
Version: 1.1
Architecture: all
Maintainer: Nombre del mantenedor <email@net.net>
Architecture: all
Readme: README.debian
Installed-Size: 42
Section: misc
Priority: optional
Homepage: www.com
Description:
Backups scripts Scripts for backuping up files on Debian systems

¡Eso es todo, ya creaste tu primer paquete Debian!

Fuente

Dejar un comentario?

7 Comentarios.

  1. If some one needs expert view regarding blogging and
    site-building after that i suggest him/her to pay a
    visit this blog, Keep up the fastidious work.

  2. Hello exceptional blog! Does running a blog similar to
    this require a lot of work? I’ve virtually no knowledge of
    programming however I had been hoping to start my own blog in the near future.

    Anyhow, should you have any suggestions or techniques for new blog owners please share.
    I know this is off topic nevertheless I simply had to ask.

    Appreciate it!

  3. The end result is just a short walk from downtown, from the Latin word fluxus meaning sell house in skyrim
    to flow. I believe it is easy to administer the entire project successfully, without confusion
    or conflict.

  4. This design is incredible! You most certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Great job. I really loved what you had
    to say, and more than that, how you presented it.
    Too cool!

  5. Admiring the time and energy you put into your site
    and detailed information you offer. It’s great to come across a blog every once in a while
    that isn’t the same outdated rehashed material. Fantastic
    read! I’ve saved your site and I’m including your RSS feeds to my
    Google account.

  6. First of all I would like to say terrific blog!
    I had a quick question which I’d like to ask if you
    don’t mind. I was curious to know how you center yourself and clear
    your thoughts before writing. I’ve had trouble clearing my thoughts in getting my ideas out.
    I do enjoy writing but it just seems like the first
    10 to 15 minutes are wasted just trying to figure out how to begin. Any recommendations or
    hints? Appreciate it!

  7. Aw, this was an incredibly good post. Taking a few minutes and actual effort to generate a very good article… but what can I say…
    I hesitate a lot and don’t manage to get anything
    done.

Deje un comentario


NOTA - Puede usar estosHTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Translate »