Desenvolvimento/FAQ

De Wiki da Comunidade Mandriva

Perguntas Freqüentes do Mandriva Linux Cooker


Tabela de conteúdo

Como gerar CDs apartir do Cooker

Para isso use o script mkcd, que está no pacote mkcd

mkcd -a <mandrivalinux_path>


Com a opção -c é possível limitar o número de imagens geradas:

mkcd -a -c 2 <caminho_para_mandrivalinux>


Use --discsize para definir um tamanho alternativo de disco (por padrão, as imagens criadas são para discos de 650MB):

mkcd --discsize 700m -a <caminho_para_mandrivalinux>


Como trabalhar com assinatura de pacotes RPM

Como root, para listar as chaves gpg

disponíveis:

gpg --list-keys


Exportar uma determinada chave em formato ascii:

gpg --armor --export <keyid> > <keyid>.asc


Importá-las no rpm

(requer rpm >= 4.2):

rpm --import <keyid>.asc


Listar as chaves no rpm

rpm -q gpg-pubkey


Actually, chances are high that all of the keys in root's keyring were introduced in order to check package signatures before rpm

version 4.2, which was in Mandrake 9.2
. So you can import them all -- provided you do it one by one -- as rpm
doesn't support importing several keys at once.  (If you are not sure about the origin of any of the keys, do check their names with gpg

, for example when on line with gpg --import --interactive 1234ABCD


This script takes cares of importing all keys from the root user's key-ring:

for key in `gpg --list-keys | grep pub | tail +2 | cut -d " " -f 3 | cut -d
"/" -f 2`; do
   gpg -export --armor $key > $key.asc
   rpm --import $key.asc
   rm -f $key.asc
done

Additionaly, urpmi

starting from 4.4-19mdk is by default verifying signatures.

If urpmi

warns about invalid signatures the package could have been corrupted on your local mirror or during download, so you may want to try another server.  Also check via Mandriva Linux Control Center > Software Management > Select from where software packages are downloaded when updating the system: the 'Manage keys' button on the right should be used to assign different keys to various media[1]. Make sure there that you have the key assgned to the particular medium you are installing from.

Alternatively you can download the package via http or ftp and check with

rpm -Kv packagename*


for the key that's in the package (if any). It will show immediately which key you are looking for, or if absent, that somewhere it was left out accidentally. In principle *all* packages from Mandriva are signed. So, if not: be wary to proceed!

For example:

xmms-eq-0.6-4mdv2007.1.i586.rpm:
    Header V3 DSA signature: OK, key ID 26752624
    Header SHA1 digest: OK (3afae3c03cf33f925930e102c8ad37ab590342f7)
    MD5 digest: OK (dd33c2ddef8c65794695303284f77bae)
    V3 DSA signature: OK, key ID 26752624

shows the Cooker key with ID 0x26752624

The key-ids are stored in the /etc/urpmi/urpmi.cfg

config file per medium. Do not edit it unless you know very well what you are doing!

Para que são todos aqueles kernels no Mandriva Linux?

O Mandriva Linux provê vários kernels diferentes, cada um otimizado para tarefas específicas. O documento Choosing a Kernel pode ajudá-lo a escolher qual é mais adequado para o que você precisa.

E as outras distribuições que também usam RPM?

Você não está conseguindo instalar um pacote RPM no Mandriva Linux? Talvez ele feito para outra distribuição. Veja outras distribuições que também usam o formato RPM.

Note que se você tem instalado os compiladores e os pacotes '-devel' necessários, você pode gerar os RPMs a partir do RPM fonte (source RPM, ou srpm, ou ainda spm). Porém há arquivos SPEC que foram escritos sem levar em conta que poderiam ser utilizados em outras distribuições, e podem então falhar ao tentar construí-los no Mandriva Linux. Se você tiver interesse, pode ler mais a respeito de como corrigir o pacote.

Como conhecer mais a respeito do Mandriva Linux e o Linux em geral?

Veja os seguintes tópicos:

    Ferramentas pessoais