Gentoo Linux alpha Handbook: Working with Gentoo/ta
Portage ற்கு வரவேற்கிறோம்
Portage என்பது ஜென்டூவின் மென்பொருள் மேலாண்மையில் மிகவும் குறிப்பிடத்தக்கக் கண்டுபிடிப்புகளுள் ஒன்றாகும். இதன் உயர்ந்த நெகிழ்வுத்தன்மை மற்றும் மாபேரளவான தனிச்சிறப்புகள் காரணமாக இது லினக்ஸிற்காக கிடைக்கும் மென்பொருள் மேலாண்மை கருவிகளுள் சிறந்ததாக பெரும்பாலும் கருதப்படுகிறது.
Portage முற்றிலும் பைதான் மற்றும் பாஷ் ஆல் எழுதப்பட்டுள்ளது. இவை இரண்டும் உரைநிரல் மொழிகள் என்பதால் பயனர்களால் இவற்றை முழுமையாகக் காண முடியும்.
பெரும்பாலான பயனர்கள் emerge கருவி மூலம் Portage உடன் வேளை செய்வர். இந்த பகுதி emerge இன் கைமுறை பக்கத்தில் உள்ள தகவல்களை நகலெடுத்தவாறு கூறுவதற்காக வடிவமைக்கப்படவில்லை. emerge ற்கான விருப்பத்தேர்வுகளின் முழு அறிக்கையைக் காண, கைமுறை பக்கத்தை நாடவும்:
user $
man emerge
ஜென்டூ கருவூலம்
Ebuilds
ஜென்டூ ஆவணப்படுத்தலானது ஒரு தொகுப்பைப் பற்றிப் பேசும்போது, அது உண்மையில் ஜென்டூ கருவூலம் மூலம் ஜென்டூ பயனர்களுக்குக் கிடைக்கப்பெறும் மென்பொருள் தலைப்புகளைக் குறிப்பதாகும். இந்த கருவூலமானது, ebuild என அழைக்கப்படும் ஒரு மென்பொருளைப் பராமரிக்க (நிறுவல், தேடல், வினவுதல் முதலியன) Portage ற்கு தேவையான எல்லா தகவல்களையும் கொண்டுள்ள கோப்புகளின் தொகுப்புகளைக் கொண்டுள்ளது. இவ்வகை ebuild கள் முன்னிருப்பாக /var/db/repos/gentoo என்னும் இடத்தில் இருக்கும்.
எப்போதாவது மென்பொருள் தலைப்புகள் தொடர்பான சில செயல்களைச் செய்யுமாறு Portage இடம் ஒருவர் கேட்கும்போது, முறைமையில் உள்ள ebuild களை அடிப்படையாகப் பயன்படுத்தும். எனவே, புதிய மென்பொருள், பாதுகாப்பு இற்றைப்படுத்தல், முதலியவற்றைப் பற்றி Portage அறிந்துகொள்ள, முறைமையில் உள்ள ebuild களை முறையாக இற்றைப்படுத்துவது இன்றியமையாததாகும்.
ஜென்டூ கருவூலத்தை புதுப்பித்தல்
ஜென்டூ கருவூலமானது விரைவான ஏற்றத்துக்குரிய கோப்பு மாற்ற பயன்கூறு நிரலாகிய rsync ஐ கொண்டு பெரும்பாலும் இற்றைப்படுத்தப்படுகிறது. emerge கட்டளை rsync ற்கு ஒரு முன்முனையை அளித்திருப்பதால் மிகவும் எளிமையாக இற்றைப்படுத்தலாம்:
root #
emerge --sync
சில நேரங்களில் rsync ஆனது கண்ணாடிதளங்களோடு தொடர்பு கொள்வதை தீயரண் கட்டுப்பாடுகள் தடுக்கலாம். இந்த வழக்கில், ஜென்டூவின் தினசரி உருவாக்கப்படும் நொடிப்பெடுப்புகளை கொண்டு ஜென்டூ கருவூலத்தை இற்றைப்படுத்தலாம். emerge-webrsync கருவியானது அண்மை நொடிப்பெடுப்பை தானியக்கமாகக் கொணர்ந்து முறைமையில் நிறுவுகிறது:
root #
emerge-webrsync
emerge-webrsync ஐ பயன்படுத்துவதன் கூடுதல் நன்மை என்னவென்றால், இது ஜென்டூ வெளியீடு பொறியியல் GPG திறவுகோல் மூலம் ஒப்பம் இடப்பட்ட ஜென்டூ கருவூல நிழற்பட நொடிப்பெடுப்புகளை மட்டும் கொணர நிர்வாகியை அனுமதிக்கும். இதைப்பற்றிய மேலும் தகவல்களை Portage இன் தனிச்சிறப்புகளில் உள்ள சரிபார்க்கப்பட்ட ஜென்டூ கருவூல நிழற்பட நொடிப்பெடுப்புகளைக் கொணர்தல் பகுதியில் காணலாம்.
மென்பொருட்களை பராமரித்தல்
மென்பொருட்களை தேடுதல்
ஜென்டூ கருவூலத்தில் ஒரு மென்பொருளைத் தேடுவதற்குப் பல வழிகள் உள்ளன. அதில் ஒரு வழி emerge ஐ கொண்டு தேடுவது. முன்னிருப்பாக, கொடுக்கப்பட்ட தேடல் சொல்லிற்கு (முழுமையாக அல்லது பகுதியாக) ஒத்துப்போகும் தொகுப்புகளின் பெயர்களை emerge --search அளிக்கிறது.
எடுத்துக்காட்டாக, "pdf" என்பதை தங்கள் பெயரில் கொண்டுள்ள எல்லா தொகுப்புகளையும் தேடுவதற்கு:
user $
emerge --search pdf
விளக்கங்களைக் கொண்டு தேட, --searchdesc
(அல்லது -S
) விருப்பத்தேர்வைப் பயன்படுத்தவும்:
user $
emerge --searchdesc pdf
வெளியீடு பல தகவல்களை அளிப்பதைக் கவனிக்கவும். புலங்கள் தெளிவாக முத்திரையிடப்பட்டுள்ளதால் இதன் பொருள்களுக்குள் நாம் மேலும் செல்லப் போவதில்லை:
* net-print/cups-pdf Latest version available: 1.5.2 Latest version installed: [ Not Installed ] Size of downloaded files: 15 kB Homepage: http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/ Description: Provides a virtual printer for CUPS to produce PDF files. License: GPL-2
மென்பொருட்களை நிறுவுதல்
மென்பொருள் தலைப்பைக் கண்டறிந்ததும், வெறும் ஒரு emerge கட்டளையைக் கொண்டு அதை நிறுவி விடலாம். எடுத்துக்காட்டாக, gnumeric ஐ நிறுவுவதற்கு:
root #
emerge --ask app-office/gnumeric
பல செயலிகள் ஒன்றையொன்று சார்ந்து இருப்பதால், குறிப்பிட்ட ஒரு மென்பொருள் தொகுப்பை நிறுவ முயலும்போது, அதன் சார்ப்புகளையும் சேர்த்து நிறுவ வேண்டிய நிலை ஏற்படும். கவலை கொள்ள வேண்டாம், Portage இவ்வகை சார்புகளையும் திறம்படக் கையாளுகிறது. Portage எவற்றையெல்லாம் நிறுவும் என்பதை அறிந்துகொள்ள, --pretend
விருப்பத்தேர்வைச் சேர்க்கவும், எடுத்துக்காட்டாக:
root #
emerge --pretend gnumeric
During the installation of a package, Portage will download the necessary source code from the Internet (if necessary) and store it by default in /var/cache/distfiles/. After this it will unpack, compile and install the package. To tell Portage to only download the sources without installing them, add the --fetchonly
option to the emerge command:
root #
emerge --fetchonly gnumeric
நிறுவப்பட்ட தொகுப்பின் ஆவணப்படுத்தலைக் கண்டறிய
Many packages come with their own documentation. Sometimes, the doc
USE flag determines whether the package documentation should be installed or not. To see if the doc
USE flag is used by a package, use emerge -vp category/package:
root #
emerge -vp media-libs/alsa-lib
These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-libs/alsa-lib-1.1.3::gentoo USE="python -alisp -debug -doc" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7" 0 KiB
The best way of enabling the doc
USE flag is doing it on a per-package basis via /etc/portage/package.use, so that only the documentation for the wanted packages is installed. For more information read the USE flags section.
Once the package installed, its documentation is generally found in a subdirectory named after the package in the /usr/share/doc/ directory:
user $
ls -l /usr/share/doc/alsa-lib-1.1.3
total 16 -rw-r--r-- 1 root root 3098 Mar 9 15:36 asoundrc.txt.bz2 -rw-r--r-- 1 root root 672 Mar 9 15:36 ChangeLog.bz2 -rw-r--r-- 1 root root 1083 Mar 9 15:36 NOTES.bz2 -rw-r--r-- 1 root root 220 Mar 9 15:36 TODO.bz2
A more sure way to list installed documentation files is to use equery's --filter
option. equery is used to query Portage's database and comes as part of the app-portage/gentoolkit package:
user $
equery files --filter=doc alsa-lib
* Searching for alsa-lib in media-libs ... * Contents of media-libs/alsa-lib-1.1.3: /usr/share/doc/alsa-lib-1.1.3/ChangeLog.bz2 /usr/share/doc/alsa-lib-1.1.3/NOTES.bz2 /usr/share/doc/alsa-lib-1.1.3/TODO.bz2 /usr/share/doc/alsa-lib-1.1.3/asoundrc.txt.bz2
The --filter
option can be used with other rules to view the install locations for many other types of files. Additional functionality can be reviewed in equery's man page: man 1 equery.
மென்பொருட்களை நீக்குதல்
To safely remove software from a system, use emerge --deselect. This will tell Portage a package is no longer required and it is eligible for cleaning through --depclean
.
root #
emerge --deselect gnumeric
When a package is no longer selected, the package and its dependencies that were installed automatically when it was installed are still left on the system. To have Portage locate all dependencies that can now be removed, use emerge's --depclean
functionality, which is documented later.
முறைமையை புதுப்பித்தல்
To keep the system in perfect shape (and not to mention install the latest security updates) it is necessary to update the system regularly. Since Portage only checks the ebuilds in the Gentoo repository, the first thing to do is to update this repository. When the Gentoo repository is updated, the system can be updated using emerge --update @world. In the next example, the --ask
option is also used which will tell Portage to display the list of packages it wants to upgrade and ask for confirmation:
root #
emerge --update --ask @world
Portage will then search for newer version of the applications that are installed. However, it will only verify the versions for the applications that are explicitly installed (the applications listed in /var/lib/portage/world) - it does not thoroughly check their dependencies. To update the dependencies of those packages as well, add the --deep
option:
root #
emerge --update --deep @world
Still, this does not mean all packages: some packages on the system are needed during the compile and build process of packages, but once that package is installed, these dependencies are no longer required. Portage calls those build dependencies. To include those in an update cycle, add --with-bdeps=y
:
root #
emerge --update --deep --with-bdeps=y @world
Since security updates also happen in packages that are not explicitly installed on the system (but that are pulled in as dependencies of other programs), it is recommended to run this command once in a while.
If the USE settings of the system have been altered, it is recommended to add --newuse
as well. Portage will then verify if the change requires the installation of new packages or recompilation of existing ones:
root #
emerge --update --deep --with-bdeps=y --newuse @world
மீ தொகுப்புகள்
Some packages in the Gentoo repository don't have any real content but are used to install a collection of packages. For instance, the kde-plasma/plasma-meta package will install the KDE Plasma desktop on the system by pulling in various Plasma-related packages as dependencies.
To remove such a package from your system, running emerge --deselect on the package won't have much effect as the dependencies remain on the system.
Portage has the functionality to remove orphaned dependencies as well, but since the availability of software is dynamically dependent it is important to first update the entire system fully, including the new changes applied when changing USE flags. After this one can run emerge --depclean to remove the orphaned dependencies. When this is done, it might be necessary to rebuild the applications that were dynamically linked to the now-removed software titles but don't require them anymore, although recently support for this has been added to Portage.
இவற்றை எல்லாம் பின்வரும் இரண்டு கட்டளைகள் மூலம் கையாளலாம்:
root #
emerge --update --deep --newuse @world
root #
emerge --ask --depclean
உரிமங்கள்
Beginning with Portage version 2.1.7, it is possible to accept or reject software installation based on its license. All packages in the tree contain a LICENSE entry in their ebuilds. Running emerge --search category/package will show the package's license.
ebuild இல் உள்ள LICENSE மாறியானது ஜென்டூ உருவாக்குநர்கள் மற்றும் பயனர்களுக்கான வழிகாட்டி மட்டுமே, சட்ட வாக்குமூலம் இல்லை. மேலும் இது நடைமுறையில் எதிரொலிக்கும் என எந்த பொறுப்புறுதியும் இல்லை. அதனால் இதை நம்பி இருக்க வேண்டாம். நீங்கள் பயன்படுத்தப்படும் எல்லா கோப்புகளையும் சேர்த்துத் தொகுப்பை ஆழமாகச் சரிபார்க்கவும்.
இயல்பாக, Portage ஆனது கட்டற்ற மென்பொருள் அறக்கட்டளை, திறந்த மூல முன்னெடுப்பு களால் வெளிப்படையாக ஏற்றுக்கொள்ளப்பட்ட உரிமங்கள் அல்லது கட்டற்ற மென்பொருள் வரையறுத்தல் ஐ பின்பற்றும் உரிமங்கள் ஆகியவற்றை அனுமதிக்கிறது.
அனுமதிக்கப்பட்ட உரிமங்களைக் கட்டுப்படுத்தும் மாறியானது ACCEPT_LICENSE என அழைக்கப்படுகிறது. இதை /etc/portage/make.conf கோப்பில் அமைக்கலாம். அடுத்த எடுத்துக்காட்டில் முன்னிருப்பு மதிப்பு காண்பிக்கப்பட்டுள்ளது:
/etc/portage/make.conf
முன்னிருப்பு ACCEPT_LICENSE அமைப்புACCEPT_LICENSE="-* @FREE"
இந்த உள்ளமைவு மூலம், கட்டற்ற மென்பொருள் அல்லது ஆவணப்படுத்தல் உரிமத்தைக் கொண்டுள்ள தொகுப்புக்கள் நிறுவ முடியும். கட்டற்ற மென்பொருள் அல்லாதவற்றை நிறுவ முடியாது.
ACCEPT_LICENSE மாறியை /etc/portage/make.conf கோப்பில் உலகம் முழுமைக்கும், /etc/portage/package.license கோப்பில் ஒரு தொகுப்புக்குத் தனியாக அமைக்க முடியும்.
எடுத்துக்காட்டாக, www-client/google-chrome தொகுப்பிற்கான google-chrome உரிமத்தை அனுமதிப்பதற்கு, பின்வருவதை /etc/portage/package.license இல் சேர்க்கவும்:
/etc/portage/package.license
google-chrome தொகுப்பிற்கான google-chrome உரிமத்தை அனுமதித்தல்www-client/google-chrome google-chrome
This permits the installation of the www-client/google-chrome package, but prohibits the installation of the www-plugins/chrome-binary-plugins package, even though it has the same license.
Licenses are stored in /var/db/repos/gentoo/licenses/ directory, and license groups are kept in /var/db/repos/gentoo/profiles/license_groups file. The first entry of each line in CAPITAL letters is the name of the license group, and every entry after that is an individual license.
License groups defined in the ACCEPT_LICENSE variable are prefixed with an @
sign. A possible setting (which was the previous Portage default) is to allow all licenses, except End User License Agreements (EULAs) that require reading and signing an acceptance agreement. To accomplish this, accept all licenses (using *
) and then remove the licenses in the EULA group as follows:
/etc/portage/make.conf
Accept all licenses except EULAsACCEPT_LICENSE="* -@EULA"
இந்த அமைப்பு கட்டற்ற மென்பொருள் மற்றும் ஆவணப்படுத்தல் அல்லாதவையும் அனுமதிக்கும் என்பதை நினைவில் கொள்க.
Portage குறை கூறும்போது
கலைச்சொல்
முன்பு கூறியது போல், Portage மற்ற மென்பொருள் மேலாண்மை கருவிகள் அளிக்கத் தவறும் சிறப்பியல்புகளைக் கொண்ட மிக்க திறன் வாய்ந்த கருவியாகும். இதைப் புரிந்துகொள்வதற்காக நாங்கள் Portage இன் சில இயல்புகளை விரிவாக இல்லாமல் சற்று எளிமையாக விளக்கியுள்ளோம்.
With Portage different versions of a single package can coexist on a system. While other distributions tend to name their package to those versions (like freetype and freetype2) Portage uses a technology called SLOTs. An ebuild declares a certain SLOT for its version. Ebuilds with different SLOTs can coexist on the same system. For instance, the freetype package has ebuilds with SLOT="1" and SLOT="2".
There are also packages that provide the same functionality but are implemented differently. For instance, metalogd, sysklogd, and syslog-ng are all system loggers. Applications that rely on the availability of "a system logger" cannot depend on, for instance, metalogd, as the other system loggers are as good a choice as any. Portage allows for virtuals: each system logger is listed as an "exclusive" dependency of the logging service in the logger virtual package of the virtual category, so that applications can depend on the virtual/logger package. When installed, the package will pull in the first logging package mentioned in the package, unless a logging package was already installed (in which case the virtual is satisfied).
Software in the Gentoo repository can reside in different branches. By default the system only accepts packages that Gentoo deems stable. Most new software titles, when committed, are added to the testing branch, meaning more testing needs to be done before it is marked as stable. Although the ebuilds for those software are in the Gentoo repository, Portage will not update them before they are placed in the stable branch.
Some software is only available for a few architectures. Or the software doesn't work on the other architectures, or it needs more testing, or the developer that committed the software to the Gentoo repository is unable to verify if the package works on different architectures.
Each Gentoo installation also adheres to a certain profile which contains, amongst other information, the list of packages that are required for a system to function normally.
தடுக்கப்பட்ட தொகுப்புகள்
[blocks B ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
!!! Error: the mail-mta/postfix package conflicts with another package. !!! both can't be installed on the same system together. !!! Please use 'emerge --pretend' to determine blockers.
Ebuilds contain specific fields that inform Portage about its dependencies. There are two possible dependencies: build dependencies, declared in the DEPEND variable and run-time dependencies, likewise declared in RDEPEND. When one of these dependencies explicitly marks a package or virtual as being not compatible, it triggers a blockage.
While recent versions of Portage are smart enough to work around minor blockages without user intervention, occasionally such blockages need to be resolved manually.
To fix a blockage, users can choose to not install the package or unmerge the conflicting package first. In the given example, one can opt not to install postfix or to remove ssmtp first.
Sometimes there are also blocking packages with specific atoms, such as <media-video/mplayer-1.0_rc1-r2
. In this case, updating to a more recent version of the blocking package could remove the block.
It is also possible that two packages that are yet to be installed are blocking each other. In this rare case, try to find out why both would need to be installed. In most cases it is sufficient to do with one of the packages alone. If not, please file a bug on Gentoo's bugtracking system.
மறைக்கப்பட்ட தொகுப்புகள்
!!! all ebuilds that could satisfy "bootsplash" have been masked.
!!! possible candidates are: - gnome-base/gnome-2.8.0_pre1 (masked by: ~x86 keyword) - lm-sensors/lm-sensors-2.8.7 (masked by: -sparc keyword) - sys-libs/glibc-2.3.4.20040808 (masked by: -* keyword) - dev-util/cvsd-1.0.2 (masked by: missing keyword) - games-fps/unreal-tournament-451 (masked by: package.mask) - sys-libs/glibc-2.3.2-r11 (masked by: profile) - net-im/skype-2.1.0.81 (masked by: skype-eula license(s))
When trying to install a package that isn't available for the system, this masking error occurs. Users should try installing a different application that is available for the system or wait until the package is marked as available. There is always a reason why a package is masked:
மறைத்தலுக்கான காரணம் | விளக்கம் |
---|---|
~arch குறிச்சொல் | செயலியானது நிலையான கிளையில் சேர்ப்பதற்குத் தேவையான அளவு சோதிக்கப்படவில்லை. சில நாட்கள் அல்லது வாரங்கள் காத்திருந்து பின் முயற்சி செய்து பார்க்கவும். |
-arch குறிச்சொல் அல்லது -* குறிச்சொல் | செயலியானது உங்கள் கட்டமைப்பில் வேலை செய்யாது. தொகுப்பு உங்கள் கட்டமைப்பில் வேலை செய்யும் என நீங்கள் நம்பினால் எங்கள் Bugzilla இணையதளத்தில் ஒரு வழுவை பதிவு செய்யவும். |
missing குறிச்சொல் | செயலியானது உங்கள் கட்டமைப்பில் இன்னும் சோதிக்கப்படவில்லை. தொகுப்பைச் சோதிக்கும்படி கட்டமைப்பு அனுப்புதல் குழுவிடம் கேட்டுக்கொள்ளவும் அல்லது அவர்களுக்காக அதை நீங்களே சோதித்து பின் முடிவுகளை எங்கள் Bugzilla இணையதளத்தில் தெரிவிக்கவும். |
package.mask | தொகுப்பானது பழுதடைந்து, நிலையில்லாமல் அல்லது மோசமான நிலையில் உள்ளதால் வேண்டுமென்றே 'பயன்படுத்த-வேண்டாம்' எனக் குறிக்கப்பட்டுள்ளது. |
profile | தொகுப்பானது இப்போதுள்ள தனியமைப்பிற்குப் பொருந்தக்கூடியதாக இல்லை எனக் கண்டறியப்பட்டுள்ளது. இந்த செயலி நிறுவப்பட்டால் முறைமை பழுதாகி விடலாம் அல்லது இது இப்போது பயன்பாட்டில் உள்ள தனியமைப்போடு ஒத்துப்போகாமல் இருக்கலாம். |
license | தொகுப்பின் உரிமமானது ACCEPT_LICENSE மதிப்போடு ஒத்துப்போக வில்லை. /etc/portage/make.conf அல்லது /etc/portage/package.license என்னும் இடத்தில் அமைப்பதன் மூலம் இதன் உரிமத்தை அல்லது சரியான உரிம குழுவை அனுமதிக்கவும். |
தேவையான USE கொடி மாற்றங்கள்
The following USE changes are necessary to proceed: #required by app-text/happypackage-2.0, required by happypackage (argument) >=app-text/feelings-1.0.0 test
--autounmask
அமைக்கப்படவில்லை என்றால் பிழைச் செய்தி பின்வருமாறு திரையில் காட்டப்படும்:
emerge: there are no ebuilds built with USE flags to satisfy "app-text/feelings[test]". !!! One of the following packages is required to complete your request: - app-text/feelings-1.0.0 (Change USE: +test) (dependency required by "app-text/happypackage-2.0" [ebuild]) (dependency required by "happypackage" [argument])
Such warning or error occurs when a package is requested for installation which not only depends on another package, but also requires that that package is built with a particular USE flag (or set of USE flags). In the given example, the package app-text/feelings needs to be built with USE="test", but this USE flag is not set on the system.
To resolve this, either add the requested USE flag to the global USE flags in /etc/portage/make.conf, or set it for the specific package in /etc/portage/package.use.
காணாமல் போன சார்புநிலைகள்
emerge: there are no ebuilds to satisfy ">=sys-devel/gcc-3.4.2-r4". !!! Problem with ebuild sys-devel/gcc-3.4.2-r2 !!! Possibly a DEPEND/*DEPEND problem.
The application to install depends on another package that is not available for the system. Please check Bugzilla if the issue is known and if not, please report it. Unless the system is configured to mix branches, this should not occur and is therefore a bug.
தெளிவற்ற ebuild பெயர்
[ Results for search key : listen ] [ Applications found : 2 ] * dev-tinyos/listen [ Masked ] Latest version available: 1.1.15 Latest version installed: [ Not Installed ] Size of files: 10,032 kB Homepage: http://www.tinyos.net/ Description: Raw listen for TinyOS License: BSD * media-sound/listen [ Masked ] Latest version available: 0.6.3 Latest version installed: [ Not Installed ] Size of files: 859 kB Homepage: http://www.listen-project.org Description: A Music player and management for GNOME License: GPL-2 !!! The short ebuild name "listen" is ambiguous. Please specify !!! one of the above fully-qualified ebuild names instead.
The application that is selected for installation has a name that corresponds with more than one package. Supply the category name as well to resolve this. Portage will inform the user about possible matches to choose from.
சுழல் சார்புநிலைகள்
!!! Error: circular dependencies: ebuild / net-print/cups-1.1.15-r2 depends on ebuild / app-text/ghostscript-7.05.3-r1 ebuild / app-text/ghostscript-7.05.3-r1 depends on ebuild / net-print/cups-1.1.15-r2
Two (or more) packages to install depend on each other and can therefore not be installed. This is most likely a bug in one of the packages in the Gentoo repository. Please re-sync after a while and try again. It might also be beneficial to check Bugzilla to see if the issue is known and if not, report it.
Fetch தோல்வியடைந்துவிட்டது
!!! Fetch failed for sys-libs/ncurses-5.4-r5, continuing... (...) !!! Some fetch errors were encountered. Please see above for details.
Portage was unable to download the sources for the given application and will try to continue installing the other applications (if applicable). This failure can be due to a mirror that has not synchronized correctly or because the ebuild points to an incorrect location. The server where the sources reside can also be down for some reason.
சிக்கல் இன்னும் நீடித்தால் ஒரு மணி நேரம் கழித்து மீண்டும் முயற்சி செய்து பார்க்கவும்.
முறைமை தனியமைப்பு பாதுகாப்பு
!!! Trying to unmerge package(s) in system profile. 'sys-apps/portage' !!! This could be damaging to your system.
The user has asked to remove a package that is part of the system's core packages. It is listed in the profile as required and should therefore not be removed from the system.
Digest சரிபார்த்தல் தோல்வியடைதல்
>>> checking ebuild checksums !!! Digest verification failed:
This is a sign that something is wrong with the Gentoo repository - often, caused by a mistake made when committing an ebuild to the Gentoo ebuild repository.
When the digest verification fails, do not try to re-digest the package personally. Running ebuild foo manifest will not fix the problem; it quite possibly could make it worse.
Instead, wait an hour or two for the repository to settle down. It is likely that the error was noticed right away, but it can take a little time for the fix to trickle down the rsync mirrors. Check Bugzilla and see if anyone has reported the problem yet or ask around on #gentoo (webchat) (IRC). If not, go ahead and file a bug for the broken ebuild.
வழு சரிசெய்யப்படவுடன், நிலையான digest ஐ எடுப்பதற்கு ஜென்டூ ebuild கருவூலத்தை மறு ஒத்திசைவு செய்யவும்.
Be careful to not sync the Gentoo ebuild repository more than once a day. As stated in the official Gentoo netiquette policy (as well as when running emerge --sync), users who sync too often will be soft-banned from additional syncs for a time. Abusers who repeatedly fail to follow this policy may be hard-banned. Unless absolutely necessary it is often best to wait for a 24 hours period to sync so that re-synchronization does not overload Gentoo's rsync mirrors.
USE கொடிகள் என்றால் என்ன
USE கொடிகளுக்குப் பின்னால் உள்ளக் கருத்து
ஜென்டூவை (அல்லது மற்ற வழங்கல், இயங்குதளங்களை) நிறுவும்போது, பயனர்கள் அவர்கள் வேளை செய்யும் சூழல்களைச் சார்ந்து தேர்வுகளைச் செய்கின்றனர். சேவையகத்திற்கான அமைவுகள், பணிநிலையத்திற்கான அமைவை விட மாறுபட்டிருக்கும். மேலும் விளையாடுவதற்காகப் பயன்படுத்தப்படும் பணிநிலையம் 3D மீள்தருகைக்கு பயன்படும் பணிநிலையங்களை விட மாறுபட்டதாக இருக்கும்.
என்ன தொகுப்பை நிறுவ வேண்டும் என்பதற்கு மட்டுமல்லாமல் குறிப்பிட்ட தொகுப்பு என்ன தனிச்சிறப்புகளைக் கொண்டிருக்க வேண்டும் என்பதையும் தேர்வு செய்வதற்கும் இது பொருந்தும். OpenGL க்கான தேவை இல்லையென்றால், எதற்காக ஒருவர் அதை நிறுவிப் பராமரிப்பதையும், பெரும்பாலான தொகுப்புகளில் இதன் ஆதரவைச் சேர்த்து உருவாக்குவதையும் கருத வேண்டும்? ஒருவர் KDE ஐ பயன்படுத்த விரும்பவில்லை என்றால், KDE க்கான ஆதரவு இல்லாமலும் தொகுப்புகள் குறையின்றி இயங்கும் என்ற நிலையில் எதற்காக அதைச் சேர்த்துத் தொகுப்பதை அவர் கருத வேண்டும்?
எதை நிறுவ மற்றும் செயல்படுத்த வேண்டும்/தேவையில்லை என முடிவெடுப்பதில் பயனர்களுக்கு உதவுவதன் மூலம், அவர்கள் சூழலை எளிமையான வழியில் குறிப்பிடுவதை ஜென்டூ விரும்புகிறது. இது பயனர்கள் தங்களுக்கு உண்மையில் என்ன தேவை என்பதை உணர் வைக்கிறது. Portage க்கான செயல்பாடு எளிமையாக்கப்பட்டு, பயனுள்ள முடிவுகளை எடுக்க வழிவகுக்கிறது.
USE கொடியின் வரையறை
USE கொடியை உள்ளிடவும், இவ்வகை கொடியானது ஒரு குறிப்பிட்ட கருத்திற்கான ஆதரவு மற்றும் சார்புநிலை தகவல்களை உள்ளடக்கிய உறைசொல்லாகும். குறிப்பிட்ட USE கொடியை ஒருவர் வரையறுக்கும்போது, தேர்ந்தெடுத்த உறைசொல்லுக்கான ஆதரவு அவர்களுக்குத் தேவைப்படுகிறது என Portage அறிந்துகொள்ளும். ஐயத்திற்கு இடமின்றி இது தொகுப்பிற்கான சார்புநிலை தகவல்களையும் மாற்றியமைக்கும்.
குறிப்பிட்ட இந்த எடுத்துக்காட்டைக் காணவும்: kde
என்னும் உறைசொல் USE மாறியில் இல்லையென்றால், KDE க்கான ஆதரவு விரும்பினால் கிடைக்கும் எல்லா தொகுப்புகளும் KDE யின் ஆதரவு இன்றி தொகுக்கப்படும். மேலும், KDE க்கான சார்புநிலை விரும்பினால் கிடைக்கும் எல்லா தொகுப்புகளும் KDE திரட்டுகளின் (சார்புநிலைகளாக) நிறுவல் இல்லாமல் நிறுவப்படும். kde
உறைசொல் வரையறுக்கப்பட்டால், இந்த தொகுப்புகள் எல்லாம் KDE யின் ஆதரவு உடன் தொகுக்கப்பட்டு, KDE திரட்டுக்கள் சார்புநிலைகளாக நிறுவப்படும்.
When the kde
flag is set to enabled, then those packages will be compiled with KDE support, and the KDE libraries will be installed as dependency.
உறைசொற்களை சரியாக வரையறுப்பதன் மூலம் பயனரின் தேவைக்கு ஏற்ப முறைமையை வடிவமைக்க முடியும்.
USE கொடிகளைப் பயன்படுத்துதல்
நிலையான USE கொடிகளை அறிவித்தல்
All USE flags are declared inside the USE variable. To make it easy for users to search and pick USE flags, we already provide a default USE setting. This setting is a collection of USE flags we think are commonly used by the Gentoo users. This default setting is declared in the make.defaults files that are part of the selected profile.
The profile the system listens to is pointed to by the /etc/portage/make.profile symlink. Each profile works on top of other profiles, and the end result is therefore the sum of all profiles. The top profile is the base profile (/var/db/repos/gentoo/profiles/base).
இப்போதைய செயல்பாட்டில் உள்ள USE கொடிகளை (முழுவதுமாக) காண, emerge --info என்னும் கட்டளையைப் பயன்படுத்தவும்:
root #
emerge --info | grep ^USE
USE="a52 aac acpi alsa branding cairo cdr dbus dts ..."
This variable already contains quite a lot of keywords. Do not alter any make.defaults file to tailor the USE variable to personal needs though: changes in these files will be undone when the Gentoo repository is updated!
To change this default setting, add or remove keywords to/from the USE variable. This is done globally by defining the USE variable in /etc/portage/make.conf. In this variable one can add the extra USE flags required, or remove the USE flags that are no longer needed. This latter is done by prefixing the keyword with the minus-sign (-
).
For instance, to remove support for KDE and Qt but add support for LDAP, the following USE can be defined in /etc/portage/make.conf:
/etc/portage/make.conf
Updating USE in make.confUSE="-kde -qt5 ldap"
தனி தொகுப்புகளுக்கு USE கொடிகளை அறிவித்தல்
Sometimes users want to declare a certain USE flag for one (or a couple) of applications but not system-wide. To accomplish this, edit /etc/portage/package.use. package.use is typically a single file, however it can also be a directory filled with children files; see the tip below and then man 5 portage for more information on how to use this convention. The following examples assume package.use is a single file.
For instance, to only have Blu-ray support for the VLC media player package:
/etc/portage/package.use
VLC க்கான Blu-ray ஆதரவை செயல்படுத்துதல்media-video/vlc bluray
If package.use is pre-existing as a directory (opposed to a single file), packages can have their USE flags modified by simply creating files under the package.use/ directory. Any file naming convention can work, however it is wise to implement a coherent naming scheme. One convention is to simply use the package name as the title for the child file. For example, setting the
bluray
USE flag for the media-video/vlc package can be performed as follows:root #
echo "media-video/vlc bluray" >> /etc/portage/package.use/vlc
Similarly it is possible to explicitly disable USE flags for a certain application. For instance, to disable bzip2 support in PHP (but have it for all other packages through the USE flag declaration in make.conf):
/etc/portage/package.use
PHP க்கான bzip2 ஆதரவை முடக்குதல்dev-lang/php -bzip2
தற்காலிக USE கொடிகளை அறிவித்தல்
Sometimes users need to set a USE flag for a brief moment. Instead of editing /etc/portage/make.conf twice (to do and undo the USE changes) just declare the USE variable as an environment variable. Remember that this setting only applies for the command entered; re-emerging or updating this application (either explicitly or as part of a system update) will undo the changes that were triggered through the (temporary) USE flag definition.
The following example temporarily removes the pulseaudio
value from the USE variable during the installation of SeaMonkey:
root #
USE="-pulseaudio" emerge www-client/seamonkey
முந்துரிமை
Of course there is a certain precedence on what setting has priority over the USE setting. The precedence for the USE setting is, ordered by priority (first has lowest priority):
- Default USE setting declared in the make.defaults files part of your profile
- User-defined USE setting in /etc/portage/make.conf
- User-defined USE setting in /etc/portage/package.use
- User-defined USE setting as environment variable
To view the final USE setting as seen by Portage, run emerge --info. This will list all relevant variables (including the USE variable) with their current definition as known to Portage.
root #
emerge --info
புதிய USE கொடிகளுக்கு முழு முறைமையும் தகவமைத்தல்
After having altered USE flags, the system should be updated to reflect the necessary changes. To do so, use the --newuse
option with emerge:
root #
emerge --update --deep --newuse @world
Next, run Portage's depclean to remove the conditional dependencies that were emerged on the "old" system but that have been obsoleted by the new USE flags.
Double-check the provided list of "obsoleted" packages to make sure it does not remove packages that are needed. In the following example the
--pretend
(-p
) switch to have depclean only list the packages without removing them:
root #
emerge --pretend --depclean
When depclean has finished, emerge may prompt to rebuild the applications that are dynamically linked against shared objects provided by possibly removed packages. Portage will preserve necessary libraries until this action is done to prevent breaking applications. It stores what needs to be rebuilt in the preserved-rebuild
set. To rebuild the necessary packages, run:
root #
emerge @preserved-rebuild
When all this is accomplished, the system is using the new USE flag settings.
தொகுப்பு சார்ந்த USE கொடிகள்
கிடைக்கும் USE கொடிகளைப் பார்வையிடல்
Let's take the example of seamonkey: what USE flags does it listen to? To find out, we use emerge with the --pretend
and --verbose
options:
root #
emerge --pretend --verbose www-client/seamonkey
These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] www-client/seamonkey-2.48_beta1::gentoo USE="calendar chatzilla crypt dbus gmp-autoupdate ipc jemalloc pulseaudio roaming skia startup-notification -custom-cflags -custom-optimization -debug -gtk3 -jack -minimal (-neon) (-selinux) (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" L10N="-ca -cs -de -en-GB -es-AR -es-ES -fi -fr -gl -hu -it -ja -lt -nb -nl -pl -pt-PT -ru -sk -sv -tr -uk -zh-CN -zh-TW" 216,860 KiB Total: 1 package (1 new), Size of downloads: 216,860 KiB
emerge isn't the only tool for this job. In fact, there is a tool dedicated to package information called equery which resides in the app-portage/gentoolkit package
root #
emerge --ask app-portage/gentoolkit
Now run equery with the uses
argument to view the USE flags of a certain package. For instance, for the app-portage/portage-utils package:
user $
equery --nocolor uses =gnumeric-1.12.31
[ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for app-office/gnumeric-1.12.31: U I + + introspection : Add support for GObject based introspection - - libgda : Enable database support through gnome-extra/libgda. - - perl : Enable perl plugin loader. + + python : Enable python plugin loader. + + python_targets_python2_7 : Build with Python 2.7
Satisfying REQUIRED_USE conditions
Some ebuilds require or forbid certain combinations of USE flags in order to work properly. This is expressed via a set of conditions placed in a REQUIRED_USE expression. This conditions ensure that all features and dependencies are complete and that the build will succeed and perform as expected. If any of these are not met, emerge will alert you and ask you to fix the issue.
எடுத்துக்காட்டு | விளக்கம் |
---|---|
REQUIRED_USE="foo? ( bar )"
|
foo அமைக்கப்பட்டிருந்தால், bar ஐ அமைக்க வேண்டும்.
|
REQUIRED_USE="foo? ( !bar )"
|
foo அமைக்கப்பட்டிருந்தால், bar ஐ அமைக்கக் கூடாது.
|
REQUIRED_USE="foo? ( || ( bar baz ) )"
|
foo அமைக்கப்பட்டிருந்தால், bar அல்லது baz ஐ அமைக்க வேண்டும்.
|
REQUIRED_USE="^^ ( foo bar baz )"
|
foo bar அல்லது baz இல் சரியாக ஏதாவது ஒன்றை அமைக்க வேண்டும்.
|
REQUIRED_USE="|| ( foo bar baz )"
|
foo bar அல்லது baz இல் குறைந்தது ஒன்றையாவது அமைக்க வேண்டும்.
|
REQUIRED_USE="?? ( foo bar baz )"
|
foo bar அல்லது baz இல் ஒன்றிற்கு மேல் அமைக்கக் கூடாது.
|
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
ஓடுநிலைகள்
முறைமையை துவக்குதல்
முறைமை துவங்கும்போது நிறைய உரைகள் திரையில் செல்வதைக் காணலாம். இதை உற்று நோக்கினால் ஒருவரால் இந்த உரைகள் ஒவ்வொரு முறை முறைமை மறு துவங்கும்போதும் தோன்றுவதைக் காண முடியும். இந்த எல்லா செயல்களுக்கான வரிசையைத் துவக்க வரிசை என அழைப்பர். இது (ஏறத்தாழ) நிலையாக வரையறுக்கப்பட்டுள்ளது.
முதலில், துவக்க ஏற்றியானது துவக்க ஏற்றி உள்ளமைவில் வரையறுக்கப்பட்டுள்ள கர்னல் படத்தை ஏற்றும். பிறகு, இந்த துவக்க ஏற்றி கர்னலை இயக்குமாறு CPU விற்கு கட்டளையிடும். கர்னல் ஏற்றப்பட்டு இயங்கும்போது, இது கர்னல் சார்ந்த கட்டமைப்புகள் மற்றும் பணிகளைத் தொடங்கி init செயலை துவக்கும்.
எல்லா கோப்பு முறைமைகளும் (/etc/fstab கோப்பில் வரையறுக்கப்பட்டுள்ளவை) ஏற்றப்பட்டுப் பயன்படுத்துவதற்கு ஆயத்த நிலையில் உள்ளதை இந்த செயல் உறுதிப்படுத்துகிறது. மேலும் இது /etc/init.d/ என்னும் இடத்தில் உள்ள பல்வேறு குறுநிரல்களை இயக்குவதன் மூலம், வெற்றிகரமாகத் துவங்கும் முறைமைக்குத் தேவையான சேவைகளை இது துவக்கும்.
இறுதியாக, எல்லா குறுநிரல்களையும் இயக்கியவுடன், init ஆனது முனையங்களை (பெரும்பாலான வழக்கில் இது Alt+F1, Alt+F2 முதலிய கூட்டு விசையால் அழைக்கப்படும் மெய்நிகர் முனையங்களாக இருக்கும்) செயல்படுத்திய பின் அவற்றுடன் agetty என் அழைக்கப்படும் சிறப்புச் செயலானது இணைக்கப்படுகிறது. இந்த செயலானது பயனர்கள் இவ்வகை முனையங்களில் உள்நுழைதல் மூலம் உள்நுழைய இயலுவதை உறுதிப்படுத்துகிறது.
Init குறுநிரல்கள்
Now init doesn't just execute the scripts in /etc/init.d/ randomly. Even more, it doesn't run all scripts in /etc/init.d/, only the scripts it is told to execute. It decides which scripts to execute by looking into /etc/runlevels/.
First, init runs all scripts from /etc/init.d/ that have symbolic links inside /etc/runlevels/boot/. Usually, it will start the scripts in alphabetical order, but some scripts have dependency information in them, telling the system that another script must be run before they can be started.
When all /etc/runlevels/boot/ referenced scripts are executed, init continues with running the scripts that have a symbolic link to them in /etc/runlevels/default/. Again, it will use the alphabetical order to decide what script to run first, unless a script has dependency information in it, in which case the order is changed to provide a valid start-up sequence. The latter is also the reason why commands used during the installation of Gentoo Linux used default
, as in rc-update add sshd default.
எவ்வாறு init வேலை செய்கிறது?
ஐயத்திற்கு இடமின்றி இவை எல்லாவற்றையும் init ஆனது தானாக முடிவு எடுக்காது. என்ன நடவடிக்கை எடுக்க வேண்டும் என்பதைக் குறிப்பிடும் ஒரு உள்ளமைவு கோப்பு இதற்குத் தேவை. இந்த உள்ளமைவு கோப்பு /etc/inittab என்பதாகும்.
init இன் முதல் நடவடிக்கை எல்லா கோப்பு முறைமைகளையும் ஏற்றுவதாகும் என சற்றுமுன் விளக்கிய துவக்க வரிசை நினைவிருக்கிறதா? இது /etc/inittab கோப்பில் பின்வரும் வரியில் வரையறுக்கப்பட்டுள்ளது.
/etc/inittab
தொடங்கல் கட்டளைsi::sysinit:/sbin/openrc sysinit
This line tells init that it must run /sbin/openrc sysinit to initialize the system. The /sbin/openrc script takes care of the initialization, so one might say that init doesn't do much - it delegates the task of initializing the system to another process.
Second, init executed all scripts that had symbolic links in /etc/runlevels/boot/. This is defined in the following line:
/etc/inittab
Boot command invocationrc::bootwait:/sbin/openrc boot
Again the openrc script performs the necessary tasks. Note that the option given to openrc (boot) is the same as the subdirectory of /etc/runlevels/ that is used.
Now init checks its configuration file to see what runlevel it should run. To decide this, it reads the following line from /etc/inittab:
/etc/inittab
முன்னிருப்பு ஓடுநிலை தேர்ந்தெடுத்தல்id:3:initdefault:
In this case (which the majority of Gentoo users will use), the runlevel id is 3. Using this information, init checks what it must run to start runlevel 3:
/etc/inittab
ஓடுநிலை வரையறுத்தல்கள்l0:0:wait:/sbin/openrc shutdown l1:S1:wait:/sbin/openrc single l2:2:wait:/sbin/openrc nonetwork l3:3:wait:/sbin/openrc default l4:4:wait:/sbin/openrc default l5:5:wait:/sbin/openrc default l6:6:wait:/sbin/openrc reboot
The line that defines level 3, again, uses the openrc script to start the services (now with argument default
). Again note that the argument of openrc is the same as the subdirectory from /etc/runlevels/.
When openrc has finished, init decides what virtual consoles it should activate and what commands need to be run at each console:
/etc/inittab
Terminal definitionsc1:12345:respawn:/sbin/agetty 38400 tty1 linux c2:12345:respawn:/sbin/agetty 38400 tty2 linux c3:12345:respawn:/sbin/agetty 38400 tty3 linux c4:12345:respawn:/sbin/agetty 38400 tty4 linux c5:12345:respawn:/sbin/agetty 38400 tty5 linux c6:12345:respawn:/sbin/agetty 38400 tty6 linux
கிடைக்கும் ஓடுநிலைகள்
In a previous section, we saw that init uses a numbering scheme to decide what runlevel it should activate. A runlevel is a state in which the system is running and contains a collection of scripts (runlevel scripts or initscripts) that must be executed when entering or leaving a runlevel.
In Gentoo, there are seven runlevels defined: three internal runlevels, and four user-defined runlevels. The internal runlevels are called sysinit, shutdown and reboot and do exactly what their names imply: initialize the system, powering off the system, and rebooting the system.
The user-defined runlevels are those with an accompanying /etc/runlevels/ subdirectory: boot, default, nonetwork and single. The boot runlevel starts all system-necessary services which all other runlevels use. The remaining three runlevels differ in what services they start: default is used for day-to-day operations, nonetwork is used in case no network connectivity is required, and single is used when the system needs to be fixed.
init குறுநிரல்களோடு வேளை செய்தல்
openrc செயல்பாட்டைத் தொடங்கும் குறுநிரலானது init குறுநிரல் என் அழைக்கப்படும். /etc/init.d/ இல் உள்ள ஒவ்வொரு குறுநிரலையும் start
, stop
, restart
, zap
, status
, ineed
, iuse
, iwant
, needsme
, usesme
அல்லது wantsme
என்னும் வாதங்களைக் கொண்டு செயல்படுத்தலாம்.
To start, stop, or restart a service (and all depending services), the start
, stop
, and restart
arguments should be used:
root #
rc-service postfix start
Only the services that need the given service are stopped or restarted. The other depending services (those that use the service but don't need it) are left untouched.
To stop a service, but not the services that depend on it, use the --nodeps
option together with the stop
argument:
root #
rc-service --nodeps postfix stop
To see what status a service has (started, stopped, ...) use the status
argument:
root #
rc-service postfix status
If the status information shows that the service is running, but in reality it is not, then reset the status information to "stopped" with the zap
argument:
root #
rc-service postfix zap
To also ask what dependencies the service has, use iwant
, iuse
or ineed
. With ineed
it is possible to see the services that are really necessary for the correct functioning of the service. iwant
or iuse
, on the other hand, shows the services that can be used by the service, but are not necessary for the correct functioning.
root #
rc-service postfix ineed
Similarly, it is possible to ask what services require the service (needsme
) or can use it (usesme
or wantsme
):
root #
rc-service postfix needsme
ஓடுநிலைகளை புதுப்பித்தல்
rc-update
Gentoo's init system uses a dependency-tree to decide what service needs to be started first. As this is a tedious task that we wouldn't want our users to have to do manually, we have created tools that ease the administration of the runlevels and init scripts.
With rc-update it is possible to add and remove init scripts to a runlevel. The rc-update tool will then automatically ask the depscan.sh script to rebuild the dependency tree.
சேவைகளைச் சேர்த்தல் மற்றும் நீக்குதல்
In earlier instructions, init scripts have already been added to the "default" runlevel. What "default" means has been explained earlier in this document. Next to the runlevel, the rc-update script requires a second argument that defines the action: add
, del
, or show
.
To add or remove an init script, just give rc-update the add
or del
argument, followed by the init script and the runlevel. For instance:
root #
rc-update del postfix default
The rc-update -v show command will show all the available init scripts and list at which runlevels they will execute:
root #
rc-update -v show
It is also possible to run rc-update show (without -v
) to just view enabled init scripts and their runlevels.
சேவைகளை உள்ளமைத்தல்
ஏன் கூடுதல் உள்ளமைவு தேவைப்படுகிறது
Init scripts can be quite complex. It is therefore not really desirable to have the users edit the init script directly, as it would make it more error-prone. It is however important to be able to configure such a service. For instance, users might want to give more options to the service itself.
A second reason to have this configuration outside the init script is to be able to update the init scripts without the fear that the user's configuration changes will be undone.
conf.d அடைவு
Gentoo provides an easy way to configure such a service: every init script that can be configured has a file in /etc/conf.d/. For instance, the apache2 initscript (called /etc/init.d/apache2) has a configuration file called /etc/conf.d/apache2, which can contain the options to give to the Apache 2 server when it is started:
/etc/conf.d/apache2
apache2 init குறுநிரலுக்கான எடுத்துக்காட்டு விருப்பத்தேர்வுகள்APACHE2_OPTS="-D PHP5"
Such a configuration file contains only variables (just like /etc/portage/make.conf does), making it very easy to configure services. It also allows us to provide more information about the variables (as comments).
init குறுநிரல்களை எழுதுதல்
Another useful resource is OpenRC's service script guide.
இது தேவையா?
No, writing an init script is usually not necessary as Gentoo provides ready-to-use init scripts for all provided services. However, some users might have installed a service without using Portage, in which case they will most likely have to create an init script.
Do not use the init script provided by the service if it isn't explicitly written for Gentoo: Gentoo's init scripts are not compatible with the init scripts used by other distributions! That is, unless the other distribution is using OpenRC!
தளவமைப்பு
init குறுநிரலின் அடிப்படை தளவமைப்பு கீழே கொடுக்கப்பட்டுள்ளது.
#!/sbin/openrc-run depend() { # (சார்புநிலை தகவல்கள்) } start() { # (சேவைகளைத் துவக்குவதற்குத் தேவையான கட்டளைகள்) } stop() { # (சேவைகளை நிறுத்துவதற்குத் தேவையான கட்டளைகள்) }
#!/sbin/openrc-run command=/usr/bin/foo command_args="${foo_args} --bar" pidfile=/var/run/foo.pid name="FooBar Daemon" description="FooBar is a daemon that drinks" extra_started_commands="drink" description_drink="Opens mouth and reflexively swallows" depend() { # (Dependency information) } start_pre() { # (Commands necessary to prepare to start the service) # Ensure that our dirs are correct checkpath --directory --owner foo:foo --mode 0775 \ /var/run/foo /var/cache/foo } stop_post() { # (Commands necessary to clean up after the service) # Clean any spills rm -rf /var/cache/foo/* } drink() { ebegin "Starting to drink" ${command} --drink beer eend $? "Failed to drink any beer :(" }
Every init script requires the start()
function or command
variable to be defined. All other sections are optional.
சார்புநிலைகள்
There are three dependency-alike settings that can be defined which influence the start-up or sequencing of init scripts: want
, use
and need
. Next to these, there are also two order-influencing methods called before
and after
. These last two are no dependencies per se - they do not make the original init script fail if the selected one isn't scheduled to start (or fails to start).
- The
use
settings informs the init system that this script uses functionality offered by the selected script, but does not directly depend on it. A good example would beuse logger
oruse dns
. If those services are available, they will be put in good use, but if the system does not have a logger or DNS server the services will still work. If the services exist, then they are started before the script that uses them. - The
want
setting is similar touse
with one exception.use
only considers services which were added to an init level.want
will try to start any available service even if not added to an init level. - The
need
setting is a hard dependency. It means that the script that is needing another script will not start before the other script is launched successfully. Also, if that other script is restarted, then this one will be restarted as well. - When using
before
, then the given script is launched before the selected one if the selected one is part of the init level. So an init script xdm that definesbefore alsasound
will start before the alsasound script, but only if alsasound is scheduled to start as well in the same init level. If alsasound is not scheduled to start too, then this particular setting has no effect and xdm will be started when the init system deems it most appropriate. - Similarly,
after
informs the init system that the given script should be launched after the selected one if the selected one is part of the init level. If not, then the setting has no effect and the script will be launched by the init system when it deems it most appropriate.
It should be clear from the above that need
is the only "true" dependency setting as it affects if the script will be started or not. All the others are merely pointers towards the init system to clarify in which order scripts can be (or should be) launched.
Now, look at many of Gentoo's available init scripts and notice that some have dependencies on things that are no init scripts. These "things" we call virtuals.
A virtual dependency is a dependency that a service provides, but that is not provided solely by that service. An init script can depend on a system logger, but there are many system loggers available (metalogd, syslog-ng, sysklogd, ...). As the script cannot need every single one of them (no sensible system has all these system loggers installed and running) we made sure that all these services provide a virtual dependency.
For instance, take a look at the postfix dependency information:
/etc/init.d/postfix
Dependency information of the postfix servicedepend() { need net use logger dns provide mta }
As can be seen, the postfix service:
- Requires the (virtual) net dependency (which is provided by, for instance, /etc/init.d/net.eth0).
- Uses the (virtual) logger dependency (which is provided by, for instance, /etc/init.d/syslog-ng).
- Uses the (virtual) dns dependency (which is provided by, for instance, /etc/init.d/named).
- Provides the (virtual) mta dependency (which is common for all mail servers).
வரிசையைக் கட்டுப்படுத்துதல்
As described in the previous section, it is possible to tell the init system what order it should use for starting (or stopping) scripts. This ordering is handled both through the dependency settings use and need, but also through the order settings before and after. As we have described these earlier already, let's take a look at the portmap service as an example of such init script.
/etc/init.d/portmap
Dependency information of the portmap servicedepend() { need net before inetd before xinetd }
It is possible to use the "*" glob to catch all services in the same runlevel, although this isn't advisable.
depend() { before * }
If the service must write to local disks, it should need localmount. If it places anything in /var/run/ such as a pidfile, then it should start after bootmisc:
depend() { need localmount after bootmisc }
Standard functions
Next to the depend()
functionality, it is also necessary to define the start()
function. This one contains all the commands necessary to initialize the service. It is advisable to use the ebegin
and eend
functions to inform the user about what is happening:
start() { if [ "${RC_CMD}" = "restart" ]; then # Do something in case a restart requires more than stop, start fi ebegin "Starting my_service" start-stop-daemon --start --exec /path/to/my_service \ --pidfile /path/to/my_pidfile eend $? }
Both --exec
and --pidfile
should be used in start and stop functions. If the service does not create a pidfile, then use --make-pidfile
if possible, though it is recommended to test this to be sure. Otherwise, don't use pidfiles. It is also possible to add --quiet
to the start-stop-daemon options, but this is not recommended unless the service is extremely verbose. Using --quiet
may hinder debugging if the service fails to start.
Another notable setting used in the above example is to check the contents of the RC_CMD variable. Unlike the previous init script system, the newer OpenRC system does not support script-specific restart functionality. Instead, the script needs to check the contents of the RC_CMD variable to see if a function (be it start()
or stop()
) is called as part of a restart or not.
Make sure that
--exec
actually calls a service and not just a shell script that launches services and exits - that's what the init script is supposed to do.For more examples of the start()
function, please read the source code of the available init scripts in the /etc/init.d/ directory.
Another function that can (but does not have to) be defined is stop()
. The init system is intelligent enough to fill in this function by itself if start-stop-daemon is used.
stop() { ebegin "Stopping my_service" start-stop-daemon --stop --exec /path/to/my_service \ --pidfile /path/to/my_pidfile eend $? }
If the service runs some other script (for example, Bash, Python, or Perl), and this script later changes names (for example, foo.py to foo), then it is necessary to add --name
to start-stop-daemon. This must specify the name that the script will be changed to. In this example, a service starts foo.py, which changes names to foo:
start() { ebegin "Starting my_script" start-stop-daemon --start --exec /path/to/my_script \ --pidfile /path/to/my_pidfile --name foo eend $? }
start-stop-daemon has an excellent man page available if more information is needed:
user $
man start-stop-daemon
Gentoo's init script syntax is based on the POSIX Shell so people are free to use sh-compatible constructs inside their init scripts. Keep other constructs, like bash-specific ones, out of the init scripts to ensure that the scripts remain functional regardless of the change Gentoo might do on its init system.
Adding custom options
If the initscript needs to support more options than the ones we have already encountered, then add the option to one of the following variables, and create a function with the same name as the option. For instance, to support an option called restartdelay
:
- extra_commands - Command is available with the service in any state
- extra_started_commands - Command is available when the service is started
- extra_stopped_commands - Command is available when the service is stopped
extra_started_commands="restartdelay" restartdelay() { stop sleep 3 # Wait 3 seconds before starting again start }
OpenRC யில்
restart()
செயலாற்றியை மேலெழுத இயலாது!சேவை உள்ளமைவு மாறிகள்
In order to support configuration files in /etc/conf.d/, no specifics need to be implemented: when the init script is executed, the following files are automatically sourced (i.e. the variables are available to use):
- /etc/conf.d/YOUR_INIT_SCRIPT
- /etc/conf.d/basic
- /etc/rc.conf
Also, if the init script provides a virtual dependency (such as net), the file associated with that dependency (such as /etc/conf.d/net) will be sourced too.
ஓடுநிலை நடத்தையை மாற்றுதல்
யார் பயன் அடையலாம்
Many laptop users know the situation: at home they need to start net.eth0, but they don't want to start net.eth0 while on the road (as there is no network available). With Gentoo the runlevel behaviour can be altered at will.
For instance, a second "default" runlevel can be created which can be booted that has other init scripts assigned to it. At boottime, the user can then select what default runlevel to use.
Using softlevel
First of all, create the runlevel directory for the second "default" runlevel. As an example we create the offline runlevel:
root #
mkdir /etc/runlevels/offline
Add the necessary init scripts to the newly created runlevel. For instance, to have an exact copy of the current default runlevel but without net.eth0:
root #
cd /etc/runlevels/default
root #
for service in *; do rc-update add $service offline; done
root #
rc-update del net.eth0 offline
root #
rc-update show offline
(Partial sample Output) acpid | offline domainname | offline local | offline net.eth0 |
Even though net.eth0 has been removed from the offline runlevel, udev might want to attempt to start any devices it detects and launch the appropriate services, a functionality that is called hotplugging. By default, Gentoo does not enable hotplugging.
To enable hotplugging, but only for a selected set of scripts, use the rc_hotplug variable in /etc/rc.conf:
/etc/rc.conf
Enable hotplugging of the WLAN interfacerc_hotplug="net.wlan !net.*"
சாதனம் தொடங்கப்பட்ட சேவைகளைப் பற்றிய மேலும் தகவல்களுக்கு, /etc/rc.conf இனுள் உள்ளக் கருத்துக்களைக் காணவும்.
Edit the bootloader configuration and add a new entry for the offline runlevel. In that entry, add softlevel=offline
as a boot parameter.
Using bootlevel
Using bootlevel is completely analogous to softlevel. The only difference here is that a second "boot" runlevel is defined instead of a second "default" runlevel.
சூழல் மாறிகள்
முன்னுரை
சூழல் மாறிகள் என்பது ஒன்று அல்லது அதற்கு மேற்பட்ட செயலிகள் பயன்படுத்தும் தகவல்களைக் கொண்ட பெயரிடப்பட்ட பொருளாகும். சூழல் மாறிகளைப் பயன்படுத்துவதன் மூலம் ஒருவர் எளிமையாக ஒன்று அல்லது அதற்கு மேற்பட்ட செயலிகளின் உள்ளமைவுகளை மாற்ற இயலும்.
முக்கியமான எடுத்துக்காட்டுகள்
பின்வரும் அட்டவணை லினக்ஸ் முறைமையால் பயன்படுத்தப்படும் மாறிகள் மற்றும் அவற்றின் பயன்களின் விளக்கம் ஆகியவற்றைப் பட்டியலிடுகிறது. எடுத்துக்காட்டு மதிப்புகள் அட்டவணைக்குப் பின்னர் காட்டப்பட்டுள்ளது.
மாறி | விளக்கம் |
---|---|
PATH | இந்த மாறியானது செயல்படுத்தகு கோப்புகளுக்காக முறைமை பார்க்கும் அடைவுகளின் முக்கால் புள்ளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. செயல்படுத்தகு நிரல்களான ls, rc-update அல்லது emerge ஐ இடும்போது ஒருவேளை இவை பட்டியலிடப்பட்ட அடைவில் இல்லையென்றால், நிரலின் முழு பாதையைக் கொண்ட (/bin/ls போன்ற) கட்டளையாக இடாதவரை முறைமை அதைச் செயல்படுத்தாது. |
ROOTPATH | இந்த மாறி PATH மாறியின் செயலாற்றியை ஒத்தது என்றாலும் இது கட்டளையை வேர்-பயனர் இடும்போது பார்க்க வேண்டிய அடைவுகளை மட்டுமே பட்டியலிடும். |
LDPATH | இந்த மாறியானது திரட்டைத் தேடிக் கண்டுபிடிப்பதற்காக இயங்காற்றலுக்குரிய இணைப்பி பயன்படுத்தும் அடைவுகளின் முக்கால் புள்ளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
MANPATH | இந்த மாறியானது, கைமுறை பக்கங்களைத் தேடுவதற்கு man கட்டளை பயன்படுத்தும் அடைவுகளின் முக்கால் புள்ளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
INFODIR | இந்த மாறியானது, தகவல் பக்கங்களைத் தேடுவதற்கு info கட்டளை பயன்படுத்தும் அடைவுகளின் முக்கால் புள்ளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
PAGER | இந்த மாறியானது கோப்புகளில் உள்ள உள்ளடக்கத்தைப் பட்டியலிடப் பயன்படுத்தப்படும் நிரல்களான less அல்லது more போன்றவற்றின் பாதையைக் கொண்டிருக்கும். |
EDITOR | இந்த மாறியானது கோப்புகளில் உள்ள உள்ளடக்கத்தை மாற்றப் பயன்படுத்தப்படும் நிரல்களான nano அல்லது vi போன்றவற்றின் பாதையைக் கொண்டிருக்கும். |
KDEDIRS | இந்த மாறியானது KDE-சார்ந்த பொருட்களைக் கொண்டுள்ள அடைவுகளின் முக்கால் புள்ளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
CONFIG_PROTECT | இந்த மாறியானது இற்றைப்படுத்தலின் போது Portage ஆல் பாதுகாக்கப்பட வேண்டிய அடைவுகளின் இடைவெளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
CONFIG_PROTECT_MASK | இந்த மாறியானது இற்றைப்படுத்தலின் போது Portage ஆல் பாதுகாக்கப்படக் கூடாத அடைவுகளின் இடைவெளியால் பிரிக்கப்பட்ட பட்டியலைக் கொண்டுள்ளது. |
கீழே இருப்பது இவ்வகையான மாறிகள் எல்லாவற்றிற்கான எடுத்துக்காட்டு வரையறுத்தலாகும்:
PATH="/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/games/bin" ROOTPATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" LDPATH="/lib:/usr/lib:/usr/local/lib:/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3" MANPATH="/usr/share/man:/usr/local/share/man" INFODIR="/usr/share/info:/usr/local/share/info" PAGER="/usr/bin/less" EDITOR="/usr/bin/vim" KDEDIRS="/usr" CONFIG_PROTECT="/usr/X11R6/lib/X11/xkb /opt/tomcat/conf \ /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ \ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf"
உலகளவில் மாறிகளை வரையறுத்தல்
env.d அடைவு
இவ்வகை மாறிகளின் வரையறுத்தலை மையமாக்கும் விதமாக ஜென்டூவானது /etc/env.d/ என்னும் அடைவை அறிமுகப்படுத்துகிறது. இந்த அடைவினுள் 00basic, 05gcc முதலிய பல எண்ணிக்கையிலான கோப்புகள் கிடைக்கின்றன. இந்த கோப்புகள் அதன் பெயரில் குறிப்பிட்டுள்ள செயலிக்குத் தேவையான மாறிகளைக் கொண்டுள்ளன.
எடுத்துக்காட்டாக, gcc ஆனது நிறுவப்படும்போது, பின்வரும் மாறிகளின் வரையறுத்தல்களைக் கொண்ட 05gcc என அழைக்கப்படும் கோப்பு ebuild ஆல் உருவாக்கப்படும்:
/etc/env.d/05gcc
முன்னிருப்பு gcc செயல்படுத்தப்பட்ட சூழல் மாறிகள்PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2" ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2" MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man" INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info" CC="gcc" CXX="g++" LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3"
சூழல் மாறிகளின் வரையறுத்தல்களை மாற்றுதல் அல்லது சேர்த்தல் ஆகியவற்றை /etc/profile அல்லது மற்ற இடத்தில் செய்யுமாறு பயனர்களிடம் மற்ற வழங்கல்கள் கூறலாம். ஆனால் ஜென்டூ இந்த செயலை எளிமையாக்குவதன் மூலம் சூழல் மாறிகளைக் கொண்டுள்ள பல எண்ணிக்கையிலான கோப்புகளுக்குப் பெரிய அளவில் கவனம் செலுத்தாமல் பயனர்கள் (மற்றும் Portage) சூழல் மாறிகளை எளிமையாகப் பராமரிக்கவும், மேலாண்மை செய்யவும் முடியும்.
எடுத்துக்காட்டாக, gcc ஐ இற்றைப்படுத்தும்போது, எந்தவித பயனர்-ஊடாடலும் கோராமல் /etc/env.d/05gcc கோப்பும் இற்றைப்படுத்தப்படும்.
இதன் மூலம் Portage மட்டுமல்லாமல் பயனரும் பயனடைவர். பயனர்கள் குறிப்பிட்ட சூழல் மாறிகளை முறைமை முழுமைக்கு அமைக்க எப்போதாவது கேட்கப்படலாம். எடுத்துக்காட்டாக நாம் http_proxy மாறியை எடுத்துக்கொள்வோம். நேரடியாக /etc/profile இல் மாற்றங்கள் செய்து குழப்புவதற்குப் பதிலாக இப்போது பயனர்கள் ஒரு கோப்பை (/etc/env.d/99local போன்றவற்றை) உருவாக்கி அதில் இவற்றிற்கான வரையறுத்தல்(களை) இடலாம்:
/etc/env.d/99local
உலக மாறியை அமைத்தல்http_proxy="proxy.server.com:8080"
எல்லா தன்-மேலாண்மை மாறிகளுக்கும் ஒரே கோப்பை பயன்படுத்துவதன் மூலம், பயனர்கள் தாங்களாக வரையறுத்துள்ள மாறிகளை விரைவாக மீள்பார்வையிடலாம்.
env-update
/etc/env.d/ இல் உள்ள பல்வேறு கோப்புகள் PATH மாறியை வரையறுக்கிறது. இது பிழையல்ல: env-update கட்டளை செயல்படுத்தும்போது, சூழல் மாறிகளை இற்றைப்படுத்துவதற்கு முன் பல்வேறு வரையறுத்தல்களை இது பின்னொட்டு செய்யும். இதன்மூலம் ஏற்கனவே உள்ள மதிப்புகளுடன் தலையிடாமல் தொகுப்புகள் (அல்லது பயனர்கள்) தங்கள் சொந்த சூழல் மாறி அமைப்புகளை எளிமையாகச் சேர்க்க முடியும்.
env-update குறுநிரலானது மதிப்புகளை /etc/env.d/ கோப்புகளின் அகர வரிசையில் பின்னொட்டு செய்யும். கோப்பு பெயர்கள் இரண்டு பதின்ம இலக்கத்தில் துவங்க வேண்டும்.
00basic 99kde-env 99local +-------------+----------------+-------------+ PATH="/bin:/usr/bin:/usr/kde/3.2/bin:/usr/local/bin"
மாறிகளின் ஒன்றிணைத்தல் பின்வரும் மாறிகளைத் தவிர மற்ற இடங்களில் எப்போதும் நடக்காது: ADA_INCLUDE_PATH, ADA_OBJECTS_PATH, CLASSPATH, KDEDIRS, PATH, LDPATH, MANPATH, INFODIR, INFOPATH, ROOTPATH, CONFIG_PROTECT, CONFIG_PROTECT_MASK, PRELINK_PATH, PRELINK_PATH_MASK, PKG_CONFIG_PATH மற்றும் PYTHONPATH. மற்ற எல்லா மாறிகளுக்கும் அண்மையில் வரையறுக்கப்பட்ட மதிப்பு (/etc/env.d/ அடைவில் அகர வரிசையில் உள்ள கோப்புகள்) பயன்படுத்தப்படுகிறது.
மாறி பெயர்களை /etc/env.d/ கோப்பில் உள்ள COLON_SEPARATED அல்லது SPACE_SEPARATED மாறிகளில் சேர்ப்பதன் மூலம் கூடுதல் மாறிகளை இந்த மாறிகள்-ஒன்றிணைத்தல் பட்டியலில் சேர்க்க வாய்ப்புள்ளது.
env-update ஐ செயல்படுத்தும்போது, எல்லா சூழல் மாறிகளையும் இந்த குறுநிரல் உருவாக்கி /etc/profile.env என்னும் இடத்தில் வைக்கும் (இது பின்பு /etc/profile ஆல் பயன்படுத்தப்படும்). மேலும் இது LDPATH மாறியிடமிருந்து தகவல்களைப் பிழிந்தெடுத்து /etc/ld.so.conf ஐ உருவாக்கப் பயன்படுத்தும். இதன் பிறகு, இயங்காற்றலுக்குரிய இணைப்பியால் பயன்படுத்தப்படும் /etc/ld.so.cache ஐ மறுஉருவாக்குவதற்கு ldconfig ஐ இயக்கும்.
env-update இன் விளைவை அதை இயக்கிய பின்பு உடனடியாக காண விரும்பினால், சூழலை இற்றைப்படுத்துவதற்குப் பின்வரும் கட்டளையைச் செயல்படுத்தவும். ஜென்டூவை தாங்களாக நிறுவிய பயனர்கள் நிறுவல் வழிகாட்டுதல்கள் மூலம் இதை நினைவில் வைத்திருக்க வாய்ப்புள்ளது:
root #
env-update && source /etc/profile
மேலுள்ள கட்டளையானது இப்போதுள்ள முனையம், புதிய முனையம் மற்றும் அதன் குழந்தைகள் ஆகியவற்றில் உள்ள மாறிகளை இற்றைப்படுத்துகிறது. எனவே, பயனர் X11 இல் வேளை செய்து கொண்டிருந்தால், அவர் ஒவ்வொரு முறை புதிய முனையம் திறக்கும்போதும் source /etc/profile ஐ செய்ய வேண்டும் அல்லது எல்லா புதிய முனையங்களிலும் புதிய மாறியை இற்றைப்படுத்த X ஐ மறுதொடக்கம். உள்நுழைவு மேலாளர் பயன்படுத்தப்பட்டால், வேர் பயனராக மாறி /etc/init.d/xdm சேவையை மறுதொடக்கம் செய்வது இன்றியமையாததாகும்.
மற்ற மாறிகளை வரையறுக்கும்போது கூடு மாறிகளைப் பயன்படுத்த வாய்ப்பில்லை. இதன் பொருள்,
FOO="$BAR"
(இதில் $BAR என்பது மற்றொரு மாறியாகும்) போன்றவை தடை செய்யப்பட்டுள்ளது.உள்ளூரளவில் மாறிகளை வரையறுத்தல்
பயனர் சார்ந்தவை
சூழல் மாறியை உலகளவில் வரையறுப்பதற்கான தேவை இல்லாமல் போகலாம். எடுத்துக்காட்டாக, ஒருவர் முறைமையில் உள்ள மற்ற பயனர்களின் PATH மாறியைப் பாதிக்காத வகையில் /home/my_user/bin மற்றும் தற்போது வேளை செய்து கொண்டிருக்கும் அடைவு (பயனர் இப்போது உள்ள அடைவு) ஆகியவற்றை PATH மாறியில் சேர்க்க விரும்பலாம். உள்ளூரளவில் சூழல் மாறியை வரையறுக்க, ~/.bashrc அல்லது ~/.bash_profile ஐ பயன்படுத்தவும்:
~/.bashrc
உள்ளூர் பயன்பாட்டிற்காக PATH ஐ விரிவாக்குதல்# முக்கால் புள்ளியை அடுத்து எந்த அடைவும் இல்லை என்றால் அது இப்போது பணி செய்யும் அடைவாகக் கருதப்படும் PATH="${PATH}:/home/my_user/bin:"
வெளியேறுதல்/உள்நுழைதலுக்குப் பிறகு, PATH மாறி இற்றைப்படுத்தப்படும்.
அமர்வு சார்ந்தவை
சில நேரம் இன்னும் கண்டிப்பான வரையறுத்தல்கள் கோரப்படுகிறது. எடுத்துக்காட்டாக, இருமங்களை அதற்காகப் பாதையைப் பயன்படுத்தாமல் அல்லது குறுகிய கால தேவைகளுக்காக ~/.bashrc ஐ திருத்தாமல் ஒரு உருவாக்கப்பட்ட தற்காலிக அடைவின் மூலம் பயன்படுத்தப் பயனர் விரும்பலாம்.
இந்த வழக்கில், export கட்டளையைப் பயன்படுத்தி இப்போதைய அமர்வில் PATH மாறியை வரையறுக்கவும். பயனர் வெளியேறாத வரை இந்த தற்காலிக அமைப்புகளை PATH மாறி பயன்படுத்தும்.
root #
export PATH="${PATH}:/home/my_user/tmp/usr/bin"
Warning: Display title "Gentoo Linux alpha Handbook: Working with Gentoo/ta" overrides earlier display title "கையேடு:Alpha/முழு/வேலைசெய்தல்".