Fixação da Debian - Use estável, mas instale do testing / unstable quando necessário | Também instalar deps de backports estáveis, quando disponíveis

5

Estou configurando um servidor Debian 6 (Squeeze) x86 e quero instalar alguns pacotes de testes ou instáveis quando necessário, então estou usando o pinning.

Eu configurei meu /etc/apt/sources.list da seguinte forma:

deb http://ftp.br.debian.org/debian stable main
deb http://ftp.br.debian.org/debian stable-updates main
deb http://security.debian.org/ stable/updates main

deb http://backports.debian.org/debian-backports squeeze-backports main

deb http://ftp.br.debian.org/debian testing main
deb http://ftp.br.debian.org/debian testing-updates main
deb http://security.debian.org/ testing/updates main

deb http://ftp.br.debian.org/debian unstable main

E meu / etc / apt / preferences como segue:

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=stable-updates
Pin-Priority: 700


Package: *
Pin: release a=squeeze-backports
Pin-Priority: 675


Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=testing-updates
Pin-Priority: 650


Package: *
Pin: release a=unstable
Pin-Priority: 600

Executando a política do apt-cache, recebo:

100 /var/lib/dpkg/status
   release a=now
600 http://ftp.br.debian.org/debian/ unstable/main i386 Packages
   release o=Debian,a=unstable,n=sid,l=Debian,c=main
   origin ftp.br.debian.org
650 http://security.debian.org/ testing/updates/main i386 Packages
   release o=Debian,a=testing,n=wheezy,l=Debian-Security,c=main
   origin security.debian.org
650 http://ftp.br.debian.org/debian/ testing-updates/main i386 Packages
   release o=Debian,a=testing-updates,n=wheezy-updates,l=Debian,c=main
   origin ftp.br.debian.org
650 http://ftp.br.debian.org/debian/ testing/main i386 Packages
   release o=Debian,a=testing,n=wheezy,l=Debian,c=main
   origin ftp.br.debian.org
675 http://backports.debian.org/debian-backports/ squeeze-backports/main i386 Packages
   release o=Debian Backports,a=squeeze-backports,n=squeeze-backports,l=Debian Backports,c=main
   origin backports.debian.org
700 http://security.debian.org/ stable/updates/main i386 Packages
   release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main
   origin security.debian.org
700 http://ftp.br.debian.org/debian/ stable-updates/main i386 Packages
   release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=main
   origin ftp.br.debian.org
700 http://ftp.br.debian.org/debian/ stable/main i386 Packages
   release v=6.0.6,o=Debian,a=stable,n=squeeze,l=Debian,c=main
   origin ftp.br.debian.org

O problema que estou enfrentando é que quando tento instalar alguns pacotes do teste. Ex:

apt-get install ruby1.9.1-dev/testing

Recebo uma mensagem de pacote quebrada:

The following packages have broken dependencies:
 ruby1.9.1-dev : Depends: libruby1.9.1 (= 1.9.3.194-5) but 1.9.2.0-2 is set to be installed
E: Broken Packages

Isto significa que eu quero instalar a partir do teste, mas o Debian tenta instalar dependências de estável. Eu sei que posso fazer:

apt-get install -t testing ruby1.9.1-dev

Funciona instalando todas as dependências do teste, mas eu quero usar o máximo possível dos pacotes estáveis (instalar deps do stable, se disponível).

Outro problema que estou tendo é, se eu instalar um pacote como este:

apt-get install -t testing ruby1.9.1-dev

E então tente instalar outro pacote que depende de uma biblioteca que foi instalada como uma dependência do ruby1.9.1-dev do teste:

apt-get install gcc

Também recebo o erro "Pacotes quebrados".

Então as perguntas são:

Como posso instalar um pacote de teste, mas também instalar o máximo de dependências possíveis de estável?

É possível instalar automaticamente um pacote do teste quando ele não estiver disponível na stable executando apenas

apt-get install package_name

?

    
por Anthony Gaudino 23.01.2013 / 20:58

1 resposta

3

Eu encontrei uma solução possível

Mude meu / etc / apt / preferences para isto:

Package: *
Pin: release a=stable
Pin-Priority: 999

Package: *
Pin: release a=stable-updates
Pin-Priority: 999


Package: *
Pin: release a=squeeze-backports
Pin-Priority: 995


Package: *
Pin: release a=testing
Pin-Priority: 993

Package: *
Pin: release a=testing-updates
Pin-Priority: 993


Package: *
Pin: release a=unstable
Pin-Priority: 991

Em seguida, posso instalar um pacote de teste que instalará dependências de stable ou backports quando possível. Para fazer isso, devo executar:

