Chapter 6. Basics for packaging

Table of Contents

6.1. Fluxo de trabalho de empacotamento
6.2. debhelper package
6.3. Nome e versão do pacote
6.4. Pacote Debian nativo
6.5. debian/rules file
6.6. debian/control file
6.7. debian/changelog file
6.8. debian/copyright file
6.9. debian/patches/* files
6.10. debian/source/include-binaries file
6.11. debian/watch file
6.12. debian/upstream/signing-key.asc file
6.13. debian/salsa-ci.yml file
6.14. Other debian/* files

Here, a broad overview is presented without using VCS operations for the basic rules of Debian packaging focusing on the non-native Debian package in the 3.0 (quilt) format.

[Note]Note

Alguns detalhes são saltados intencionalmente para clarificar. Por favor leia os manuais do dpkg-source(1), dpkg-buildpackage(1), dpkg(1), dpkg-deb(1), deb(5), etc.

O pacote fonte Debian é um conjunto de ficheiros de entrada usados para compilar o pacote binário Debian e não é um ficheiro único.

O pacote binário Debian é um ficheiro de arquivo especial que contém um conjunto de dados binários instaláveis com a sua informação associada.

Um único pacote fonte Debian pode gerar múltiplos pacotes binário Debian definidos no ficheiro debian/control.

The non-native Debian package in the Debian source format 3.0 (quilt) is the most normal Debian source package format.

[Note]Note

Existem muitos scripts invólucro. Use-os para simplificar o seu fluxo de trabalho mas certifique-se que compreende as suas bases internas.

The Debian packaging workflow to create a Debian binary package involves generating several specifically named files (see Section 6.3, “Nome e versão do pacote””) as defined in the Debian Policy Manual. This workflow can be summarized in 10 steps with some over simplification as follows.

  1. O tarball de autor é descarregado como ficheiro pacote-versão.tar.gz.
  2. O tarball de autor é descompactado para criar muitos ficheiros sob o directório pacote-versão/.
  3. O tarball de autor é copiado (ou ligado por link simbólico) para o nome de ficheiro particular nomepacote_versão.orig.tar.gz.

    • o caractere que separa pacote e versão é alterado de - (hífen) para _ (underscore)
    • é adicionado .orig à extensão do ficheiro.
  4. Os ficheiros de especificação de pacote Debian são adicionados à fonte do autor sob o directório pacote-versão/debian/.

    • Ficheiros de especificação requeridos sob o directório debian/:

      debian/rules
      O script executável para compilar o pacote Debian (veja Section 6.5, “debian/rules file”)
      debian/control
      O ficheiro de configuração do pacote que contém o nome do pacote fonte, as dependências de compilação da fonte, o nome do pacote binário, as dependências binárias, etc. (veja Section 6.6, “debian/control file”)
      debian/changelog
      O ficheiro de histórico de pacote Debian que define a versão de pacote do autor e a revisão Debian na sua primeira linha (veja Section 6.7, “debian/changelog file”)
      debian/copyright
      O resumo de copyright e licença (veja Section 6.8, “debian/copyright file”)
    • Ficheiros de especificação opcionais sob debian/* (veja Section 6.14, “Other debian/* files”):
    • The debmake command invoked in the package-version/ directory may be used to provide the initial template of these configuration files.

      • Os ficheiros de especificação requeridos são gerados mesmo com a opção -x0.
      • O comando debmake não sobrescreve nenhuns ficheiros de configuração existentes.
    • These files must be manually edited to their perfection according to the Debian Policy Manual and Debian Developer’s Reference.
  5. The dpkg-buildpackage command (usually from its wrapper debuild or sbuild) is invoked in the package-version/ directory to make the Debian source and binary packages by invoking the debian/rules script.

    • The current directory is set as: CURDIR=/path/to/package-version/
    • Create the Debian source package in the Debian source format 3.0 (quilt) using dpkg-source(1)

      • package_version.orig.tar.gz (copy or symlink of package-version.tar.gz)
      • package_version-revision.debian.tar.xz (tarball of debian/ found in package-version/)
      • package_version-revision.dsc
    • Build the source using debian/rules build into $(DESTDIR)

      • DESTDIR=debian/binarypackage/ for single binary package [11]
      • DESTDIR=debian/tmp/ for multi binary package
    • Cria o pacote binário Debian usando dpkg-deb(1), dpkg-genbuildinfo(1), e dpkg-genchanges(1).

      • pacotebinário_versão-revisão_arch.deb
      • …​ (There may be multiple Debian binary package files.)
      • pacote_versão-revisão_arch.changes
      • pacote_versão-revisão_arch.buildinfo
  6. Verifica a qualidade do pacote Debian com o comando lintian. (recomendado)

  7. Teste a fiabilidade do pacote binário Debian gerado manualmente ao instala-lo e ao correr os seus programas.
  8. Após confirmar a fiabilidade, prepare os ficheiros para o envio apenas-fonte normal para o arquivo Debian.
  9. Sign the Debian package file with the debsign command using your private GPG key.

    • Use debsign package_version-revision_source.changes (normal source-only upload situation)
    • Use debsign package_version-revision_arch.changes (exceptional binary upload situation such as NEW uploads, and security uploads) files for the binary Debian package upload.
  10. Upload the set of the Debian package files with the dput command to the Debian archive.

    • Use dput package_version-revision_source.changes (source-only upload)
    • Use dput package_version-revision_arch.changes (binary upload)

O testar da compilação e confirmar da fiabilidade do pacote binário como em cima é obrigação moral como um desenvolvedor Debian diligente mas neste momento não há barreira física para as pessoas saltarem tais operações para o envio apenas-fonte.

Aqui, por favor substitua cada parte do nome de ficheiro como:

  • a parte pacote pelo nome de pacote fonte Debian
  • a parte pacotebinário pelo nome do pacote binário Debian
  • a parte versão pela versão do autor
  • a parte revisão pela revisão Debian
  • the arch part with the package architecture (e.g., amd64)

Veja também Envios apenas-fonte.

[Tip]Tip

São praticadas muitas estratégias de gestão de patch e utilização de VCS para o empacotamento Debian. Você não precisa de as usar todas.

[Tip]Tip

There is very extensive documentation in Chapter 6. Best Packaging Practices in the Debian Developer’s Reference. Please read it.

Although a Debian package can be made by writing a debian/rules script without using the debhelper package, it is impractical to do so. There are too many modern Debian Policy” required features to be addressed, such as application of the proper file permissions, use of the proper architecture dependent library installation path, insertion of the installation hook scripts, generation of the debug symbol package, generation of package dependency information, generation of the package information files, application of the proper timestamp for reproducible build, etc.

Debhelper package provides a set of useful scripts in order to simplify Debian’s packaging workflow and reduce the burden of package maintainers. When properly used, they will help packagers handle and implement Debian Policy required features automatically.

O fluxo de trabalho de empacotamento Debian moderno pode ser organizado num fluxo de trabalho simples modular ao:

  • usar o comando dh para invocar muitos scripts utilitários automaticamente a partir do pacote debhelper, e
  • configurar o seu comportamento com ficheiros de configuração declarativos no directório debian/.

Você deve quase sempre usar o debhelper como sua dependência de compilação do pacote. Este documento também assume que você está a usar uma versão razoavelmente contemporânea do debhelper para lidar com os trabalhos de empacotamento nos seguintes contextos.

[Note]Note

For debhelper compat >= 9, the dh command exports compiler flags (CFLAGS, CXXFLAGS, FFLAGS, CPPFLAGS and LDFLAGS) with values as returned by dpkg-buildflags if they are not set previously. (The dh command calls set_buildflags defined in the Debian::Debhelper::Dh_Lib module.)

[Note]Note

debhelper(1) changes its behavior with time. Please make sure to read debhelper-compat-upgrade-checklist(7) to understand the situation.

Se a fonte do autor vem como hello-0.9.12.tar.gz, você pode tirar hello como o nome do pacote fonte do autor e 0.9.12 como a versão do autor.

Existem algumas limitações para quais caracteres podem ser usados como parte do pacote Debian. A limitação mais notável é a proibição de letras maiúsculas no nome do pacote. Aqui está um sumário como um conjunto de expressões regulares:

  • Upstream package name (-p): [-+.a-z0-9]{2,}
  • Binary package name (-b): [-+.a-z0-9]{2,}
  • Upstream version (-u): [0-9][-+.:~a-z0-9A-Z]*
  • Debian revision (-r): [0-9][+.~a-z0-9A-Z]*

See the exact definition in Chapter 5 - Control files and their fields” in the Debian Policy Manual.

Você tem de ajustar o nome do pacote e a versão do autor de acordo com o empacotamento Debian.

De modo a se gerir efectivamente o nome do pacote e a informação da versão sob ferramentas populares como o comando aptitude, é boa ideia manter o comprimento do nome do pacote a ser igual ou menor que 30 caracteres, e o comprimento total da versão e revisão a ser igual ou menor que 14 caracteres. [12]

De modo a evitar colisões de nomes, o nome de pacote binário visível ao utilizador não deve ser escolhido a partir de nenhumas palavras genéricas.

Se o autor não usar um esquema normal de indicação da versão como 2.30.32 mas usa algum tipo da data como 11Apr29, uma string aleatória de código, ou um valor hash VCS como parte da a versão, certifique-se de a remover da versão de autor. Tal informação pode ser guardada no ficheiro debian/changelog. Se você precisa de inventar uma string de versão, use o formato AAAAMMDD tal como 20110429 como versão do autor. Isto assegura que o comando dpkg interpreta as versões posteriores corretamente como atualizações. Se você precisa de assegurar uma transição suave para um esquema normal de versão como 0.1 no futuro, então use o formato 0~AAMMDD como ex 0~110429 como versão do autor.

As strings de versão podem ser comparadas usando o comando dpkg como se segue.

$ dpkg --compare-versions ver1 op ver2

A regra de comparação de versão pode ser resumida a:

  • As strings são comparadas desde o inicio para o fim.
  • As letras são mais largas que os dígitos.
  • Números são comparados como inteiros.
  • As letras são comparadas em ordem de código ASCII.

Existem regras especiais para os caracteres ponto (.), mais (+), e til (~), como se segue.

0.0 < 0.5 < 0.10 < 0.99 < 1 < 1.0~rc1 < 1.0 < 1.0+b1 < 1.0+nmu1 < 1.1 < 2.0

Um caso complicado ocorre quando o autor lança hello-0.9.12-ReleaseCandidate-99.tar.gz como o pré-lançamento de hello-0.9.12.tar.gz. Você pode assegurar que a atualização de pacote Debian vai funcionar bem ao renomear a fonte do autor para hello-0.9.12~rc99.tar.gz.

The non-native Debian package in the Debian source format 3.0 (quilt) is the most normal Debian source package format. The debian/source/format file should have 3.0 (quilt) in it as described in dpkg-source(1). The above workflow and the following packaging examples always use this format.

O pacote Debian nativo é o formato de pacote binário Debian raro. Só pode ser usando quando o pacote é útil e valoroso apenas para Debian. Assim , o seu uso é geralmente desencorajado.

[Caution]Caution

A native Debian package is often accidentally built when its upstream tarball is not accessible from the dpkg-buildpackage command with its correct name package_version.orig.tar.gz . This is a typical newbie mistake caused by making a symlink name with - instead of the correct one with _.

Um pacote nativo Debian não tem separação entre o código do autor e as modificações Debian e consistem apenas do seguinte:

  • package_version.tar.gz (copy or symlink of package-version.tar.gz with debian/* files.)
  • package_version.dsc

If you need to create a native Debian package, create it in the Debian source format 3.0 (native) using dpkg-source(1).

[Tip]Tip

There is no need to create the tarball in advance if the native Debian package format is used. The debian/source/format file should have 3.0 (native) in it as described in dpkg-source(1) and The debian/source/format file should have the version without the Debian revision (1.0 instead of 1.0-1). Then, the tarball containing is generated when dpkg-source -b is invoked in the source tree.

The debian/rules file is the executable script which re-targets the upstream build system to install files in the $(DESTDIR) and creates the archive file of the generated files as the deb file. The deb file is used for the binary distribution and installed to the system using the dpkg command.

The Debian policy compliant debian/rules file supporting all the required targets can be written as simple as [13]:

debian/rules simples: 

#!/usr/bin/make -f
#export DH_VERBOSE = 1

%:
	dh $@

The dh command functions as the sequencer to call all required dh target commands at the right moment. [14]

  • dh clean : limpa ficheiros na árvore fonte.
  • dh build : compila a árvore fonte
  • dh build-arch : compila a árvore fonte para pacotes dependentes da arquitectura
  • dh build-indep : compila a árvore fonte para pacotes independentes da arquitectura
  • dh install : instala os ficheiros binário em $(DESTDIR)
  • dh install-arch : instala os ficheiros binário em $(DESTDIR) para pacotes dependentes da arquitectura
  • dh install-indep : instala os ficheiros binário em $(DESTDIR) para pacotes independentes da arquitectura
  • dh binary : gera o ficheiro deb
  • dh binary-arch : gera o ficheiro deb para pacotes dependentes de arquitectura
  • dh binary-indep : gera o ficheiro deb para pacotes independentes da arquitectura

Here, $(DESTDIR) path depends on the build type.

  • DESTDIR=debian/binarypackage/ for single binary package [15]
  • DESTDIR=debian/tmp/ for multi binary package

See Section 8.2, “Customized debian/rules and Section 8.3, “Variables for debian/rules for customization.

[Tip]Tip

Setting export DH_VERBOSE = 1 outputs every command that modifies files on the build system. Also it enables verbose build logs for some build systems.

O ficheiro debian/control consiste de blocos de meta-dados separados por uma linha vazia. Cada bloco de meta-dados define o seguinte por esta ordem:

  • meta-dados para os pacotes fonte Debian
  • meta-dados para os pacotes binário Debian

See Chapter 5 - Control files and their fields” of the Debian Policy Manual for the definition of each meta data.

[Note]Note

The debmake command sets the debian/control file with Build-Depends: debhelper-compat (= 13) to set the debhelper compatibility level.

[Tip]Tip

If an existing package has lower than debhelper compatibility level 13, probably it’s time to update its packaging.

The debian/changelog file records the Debian package history.

  • This should be edited using the debchange command (alias dch).
  • This defines the upstream package version and the Debian revision in its first line.
  • The changes need to be documented in the specific, formal, and concise style.

    • If Debian maintainer modification fixes reported bugs, add Closes: #<bug_number> to close those bugs.
  • Mesmo que seja você próprio a enviar o seu pacote, você tem de documentar todas as alterações não-triviais visíveis-ao-utilizador tais como:

    • as correções de bugs relacionada com segurança.
    • as alterações à interface de utilizador.
  • Se você está a pedir ao seu patrocinador para o enviar, você deve documentar as alterações de forma compreensiva, incluindo todas as relacionadas com o empacotamento, para ajudar na revisão do seu pacote.

    • The sponsor shouldn’t be forced to second guess your thought behind your package.
    • O tempo do patrocinador é mais valioso que o seu.

After finishing your packaging and verifying its quality, please execute the dch -r command and save the finalized debian/changelog file with the suite normally set to unstable. [16] If you are packaging for backports, security updates, LTS, etc., please use the appropriate distribution names instead.

O comando debmake cria o ficheiro modelo inicial com a versão do pacote de autor e a revisão Debian. A distribuição é definida para UNRELEASED para prevenir envio acidental para o arquivo Debian.

[Tip]Tip

The date string used in the debian/changelog file can be manually generated by the LC_ALL=C date -R command.

[Tip]Tip

Use uma entrada no debian/changelog com uma string de versão tal como 1.0.1-1~rc1 quando experimentar. Depois, when you experiment. Then, arrume tais entradas changelog numa entrada única para o pacote oficial.

The debian/changelog file is installed in the /usr/share/doc/binarypackage directory as changelog.Debian.gz by the dh_installchangelogs command.

O registo de alterações do autor é instalado no directório /usr/share/doc/pacotebinário como changelog.gz.

O registo de alterações do autor é descoberto automaticamente pelo dh_installchangelogs usando a correspondência não sensível a maiúsculas minúsculas do seu nome de ficheiro para changelog, changes, changelog.txt, changes.txt, history, history.txt, ou changelog.md e procurado nos directórios ./ doc/ ou docs/.

Debian takes the copyright and license matters very seriously. The Debian Policy Manual enforces having a summary of them in the debian/copyright file in the package.

The debmake command creates the initial debian/copyright template file.

A menos que requerido especificamente para ser pedante com a opção -P, o comando debmake salta reportar para ficheiros auto-gerados com licenças permissivas para ser prático.

[Caution]Caution

O ficheiro debian/copyright deve ser ordenado para manter os padrões de ficheiro genérico no topo da lista. Veja Section 15.6, “debmake -k.

[Note]Note

Se você encontrar problemas com o verificador de licença, por favor preencha um relatório de bug para o pacote debmake com a parte problemática do texto a conter o copyright e a licença.

As demonstrated in Section 5.9, “Step 3 (alternatives): Modification to the upstream source””, the debian/patches/ directory holds

  • patch-file-name.patch files providing -p1 patches and
  • the series file which which defines how these patches are applied.

See how these files are used in:

[Note]Note

Header texts of these patches should conform to DEP-3.

[Note]Note

If you want to use VCS tools such as git, gbp and dgit to create and manage these patches after learning basics here, please refer to later in Chapter 10, Packaging with git.

The dpkg-source --commit command functions like dquilt but has one advantage over the dquilt command. While the dquilt command can’t handle modified binary files, the dpkg-source --commit command detects modified binary files and lists them in the debian/source/include-binaries file to include them in the Debian tarball as a part of the Debian source package.

The uscan(1) command downloads the latest upstream version using the debian/watch file. E.g.:

Basic debian/watch file: 

version=4
https://ftp.gnu.org/gnu/hello/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@

The uscan command may verify the authenticity of the upstream tarball with optional configuration (see Section 6.12, “debian/upstream/signing-key.asc file””).

See uscan(1), Section 8.4, “Novo lançamento do autor”, Section 7.1, “Fix with Files-Excluded, and Section 10.10, “Manage patch queue with gbp-pq for more.

Some packages are signed by a GPG key and their authenticity can be verified using their public GPG key.

For example, GNU hello” can be downloaded via HTTP from https://ftp.gnu.org/gnu/hello/ . There are sets of files:

  • hello-versão.tar.gz (fonte de autor)
  • hello-versão.tar.gz.sig (assinatura desanexada)

Vamos pegar no conjunto da versão mais recente.

Download the upstream tarball and its signature. 

$ wget https://ftp.gnu.org/gnu/hello/hello-2.9.tar.gz
 ...
$ wget https://ftp.gnu.org/gnu/hello/hello-2.9.tar.gz.sig
 ...
$ gpg --verify hello-2.9.tar.gz.sig
gpg: Signature made Thu 10 Oct 2013 08:49:23 AM JST using DSA key ID 80EE4A00
gpg: Can't check signature: public key not found

If you know the public GPG key of the upstream maintainer from the mailing list, use it as the debian/upstream/signing-key.asc file. Otherwise, use the hkp keyserver and check it via your web of trust.

Download public GPG key for the upstream. 

$ gpg --keyserver hkp://keys.gnupg.net --recv-key 80EE4A00
gpg: requesting key 80EE4A00 from hkp server keys.gnupg.net
gpg: key 80EE4A00: public key "Reuben Thomas <rrt@sc3d.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
$ gpg --verify hello-2.9.tar.gz.sig
gpg: Signature made Thu 10 Oct 2013 08:49:23 AM JST using DSA key ID 80EE4A00
gpg: Good signature from "Reuben Thomas <rrt@sc3d.org>"
  ...
Primary key fingerprint: 9297 8852 A62F A5E2 85B2  A174 6808 9F73 80EE 4A00

[Tip]Tip

If your network environment blocks access to the HKP port 11371, use hkp://keyserver.ubuntu.com:80 instead.

Após confirmar que o ID de chave 80EE4A00 é de confiança, descarregue a sua chave pública para o ficheiro debian/upstream/signing-key.asc.

Set public GPG key to debian/upstream/signing-key.asc

$ gpg --armor --export 80EE4A00 >debian/upstream/signing-key.asc

With the above debian/upstream/signing-key.asc file and the following debian/watch file, the uscan command can verify the authenticity of the upstream tarball after its download. E.g.:

Improved debian/watch file with GPG support: 

version=4
opts="pgpsigurlmangle=s/$/.sig/" \
https://ftp.gnu.org/gnu/hello/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@

Install Salsa CI configuration file. See Section 10.3, “Salsa CI service”.

Podem ser adicionados ficheiros de configuração opcionais sob o directório debian/. A maioria deles são comandos de controle dh_* oferecidos pelo pacote debhelper mas existem alguns para os comandos dpkg-source, lintian e gbp.

[Tip]Tip

Even an upstream source without its build system can be packaged just by using these files. See Section 13.2, “Nenhum Makefile (shell, CLI)” as an example.

The alphabetical list of notable optional debian/binarypackage.* configuration files listed below provides very powerful means to set the installation path of files. Please note:

  • The "-x[01234]" superscript notation that appears in the following list indicates the minimum value for the debmake -x option that generates the associated template file. See Section 15.9, “debmake -x” or debmake(1) for details.
  • For a single binary package, the binarypackage. part of the filename in the list may be removed.
  • For a multi binary package, a configuration file missing the binarypackage part of the filename is applied to the first binary package listed in the debian/control.
  • When there are many binary packages, their configurations can be specified independently by prefixing their name to their configuration filenames such as package-1.install, package-2.install, etc.
  • Alguns ficheiros de configuração modelo podem não ser criados pelo comando debmake. Em tais casos, você precisa de cria-los com um editor.
  • Some configuration template files generated by the debmake command with an extra .ex suffix need to be activated by removing that suffix.
  • Ficheiros modelo de configuração não usados gerados pelo comando debmake devem ser removidos.
  • Copie ficheiros modelo de configuração como necessário para que os nomes de ficheiros correspondam aos seus nomes de pacote binário pertinentes.

    pacote-binário.bug-control -x3
    instalado como usr/share/bug/pacotebinário/control em pacotebinário. Veja Section 8.11, “Relatórios de bug”.
    pacote-binário.bug-presubj -x3
    instalado como usr/share/bug/pacotebinário/presubj em pacotebinário. Veja Section 8.11, “Relatórios de bug”.
    pacote-binário.bug-script -x3
    instalado como usr/share/bug/pacotebinário ou usr/share/bug/pacotebinário/script em pacotebinário. Veja Section 8.11, “Relatórios de bug”.
    binarypackage.bash-completion -x3

    List bash completion scripts to be installed.

    The bash-completion package is required for both build and user environments.

    Veja dh_bash-completion(1).

    clean -x2

    Lista ficheiros que devem ser removidos mas não são limpos pelo comando dh_auto_clean.

    Veja dh_auto_clean(1) e dh_clean(1).

    compat -x4

    Set the debhelper compatibility level. (deprecated)

    Use Build-Depends: debhelper-compat (= 13) in debian/control to specify the compatibility level and remove debian/compat.

    See COMPATIBILITY LEVELS in debhelper(7).

    binarypackage.conffiles -x3

    This optional file is installed into the DEBIAN directory within the binary package while supplimenting it with all the conffiles auto-detected by debhelper.

    This file is primarily useful for using "special" entries such as the remove-on-upgrade feature from dpkg(1).

    Se o programa que você está a empacotar requerer que cada utilizador modifique os ficheiros de configuração no directório /etc, existem duas maneiras populares de fazer com que não sejam ficheiros de configuração, mantendo o comando dpkg contente e caladinho.

    • Cria um link simbólico sob o directório /etc a apontar para um ficheiro sob o directório /var gerado pelos scripts do maintainer.
    • Cria um ficheiro gerado pelos scripts do maintainer sob o directório /etc.

    Veja dh_installdeb(1).

    binarypackage.config -x3
    Este é o script config do debconf usado para perguntar quaisquer questões necessárias para configurar o pacote. Veja Section 9.22, “debconf.
    pacote-binário.cron.hourly -x3

    Instalado no ficheiro etc/cron/hourly/pacote-binário em pacote-binário.

    Veja dh_installcron(1) e cron(8).

    pacote-binário.cron.daily -x3

    Instalado no ficheiro etc/cron/daily/pacote-binário em pacote-binário.

    Veja dh_installcron(1) e cron(8).

    pacote-binário.cron.weekly -x3

    Instalado no ficheiro etc/cron/weekly/pacote-binário em pacote-binário.

    Veja dh_installcron(1) e cron(8).

    pacote-binário.cron.monthly -x3

    Installed into the *etc/cron/monthly/*binarypackage file in binarypackage.

    Veja dh_installcron(1) e cron(8).

    pacote-binário.cron.d -x3

    Instalado no ficheiro etc/cron.d/pacote-binário em pacote-binário.

    Veja dh_installcron(1), cron(8), e crontab(5).

    pacote-binário.default -x3

    Se isto existir, é instalado em etc/default/pacote-binário em pacote-binário.

    Veja dh_installinit(1).

    binarypackage.dirs -x1

    Lista directórios a serem criados em pacote-binário.

    Veja dh_installdirs(1).

    Geralmente, isto não é necessário pois todos os comandos dh_install* criam os directórios requeridos automaticamente. Use isto apenas se encontrar problemas.

    binarypackage.doc-base -x1

    Instalado como o ficheiro de controle do doc-base em pacote-binário.

    See dh_installdocs(1) and Debian doc-base Manual (doc-base.html) provided by the doc-base package.

    binarypackage.docs -x1

    Lista ficheiros de documentação a serem instalados em pacote-binário.

    Veja dh_installdocs(1).

    pacote-binário.emacsen-compat -x3

    Instalado em usr/lib/emacsen-common/packages/compat/pacote-binário em pacote-binário.

    Veja dh_installemacsen(1).

    pacote-binário.emacsen-install -x3

    Instalado em usr/lib/emacsen-common/packages/install/pacote-binário em pacote-binário.

    Veja dh_installemacsen(1).

    pacote-binário.emacsen-remove -x3

    Instalado em usr/lib/emacsen-common/packages/remove/pacote-binário em pacote-binário.

    Veja dh_installemacsen(1).

    pacote-binário.emacsen-startup -x3

    Instalado em usr/lib/emacsen-common/packages/startup/pacote-binário em pacote-binário.

    Veja dh_installemacsen(1).

    binarypackage.examples -x1

    Lista ficheiros ou directórios exemplo a serem instalados em usr/share/doc/pacote-binário/examples/ em pacote-binário.

    Veja dh_installexamples(1).

    gbp.conf -x1

    Se isto existir, funciona como ficheiro de configuração para o comando gbp.

    Veja gbp.conf(5), gbp(1), e git-buildpackage(1).

    binarypackage.info -x1

    Lista ficheiros de informação a serem instalados em pacote-binário.

    Veja dh_installinfo(1).

    binarypackage.init -x4

    Installed into etc/init.d/binarypackage in binarypackage. (deprecated)

    Veja dh_installinit(1).

    binarypackage.install -x1

    Lista ficheiros que devem ser instalados mas não são instalados pelo comando dh_auto_install.

    Veja dh_install(1) e dh_auto_install(1).

    binarypackage.links -x1

    Lista pares de ficheiros de fonte e destino para serem ligados por link simbólico. Cada par deve ser posto na sua própria linha, com a fonte e destino separados por espaço em branco.

    Veja dh_link(1).

    pacote-binário.lintian-overrides -x3

    Instalado em usr/share/lintian/overrides/pacote-binário no directório de compilação do pacote. Este ficheiro é usado para suprimir diagnósticos do lintian erróneos.

    Veja dh_lintian(1), lintian(1) e Manual do Utilizador de Lintian.

    binarypackage.maintscript -x2

    If this optional file exists, debhelper uses this as the template to generate DEBIAN/binarypackage.{pre,post}{inst,rm} files within the binary package while adding -- "$@" to the dpkg-maintscript-helper(1) command.

    See dh_installdeb(1) and Chapter 6 - Package maintainer scripts and installation procedure in the Debian Policy Manual.

    manpage.* -x3

    Estes são ficheiros modelo de manuais gerados pelo comando debmake. Por favor renomeie estes para nomes de ficheiro apropriados e atualize o seu conteúdo.

    Debian Policy requires that each program, utility, and function should have an associated manual page included in the same package. Manual pages are written in nroff(1). If you are new to making a manpage, use manpage.asciidoc or manpage.1 as the starting point.

    binarypackage.manpages -x1

    Lista os manuais a serem instalados.

    Veja dh_installman(1).

    pacote-binário.menu (descontinuado, não mais instalado)

    tech-ctte #741573 decided Debian should use .desktop files as appropriate.

    Ficheiro de menu Debian instalado em usr/share/menu/pacote-binário em pacote-binário.

    Veja menufile(5) para o seu formato. Veja dh_installmenu(1).

    NEWS -x3

    Instalado em usr/share/doc/pacote-binário/NEWS.Debian.

    Veja dh_installchangelogs(1).

    patches/*

    Coleção de ficheiros patch -p1 que são aplicados à fonte do autor antes de se compilar o pacote.

    Nenhuns ficheiros patch são gerados pelo comando debmake.

    Veja dpkg-source(1), Section 4.4, “quilt setup” e Section 5.9, “Step 3 (alternatives): Modification to the upstream source”.

    patches/series -x1
    A sequência de aplicação dos ficheiros patch patches/*.
    pacote-binário.preinst -x2, pacote-binário.postinst -x2, pacote-binário.prerm -x2, pacote-binário.postrm -x2

    If these optional files exist, the corresponding files are installed into the DEBIAN directory within the binary package after enriched by debhelper. Otherwise, these files in the DEBIAN directory within the binary package is generated by debhelper.

    Whenever possible, simpler binarypackage.maintscript should be used instead.

    See dh_installdeb(1) and Chapter 6 - Package maintainer scripts and installation procedure in the Debian Policy Manual.

    See also debconf-devel(7) and 3.9.1 Prompting in maintainer scripts in the Debian Policy Manual.

    README.Debian -x1

    Instalado no primeiro pacote binário listado no ficheiro debian/control como usr/share/doc/pacote-binário/README.Debian.

    Este ficheiro fornece a informação especifica ao pacote Debian.

    Veja dh_installdocs(1).

    README.source -x1

    Installed into the first binary package listed in the debian/control file as usr/share/doc/binarypackage/README.source.

    If running dpkg-source -x on a source package doesn’t produce the source of the package, ready for editing, and allow one to make changes and run dpkg-buildpackage to produce a modified package without taking any additional steps, creating this file is recommended.

    See Debian policy manual section 4.14.

    pacote-binário.service -x3

    Se isto existir, será instalado em lib/systemd/system/pacote-binário.service em pacote-binário.

    Veja dh_systemd_enable(1), dh_systemd_start(1), e dh_installinit(1).

    source/format -x1

    O formato de pacote Debian.

    • Use 3.0 (quilt) to make this non-native package (recommended)
    • Use 3.0 (native) to make this native package

    See SOURCE PACKAGE FORMATS in dpkg-source(1).

    source/lintian-overrides -x3

    These file is not installed, but are scanned by the lintian command to provide overrides for the source package.

    Veja dh_lintian(1) e lintian(1).

    source/local-options -x1

    O comando dpkg-source usa este conteúdo como suas opções. As opções notáveis são:

    • unapply-patches
    • abort-on-upstream-changes
    • auto-commit
    • single-debian-patch

    Isto não está incluído no pacote fonte gerado e destina-se a ser cometido para o VCS do maintainer.

    See FILE FORMATS in dpkg-source(1).

    source/local-patch-header -x1

    Texto de formato livre que é colocado no topo da patch automática gerada.

    Isto não está incluído no pacote fonte gerado e destina-se a ser cometido para o VCS do maintainer.

    See FILE FORMATS in dpkg-source(1).

    source/options -x3
    Use source/local-options instead to avoid issues with NMUs. See FILE FORMATS in dpkg-source(1).
    source/patch-header -x4
    Use source/local-patch-header instead to avoid issues with NMUs. See FILE FORMATS in dpkg-source(1).
    binarypackage.symbols -x1

    Os ficheiros de símbolos, se presentes, são passados ao comando dpkg-gensymbols para serem processados e instalados.

    Veja dh_makeshlibs(1) e Section 9.16, “Símbolos de biblioteca”..

    binarypackage.templates -x3
    Isto é o ficheiro de modelos debconf usado para fazer perguntas necessárias para configurar o pacote. Veja Section 9.22, “debconf.
    tests/control -x1
    This is the RFC822-style test meta data file defined in DEP-8. See autopkgtest(1) and Section 9.4, “Integração contínua”.
    TODO -x3

    Instalado no primeiro pacote binário listado no ficheiro debian/control como usr/share/doc/pacote-binário/TODO.Debian.

    Veja dh_installdocs(1).

    pacote-binário.tmpfile -x3

    Se isto existir, será instalado em usr/lib/tmpfiles.d/pacote-binário.conf em pacote-binário.

    Veja dh_systemd_enable(1), dh_systemd_start(1), e dh_installinit(1).

    binarypackage.upstart -x4

    If this exists, it is installed into etc/init/package.conf in the package build directory. (deprecated)

    Veja dh_installinit(1).

    upstream/metadata -x1
    Per-package machine-readable metadata about upstream (DEP-12). See Upstream MEtadata GAthered with YAml (UMEGAYA).


[11] This is the default up to debhelper v13. At debhelper v14, it warns the default change. After debhelper v15, it will change the default to DESTDIR=debian/tmp/ .

[12] Para mais de 90% dos pacotes, o nome do pacote é igual ou menos que 24 caracteres; a versão de autor é igual ou menos que 10 caracteres e a revisão Debian é igual ou menos que 3 caracteres.

[13] O comando debmake gera um ficheiro debian/rules um pouco mais complicado. Mas está a parte central.

[14] Esta simplicidade está disponível desde a versão 7 do pacote debhelper. Este guia assume o uso de debhelper versão 13 ou mais recente.

[15] This is the default up to debhelper v13. At debhelper v14, it warns the default change. After debhelper v15, it will change the default to DESTDIR=debian/tmp/ .

[16] If you are using the vim editor, make sure to save this with the :wq command.