Difference between pages "Install/pt-br/Overview" and "Repository Configuration"

From Funtoo
< Install(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
<noinclude>
{{Warning|This article is a work-in-progress referring to a future Portage version. It does not apply to the current Funtoo Portage version. Please do not update your configuration yet.}}
{{InstallPart|uma visão geral inicial do processo de instalação, tão em quanto instruções de download do LiveCD e de boot}}
</noinclude>
== Visão geral da instalação ==


Essa é uma básica visão geral do processo de instalação do Funtoo:
Starting with Portage-2.3.8, a switch to a new repository configuration framework is complete and users may want to update their configuration files. This document aims to describe the goals for the new framework and how to use it.


# [[#Live CD|Baixe e boot o live CD da sua escolha]].
== Multiple repository layout ==
# [[#Prepare Hard Disk|Prepare seu disco]].
One of the most important changes is the switch from the old ''overlay'' layout to a new cleaner ''repository'' system. The new layout is more flexible and more predictable. For example, repositories can now use resources (eclasses, for example) provided by other repositories.
# [[#Creating filesystems|Crie]] e [[#Mounting filesystems|monte]] os filesystems.
# [[#Installing the Stage 3 tarball|Instale o tarball stage doFuntoo]] da sua escolha.
# [[#Chroot into Funtoo|Use o Chroot no seu novo sistema]].
# [[#Downloading the Portage tree|Baixe o Portage tree]].
# [[#Configuring your system|Configure seu sistema]] e sua [[#Configuring your network|rede]].
# [[#Configuring and installing the Linux kernel|Instale um kernel]].
# [[#Installing a Bootloader|Instale um bootloader]].
# [[#Finishing Steps|Complete os passos finais]].
# [[#Restart your system|Reboot e aproveite]].


=== Live CD ===
The old layout was based on the concept of one ''main tree'' and optionally a number of overlays. The main tree provided base system ebuilds, eclasses, profiles, while overlays mostly were able to provide their own ebuilds. The ebuild provided by overlays overrode the ebuilds in main tree to the extend of making it impossible to install the main tree version. Overlays could also provide eclasses for their own ebuilds and package.* entries that applied to all overlays and to the main tree. The Package Manager is responsible for updating the main tree, while overlays are managed externally.


Funtoo não provê um  Live CD "official" do Funtoo. Recomendamos utilizar o Gentoo-based [http://www.sysresccd.org/ System Rescue CD] já que ele contem muitas ferramentas e utilizades e tem suporte a sistemas tanto à 32-bit quando 64-bit. Baixe-o aqui:
The new layout is based on the concept of one or more configurable repositories. Each repository can either be stand-alone or depend upon other repositories. The distribution provides a repository called ''funtoo'' (a drop-in replacement for Gentoo's ''gentoo'' repository). Users can install more repositories at they will, the repositories providing their own ebuilds, eclasses and profiles as necessary and/or using them from other repositories. Users can explicitly choose the repository they want to install packages from. The Package Manager can update all repositories.


http://www.sysresccd.org/Download
== Portage configuration ==
=== New repository layout ===
The repository configuration should be stored in <code>/etc/portage/repos.conf</code>. It can be either a single file or a directory containing one or more ''.conf'' files.


{{Note|Se utilizar uma versão antiga do System Rescue CD, '''certifique-se de selecionar o kernel <code>rescue64</code> no menu de boot se estiver instalando um sistema 64-bit'''. Por padrão, o System Rescue CD costumava a bottar em em módo 32-bit, embora a ultima versão atenta para detectar automaticamente  os processadores 64-bit.}}
The default configuration is installed as <code>/usr/share/portage/config/repos.conf</code>. This file is internal configuration file installed with portage ebuild and should '''not''' be modified. Instead, the configuration in <code>/etc/portage/repos.conf</code> can override the defaults specified there.


==== Acesso a Rede ====
The configuration uses format similar to Windows .ini files. Each section heading (repository name in square brackets) signifies a single repository, followed by one or more key-value option pairs. For example, the following file copies default configuration for Funtoo repository:


Uma vez que você tenha inicializado o System Rescue CD, veja se você possui acesso a Internet. Acesso a internet é necessário para a instalação do Funtoo Linux:
{{file|name=/etc/portage/repos.conf/funtoo.conf|desc=Example configuration override for Funtoo repository to move it to non-standard location|body=
[funtoo]
# moved to non-standard location!
location = /var/db/repos/funtoo
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git
auto-sync = yes
}}


<console>
The most useful repository configuration options are listed below:
# ##i##ping www.google.com
;location: ''Obligatory.'' Specifies the directory where repository is/will be stored. If Portage knows how to sync the repository and the location does not exist, it will be created on next ''emerge --sync''. Otherwise, the directory must exist.
PING www.google.com (216.58.217.36) 56(84) bytes of data.
;priority: Specifies the priority used for ordering ebuilds from different repositories. If two repositories provide an ebuild with matching versions, the repository with higher priority will be used.
64 bytes from den03s10-in-f4.1e100.net (216.58.217.36): icmp_seq=1 ttl=57 time=30.1 ms
;auto-sync: Specifies whether ''emerge --sync'' should update the repository. Defaults to ''yes'' if ''sync-type'' is specified, ''no'' otherwise.
</console>
;sync-depth: Specifies ''--depth'' for git clone. Used only on initial sync. Defaults to 1. Can be set to 0 to force full clone (not pass ''--depth'' at all).
;sync-type: Specifies syncing/update method. Can be one of: ''cvs'', ''git'', ''rsync'', ''svn''.
;sync-umask: Specifies the umask used when updating/syncing the repository.
;sync-uri: Specifies remote URI from which the repository will be cloned/synced. Can use any syntax valid for a particular syncing method.
;sync-user: Specifies the user[:group] used to update/sync the repository. If ''FEATURES=usersync'' is used, defaults to the credentials of directory owner.


Se o ping obtiver sucesso  (Você visualiza as mensagens <code>64 bytes</code> como acima,) então sua rede está ativa. Pressione Control-C para parar o ping.  
Additionally a <code>[DEFAULT]</code> section may be specified. Options in this section are used as defaults for all repositories.


Sei você precisar configurar uma conexão WiFi para acesso a Internet, então essa precisa ser feita utilizando o ambiente gráfico do System Rescue CD. Execute <code>startx</code> para inicializar a seção gráfica:
=== Migrating existing configurations ===
The new configuration format provides replacement for existing configuration done through <code>/etc/portage/make.conf</code> and environment variables. While the variables are still supported for backwards compatibility, users are recommended to move to the new configuration scheme. Funtoo portage ebuild is planned to  make the migration unattended (repos.conf installed automatically to ease the config steps) with the following file:
   
{{file|name=/etc/portage/repos.conf/funtoo.conf|body=
[funtoo]
location = /usr/portage
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git
auto-sync = yes
}}
The following replacements are provided for existing variables:
;PORTDIR: Used to specify main tree location. Replaced by ''location'' key in the section corresponding to the default repository (<code>[funtoo]</code> by default).
;PORTDIR_OVERLAY: Used to specify locations of overlays. Each of the paths needs to be replaced with a separate repository section, with the path placed in ''location'' key. Additionally, ''priority'' may be used to force specific ordering of ebuild overrides.
;SYNC: Used to specify URI for syncing the main repository, also implied a protocol for doing that. Replaced by the ''sync-uri'' and ''sync-type'' keys in the default repository section.
;SYNC_UMASK: Used to specify umask for syncing repositories. Replaced by ''sync-umask'' key in repository configuration. Can be specified in <code>[DEFAULT]</code> section to apply to all repositories.
;SYNC_USER: Used to specify user credentials for syncing repositories. Replaced by ''sync-user'' key in repository configuration. Can be specified in <code>[DEFAULT]</code> section to apply to all repositories.


<console>
{{file|name=/etc/portage/make.conf|desc=Example old make.conf file|body=
# ##i##startx
# user changed PORTDIR location
</console>
PORTDIR="/var/db/repos/funtoo"
PORTDIR_OVERLAY="/var/db/repos/foo /var/db/repos/bar"


Depois, utilize o NetworkManager applet (ícone no canto inferior direito) para conectar a uma rede WiFi de sua escolha. Depois, um terminal terminal dentro de seu ambiente gráfico, e você deve ser capaz de utilizar o terminal para completar o resto dos passos.
SYNC="git://github.com/funtoo/ports-2015.git"
SYNC_USER="oleg"
SYNC_UMASK="022"
}}


==== Instalação Remota ====
{{file|name=/etc/portage/repos.conf|desc=Replacement repos.conf file|body=
[DEFAULT]
sync-user = oleg
sync-umask = 022


Alternativamente, você pode logar no System Rescue CD pela rede via SSH para realizar a instalação a partir de outro computador, e isso pode ser mais o jeito conveniente para instalar o Funtoo Linux.
[funtoo]
location = /var/db/repos/funtoo
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git


Se você gostaria de completar a instalação remotamente, aqui está como fazer isso. Primeiro, você precisará se assegurar de que o System Rescue CD tem uma conexão de rede funcional. Depois, você precisara definir uma senha de root para o System Rescue CD:
[foo]
location = /var/db/repos/foo
priority = 1


<console>
[bar]
# ##i##passwd
location = /var/db/repos/bar
New password: ##i##********
priority = 2
Retype new password: ##i##********
}}
passwd: password updated successfully
#
</console>


Uma vez que você tenha digitado uma senha, você precisará agora determinar o endereço IP do System Rescue CD, e então você pode utilizar <code>ssh</code> para conectar-se à rede. Para determinar o endereço IP atualmente sendo utilizado pelo System Rescue CD, digite <code>ifconfig</code>:
The <code>repos.conf</code> configuration can be further extended with ''sync-type'' and ''sync-uri'' for overlays to get ''emerge --sync'' updating them automatically.


<console>
let's see a real example of tree and overlays added.
# ##i##ifconfig
{{file|name=/etc/portage/repos.conf|desc=Replacement repos.conf file|body=
</console>


Uma das interfaces deve ter um endereço IP (listado como <code>inet addr:</code>) a partir de sua LAN. Você pode então conectar remotamente, a partir de outro sistema na sua LAN, ao System Rescue CD, e realizar os passos a partir do conforto de um OS existente. No seu sistema remoto, digite o seguinte, substituindo <code>1.2.3.4</code> pelo endereço IP do System Rescue CD. Conectando a partir de um sistema Linux ou MacOS existente pareceria como isso:
[gentoo]
 
location = /usr/portage
<console>
sync-type = git
(remote system) $ ##i##ssh root@1.2.3.4
sync-uri = git://github.com/funtoo/ports-2012.git
Password: ##i##**********
</console>
[funtoo-overlay]
 
location = /root/git/funtoo-overlay
{{Note|Se você quiser de conectar remotamente a partir um sistema Microsoft Windows existente, você precisará baixar um cliente SSH para Windows, tal qual [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].}}
 
[funtoo-gnome]
Depois que você tiver logado via SSH, você está agora conectado remotamente ao System Rescue CD e pode realizar os passos da instalação.
location = /root/git/funtoo-gnome-overlay
}}
funtoo-overlay and funtoo-gnome-overlay are an overlays added on top of regular portage tree.
[[Category:Portage]]

Revision as of 05:39, February 21, 2015

   Warning

This article is a work-in-progress referring to a future Portage version. It does not apply to the current Funtoo Portage version. Please do not update your configuration yet.

Starting with Portage-2.3.8, a switch to a new repository configuration framework is complete and users may want to update their configuration files. This document aims to describe the goals for the new framework and how to use it.

Multiple repository layout

One of the most important changes is the switch from the old overlay layout to a new cleaner repository system. The new layout is more flexible and more predictable. For example, repositories can now use resources (eclasses, for example) provided by other repositories.

The old layout was based on the concept of one main tree and optionally a number of overlays. The main tree provided base system ebuilds, eclasses, profiles, while overlays mostly were able to provide their own ebuilds. The ebuild provided by overlays overrode the ebuilds in main tree to the extend of making it impossible to install the main tree version. Overlays could also provide eclasses for their own ebuilds and package.* entries that applied to all overlays and to the main tree. The Package Manager is responsible for updating the main tree, while overlays are managed externally.

The new layout is based on the concept of one or more configurable repositories. Each repository can either be stand-alone or depend upon other repositories. The distribution provides a repository called funtoo (a drop-in replacement for Gentoo's gentoo repository). Users can install more repositories at they will, the repositories providing their own ebuilds, eclasses and profiles as necessary and/or using them from other repositories. Users can explicitly choose the repository they want to install packages from. The Package Manager can update all repositories.

Portage configuration

New repository layout

The repository configuration should be stored in /etc/portage/repos.conf. It can be either a single file or a directory containing one or more .conf files.

The default configuration is installed as /usr/share/portage/config/repos.conf. This file is internal configuration file installed with portage ebuild and should not be modified. Instead, the configuration in /etc/portage/repos.conf can override the defaults specified there.

The configuration uses format similar to Windows .ini files. Each section heading (repository name in square brackets) signifies a single repository, followed by one or more key-value option pairs. For example, the following file copies default configuration for Funtoo repository:

   /etc/portage/repos.conf/funtoo.conf - Example configuration override for Funtoo repository to move it to non-standard location
[funtoo]
# moved to non-standard location!
location = /var/db/repos/funtoo
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git
auto-sync = yes

The most useful repository configuration options are listed below:

location
Obligatory. Specifies the directory where repository is/will be stored. If Portage knows how to sync the repository and the location does not exist, it will be created on next emerge --sync. Otherwise, the directory must exist.
priority
Specifies the priority used for ordering ebuilds from different repositories. If two repositories provide an ebuild with matching versions, the repository with higher priority will be used.
auto-sync
Specifies whether emerge --sync should update the repository. Defaults to yes if sync-type is specified, no otherwise.
sync-depth
Specifies --depth for git clone. Used only on initial sync. Defaults to 1. Can be set to 0 to force full clone (not pass --depth at all).
sync-type
Specifies syncing/update method. Can be one of: cvs, git, rsync, svn.
sync-umask
Specifies the umask used when updating/syncing the repository.
sync-uri
Specifies remote URI from which the repository will be cloned/synced. Can use any syntax valid for a particular syncing method.
sync-user
Specifies the user[:group] used to update/sync the repository. If FEATURES=usersync is used, defaults to the credentials of directory owner.

Additionally a [DEFAULT] section may be specified. Options in this section are used as defaults for all repositories.

Migrating existing configurations

The new configuration format provides replacement for existing configuration done through /etc/portage/make.conf and environment variables. While the variables are still supported for backwards compatibility, users are recommended to move to the new configuration scheme. Funtoo portage ebuild is planned to make the migration unattended (repos.conf installed automatically to ease the config steps) with the following file:

   /etc/portage/repos.conf/funtoo.conf
[funtoo]
location = /usr/portage
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git
auto-sync = yes

The following replacements are provided for existing variables:

PORTDIR
Used to specify main tree location. Replaced by location key in the section corresponding to the default repository ([funtoo] by default).
PORTDIR_OVERLAY
Used to specify locations of overlays. Each of the paths needs to be replaced with a separate repository section, with the path placed in location key. Additionally, priority may be used to force specific ordering of ebuild overrides.
SYNC
Used to specify URI for syncing the main repository, also implied a protocol for doing that. Replaced by the sync-uri and sync-type keys in the default repository section.
SYNC_UMASK
Used to specify umask for syncing repositories. Replaced by sync-umask key in repository configuration. Can be specified in [DEFAULT] section to apply to all repositories.
SYNC_USER
Used to specify user credentials for syncing repositories. Replaced by sync-user key in repository configuration. Can be specified in [DEFAULT] section to apply to all repositories.
   /etc/portage/make.conf - Example old make.conf file
# user changed PORTDIR location
PORTDIR="/var/db/repos/funtoo"
PORTDIR_OVERLAY="/var/db/repos/foo /var/db/repos/bar"

SYNC="git://github.com/funtoo/ports-2015.git"
SYNC_USER="oleg"
SYNC_UMASK="022"
   /etc/portage/repos.conf - Replacement repos.conf file
[DEFAULT]
sync-user = oleg
sync-umask = 022

[funtoo]
location = /var/db/repos/funtoo
sync-type = git
sync-uri = git://github.com/funtoo/ports-2015.git

[foo]
location = /var/db/repos/foo
priority = 1

[bar]
location = /var/db/repos/bar
priority = 2

The repos.conf configuration can be further extended with sync-type and sync-uri for overlays to get emerge --sync updating them automatically.

let's see a real example of tree and overlays added.

   /etc/portage/repos.conf - Replacement repos.conf file
[gentoo]
location = /usr/portage
sync-type = git
sync-uri = git://github.com/funtoo/ports-2012.git
 
[funtoo-overlay]
location = /root/git/funtoo-overlay
 
[funtoo-gnome]
location = /root/git/funtoo-gnome-overlay

funtoo-overlay and funtoo-gnome-overlay are an overlays added on top of regular portage tree.