apt-get -t stable install [PACKAGE NAME]/testing

Por exemplo, se eu correr:

apt-get -s -t stable install imagemagick/testing

Eu recebo esta lista de pacotes que serão instalados:

Inst locales [2.11.3-4] (2.13-37 Debian:testing [all]) []
Inst libc-bin [2.11.3-4] (2.13-37 Debian:testing [i386]) [libc6:i386 ]
Inst libc6 [2.11.3-4] (2.13-37 Debian:testing [i386]) [libc6-i686:i386 on libc6:i386] [libc6-i686:i386 ]
Inst libc6-i686 [2.11.3-4] (2.13-37 Debian:testing [i386])
Inst libuuid-perl [0.02-4] (0.02-5 Debian:testing [i386]) []
Inst perl-base [5.10.1-17squeeze4] (5.14.2-16 Debian:testing [i386]) [liblocale-gettext-perl:i386 on perlapi-5.10.0:i386] [liblocale-gettext-perl:i386 libtext-charwidth-perl:i386 libtext-iconv-perl:i386 ]
Inst libtext-charwidth-perl [0.04-6] (0.04-7+b1 Debian:testing [i386]) [liblocale-gettext-perl:i386 on perlapi-5.10.0:i386] [liblocale-gettext-perl:i386 libtext-iconv-perl:i386 ]
Inst liblocale-gettext-perl [1.05-6] (1.05-7+b1 Debian:testing [i386]) [libtext-iconv-perl:i386 ]
Inst libtext-iconv-perl [1.7-2] (1.7-5 Debian:testing [i386])
Inst gcc-4.7-base (4.7.2-5 Debian:testing [i386])
Inst multiarch-support (2.13-37 Debian:testing [i386])
Inst libstdc++6 [4.4.5-8] (4.7.2-5 Debian:testing [i386])
Inst libattr1 [1:2.4.44-2] (1:2.4.46-8 Debian:testing [i386])
Inst liblzma5 (5.1.1alpha+20120614-2 Debian:testing [i386])
Inst libcap2 (1:2.22-1.2 Debian:testing [i386])
Inst libdb5.1 (5.1.29-5 Debian:testing [i386])
Inst libgpg-error0 (1.10-3.1 Debian:testing [i386])
Inst libgcrypt11 (1.5.0-3 Debian:testing [i386])
Inst libp11-kit0 (0.12-3 Debian:testing [i386])
Inst libtasn1-3 (2.13-2 Debian:testing [i386])
Inst libgnutls26 (2.12.20-2 Debian:testing [i386])
Inst libgssapi-krb5-2 [1.8.3+dfsg-4squeeze6] (1.10.1+dfsg-3 Debian:testing [i386]) []
Inst libk5crypto3 [1.8.3+dfsg-4squeeze6] (1.10.1+dfsg-3 Debian:testing [i386]) []
Inst libkrb5-3 [1.8.3+dfsg-4squeeze6] (1.10.1+dfsg-3 Debian:testing [i386]) []
Inst libkrb5support0 [1.8.3+dfsg-4squeeze6] (1.10.1+dfsg-3 Debian:testing [i386])
Inst libidn11 (1.25-2 Debian:testing [i386])
Inst libpcre3 (1:8.30-5 Debian:testing [i386])
Inst libxml2 (2.8.0+dfsg1-7 Debian:testing [i386])
Inst imagemagick-common (8:6.7.7.10-5 Debian:testing [all])
Inst libavahi-common-data (0.6.31-1 Debian:testing [i386])
Inst libavahi-common3 (0.6.31-1 Debian:testing [i386])
Inst libdbus-1-3 (1.6.8-1 Debian:testing [i386])
Inst libavahi-client3 (0.6.31-1 Debian:testing [i386])
Inst libffi5 (3.0.10-3 Debian:testing [i386])
Inst libglib2.0-0 (2.33.12+really2.32.4-3 Debian:testing [i386])
Inst libcroco3 (0.6.6-2 Debian:testing [i386])
Inst libcups2 (1.5.3-2.13 Debian:testing [i386])
Inst libjpeg8 (8d-1 Debian:testing [i386])
Inst libpng12-0 (1.2.49-1 Debian:testing [i386])
Inst libjbig0 (2.0-2 Debian:testing [i386])
Inst libtiff4 (3.9.6-10 Debian:testing [i386])
Inst libcupsimage2 (1.5.3-2.13 Debian:testing [i386])
Inst libdatrie1 (0.2.5-3 Debian:testing [i386])
Inst libdjvulibre-text (3.5.25.3-1 Debian:testing [all])
Inst libdjvulibre21 (3.5.25.3-1 Debian:testing [i386])
Inst ttf-dejavu-core (2.33-3 Debian:testing [all])
Inst fontconfig-config (2.9.0-7.1 Debian:testing [all])
Inst libfontconfig1 (2.9.0-7.1 Debian:testing [i386])
Inst libjasper1 (1.900.1-13 Debian:testing [i386])
Inst libxau6 (1:1.0.7-1 Debian:testing [i386])
Inst libxdmcp6 (1:1.1.1-1 Debian:testing [i386])
Inst libxcb1 (1.8.1-2 Debian:testing [i386])
Inst libx11-data (2:1.5.0-1 Debian:testing [all])
Inst libx11-6 (2:1.5.0-1 Debian:testing [i386])
Inst libgdk-pixbuf2.0-common (2.26.1-1 Debian:testing [all])
Inst libgdk-pixbuf2.0-0 (2.26.1-1 Debian:testing [i386])
Inst libgomp1 (4.7.2-5 Debian:testing [i386])
Inst x11-common (1:7.6+8~bpo60+1 Debian Backports:squeeze-backports [all])
Inst libice6 (2:1.0.8-2 Debian:testing [i386])
Inst liblcms1 (1.19.dfsg-1.2 Debian:testing [i386])
Inst liblqr-1-0 (0.4.1-2 Debian:testing [i386])
Inst libltdl7 (2.4.2-1.1 Debian:testing [i386])
Inst liblcms2-2 (2.2+git20110628-2~bpo60+1 Debian Backports:squeeze-backports [i386])
Inst libsm6 (2:1.2.1-2 Debian:testing [i386])
Inst libxext6 (2:1.3.1-2 Debian:testing [i386])
Inst libxt6 (1:1.1.3-1 Debian:testing [i386])
Inst libmagickcore5 (8:6.7.7.10-5 Debian:testing [i386])
Inst libpixman-1-0 (0.24.0-1~bpo60+1 Debian Backports:squeeze-backports [i386])
Inst libxcb-render0 (1.8.1-2 Debian:testing [i386])
Inst libxcb-shm0 (1.8.1-2 Debian:testing [i386])
Inst libxrender1 (1:0.9.7-1 Debian:testing [i386])
Inst libcairo2 (1.10.2-7~bpo60+1 Debian Backports:squeeze-backports [i386])
Inst libilmbase6 (1.0.1-4 Debian:testing [i386])
Inst libmagickwand5 (8:6.7.7.10-5 Debian:testing [i386])
Inst libopenexr6 (1.6.1-6 Debian:testing [i386])
Inst libthai-data (0.1.18-2 Debian:testing [all])
Inst libthai0 (0.1.18-2 Debian:testing [i386])
Inst libxft2 (2.3.1-1 Debian:testing [i386])
Inst fontconfig (2.9.0-7.1 Debian:testing [i386])
Inst libpango1.0-0 (1.30.0-1 Debian:testing [i386])
Inst librsvg2-2 (2.36.1-1 Debian:testing [i386])
Inst libwmf0.2-7 (0.2.8.4-10.2 Debian:testing [i386])
Inst libmagickcore5-extra (8:6.7.7.10-5 Debian:testing [i386])
Inst libpaper1 (1.1.24+nmu2 Debian:testing [i386])
Inst poppler-data (0.4.5-10 Debian:testing [all])
Inst libsystemd-login0 (44-7 Debian:testing [i386])
Inst krb5-locales (1.10.1+dfsg-3 Debian:testing [all])
Inst libclass-isa-perl (0.36-3 Debian:testing [all])
Inst perl-modules (5.14.2-16 Debian:testing [all]) []
Inst perl (5.14.2-16 Debian:testing [i386]) []
Inst libswitch-perl (2.16-2 Debian:testing [all])
Inst dbus (1.6.8-1 Debian:testing [i386])
Inst fonts-droid (20101110+git-3~bpo60+1 Debian Backports:squeeze-backports [all])
Inst libijs-0.35 (0.35-8 Debian:testing [i386])
Inst libjbig2dec0 (0.11+20120125-1 Debian:testing [i386])
Inst libgs9-common (9.05~dfsg-6.3 Debian:testing [all])
Inst libgs9 (9.05~dfsg-6.3 Debian:testing [i386])
Inst gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2 Debian:6.0.6/stable, Debian:testing, Debian:unstable [all])
Inst ghostscript (9.05~dfsg-6.3 Debian:testing [i386])
Inst hicolor-icon-theme (0.12-1 Debian:6.0.6/stable, Debian:testing, Debian:unstable [all])
Inst imagemagick (8:6.7.7.10-5 Debian:testing [i386])
Inst libexiv2-12 (0.23-1 Debian:testing [i386])
Inst libglib2.0-data (2.33.12+really2.32.4-3 Debian:testing [all])
Inst libnetpbm10 (2:10.0-15+b1 Debian:testing [i386])
Inst libpaper-utils (1.1.24+nmu2 Debian:testing [i386])
Inst librsvg2-common (2.36.1-1 Debian:testing [i386])
Inst netpbm (2:10.0-15+b1 Debian:testing [i386])
Inst sgml-base (1.26+nmu3 Debian:testing [all])
Inst shared-mime-info (1.0-1+b1 Debian:testing [i386])
Inst liblensfun-data (0.2.5-2 Debian:testing [all])
Inst liblensfun0 (0.2.5-2 Debian:testing [i386])
Inst ufraw-batch (0.18-2 Debian:testing [i386])
Inst xml-core (0.13+nmu2 Debian:testing [all])

