Handbook:AMD64/Working/Features
Portage இன் தனிச்சிறப்புகள்
Portage has several additional features that make the Gentoo experience even better. Many of these features rely on certain software tools that improve performance, reliability, security, ...
To enable or disable certain Portage features, edit /etc/portage/make.conf and update or set the FEATURES variable which contains the various feature keywords, separated by white space. In several cases it will also be necessary to install the additional tool on which the feature relies.
Not all features that Portage supports are listed here. For a full overview, please consult the make.conf man page:
user $
man make.conf
முன்னிருப்பாக என்ன FEATURES கள் அமைக்கப்பட்டுள்ளது என்பதை அறிந்து கொள்வதற்கு, emerge --info வை இயக்கி FEATURES மாறியைத் தேடவும் அல்லது grep ஐ பயன்படுத்தவும்:
user $
emerge --info | grep ^FEATURES=
பகிர்ந்தளிக்கப்பட்ட தொகுத்தல்
distcc ஐ பயன்படுத்துதல்
distcc ஆனது ஒரு வலையமைப்பில் உள்ள பல்வேறு இயந்திரங்களுக்கு (ஒத்த இயந்திரங்களாக இருக்க வேண்டிய தேவையில்லை) தொகுத்தல் செயலை பகிர்ந்தளிக்கும் ஒரு நிரலாகும். distcc வாங்கியானது எல்லா தேவையான தகவல்களையும் (distccd ஐ இயக்குவதன் மூலம்) கிடைக்கும் distcc சேவையகங்களுக்கு அனுப்புகிறது. இதன்மூலம் distcc சேவையகங்களால் வாங்கியின் பொருட்டு மூல நிரலின் பாகங்களைத் தொகுக்க இயலும். இதன் விளைவாகத் தொகுத்தல் நேரம் கணிசமாகக் குறைக்கப்படும்.
distcc (மற்றும் ஜென்டூவோடு அதை எவ்வாறு வேலை செய்ய வைப்பது) என்பதைப் பற்றிய மேலும் விவரங்களை Distcc கட்டுரையில் காணலாம்.
distcc ஐ நிறுவுதல்
Distcc ships with a graphical monitor to monitor tasks that the computer is sending away for compilation. This tool is automatically installed if USE="gtk"
is set.
root #
emerge --ask sys-devel/distcc
Portage இன் distcc ற்கான ஆதரவை செயல்படுத்துதல்
Add distcc
to the FEATURES variable inside /etc/portage/make.conf. Next, edit the MAKEOPTS variable and increase the number of parallel build jobs that the system allows. A known guideline is to fill in -jN
where N
is the number of CPUs that run distccd (including the current host) plus one, but that is just a guideline.
Now run distcc-config and enter the list of available distcc servers. For a simple example assume that the available DistCC servers are 192.168.1.102 (the current host), 192.168.1.103 and 192.168.1.104 (two "remote" hosts):
root #
distcc-config --set-hosts "192.168.1.102 192.168.1.103 192.168.1.104"
distccd மறைநிரலை இயக்க மறந்துவிடாதீர்கள்:
root #
rc-update add distccd default
root #
/etc/init.d/distccd start
தொகுத்தல் பொருட்களை பதுக்குதல்
ccache ஐ பற்றி
ccache ஒரு விரைவான தொகுப்பி பதுக்கல் நிரலாகும். ஒவ்வொரு முறை ஒரு செயலி தொகுக்கப்படும்போதும், இது அதன் உடனடி விளைவுகளைப் பதுக்கி வைக்கும். இதன்மூலம் அதே நிரல் மற்றும் பதிப்பு தொகுக்கப்படும்போது, தொகுத்தல் நேரத்தைக் கணிசமாகக் குறைக்கும். முதல் முறை ccache ஐ இயக்கும்போது, வழக்கமான தொகுத்தல் நேரத்தை விடச் சற்று மந்தமாக இருப்பினும் பின்வரும் மறு-தொகுத்தல்கள் மிக விரைவாக இருக்கும். ccache ஆனது ஒரே செயலி பதிப்பு பலமுறை மறு-தொகுத்தல் செய்யப்படும் போது மட்டுமே உதவியாக இருக்கும். எனவே இது பெரும்பாலும் மென்பொருள் உருவாக்குநர்களுக்கு மட்டுமே பயனுள்ளதாக இருக்கும்.
ccache ஐ பற்றிய மேலும் விவரங்களுக்கு, இதன் வலைமனையை காணவும்
ccache is known to cause numerous compilation failures. Sometimes ccache will retain stale code objects or corrupted files, which can lead to packages that cannot be emerged. If this happens (errors like "File not recognized: File truncated" come up in build logs), try recompiling the application with ccache disabled (
FEATURES="-ccache"
in /etc/portage/make.conf or one-shot from the commandline with the following) before reporting a bug:
root #
FEATURES="-ccache" emerge <category/package>
ccache ஐ நிறுவுதல்
ccache ஐ நிறுவ பின்வரும் கட்டளையை இயக்கவும்:
root #
emerge --ask dev-util/ccache
Portage இன் ccache ற்கான ஆதரவை செயல்படுத்துதல்
Open /etc/portage/make.conf and add ccache
to any values defined in the FEATURES variable. If FEATURES does not exist, then create it. Next, add a new variable called CCACHE_SIZE and set it to 2G
:
/etc/portage/make.conf
Portage இன் ccache ற்கான ஆதரவை செயல்படுத்துதல்FEATURES="ccache" CCACHE_SIZE="2G"
ccache வேலை செய்கிறதா என்பதைச் சரிபார்ப்பதற்கு, ccache இடம் அதன் புள்ளிவிவரங்களை அளிக்கும்படி கேட்கவும். Portage ஆனது வேறு ccache home அடைவைப் பயன்படுத்துவதால், இடைக்காலத்திற்கு ஒரு CCACHE_DIR மாறியை அமைப்பது இன்றியமையாததாகும்:
root #
CCACHE_DIR="/var/tmp/ccache" ccache -s
The /var/tmp/ccache/ location is Portage' default ccache home directory; it can be changed by setting the CCACHE_DIR variable in /etc/portage/make.conf.
When running ccache standalone, it would use the default location of ${HOME}/.ccache/, which is why the CCACHE_DIR variable needs to be set when asking for the (Portage) ccache statistics.
Portage க்கு வெளியில் ccache ஐ பயன்படுத்துதல்
To use ccache for non-Portage compilations, add /usr/lib/ccache/bin/ to the beginning of the PATH variable (before /usr/bin). This can be accomplished by editing ~/.bash_profile in the user's home directory. Using ~/.bash_profile is one way to define PATH variables.
~/.bash_profile
Setting the ccache location before any other PATHPATH="/usr/lib/ccache/bin:${PATH}"
இரும தொகுப்புகளுக்கான ஆதரவு
முன்-கட்டப்பட்ட தொகுப்புகளை உருவாக்குதல்
முன்-கட்டப்பட்ட தொகுப்புகளின் நிறுவலை Portage ஆதரிக்கிறது. ஜென்டூ தன்னால் முன்-கட்டப்பட்ட தொகுப்புகளை அளிக்கவில்லை என்றாலும் Portage ஐ முன்-கட்டமைக்கப்பட்ட தொகுப்புகளைப் பற்றி முழுமையாக அறிந்து கொள்ள வைக்க முடியும்.
To create a prebuilt package use the quickpkg command if the package is already installed on the system, or emerge with the --buildpkg
or --buildpkgonly
options.
To have Portage create prebuilt packages of every single package that gets installed, add buildpkg
to the FEATURES variable.
More extended support for creating prebuilt package sets can be obtained with catalyst. For more information on catalyst please read the Catalyst FAQ.
முன்-கட்டப்பட்ட தொகுப்புகளை நிறுவுதல்
Although Gentoo doesn't provide one, it is possible to create a central repository where prebuilt packages are stored. In order to use this repository, it is necessary to make Portage aware of it by having the PORTAGE_BINHOST variable point to it. For instance, if the prebuilt packages are on ftp://buildhost/gentoo:
/etc/portage/make.conf
PORTAGE_BINHOST இருப்பிடத்தை சேர்த்தல்PORTAGE_BINHOST="ftp://buildhost/gentoo"
To install a prebuilt package, add the --getbinpkg
option to the emerge command alongside of the --usepkg
option. The former tells emerge to download the prebuilt package from the previously defined server while the latter asks emerge to try to install the prebuilt package first before fetching the sources and compiling it.
எடுத்துக்காட்டாக, gnumeric ஐ முன்-கட்டப்பட்ட தொகுப்புகளுடன் நிறுவ:
root #
emerge --usepkg --getbinpkg gnumeric
இ-ஒன்றாக்குதலின் முன்-கட்டப்பட்ட தொகுப்பு விருப்பத்தேர்வுகளைப் பற்றிய மேலும் விவரங்களை emerge இன் கைமுறை பக்கத்தில் காணலாம்:
user $
man emerge
முன்-கட்டப்பட்ட தொகுப்புகளை மற்றவற்றுக்குப் பகிர்ந்தளித்தல்
If prebuilt packages are to be distributed to others, then make sure that this is permitted. Check the distribution terms of the upstream package for this. For example, for a package released under the GNU GPL, sources must be made available along with the binaries.
Ebuilds may define a bindist
restriction in their RESTRICT variable if built binaries are not distributable. Sometimes this restriction is conditional on one or more USE flags.
By default, Portage will not mask any packages because of restrictions. This can be changed globally by setting the ACCEPT_RESTRICT variable in /etc/portage/make.conf. For example, to mask packages that have a bindist
restriction, add the following line to make.conf:
/etc/portage/make.conf
பகிர்ந்தளிக்கக்கூடிய இருமத் தொகுப்புகளை மட்டும் அனுமதிக்கும்ACCEPT_RESTRICT="* -bindist"
It is also possible to override the ACCEPT_RESTRICT variable by passing the --accept-restrict
option to the emerge command. For example, --accept-restrict=-bindist
will temporarily mask packages with a bindist
restriction.
Also consider setting the ACCEPT_LICENSE variable when distributing packages. See the Licenses section for this.
It is entirely the responsibility of each user to comply with packages' license terms and with laws of each user's country. The metadata variables defined by ebuilds (RESTRICT or LICENSE) can provide guidance when distribution of binaries is not permitted, however output from Portage or questions answered by the Gentoo developers are not legal statements and should not be relied upon as such. Be cautious to abide by the law of your physical location.
கோப்புகளைக் கொணர்தல்
Userfetch
Portage is normally run as the root user. Setting FEATURES="userfetch"
will allow Portage to drop root privileges while fetching package sources and run with user/group permissions of portage:portage. This is a small security improvement.
If userfetch
is set in FEATURES be sure to change the owner of all the files beneath /var/db/repos/gentoo using the chown command with root privileges:
root #
chown --recursive --verbose portage:portage /var/db/repos/gentoo
dist கோப்புகளை சரிபார்த்தல்
To re-verify the integrity and (potentially) re-download previously removed/corrupted distfiles for all currently installed packages, run:
root #
emerge --ask --fetchonly --emptytree @world