debian packages versão convenção

24

Estou usando o Debian / Ubuntu e confuso sobre versões de pacotes. Ao usar o comando dpkg -l , recebo:

ii  vim                                 2:7.3.429-2ubuntu2.1                Vi IMproved - enhanced vi editor
ii  vim-common                          2:7.3.429-2ubuntu2.1                Vi IMproved - Common files
ii  vim-runtime                         2:7.3.429-2ubuntu2.1                Vi IMproved - Runtime files
ii  vim-tiny                            2:7.3.429-2ubuntu2.1                Vi IMproved - enhanced vi editor - compact version
ii  virt-what                           1.11-1                              detect if we are running in a virtual machine
ii  w3m                                 0.5.3-5ubuntu1                      WWW browsable pager with excellent tables/frames support
ii  watershed                           6                                   reduce superfluous executions of idempotent command
ii  wget                                1.13.4-2ubuntu1                     retrieves files from the web
ii  whiptail                            0.52.11-2ubuntu10                   Displays user-friendly dialog boxes from shell scripts
ii  whoopsie                            0.1.33                              Ubuntu crash database submission daemon
ii  wimlib9                             1.5.0-1~webupd8~precise             Library to extract, create, modify, and mount WIM files
ii  wimtools                            1.5.0-1~webupd8~precise             Tools to extract, create, modify, and mount WIM files
ii  wireless-tools                      30~pre9-5ubuntu2                    Tools for manipulating Linux Wireless Extensions
ii  wpasupplicant                       0.7.3-6ubuntu2.1                    client support for WPA and WPA2 (IEEE 802.11i)
ii  x11-common                          1:7.6+12ubuntu2                     X Window System (X.Org) infrastructure
ii  x11-utils                           7.6+4ubuntu0.1                      X11 utilities
ii  xauth                               1:1.0.6-1                           X authentication utility
ii  xbitmaps                            1.1.1-1                             Base X bitmaps
ii  xclip                               0.12-1                              command line interface to X selections
ii  xfonts-encodings                    1:1.0.4-1ubuntu1                    Encodings for X.Org fonts
ii  xfonts-utils                        1:7.6+1                             X Window System font utility programs
ii  xkb-data                            2.5-1ubuntu1.3                      X Keyboard Extension (XKB) configuration data
ii  xml-core                            0.13                                XML infrastructure and XML catalog file support
rc  xpdf                                3.02-21build1                       Portable Document Format (PDF) reader
ii  xterm                               271-1ubuntu2.1                      X terminal emulator
ii  xz-lzma                             5.1.1alpha+20110809-3               XZ-format compression utilities - compatibility commands
ii  xz-utils                            5.1.1alpha+20110809-3               XZ-format compression utilities
ii  zabbix-agent                        1:1.8.11-1                          network monitoring solution - agent
ii  zlib1g                              1:1.2.3.4.dfsg-3ubuntu4             compression library - runtime
ii  zlib1g-dev                          1:1.2.3.4.dfsg-3ubuntu4             compression library - development
ii  zsh                                 4.3.17-1ubuntu1                     shell with lots of features

A terceira coluna é version , mas é toda "bagunçada" de uma maneira que não consigo entender. Quero dizer, pacotes diferentes usam especificações de nomenclatura totalmente diferentes.

Aqui estão as principais questões:

  1. Por que alguns números de versão têm ubuntu , e outros não?
  2. O que significa toda a pontuação especial -~+ ?
  3. O que são alpha , build e dfsg ? Posso apenas usá-los casualmente?
  4. vim e outros pacotes têm 2: . O que isso significa?
  5. Como funciona a "comparação de versões", quando os formatos de versão podem ser tão diferentes?

Alguém por favor pode me explicar isso? Ou onde posso encontrar um documento oficial?

Obrigado antecipadamente.

    
por cizixs 12.06.2014 / 09:27

2 respostas

37

O Manual de Políticas Debian tem a dizer sobre o campo de versão, que responde algumas partes da sua pergunta:

Format

The format is: [epoch:]upstream_version[-debian_revision]

The three components here are:

epoch

This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is omitted then the upstream_version may not contain any colons. It is provided to allow mistakes in the version numbers of older versions of a package, and also a package's previous version numbering schemes, to be left behind.

upstream_version