Observe que alguns pacotes stable e backports serão instalados (e eles realmente serão instalados conforme testei).

Agora, se eu quiser instalar um pacote do stable, eu executo isso:

apt-get -t stable install [PACKAGE NAME]/stable

Eu executo isso por causa do problema 2 descrito em questão (instale outro pacote que depende de uma biblioteca que foi instalada como uma dependência do teste).

Se eu instalar o ruby1.9.1-dev do teste:

apt-get -t stable install --no-install-recommends ruby1.9.1-dev/testing

Ele irá instalar algumas bibliotecas, incluindo a libc6, mas não o gcc. Então, se eu quiser instalar o gcc do stable e eu apenas executar:

apt-get install gcc

Eu receberei Broken package erros. Se eu tentar:

apt-get -t stable install gcc

Ele instalará o gcc do teste. Para instalar o gcc do stable, devo executar:

apt-get -t stable install gcc/stable

Note que pode fazer downgrade de pacotes , mas neste caso não fará downgrade de nenhum pacote:

These extra packages will be installed:
  binutils cpp cpp-4.4 cpp-4.7 gcc gcc-4.4 gcc-4.4-base gcc-4.7-base libgcc1 libgmp10 libgomp1 libmpc2 libmpfr4 libstdc++6
Suggested packages:
  binutils-doc cpp-doc gcc-4.4-locales gcc-4.7-locales gcc-multilib make manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.4-multilib
  libmudflap0-4.4-dev gcc-4.4-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7
