Handbook:SPARC/Portage/CustomTree/it

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:SPARC/Portage/CustomTree and the translation is 50% complete.
Manuale SPARC
Installazione
Riguardo l'installazione
Il mezzo d'installazione
Configurare la rete
Preparare i dischi
Installare lo stage3
Installare il sistema base
Configurare il kernel
Configurare il sistema
Strumenti di sistema
Configurare l'avviatore
Ultimare l'installazione
Lavorare con Gentoo
Introduzione a Portage
Opzioni USE
Funzionalità di Portage
Sistema script di init
Variabili d'ambiente
Lavorare con Portage
File e cartelle
Variabili
Mixare i rami del software
Strumenti aggiuntivi
Repositorio pacchetti personalizzato
Funzionalità avanzate
Configurare la rete
Come iniziare
Configurazione avanzata
Networking modulare
Wireless
Aggiungere funzionalità
Gestione dinamica

Escludere pacchetti e categorie

È possibile aggiornare selettivamente certe categorie/pacchetti ed ignorare le altre categorie/pacchetti. Ciò può esser fatto facendo escludere a rsync tali categorie/pacchetti durante l'operazione emerge --sync.

Attenzione
In order for this method to work, manifest verification must be disabled. This will reduce the security of the repo. To disable the verification, either disable the rsync-verify USE flag on the sys-apps/portage package or set sync-rsync-verify-metamanifest=no (see man 5 portage) in the repos.conf entry of the Gentoo ebuild repository.

Definire nella seguente variabile il nome del file che contiene i modelli (pattern) di esclusione: PORTAGE_RSYNC_EXTRA_OPTS in /etc/portage/make.conf:

FILE /etc/portage/make.confDefinire il file delle esclusioni
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
FILE /etc/portage/rsync_excludesEscludere tutti i giochi
games-*/*

Si noti tuttavia che ciò può portare a problemi con le dipendenze dato che i nuovi pacchetti consentiti potrebbero dipendere da pacchetti nuovi ma esclusi.

Aggiungere ebuild non ufficiali

Definire un repositorio personalizzato

Manual creation

È possibile chiedere a Portage di usare ebuild non ufficialmente disponibili tramite il repositorio di Gentoo. Creare una nuova cartella (ad esempio /usr/local/portage) in cui archiviare gli ebuild di terze parti. Usare la stessa struttura di cartelle del repositorio di Gentoo ufficiale!

root #mkdir -p /usr/local/portage/{metadata,profiles}
root #chown -R portage:portage /usr/local/portage

Poi, scegliere un nome significativo per il repositorio. Il seguente esempio usa "localrepo" come nome:

root #echo 'localrepo' > /usr/local/portage/profiles/repo_name

Then define the EAPI used for the profiles within the repository:

root #echo '8' > /var/db/repos/localrepo/profiles/eapi

Indicare a Portage che il repositorio master è quello principale di Gentoo e che il repositorio non deve essere sincronizzato automaticamente (poiché non è supportato da un server rsync, o da un distributore (mirror) git o da altra fonte di repositori):

FILE /usr/local/portage/metadata/layout.conf
masters = gentoo
auto-sync = false

Infine, abilitare il repositorio sul sistema locale creando un file di configurazione del repositorio su /etc/portage/repos.conf ed informando Portage dove sarà possibile trovare il repositorio locale:

FILE /etc/portage/repos.conf/localrepo.conf
[localrepo]
location = /usr/local/portage

Optional: Creating a repo using eselect repository

Alternatively, a custom ebuild repository can be quickly created using the eselect repository module (from app-eselect/eselect-repository). In the following example, substitute localrepo with a name of choice:

root #eselect repository create localrepo
Adding localrepo to /etc/portage/repos.conf/eselect-repo.conf ...
Repository <ebuild_repository_name> created and added

A bare repository named "localrepo" will be made available at /var/db/repos/localrepo.

Lavorare con diverse sovrapposizioni

For those desiring to develop several ebuild repos, test packages before they hit the Gentoo repository, or who want to use unofficial ebuilds from various sources, the app-eselect/eselect-repository package also provides tooling to aid in keeping repositories up to date. See also eselect repository article.

Adding a repo using eselect repository

For instance, to enable the GURU repository:

root #eselect repository enable guru
Updating of repositories added with this methods will occur automatically on each sync:
root #emerge --sync

Software non gestito da Portage

Usare Portage con software autogestito

A volte gli utenti desiderano configurare, installare e gestire il software individualmente senza che Portage automatizzi il processo, anche se Portage può fornire quei titoli software. I casi noti sono sorgenti del kernel e driver Nvidia. È possibile configurare Portage affinché sappia che un determinato pacchetto viene installato manualmente (e quindi tener conto di questa informazione durante il calcolo delle dipendenze). Questo processo è chiamato iniezione (injecting) ed è supportato da Portage tramite il file /etc/portage/profile/package.provided.

Per esempio, per informare Portage che gentoo-sources-4.9.16 è stato installato manualmente, aggiungere la seguente riga a /etc/portage/profile/package.provided:

FILE /etc/portage/profile/package.providedSegnare gentoo-sources-4.9.16 come manualmente installato
sys-kernel/gentoo-sources-4.9.16
Nota
Questo è un file che usa versioni senza un operatore =.