This is the main part of the version number. It is usually the version number of the original ("upstream") package from which the .deb file has been made, if this is applicable. Usually this will be in the same format as that specified by the upstream author(s); however, it may need to be reformatted to fit into the package management system's format and comparison scheme.

The comparison behavior of the package management system with respect to the upstream_version is described below. The upstream_version portion of the version number is mandatory.

The upstream_version may contain only alphanumerics[36] and the characters "." (full stop), "+" (plus), "-" (hyphen), ":" (colon), "~" (tilde) and should start with a digit. If there is no debian_revision then hyphens are not allowed; if there is no epoch then colons are not allowed.

debian_revision

This part of the version number specifies the version of the Debian package based on the upstream version. It may contain only alphanumerics and the characters "." (full stop), "+" (plus), "~" (tilde) and is compared in the same way as the upstream_version is.

It is optional; if it isn't present then the upstream_version may not contain a hyphen. This format represents the case where a piece of software was written specifically to be a Debian package, where the Debian package source must always be identical to the pristine source and therefore no revision indication is required.

It is conventional to restart the debian_revision at 1 each time the upstream_version is increased.

The package management system will break the version number apart at the last hyphen in the string (if there is one) to determine the upstream_version and debian_revision. The absence of a debian_revision is equivalent to a debian_revision of 0.

Comparison

When comparing two version numbers, first the epoch of each are compared, then the upstream_version if epoch is equal, and then debian_revision if upstream_version is also equal. epoch is compared numerically. The upstream_version and debian_revision parts are compared by the package management system using the following algorithm:

The strings are compared from left to right.

First the initial part of each string consisting entirely of non-digit characters is determined. These two parts (one of which may be empty) are compared lexically. If a difference is found it is returned. The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than all the non-letters and so that a tilde sorts before anything, even the end of a part. For example, the following parts are in sorted order from earliest to latest: ~~, ~~a, ~, the empty part, a.

Then the initial part of the remainder of each string which consists entirely of digit characters is determined. The numerical values of these two parts are compared, and any difference found is returned as the result of the comparison. For these purposes an empty string (which can only occur at the end of one or both version strings being compared) counts as zero.

These two steps (comparing and removing initial non-digit strings and initial digit strings) are repeated until a difference is found or both strings are exhausted.

Note that the purpose of epochs is to allow us to leave behind mistakes in version numbering, and to cope with situations where the version numbering scheme changes. It is not intended to cope with version numbers containing strings of letters which the package management system cannot interpret (such as ALPHA or pre-), or with silly orderings.

ubuntu indicará que o pacote foi criado especificamente para o Ubuntu. As sequências alpha e build não parecem ter nenhum significado específico, mas dfsg refere-se a um pacote que foi modificado para conformidade com as Normas para o Software Livre Debian .

    
por 12.06.2014 / 09:54
5

XubuntuY parte da versão, por ex. 1ubuntu1

  • X é a versão do pacote Debian. A maioria dos pacotes do Ubuntu são baseados em pacotes Debian, que é uma distribuição "upstream".

    Se 0 , isso significa que não existe um pacote Debian: ele existe somente no Ubuntu.

    X é redefinido quando a versão real do upstream é atualizada, por exemplo, Binutils 2.25 para Binutils 2.26.

    As versões da Debian existem porque o Debian pode fazer correções nos pacotes para que funcionem melhor no sistema Debian ou para liberações de segurança.

    Os desenvolvedores da Debian estão, claro, interessados em juntar os patches de volta para evitar bifurcações.

    Sempre que um novo conjunto de patches é feito, esse número aumenta.

  • ubuntuY é opcional.

    Se não estiver presente, significa que o pacote Debian foi usado diretamente.

    Caso contrário, isso significa que este é o Yth Ubuntu aplicado no topo de um patch Debian, de forma muito semelhante ao que o Debian aplica em cima do upstream real.

    Y é redefinido quando X aumenta.

Se você obtiver a origem de um pacote com:

apt-get source gdb

você verá os patches aplicados pelo Ubuntu e pelo Debian em:

debian/patches/

Ainda mais interessante, você pode clonar com bzr e ver uma lista de todas as versões do Ubuntu com o que mudou entre elas:

bzr branch ubuntu:gdb
cd gdb
bzr log | less

Veja também: link

O que a Época realmente representa

link

    
por 26.07.2015 / 10:31