The following NEW packages will be installed:
  binutils cpp cpp-4.4 cpp-4.7 gcc gcc-4.4 gcc-4.7-base libgmp10 libgomp1 libmpc2 libmpfr4
The following packages will be updated:
  gcc-4.4-base libgcc1 libstdc++6
3 updated packages, 11 new installed packages, 0 to be removed and 159 not updated.
Inst gcc-4.7-base (4.7.2-5 Debian:testing [i386])
Inst libgcc1 [1:4.4.5-8] (1:4.7.2-5 Debian:testing [i386])
Inst libstdc++6 [4.4.5-8] (4.7.2-5 Debian:testing [i386])
Inst libgmp10 (2:5.0.5+dfsg-2 Debian:testing [i386])
Inst libgomp1 (4.7.2-5 Debian:testing [i386])
Inst libmpfr4 (3.1.0-5 Debian:testing [i386])
Inst libmpc2 (0.9-4 Debian:testing [i386])
Inst binutils (2.22-7.1 Debian:testing [i386])
Inst cpp-4.7 (4.7.2-5 Debian:testing [i386])
Inst cpp (4:4.7.2-1 Debian:testing [i386])
Inst gcc-4.4-base [4.4.5-8] (4.4.7-2 Debian:testing [i386])
Inst cpp-4.4 (4.4.7-2 Debian:testing [i386])
Inst gcc-4.4 (4.4.7-2 Debian:testing [i386])
Inst gcc (4:4.4.5-1 Debian:6.0.6/stable [i386])

Observe que o gcc será instalado do estável.

Observe também que se você colocar

APT::Default-Release "stable";

em /etc/apt/apt.conf.d/70debconf, parece que você não precisará usar -t stable . Ex:

Instead of
    apt-get -t stable install gcc/stable

I could just run
    apt-get install gcc/stable

Isso porque eu já especifiquei que meu alvo é estável em 70debconf .

Eu quero saber se existem outras soluções melhores porque essa é mais uma invasão.

    
por 24.01.2013 / 21:46