Difference between revisions of "Handbook:Parts/Portage/CustomTree"
(Marked this version for translation) |
Maffblaster (talk | contribs) (Template updates. Link update.) |
||
Line 2: | Line 2: | ||
</noinclude>{{Handbook:Parts/TOC}} | </noinclude>{{Handbook:Parts/TOC}} | ||
− | == Using a subset of the | + | == Using a subset of the Portage tree == <!--T:3--> |
=== Excluding packages and categories === <!--T:4--> | === Excluding packages and categories === <!--T:4--> | ||
<!--T:5--> | <!--T:5--> | ||
− | It is possible to selectively update certain categories/packages and ignore the other categories/packages. This can be achieved by having rsync exclude categories/packages during the | + | It is possible to selectively update certain categories/packages and ignore the other categories/packages. This can be achieved by having rsync exclude categories/packages during the {{c|emerge --sync}} step. |
<!--T:6--> | <!--T:6--> | ||
− | Define the name of the file that contains the exclude patterns in the PORTAGE_RSYNC_EXTRA_OPTS variable in {{Path|/etc/portage/make.conf}}: | + | Define the name of the file that contains the exclude patterns in the <var>PORTAGE_RSYNC_EXTRA_OPTS</var> variable in {{Path|/etc/portage/make.conf}}: |
<!--T:7--> | <!--T:7--> | ||
Line 27: | Line 27: | ||
== Adding unofficial ebuilds == <!--T:10--> | == Adding unofficial ebuilds == <!--T:10--> | ||
− | === Defining a | + | === Defining a Portage overlay directory === <!--T:11--> |
<!--T:12--> | <!--T:12--> | ||
− | It is possible to ask | + | It is possible to ask Portage to use ebuilds that are not officially available through the Portage tree. Create a new directory (for instance {{Path|/usr/local/portage}}) in which to store the 3rd-party ebuilds. Use the same directory structure as the official Portage tree! |
<!--T:13--> | <!--T:13--> | ||
− | Then define PORTDIR_OVERLAY in {{Path|/etc/portage/make.conf}} and have it point to the previously defined directory. When using | + | Then define <var>PORTDIR_OVERLAY</var> in {{Path|/etc/portage/make.conf}} and have it point to the previously defined directory. When using Portage now, it will take those ebuilds into account as well without removing/overwriting those ebuilds the next time {{c|emerge --sync}} is ran. |
=== Working with several overlays === <!--T:14--> | === Working with several overlays === <!--T:14--> | ||
<!--T:15--> | <!--T:15--> | ||
− | For the | + | For the power users who develop on several overlays, test packages before they hit the Portage tree or just want to use unofficial ebuilds from various sources, the {{Package|app-portage/layman}} package brings {{c|layman}}, a tool to help users keep the overlay repositories up to date. |
<!--T:16--> | <!--T:16--> | ||
− | First install and configure | + | First install and configure {{c|layman}} as shown in the [[Project:Overlays/User_Guide|Overlays User Guide]], and add the desired repositories with {{c|layman -a}}. |
<!--T:17--> | <!--T:17--> | ||
Line 50: | Line 50: | ||
<!--T:19--> | <!--T:19--> | ||
− | Regardless of how many repositories are used through | + | Regardless of how many repositories are used through {{c|layman}}, all the repositories can be updated with the following command: |
<!--T:20--> | <!--T:20--> | ||
Line 56: | Line 56: | ||
<!--T:21--> | <!--T:21--> | ||
− | For more information on working with overlays, please read | + | For more information on working with overlays, please read {{c|man layman}} and the previously linked layman/overlay users' guide. |
− | == Non- | + | == Non-Portage maintained software == <!--T:22--> |
− | === Using | + | === Using Portage with self-maintained software === <!--T:23--> |
<!--T:24--> | <!--T:24--> | ||
− | Sometimes users want to configure, install and maintain software individually without having Portage automate the process, even though Portage can provide the software titles. Known cases are kernel sources and nvidia drivers. It is possible to configure Portage so it knows that a certain package is manually installed on the system (and thus take this information into account when calculating dependencies). This process is called ''injecting'' and is supported by | + | Sometimes users want to configure, install and maintain software individually without having Portage automate the process, even though Portage can provide the software titles. Known cases are kernel sources and nvidia drivers. It is possible to configure Portage so it knows that a certain package is manually installed on the system (and thus take this information into account when calculating dependencies). This process is called ''injecting'' and is supported by Portage through the {{Path|/etc/portage/profile/package.provided}} file. |
<!--T:25--> | <!--T:25--> | ||
− | For instance, to inform | + | For instance, to inform Portage about gentoo-sources-2.6.11.6 which has been installed manually, add the following line to {{Path|/etc/portage/profile/package.provided}}: |
<!--T:30--> | <!--T:30--> | ||
Line 77: | Line 77: | ||
<!--T:29--> | <!--T:29--> | ||
− | {{#set:Has Title=Custom | + | {{#set:Has Title=Custom Portage tree}} |
{{Handbook:Parts/Navigator|Prev=Handbook:{{ROOTPAGENAME}}/Portage/Tools|Next=Handbook:{{ROOTPAGENAME}}/Portage/Advanced}} | {{Handbook:Parts/Navigator|Prev=Handbook:{{ROOTPAGENAME}}/Portage/Tools|Next=Handbook:{{ROOTPAGENAME}}/Portage/Advanced}} | ||
Revision as of 22:24, 3 September 2015
Using a subset of the Portage tree
Excluding packages and categories
It is possible to selectively update certain categories/packages and ignore the other categories/packages. This can be achieved by having rsync exclude categories/packages during the emerge --sync step.
Define the name of the file that contains the exclude patterns in the PORTAGE_RSYNC_EXTRA_OPTS variable in /etc/portage/make.conf:
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
games-*/*
Note however that this may lead to dependency issues since new, allowed packages might depend on new but excluded packages.
Adding unofficial ebuilds
Defining a Portage overlay directory
It is possible to ask Portage to use ebuilds that are not officially available through the Portage tree. Create a new directory (for instance /usr/local/portage) in which to store the 3rd-party ebuilds. Use the same directory structure as the official Portage tree!
Then define PORTDIR_OVERLAY in /etc/portage/make.conf and have it point to the previously defined directory. When using Portage now, it will take those ebuilds into account as well without removing/overwriting those ebuilds the next time emerge --sync is ran.
Working with several overlays
For the power users who develop on several overlays, test packages before they hit the Portage tree or just want to use unofficial ebuilds from various sources, the app-portage/layman package brings layman, a tool to help users keep the overlay repositories up to date.
First install and configure layman as shown in the Overlays User Guide, and add the desired repositories with layman -a.
For instance, to enable the hardened-development overlay:
root #
layman -a hardened-development
Regardless of how many repositories are used through layman, all the repositories can be updated with the following command:
root #
layman -S
For more information on working with overlays, please read man layman and the previously linked layman/overlay users' guide.
Non-Portage maintained software
Using Portage with self-maintained software
Sometimes users want to configure, install and maintain software individually without having Portage automate the process, even though Portage can provide the software titles. Known cases are kernel sources and nvidia drivers. It is possible to configure Portage so it knows that a certain package is manually installed on the system (and thus take this information into account when calculating dependencies). This process is called injecting and is supported by Portage through the /etc/portage/profile/package.provided file.
For instance, to inform Portage about gentoo-sources-2.6.11.6 which has been installed manually, add the following line to /etc/portage/profile/package.provided:
sys-kernel/gentoo-sources-2.6.11.6
This is a file that uses versions without an operator.