DICAS Gentoo para utilizadores dialup

De Gentoo Linux Wiki

Este artigo faz parte da seção de Dicas.

Tabela de conteúdo

[editar] Sem ligação à Internet

[editar] Obter a lista de pacotes a transferir

Para cada pacote que quiser instalar, execute

emerge -fp pacote1 pacote2 2> hiperligacoes.txt

Ou se quiser actualizar todo o sistema

emerge -fpu world 2> hiperligacoes.txt (ou)
emerge -fpu system 2> hiperligacoes.txt

O ficheiro hiperligacoes.txt é uma lista das hiperligações para os ficheiros necessários para instalar o pacote.

[editar] Transferi-los numa máquina com ligação à Internet

Agora transfira os pacotes numa máquina diferente.

Se o wget estiver instalado, basta fazer

wget -i hiperligacoes.txt

Grave os ficheiros transferidos num CD (ou outro dispositivo de armazenamento).

(nota: se estiver a usar uma versão windows do wget, é melhor usar um repositório. Algo assim:

export PKGDIR="ftp://ftp.qualquercoisa/distfiles/" de seguida emerge --usepkg -fp pacoteX pacoteY 2> hiperligacoes.txt)

[editar] Instalar os pacotes

Agora coloque os pacotes na directoria /usr/portage/distfiles. Depois, inicie o processo de instalação.

emerge pacote1 pacote2

[editar] Actualizando a árvore do portage

  1. download recent up-to date portage snapshot
  2. burn to CD (or to any portable storage device available)
  3. extract portage snapshot: tar -xvzf /path/to/snapshot -C /usr/
  4. emerge regen - updating new ebuilds. Note - take a lot of time !


[editar] Dialup

[editar] getdelta

Getdelta is a wget wrapper that will allow you to fetch the changes to source packages, instead of the entire tarball, when emerging, making use of the Dynamic Deltup network.

[editar] Instalação

Código: Instalação
# echo "dev-util/bdelta ~x86" >> /etc/portage/package.keywords

# echo "app-portage/deltup ~x86" >> /etc/portage/package.keywords

# echo "app-portage/getdelta ~x86" >> /etc/portage/package.keywords

# emerge getdelta

[editar] Configuração

Please note that only one of the following options are required.

[editar] Usando o .bashrc

This will allow you to make use of getdelta by using "gdemerge" instead of "emerge", but still allow you to easily fall back to the default fetch command when the need arises.

Arquivo: /root/.bashrc

...

alias gdemerge='FETCHCOMMAND="/usr/bin/getdelta.sh \${URI}" emerge'
[editar] Usando o make.conf

This option will change the fetch command and simply using "emerge" will make use of getdelta.

Arquivo: /etc/make.conf

...

FETCHCOMMAND="/usr/bin/getdelta.sh \${URI}"

[editar] emerge-delta-webrsync

emerge-delta-webrsync will allow only the changes of a portage snapshot to be downloaded, and sync the tree from the new snapshot built in the process.

[editar] Instalação

Código: Installation
# emerge emerge-delta-webrsync

Note that emerge-delta-webrsync works by pulling patches down, as such, the first run of it will require a full fetch. Subsequent runs however will not.

If you would like emerge-delta-webrsync to show you more information about the download while it is fetching the patches, you can do the following:


1. Open /usr/bin/emerge-delta-webrsync with a text editor as root.
# nano -w /usr/bin/emerge-delta-webrsync

2. Then find the following line:
wgetops="-q"
and change it to:
wgetops="-v"

Now emerge-delta-webrsync will show you more information about the download of the patches, such as percent done and estimated completion.

[editar] Bandwidth Limiting

Something Ive found invaluable over a dialup connection is to use the --limit-rate option of wget. This limits the amount of bandwidth that wget will use when downloading packages so you can emerge programs and go about other online business without it interupting you too much.

Obviously it will take longer to download everything but I think the trade off is worth it so you can start an emerge and just forget about it until its done.

To make use of this just update /etc/make.conf to use the following FETCHCOMMAND and RESUMECOMMAND.

Arquivo: /etc/make.conf

...

FETCHCOMMAND="/usr/bin/wget --limit-rate=1.5k -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
RESUMECOMMAND="/usr/bin/wget --limit-rate=1.5k -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"


[editar] Additional Tip

Ask local providers for a dialup flatrate.

[editar] See also

No Internet Connection Forum topic
Dynamic Deltup

Ferramentas pessoais
Outras línguas