Empaquetado Debian

Embed Size (px)

Citation preview

Plantilla MSWL Caixanova V.0.1

Debian

Debian Packages

Index

Introduction

Package Information

Making a Debian Package

Debian Quality Package

Debian ports/backport

Exercise

Introduction

Easy way to install and configure software, documentation, libraries...

Packages with dependences -> less packages sizes -> flexibility.

Package for Evolution does not include gtk libraries.

Meta-information about the package, allow different information search.

Package Information

Package: acpid Version: 1.0.4-5ubuntu9 Architecture: amd64 Maintainer: Ubuntu Core developers Installed-Size: 188 Depends: libc6 (>= 2.4), lsb-base (>= 1.3-9ubuntu3), module-init-tools (>= 3.1-rel-2ubuntu2), sysv-rc (>= 2.86.ds1-14.1ubuntu2) Section: admin Priority: optional Description: Utilities for using ACPI power management Modern computers support the Advanced Configuration and Power Interface (ACPI) to allow intelligent power management on your system and to query battery and configuration status. . ACPID is a completely flexible, ... Original-Maintainer: Cajus Pollmeier

Package Information

Debian Package is an ar file with:

Debian-binary: package format version

control.tar.gz: meta-information, scripts

data.tar.gz: installation files

Making a Debian Package

Sources directory with Makefile, script or something to compile. Autotools -> right way -> Debian.

Build-depends and depends.

debian directory in the root directory of the sources.

debian directory with information about the package and its files. Meta-Information.

Making a Debian Package

Some necessary packages:

autotools-dev

dh_make

fakeroot

devscripts

Making a Debian Package

Generate debian directory:

dh_make

Package Type (s/m/l/k..)

Original sources should be indicated (.tar.gz) or created using the actual sources directory.

Debian sources packages include differences from original sources.

DEBNAME,DEBFULLNAME,DEBEMAIL variables.

Making a Debian Package

Files in debian directory:

Changelog

Control

Rules

Copyright

preinst | postinst | prerm | postrm

install

Multiple Packages:

package1.install packag2.postinstall

Making a Debian Package

Other files

Manpages

paquete.manpages -> manpages files in the package

manpage.1, manpage.2 -> man pages files to be referenced from paquete.manpages

dirs

Directories to be created not included in the install

Docs

Documents to be included in the packages

Making a Debian Package

Changelog

Changes in the package

Version, priority.

Bug fixed

debchange | debchange -i (increment X 1.0.0-X) | debchange -v version (new version)

Making a Debian Package

Control

Dependences

Conflicts

Recommends

Suggests

Description

Making a Debian Package

Rules

The most important

Rules to compile (Makefile), easier using autotools.

Compile soures and generate a temporal directory with all the files to be included in the package.

Making a Debian Package

Copyright

Author

Copyright

License

Making a Debian Package

Scripts

#!/bin/sh -e (abort with error)

Package removing, options passed to the script:

upgrade, remove, purge, deconfigure, failed-upgraded, abort-upgraded

Package installing, options passed to the script:

install, upgrade, abort-upgrade, configure

Making a Debian Package

Multiple Packages

Different entries in debian/contol

Each package have his own .install, .postrm, etc.

Making a Debian Package

Generating package

dpkg-buildpackage -rfakeroot

debuild

Scripts that make several actions:

make clean

dpkg-source (generate source.tar.gz and diff.gz)

configure

Make

make install DESTDIR=$(CURDIR)/debian/project

Making a Debian Package

Generated files

package.build

Generation package log

package.changes

Package information and changelog

package.tar.gz and package-orig.tar.gz

package-diff.gz

Package-dsc

Package description

Making a Debian Package

Mandatory files in a repository

package.changes

package.dsc

Files included

package.diff.gz

package.orig.tar.gz

package.tar.gz

package.deb

Debian Quality Package

Lintian - dissects Debian packages and reports bugs and policy violations.

Lintian web page to search warning/errors.

Linda another Debian Package checker.

http://www.debian.org/doc/debian-policy/index.html Debian Policy Manual

Debian ports/backport

Sources from a Debian Package

Change information from Debian Meta-Information files

Generate a new package

Useful to get packages from later distributions

Debian ports/backport

Useful to get packages in other architectures

Chroot, debootstrap

Exercise

Make your own Debian Package

Try to have few errors/warnings with Lintian.

Pulse para editar el formato del texto de ttulo

Pulse para editar los formatos del texto del esquema

Segundo nivel del esquema

Tercer nivel del esquema

Cuarto nivel del esquema

Quinto nivel del esquema

Sexto nivel del esquema

Sptimo nivel del esquema

Octavo nivel del esquema

Noveno nivel del esquema

Master on Free Software