Gentoo Linux amd64 Handbook: Working with Gentoo/ta

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Handbook:Parts/Full/Working and the translation is 100% complete.
எச்சரிக்கை
கையேடு:பாகங்கள் பெயர்வெளி (அதாவது இந்த பக்கத்தை!) அல்லது இதன் துணை பக்கத்தில் உள்ள வழிமுறைகளை நேரடியாக பின்பற்ற வேண்டாம். கையேடு:பாகங்கள் பக்கங்களை மற்ற கையேடுகளுக்கு உரைகளை ஒருங்கிணைக்க பயன்படுத்தப்படும் மீ கையேடாகும். முழுமையான நிறுவல் வழிமுறைகளுக்கு கையேடு பட்டியலில் உள்ள குறிப்பிட்ட கட்டமைப்பிற்கான கையேடை பயன்படுத்தவும்.



Portage ற்கு வரவேற்கிறோம்

Portage என்பது சென்டூவின் மென்பொருள் மேலாண்மையில் மிகவும் குறிப்பிடத்தக்கக் கண்டுபிடிப்புகளுள் ஒன்றாகும். இதன் உயர்ந்த நெகிழ்வுத்தன்மை மற்றும் மாபேரளவான தனிச்சிறப்புகள் காரணமாக இது லினக்சிற்காக கிடைக்கும் மென்பொருள் மேலாண்மை கருவிகளுள் சிறந்ததாக பெரும்பாலும் கருதப்படுகிறது.

Portage முற்றிலும் பைதான் மற்றும் பாஷ் ஆல் எழுதப்பட்டுள்ளது. இவை இரண்டும் உரைநிரல் மொழிகள் என்பதால் பயனர்களால் இவற்றை முழுமையாகக் காண முடியும்.

பெரும்பாலான பயனர்கள் emerge கருவி மூலம் Portage உடன் வேளை செய்வர். இந்த பகுதி emerge இன் கைமுறை பக்கத்தில் உள்ள தகவல்களை நகலெடுத்தவாறு கூறுவதற்காக வடிவமைக்கப்படவில்லை. emerge ற்கான விருப்பத்தேர்வுகளின் முழு அறிக்கையைக் காண, கைமுறை பக்கத்தை நாடவும்:

user $man emerge

சென்டூ கருவூலம்

Ebuild கள்

சென்டூ ஆவணப்படுத்தலானது ஒரு தொகுப்பைப் பற்றிப் பேசும்போது, அது உண்மையில் சென்டூ கருவூலம் மூலம் சென்டூ பயனர்களுக்குக் கிடைக்கப்பெறும் மென்பொருள் தலைப்புகளைக் குறிப்பதாகும். இந்த கருவூலமானது, ebuild என அழைக்கப்படும் ஒரு மென்பொருளைப் பராமரிக்க (நிறுவல், தேடல், வினவுதல் முதலியன) Portage ற்கு தேவையான எல்லா தகவல்களையும் கொண்டுள்ள கோப்புகளின் தொகுப்புகளைக் கொண்டுள்ளது. இவ்வகை ebuild கள் முன்னிருப்பாக /var/db/repos/gentoo என்னும் இடத்தில் இருக்கும்.

எப்போதாவது மென்பொருள் தலைப்புகள் தொடர்பான சில செயல்களைச் செய்யுமாறு Portage இடம் ஒருவர் கேட்கும்போது, முறைமையில் உள்ள ebuild களை அடிப்படையாகப் பயன்படுத்தும். எனவே, புதிய மென்பொருள், பாதுகாப்பு இற்றைப்படுத்தல், முதலியவற்றைப் பற்றி Portage அறிந்துகொள்ள, முறைமையில் உள்ள ebuild களை முறையாக இற்றைப்படுத்துவது இன்றியமையாததாகும்.

சென்டூ கருவூலத்தை புதுப்பித்தல்

சென்டூ கருவூலமானது விரைவான ஏற்றத்துக்குரிய கோப்பு மாற்ற பயன்கூறு நிரலாகிய rsync ஐ கொண்டு பெரும்பாலும் இற்றைப்படுத்தப்படுகிறது. emerge கட்டளை rsync ற்கு ஒரு முன்முனையை அளித்திருப்பதால் மிகவும் எளிமையாக இற்றைப்படுத்தலாம்:

root #emerge --sync

சில நேரங்களில் ​rsync ஆனது கண்ணாடிதளங்களோடு தொடர்பு கொள்வதை தீயரண் கட்டுப்பாடுகள் தடுக்கலாம். இந்த வழக்கில், சென்டூவின் தினசரி உருவாக்கப்படும் நொடிப்பெடுப்புகளை கொண்டு சென்டூ கருவூலத்தை இற்றைப்படுத்தலாம். emerge-webrsync கருவியானது அண்மை நொடிப்பெடுப்பை தானியக்கமாகக் கொணர்ந்து முறைமையில் நிறுவுகிறது:

root #emerge-webrsync

மென்பொருட்களை பராமரித்தல்

மென்பொருட்களை தேடுதல்

சென்டூ கருவூலத்தில் ஒரு மென்பொருளைத் தேடுவதற்குப் பல வழிகள் உள்ளன. அதில் ஒரு வழி emerge ஐ கொண்டு தேடுவது. முன்னிருப்பாக, கொடுக்கப்பட்ட தேடல் சொல்லிற்கு (முழுமையாக அல்லது பகுதியாக) ஒத்துப்போகும் தொகுப்புகளின் பெயர்களை emerge --search அளிக்கிறது.

எடுத்துக்காட்டாக, "pdf" என்பதை தங்கள் பெயரில் கொண்டுள்ள எல்லா தொகுப்புகளையும் தேடுவதற்கு:

user $emerge --search pdf

விளக்கங்களைக் கொண்டு தேட, --searchdesc (அல்லது -S) விருப்பத்தேர்வைப் பயன்படுத்தவும்:

user $emerge --searchdesc pdf

வெளியீடு பல தகவல்களை அளிப்பதைக் கவனிக்கவும். புலங்கள் தெளிவாக முத்திரையிடப்பட்டுள்ளதால் இதன் பொருள்களுக்குள் நாம் மேலும் செல்லப் போவதில்லை:

குறிமுறை search கட்டளைக்கான எடுத்துக்காட்டு வெளியீடு
*  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

இதையே நிறுவலைத் தொடர வேண்டுமா வேண்டாமா என்பதை ஊடாடல் முறையில் தேர்வு செய்ய --ask கொடியைச் சேர்க்கவும்:

root #emerge --ask gnumeric

ஒரு தொகுப்பின் நிறுவலின்போது, தேவைப்படும் மூல நிரல்களை (தேவைப்பட்டால்) இணையத்திலிருந்து பதிவிறக்கி /var/cache/distfiles/ என்னும் இடத்தில் Portage வைக்கும். பின்னர் இதைக் கட்டவிழ்த்து, தொகுத்து நிறுவும். மூல நிரல்களை நிறுவாமல் பதிவிறக்கம் மட்டும் செய்து வைக்க --fetchonly கொடியை emerge கட்டளையில் சேர்க்கவும்:

root #emerge --fetchonly gnumeric

நிறுவப்பட்ட தொகுப்பின் ஆவணப்படுத்தலைக் கண்டறிய

பெரும்பாலான தொகுப்புகள் அதன் ஆவணப்படுத்தலையும் தன்னுள் கொண்டிருக்கும். சில சமயங்களில் ஒரு தொகுப்பு நிறுவப்படும்போது அதனோடு அதன் ஆவணப்படுத்தலையும் சேர்த்து நிறுவ வேண்டுமா வேண்டாமா என்பதை doc கொடி தீர்மானிக்கும். இந்த doc கொடியைத் தொகுப்பு பயன்படுத்துகிறதா என்பதை அறிய 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

/etc/portage/package.use மூலம் ஒவ்வொரு தொகுப்பிற்குமான அடிப்படையில் doc கொடிகளைச் செயல்படுத்துவது சிறந்த வழிமுறையாகும். இதன்மூலம் தேவைப்படும் தொகுப்புகளுக்கான ஆவணப்படுத்தலை நிறுவலாம். மேலும் விவரங்களுக்கு USE கொடிகள் பக்கத்தைக் காணவும்.

தொகுப்பு நிறுவப்பட்டதும் அதன் ஆவணப்படுத்தலானது /usr/share/doc/ அடைவில் தொகுப்பின் பெயரில் உள்ள துணை அடைவில் இருக்கும்:

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 using emerge --sync. Then the system can be updated using emerge --deep --update @world.

Portage will, with --deep, search for newer version of the applications that are installed. Without --deep, 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. This option should almost always therefore be used:

root #emerge --update --deep @world

The standard upgrade command should include --changed-use or --newuse because of possible changes within the repository's profiles, or if the USE settings of the system have been altered. 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 the system, running emerge --deselect on the package will not have much effect since the dependencies for the package 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 மாறியானது சென்டூ உருவாக்குநர்கள் மற்றும் பயனர்களுக்கான வழிகாட்டி மட்டுமே, சட்ட வாக்குமூலம் இல்லை. மேலும் இது நடைமுறையில் எதிரொலிக்கும் என எந்த பொறுப்புறுதியும் இல்லை. அதனால் இதை நம்பி இருக்க வேண்டாம். நீங்கள் பயன்படுத்தப்படும் எல்லா கோப்புகளையும் சேர்த்துத் தொகுப்பை ஆழமாகச் சரிபார்க்கவும்.

If a discrepancies is found in the ebuild, please file a bug to suggest a change to the value(s) assigned to the ebuild's LICENSE variable.}}

இயல்பாக, 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.licensegoogle-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.

Or to allow the often-needed sys-kernel/linux-firmware:

கோப்பு /etc/portage/package.licenseAccepting the licenses for the linux-firmware package
# Accepting the license for linux-firmware
sys-kernel/linux-firmware linux-fw-redistributable
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
# Accepting any license that permits redistribution
sys-kernel/linux-firmware @BINARY-REDISTRIBUTABLE
முக்கியமானது
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.confAccept all licenses except EULAs
ACCEPT_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 gtk+2 and gtk+3) 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 gtk+ package has ebuilds with SLOT="2" and SLOT="3".

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.

தடுக்கப்பட்ட தொகுப்புகள்

குறிமுறை தடுக்கப்பட்ட தொகுப்புகளை பற்றிய Portage இன் எச்சரிக்கை (--pretend உடன்)
[blocks B     ] mail-mta/ssmtp (is blocking mail-mta/postfix-2.2.2-r1)
  • Error: The above package list contains packages which cannot be
* installed at the same time on the same system.

(x11-wm/i3-4.20.1:0/0::gentoo, ebuild scheduled for merge) pulled in by

   x11-wm/i3

(x11-wm/i3-gaps-4.20.1-1:0/0::gentoo, installed) pulled in by

   x11-wm/i3-gaps required by @selected

}} 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 x11-wm/i3 or to remove x11-wm/i3-gaps first. It is usually best to simply tell Portage the package is no longer desired, with emerge --deselect x11-wm/i3-gaps, for example, to remove it from the world file rather than removing the package itself forcefully.

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 bug tracking system.

மறைக்கப்பட்ட தொகுப்புகள்

குறிமுறை மறைக்கப்பட்ட தொகுப்புகளைப் பற்றிய Portage எச்சரிக்கை
!!! all ebuilds that could satisfy "bootsplash" have been masked.
குறிமுறை மறைக்கப்பட்ட தொகுப்புகளைப் பற்றிய Portage எச்சரிக்கை - காரணம்
!!! 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 கொடி மாற்றங்கள்

குறிமுறை USE கொடியின் மாற்றத் தேவையைப் பற்றிய Portage எச்சரிக்கை
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 அமைக்கப்படவில்லை என்றால் பிழைச் செய்தி பின்வருமாறு திரையில் காட்டப்படும்:

குறிமுறை USE கொடியின் மாற்றத் தேவையைப் பற்றிய Portage பிழை
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.

காணாமல் போன சார்புநிலைகள்

குறிமுறை Portage warning about missing dependency
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 பெயர்

குறிமுறை Portage warning about ambiguous ebuild names
[ 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.

சுழல் சார்புநிலைகள்

குறிமுறை Portage warning about circular dependencies
!!! 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 தோல்வியடைந்துவிட்டது என்பதைப் பற்றிய Portage எச்சரிக்கை
!!! 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.

சிக்கல் இன்னும் நீடித்தால் ஒரு மணி நேரம் கழித்து மீண்டும் முயற்சி செய்து பார்க்கவும்.

முறைமை தனியமைப்பு பாதுகாப்பு

குறிமுறை தனியமைப்பு-பாதுகாக்கப்பட்ட தொகுப்புகளைப் பற்றிய Portage எச்சரிக்கை
!!! 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 சரிபார்த்தல் தோல்வியடைதல்

குறிமுறை 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 அறிந்துகொள்ளும். கண்டிப்பாக இது ஒரு தொகுப்பிற்கான சார்புத் தகவலை மாற்றலாம். USE கொடியைப் பொறுத்து, கோரப்பட்ட சார்பு மாற்றங்களை நிறைவேற்ற, இது மேலும் பல சார்புகளை இழுக்க வேண்டியிருக்கும்.

குறிப்பிட்ட இந்த எடுத்துக்காட்டைக் காணவும்: kde என்னும் USE கொடி USE மாறியில் அமைக்கப்படவில்லையென்றால், KDE க்கான ஆதரவு விரும்பினால் கிடைக்கும் எல்லா தொகுப்புகளும் KDE யின் ஆதரவு இன்றி தொகுக்கப்படும். மேலும், KDE க்கான சார்புநிலை விரும்பினால் கிடைக்கும் எல்லா தொகுப்புகளும் KDE திரட்டுகளின் (சார்புநிலைகளாக) நிறுவல் இல்லாமல் நிறுவப்படும்.

kde கொடி செயல்படுத்தப்படும்போது தொகுப்புகள் KDE ஆதரவு உடன் தொகுக்கப்பட்டு KDE திரட்டுக்கள் சார்புநிலைகளாக நிறுவப்படும்.

USE கொடிகளை சரியாக வரையறுப்பதன் மூலம் முறைமை மேலாளரின் தேவைக்கு ஏற்ப முறைமையை வடிவமைக்க முடியும்.

USE கொடிகளைப் பயன்படுத்துதல்

நிலையான USE கொடிகளை அறிவித்தல்

எல்லா USE கொடிகளும் USE மாறிக்குள் வரையறுக்கப்படும். பயனர்கள் USE கொடிகளை தேடி தேர்வு செய்வதை எளிமையாக்கும் வகையில் நாங்கள் முன்னிருப்பாக ஒரு USE அமைப்பை அளித்துள்ளோம். இந்த அமைப்பானது பெரும்பாலான சென்டூ பயனர்களால் பயன்படுத்தப்படும் USE கொடிகள் என நாங்கள் கருதிய USE கொடிகளின் திரளாகும். மேலும் இது தேர்ந்தெடுக்கப்பட்ட தனியமைப்பின் ஒரு பாகமான make.defaults கோப்புகளில் வரையறுக்கப்பட்டுள்ளது.

முறைமை கவனிக்கும் தனியமைப்பானது /etc/portage/make.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 ..."

இந்த மாறி ஏற்கனவே பல சிறப்பு சொற்களை கொண்டுள்ளது. ஆகையால் make.defaults கோப்பில் உள்ள USE மாறிகளை உங்கள் தேவைக்காக திருத்த வேண்டாம். இந்த கோப்பில் செய்யப்பட்ட திருத்தங்கள் அனைத்தும் சென்டூ கருவூலம் இற்றைப்படுத்தப்பட்டால் மீண்டும் பழைய நிலைக்கு திருத்தியமைக்கப்படும்.

இந்த முன்னிருப்பு அமைப்பை மாற்ற சிறப்பு சொற்களை USE மாறிக்குள் சேர்க்கவும் அல்லது நீக்கவும். இதை முறைமை முழுமைக்கும் செய்ய /etc/portage/make.conf இனுள் USE மாறியை வரையறுக்கவும். இந்த மாறியில் தேவையான USE கொடிகளை சேர்க்கவோ நீக்கவோ செய்யலாம். USE கொடியை நீக்குவதற்கு அதன் முன் கழித்தல் குறியை (-) சேர்க்கவும்.

எடுத்துக்காட்டாக, KDE மற்றும் Qt கான ஆதரவை நீக்கி LDAP கான ஆதரவை சேர்க்க /etc/portage/make.conf கோப்பில் USE மாறியை பின்வருமாறு சேர்க்கவும்:

கோப்பு /etc/portage/make.confmake.conf கோப்பில் USE கொடியை இற்றைப்படுத்தல்
USE="-kde -qt5 ldap"

தனி தொகுப்புகளுக்கு USE கொடிகளை அறிவித்தல்

சில நேரங்களில் பயனர்கள் முறைமை முழுமைக்கும் இல்லாமல் ஒரு (அல்லது ஒன்றிரண்டு) பயன்பாடுகளுக்கு மட்டும் குறிப்பிட்ட USE கொடியை வரையறுக்க விரும்புவார்கள். இதைச் செய்ய, /etc/portage/package.use ஐ திருத்தவும். package.use என்பது பொதுவாக ஒற்றை கோப்பாகும், இருப்பினும் இது குழந்தை கோப்புகள் நிரம்பியுள்ள அடைவாகவும் இருக்கலாம்; இந்த மரபை எவ்வாறு பயன்படுத்துவது என்பது பற்றிய கூடுதல் தகவலுக்கு கீழே உள்ள உதவிக்குறிப்பைப் பார்க்கவும், பின்னர் man 5 portage என்னும் கைமுறை பக்கத்தை பார்க்கவும். பின்வரும் எடுத்துக்காட்டுகள் package.use ஐ ஒற்றைக் கோப்பாக கருதுகிறது.

எடுத்துக்காட்டாக, VLC ஊடக இயக்கி தொகுப்பானது புளூ-ரே ஆதரவை மட்டும் கொண்டிருப்பதற்கு:

கோப்பு /etc/portage/package.useVLC க்கான Blu-ray ஆதரவை செயல்படுத்துதல்
media-video/vlc bluray
துணுக்கு
If package.use ஆனது தனி கோப்பாக இல்லாமல் ஒரு அடைவாக ஏற்கனவே இருந்தால் package.use/ அடைவிற்குள் தொகுப்புகளுக்கான கோப்புகளை உருவாக்குவதன் மூலம் தொகுப்புகளின் USE கொடிகளை திருத்தியமைக்கலாம். கோப்பு பெயரிடல் மரபு எதுவாயினும் அதை பின்பற்றலாம், இருப்பினும் ஓரியல்பான பெயரிடல் மரபை பயன்படுத்துவது நன்மை பயக்கும். இவ்வகை மரபுகளுள் ஒன்று தொகுப்பின் பெயரை தலைப்பாக கொண்டு கோப்பை உருவாக்குவது. எடுத்துக்காட்டாக, media-video/vlc தொகுப்பிற்கு bluray USE கொடியை அமைப்பதற்கு பின்வருமாறு செய்யவும்:

root #echo "media-video/vlc bluray" >> /etc/portage/package.use/vlc

இதேபோல் குறிப்பிட்ட ஒரு செயலிக்கு USE கொடியை வெளிப்படையாக முடக்க இயலும். எடுத்துக்காட்டாக PHP இல் bzip2 ஆதரவை முடக்குவதற்கு (make.conf இல் வெளிப்படையாக bzip2 USE கொடி வரையறுக்கப்படுவதால் மற்ற தொகுப்புகளுக்கு ஆதரவு வழங்கப்படும்):

கோப்பு /etc/portage/package.usePHP க்கான bzip2 ஆதரவை முடக்குதல்
dev-lang/php -bzip2

தற்காலிக USE கொடிகளை அறிவித்தல்

சில நேரங்களில் பயனருக்கு ஒரு USE கொடி குறுகிய காலத்திற்கு மட்டுமே தேவைப்படும். இவ்வாறான சூழலில் /etc/portage/make.conf கோப்பில் USE கொடியை சேர்த்து பின் நீக்குவதற்கு பதிலாக அந்த USE மாறியை சூழல் மாறியாக தூண்டியில் தெரிவிக்கலாம். இந்த செயல் அளிக்கப்பட்ட கட்டளைக்கு மட்டுமே பொருந்தும் என்பதை நினைவில் வைத்து கொள்ளவும். செயலியை மீள்நிறுவல் அல்லது (பயனரின் அளித்த கட்டளை மூலம் வெளிப்படையாகவோ அல்லது முறைமை இற்றைப்படுத்தலின் ஒரு பகுதியாகவோ வரும்) இற்றைப்படுத்தல் செயலை செய்தால் இந்த இடைக்கால USE கொடி வரையறையால் நிகழ்ந்த மாற்றங்கள் அனைத்தும் தவிர்க்கப்பட்டு மீளமைக்கப்படும்.

பின்வரும் எடுத்துக்காட்டில் SeaMonkey தொகுப்பின் நிறுவலின்போது USE மாறியிலிருந்து pulseaudio மதிப்பை இடைக்காலமாக நீக்கப்படுவதை காணலாம்:

root #USE="-pulseaudio" emerge www-client/seamonkey

முந்துரிமை

எந்த அமைப்பு USE அமைப்பை காட்டிலும் அதிக முன்னுரிமையை கொண்டுள்ளது என்பதில் ஒரு குறிப்பிட்ட முந்துரிமை உள்ளது. USE அமைப்பின் முந்துரிமை குறைந்த முன்னுரிமையை கொண்டுள்ளது முதலாக பின்வருமாறு:

  1. தனியமைப்பின் ஒரு பாகமாக கருதப்படும் make.defaults கோப்பில் வரையறுக்கப்பட்டுள்ள முன்னிருப்பு USE அமைப்புகள்
  2. /etc/portage/make.conf இல் உள்ள பயனர் வரையறுத்துள்ள USE அமைப்புகள்
  3. /etc/portage/package.use இல் உள்ள பயனர் வரையறுத்துள்ள USE அமைப்புகள்
  4. சூழல் மாறிகளாக பயனர் வரையறுத்துள்ள USE அமைப்புகள்

Portage கணக்கில் எடுத்துகொள்ளும் இறுதி USE அமைப்புகளை காண emerge --info கட்டளையை இயக்கவும். இது Portage க்கு புலப்படும் எல்லா தொடர்புடைய மாறிகளையும் (USE மாறியையும் சேர்த்து) அதன் இப்போதைய வரையறையுடன் பட்டியலிடும்.

root #emerge --info

புதிய USE கொடிகளுக்கு முழு முறைமையும் தகவமைத்தல்

USE கொடிகளை மாற்றியமைத்த பின் தேவையான மாற்றங்களை செயல்படுத்த முறைமையை இற்றைப்படுத்த வேண்டும். இதை செய்ய emerge கட்டளையுடன் --newuse விருப்பத்தேர்வை சேர்த்து இயக்கவும்:

root #emerge --update --deep --newuse @world

அடுத்ததாக, "பழைய" முறைமையில் நிறுவப்பட்ட முன்னீட்டிற்குறிய சார்புநிலைகள் புதிய USE கொடிகளால் வழக்கொழிந்து போனதால் அவற்றை நீக்க Portage இன் depclean விருப்பத்தேர்வை பயன்படுத்தவும்.

முக்கியமானது
அளிக்கப்பட்ட "வழக்கொழிந்த" தொகுப்புகளின் பட்டியலை ஒன்றிற்கு இருமுறை வழக்கொழிந்த தொகுப்புகளை தவிர்த்து தேவையான தொகுப்புகளை எதுவும் நீக்கப்படும் பட்டியலில் உள்ளதா என்பதை சரிபார்த்து கொள்ளவும். பின்வரும் எடுத்துக்காட்டில் உள்ள கட்டளை depclean விருப்பத்தேர்வில் --pretend (-p) விருப்பத்தேர்வை பயன்படுத்தி வழக்கொழிந்த தொகுப்புகளை நீக்காமல் அவற்றின் பட்டியலை மட்டும் அச்சிட வைக்கும்:
root #emerge --pretend --depclean

depclean முடிந்தவுடன், emerge ஆனது நீக்கப்பட்டுள்ள தொகுப்புகளால் அளிக்கப்படும் பகிர்ந்தளிக்கப்பட்ட பொருட்களோடு இயங்காற்றலால் இணைக்கப்பட்டுள்ள செயலிகளை மீள்உருவாக்க அறிவுறுத்தும். செயலி முறிவுகளை தவிர்ப்பதற்காக இந்த செயலை செய்யும் வரை தேவையான திரட்டுகளை Portage பாதுகாத்து வைத்திருக்கும். மேலும் இது எதை மீள்உருவாக்கம் செய்ய வேண்டும் என்பதை preserved-rebuild கணத்தில் சேமித்து வைத்திருக்கும். தேவையான தொகுப்புகளை மீள்உருவாக்க இதை இயக்கவும்:

root #emerge @preserved-rebuild

இவை அனைத்தும் முடிந்ததும் முறைமை புதிய USE கொடி அமைப்புகளை பயன்படுத்த தொடங்கிவிடும்.

தொகுப்பு சார்ந்த USE கொடிகள்

கிடைக்கும் USE கொடிகளைப் பார்வையிடல்

மீண்டும் நாம் seamonkey எடுத்துக்காட்டை எடுத்து கொள்வோம்: இந்த தொகுப்பில் எந்த USE கொடிகளை எல்லாம் கிடைக்க பெறுகிறது என்பதை அறிந்து கொள்வதற்கு emerge கட்டளையை --pretend மற்றும் --verbose விருப்பத்தேர்வோடு சேர்த்து இடவும்:

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 மட்டுமே செய்யும் என்றில்லை. இச்செயலுக்காகவே தனித்துவமாக வடிவமைக்கப்பட்ட equery கட்டளையானது app-portage/gentoolkit தொகுப்பின் மூலம் கிடைக்கும். இது தொகுப்பு தகவல்களை அளிக்கும் ஆற்றல் பெற்றது

root #emerge --ask app-portage/gentoolkit

இப்போது குறிப்பிட்ட தொகுப்பின் USE கொடிகளை காண்பதற்கு equeryuses மதிப்புரு உடன் சேர்த்து இயக்கவும். எடுத்துக்காட்டாக, app-portage/portage-utils தொகுப்பின் USE கொடிகளை காண:

user $equery --nocolor uses =app-portage/portage-utils-0.93.3
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-portage/portage-utils-0.93.3:
 U I
 + + nls       : Add Native Language Support (using gettext - GNU locale utilities)
 + + openmp    : Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"
 + + qmanifest : Build qmanifest applet, this adds additional dependencies for GPG, OpenSSL and BLAKE2B hashing
 + + qtegrity  : Build qtegrity applet, this adds additional dependencies for OpenSSL
 - - static    : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

REQUIRED_USE முன்னீடுகளை நிறைவேற்றல்

சில ebuild கள் சரியாக வேலை செய்வதற்கு USE கொடிகளின் சில சேர்க்கைகள் தேவைப்படுகின்றன அல்லது தடைசெய்யப்படுகின்றன. இது REQUIRED_USE கோவையில் வைக்கப்பட்டுள்ள முன்னீடுகளின் தொகுப்பின் மூலம் வெளிப்படுத்தப்படுகிறது. இந்த முன்னீடுகள் அனைத்து பண்புகளும் சார்புகளும் நிறைவடைவதையும், உருவாக்கம் வெற்றியடைந்து எதிர்பார்த்தபடி செயல்படுவதையும் உறுதி செய்கிறது. இவற்றில் ஏதேனும் நிறைவு செய்யப்படாவிட்டால், emerge உங்களை எச்சரித்து, சிக்கலைச் சரிசெய்யும்படி கேட்கும்.

எடுத்துக்காட்டு விளக்கம்
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 ஆனது சென்டூ துய்ப்புணர்வை மேம்படுத்துவதற்காக பல கூடுதல் தனிச்சிறப்புகளை கொண்டுள்ளது. இந்த தனிச்சிறப்புகளுள் பெரும்பாலானவை ஆற்றல், நம்பகத்தன்மை மற்றும் பாதுகாப்பை மேம்படுத்தும் குறிப்பிட்ட சில மென்பொருள் கருவிகளை சார்ந்துள்ளன.

குறிப்பிட்ட Portage தனிச்சிறப்பை செயல்படுத்த அல்லது முடக்க /etc/portage/make.conf கோப்பினுள் FEATURES மாறியை இடைவெளியால் பிரிக்கப்பட்ட பலவேறு தனிச்சிறப்பு சொற்களை கொண்டு அமைக்கவும் அல்லது இற்றைப்படுத்தவும். பல நேரங்களில், தனிச்சிறப்பு முறையாக வேலை செய்வதற்கு தேவையான கூடுதல் கருவிகளையும் சேர்த்து நிறுவுவது இன்றியமையாததாகும்.

Portage ஆதரிக்கும் எல்லா தனிச்சிறப்புகளும் இங்கு பட்டியலிடப்படவில்லை. இதைப்பற்றி முழுமையாக அறிய make.conf கைமுறை பக்கத்தை அணுகவும்:

user $man make.conf

முன்னிருப்பாக என்ன FEATURES கள் அமைக்கப்பட்டுள்ளது என்பதை அறிந்து கொள்வதற்கு, emerge --info வை இயக்கி FEATURES மாறியைத் தேடவும் அல்லது grep ஐ பயன்படுத்தவும்:

user $emerge --info | grep ^FEATURES=

பகிர்ந்தளிக்கப்பட்ட தொகுத்தல்

distcc ஐ பயன்படுத்துதல்

distcc ஆனது ஒரு வலையமைப்பில் உள்ள பல்வேறு இயந்திரங்களுக்கு (ஒத்த இயந்திரங்களாக இருக்க வேண்டிய தேவையில்லை) தொகுத்தல் செயலை பகிர்ந்தளிக்கும் ஒரு நிரலாகும். distcc வாங்கியானது எல்லா தேவையான தகவல்களையும் (distccd ஐ இயக்குவதன் மூலம்) கிடைக்கும் distcc சேவையகங்களுக்கு அனுப்புகிறது. இதன்மூலம் distcc சேவையகங்களால் வாங்கியின் பொருட்டு மூல நிரலின் பாகங்களைத் தொகுக்க இயலும். இதன் விளைவாகத் தொகுத்தல் நேரம் கணிசமாகக் குறைக்கப்படும்.

distcc (மற்றும் சென்டூவோடு அதை எவ்வாறு வேலை செய்ய வைப்பது) என்பதைப் பற்றிய மேலும் விவரங்களை Distcc கட்டுரையில் காணலாம்.

distcc ஐ நிறுவுதல்

தொகுத்தலுக்காக கணினி அனுப்பும் பணிகளை கண்காணிப்பதற்காக ஒரு வரைகலை கண்காணியை Distcc கொண்டுள்ளது. USE="gtk" அமைக்கப்பட்டிருந்தால் இந்த கருவி தானியக்கமாக நிறுவப்பட்டுவிடும்.

root #emerge --ask sys-devel/distcc

Portage இன் distcc ற்கான ஆதரவை செயல்படுத்துதல்

/etc/portage/make.conf கோப்பினுள் உள்ள FEATURES மாறியில் distcc என சேர்க்கவும். பின், MAKEOPTS மாறியில் முறைமை அனுமதிக்கும் இணை உருவாக்கல் பணிகளின் எண்ணிகையை அதிகப்படியாக திருத்தியமைக்கவும். -jN என அமைப்பது அறிந்த வழிமுறையாகும். இதில் N என்பது இப்போதுள்ள புரவலனையும் சேர்த்து distccd இயங்கும் மையசெயலகங்களின் மொத்த எண்ணிக்கையோடு 1 ஐ கூட்டினால் வரும் எண்ணாகும். எனினும் இது வெறும் ஒரு வழிமுறை மட்டுமே.

இப்போது distcc-config ஐ இயக்கி கிடைக்கும் distcc சேவையகங்களின் பட்டியலை இடவும். ஒரு எளிய எடுத்துக்காட்டாக, கிடைக்கும் distcc சேவையகங்கள் 192.168.1.102 (இப்போதுள்ள புரவலன்), 192.168.1.103 மற்றும் 192.168.1.104 (இவை இரண்டும் "தொலைநிலை" புரவலன்கள்) என வைத்துக்கொண்டால்:

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 ஆனது தொகுத்தலில் எண்ணற்ற தோல்விகளை ஏற்படுத்தும் என்பது அறிந்த ஒன்றாகும். சில நேரங்களில் ccache ஆனது வழக்கொழிந்த குறிமுறை பொருட்கள் அல்லது பிழையான கோப்புகளை வைத்திருக்கும். இதன் காரணமாக சில தொகுப்புகளை நிறுவ இயலாமல் போகலாம். இத்தகைய சூழலில் ("File not recognized: File truncated" போன்ற பிழைகளை உருவாக்கல் குறிப்புப்பதிவில் கண்டால்) வழுவை தெரிவிப்பதற்கு முன் ccache தனிச்சிறப்பை முடக்கி பின் செயலியை (/etc/portage/make.conf இல் FEATURES="-ccache" என குறிப்பிட்டோ அல்லது பின்வரும் கட்டளையை பயன்படுத்தியோ) மீள்தொகுக்க முயலவும்:


root #FEATURES="-ccache" emerge <category/package>

ccache ஐ நிறுவுதல்

ccache ஐ நிறுவ பின்வரும் கட்டளையை இயக்கவும்:

root #emerge --ask dev-util/ccache

Portage இன் ccache ற்கான ஆதரவை செயல்படுத்துதல்

/etc/portage/make.conf கோப்பை திறந்து அதில் உள்ள FEATURES மாறியில் ccache ஐ சேர்க்கவும். FEATURES மாறி எதுவும் ஏற்கனவே இல்லையென்றால் இப்போது உருவாக்கவும். பின், CCACHE_SIZE என புதிய மாறியை உருவாக்கி அதில் 2G என அமைக்கவும்:

கோப்பு /etc/portage/make.confPortage இன் ccache ற்கான ஆதரவை செயல்படுத்துதல்
FEATURES="ccache"
CCACHE_SIZE="2G"

ccache வேலை செய்கிறதா என்பதைச் சரிபார்ப்பதற்கு, ccache இடம் அதன் புள்ளிவிவரங்களை அளிக்கும்படி கேட்கவும். Portage ஆனது வேறு ccache home அடைவைப் பயன்படுத்துவதால், இடைக்காலத்திற்கு ஒரு CCACHE_DIR மாறியை அமைப்பது இன்றியமையாததாகும்:

root #CCACHE_DIR="/var/tmp/ccache" ccache -s

/var/tmp/ccache/ இருப்பிடமானது Portage இன் முன்னிருப்பு ccache அடைவாகும். இதை மாற்றுவதற்கு /etc/portage/make.conf இல் CCACHE_DIR மாறியை அமைக்கவும்.

ccache ஐ தனித்து இயக்கும்போது முன்னிருப்பு இருப்பிடமான ${HOME}/.ccache/ ஐ இது பயன்படுத்தும். இதன் காரணமாகவே Portage ஆனது ccache தகவல்களை பெறுவதற்கு CCACHE_DIR மாறி அமைக்கப்பட வேண்டிய தேவை ஏற்படுகிறது.

Portage க்கு வெளியில் ccache ஐ பயன்படுத்துதல்

Portage அல்லாத தொகுத்தல்களில் ccache ஐ பயன்படுத்த, PATH மாறியின் துவக்கத்தில் /usr/lib/ccache/bin/ ஐ சேர்க்கவும் (/usr/bin க்கு முன்). பயனரின் வீடு அடைவில் உள்ள ~/.bash_profile ஐ திருத்துவதன் மூலம் இதை செய்து முடிக்கலாம். ~/.bash_profile ஐ பயன்படுத்துவது PATH மாறியை வரையறுக்கும் வழிகளுள் ஒன்றாகும்.

கோப்பு ~/.bash_profileமற்ற பாதைக்கு முன் ccache இன் இருப்பிடத்தை அமைத்தல்
PATH="/usr/lib/ccache/bin:${PATH}"

இரும தொகுப்புகளுக்கான ஆதரவு

முன்-கட்டப்பட்ட தொகுப்புகளை உருவாக்குதல்

முன்-கட்டப்பட்ட தொகுப்புகளின் நிறுவலை Portage ஆதரிக்கிறது. சென்டூ தன்னால் முன்-கட்டப்பட்ட தொகுப்புகளை அளிக்கவில்லை என்றாலும் Portage ஐ முன்-கட்டமைக்கப்பட்ட தொகுப்புகளைப் பற்றி முழுமையாக அறிந்து கொள்ள வைக்க முடியும்.

ஒரு முன்-கட்டப்பட்ட தொகுப்பை உருவாக்குவதற்கு, தொகுப்பு ஏற்கனவே முறைமையில் நிறுவப்பட்டிருந்தால் quickpkg கட்டளையை பயன்படுத்தவும், இல்லையென்றால் --buildpkg அல்லது --buildpkgonly விருப்பத்தேர்வுகளை பயன்படுத்தி நிறுவவும்.

நிறுவப்படும் ஒவ்வொரு தொகுப்பிற்கும் முன்-கட்டப்பட்ட தொகுப்பை Portage உருவாக்க FEATURES மாறியில் buildpkg ஐ சேர்க்கவும்.

முன்-கட்டப்பட்ட தொகுப்புகளை உருவாக்குவதற்கான நீட்டித்த ஆதரவை catalyst மூலம் பெறலாம். இதை பற்றிய மேலும் விவரங்களுக்கு Catalyst அடிக்கடி கேட்கப்படும் கேள்விகள் பக்கத்தை படிக்கவும்.

முன்-கட்டப்பட்ட தொகுப்புகளை நிறுவுதல்

சென்டூ ஒன்றை அளிக்கவில்லை என்றாலும், முன்-கட்டப்பட்ட தொகுப்புகளை சேமித்து வைப்பதற்கு ஒரு மைய கருவூலத்தை உருவாக்க முடியும். இந்த கருவூலத்தை பயன்படுத்துவதற்கு Portage அறிந்துகொள்ளும் வகையில் PORTAGE_BINHOST மாறியை கருவூலத்தை நோக்கி அமைக்க வேண்டும். எடுத்துக்காட்டாக, முன்-கட்டப்பட்ட தொகுப்புகள் ftp://buildhost/gentoo என்னுமிடத்தில் இருந்தால்:

கோப்பு /etc/portage/make.confPORTAGE_BINHOST இருப்பிடத்தை சேர்த்தல்
PORTAGE_BINHOST="ftp://buildhost/gentoo"

முன்-கட்டப்பட்ட தொகுப்புகளை நிறுவுவதற்கு emerge கட்டளையில் --usepkg உடன் --getbinpkg விருப்பத்தேர்வையும் சேர்த்து இயக்கவும். --getbinpkg விருப்பத்தேர்வானது முன்பு வரையறுக்கப்பட்ட சேவையகத்தில் இருந்து முன்-கட்டப்பட்ட தொகுப்புகளைப் பதிவிறக்குமாறு emerge இடம் கூறுகிறது. --usepkg விருப்பத்தேர்வானது மூலங்களில் இருந்து கொணர்ந்து தொகுப்பதற்கு முன்னால் முன்-கட்டப்பட்ட தொகுப்புகளை முதலில் நிறுவ முயலுமாறு emerge ஐ கேட்டுக் கொள்கிறது.

எடுத்துக்காட்டாக, gnumeric ஐ முன்-கட்டப்பட்ட தொகுப்புகளுடன் நிறுவ:

root #emerge --usepkg --getbinpkg gnumeric

இ-ஒன்றாக்குதலின் முன்-கட்டப்பட்ட தொகுப்பு விருப்பத்தேர்வுகளைப் பற்றிய மேலும் விவரங்களை emerge இன் கைமுறை பக்கத்தில் காணலாம்:

user $man emerge

முன்-கட்டப்பட்ட தொகுப்புகளை மற்றவற்றுக்குப் பகிர்ந்தளித்தல்

முன்-கட்டமைக்கப்பட்ட தொகுப்புகள் மற்றவர்களுக்கு பகிர்ந்தளிக்க வேண்டும் என்றால், இது அனுமதிக்கப்பட்டுள்ளதை உறுதிப்படுத்திகொள்ளவும். இதற்கு மேல்நோக்கு தொகுப்பின் பகிர்ந்தளிப்பு விதிமுறைகளை சரிபார்க்கவும். எடுத்துக்காட்டாக, GNU GPL இன் கீழ் வெளியிடப்படும் தொகுப்பானது, இருமிகளுடன் மூலங்களும் கிடைக்க வேண்டும்.

கட்டப்பட்ட இருமங்கள் வழங்க இயலாமல் போனால் Ebuild கள் அதன் RESTRICT மாறியில் bindist கட்டுப்பாட்டை வரையறுக்கும். சில நேரங்களில் இந்த கட்டுப்பாடு ஒன்று அல்லது அதற்கும் மேற்பட்ட USE கொடிகளில் முன்னீடாகும்.

முன்னிருப்பாக, கட்டுப்பாடுகள் காரணமாக Portage எந்த தொகுப்பையும் மறையிடாது. /etc/portage/make.conf கோப்பில் ACCEPT_RESTRICT மாறியை அமைப்பதன் மூலம் இதை முறைமை முழுமைக்கும் மாற்றியமைக்கலாம். எடுத்துக்காட்டாக, bindist கட்டுப்பாட்டை கொண்டுள்ள தொகுப்புகளை மறைக்க, பின்வரும் வரிகளை make.conf இல் சேர்க்கவும்:

கோப்பு /etc/portage/make.confபகிர்ந்தளிக்கக்கூடிய இருமத் தொகுப்புகளை மட்டும் அனுமதிக்கும்
ACCEPT_RESTRICT="* -bindist"

emerge கட்டளையில் --accept-restrict விருப்பத்தேர்வை அளிப்பதன் மூலம் ACCEPT_RESTRICT மாறியை மேலெழுத இயலும். எடுத்துக்காட்டாக, --accept-restrict=-bindist விருப்பத்தேர்வானது bindist கட்டுப்பாட்டை கொண்டுள்ள தொகுப்புகளை இடைக்காலமாக மறைக்கிறது.

மேலும் தொகுப்புகளை பகிர்ந்தளிக்கும்போது ACCEPT_LICENSE மாறியை அமைப்பதை கருதவும். இதற்கு உரிமங்கள் பிரிவை காணவும்.

முக்கியமானது
தொகுப்புகளின் உரிம விதிமுறைகள் மற்றும் ஒவ்வொரு பயனரின் நாட்டின் சட்டங்களுக்கும் இணங்குவது ஒவ்வொரு பயனரின் முழுப் பொறுப்பாகும். ebuild களின் (RESTRICT அல்லது LICENSE) மூலம் வரையறுக்கப்பட்ட மீதரவு மாறிகள் இருமிகளின் பகிர்ந்தளிப்பு அனுமதிக்கப்படாதபோது வழிகாட்டுதலை வழங்க முடியும், இருப்பினும் Portage-ல் இருந்து வரும் வெளியீடு அல்லது சென்டூ உருவாக்குநர் பதிலளிக்கும் கேள்விகள் சட்ட அறிக்கைகளாக கருத முடியாது என்பதால் இதை முழுமையாக சார்ந்து இருக்க வேண்டாம். உங்கள் இருப்பிடத்தின் சட்டத்தை கடைபிடிப்பதில் கவனமாக இருங்கள்.

கோப்புகளைக் கொணர்தல்

Userfetch

Portage பொதுவாக வேர் பயனராக இயங்கும். FEATURES="userfetch" ஐ அமைப்பது, தொகுப்பு ஆதாரங்களைப் பெறும்போது, Portage வேர் சிறப்புரிமை கைவிட அனுமதித்து portage:portage இன் பயனர்/குழு அனுமதிகளுடன் இயங்கும். இது ஒரு சிறிய பாதுகாப்பு முன்னேற்றமாகும்.

FEATURES மாறியில் userfetch அமைக்கப்பட்டிருந்தால் வேர் சிறப்புரிமையுடன் chown கட்டளையை பயன்படுத்தி /var/db/repos/gentoo இன் கீழ் உள்ள எல்லா கோப்புகளின் உரிமையாளரை மாற்றவும்:

root #chown --recursive --verbose portage:portage /var/db/repos/gentoo

dist கோப்புகளை சரிபார்த்தல்

இப்போது நிறுவப்பட்டுள்ள தொகுப்புகளுக்கான முன்பு நீக்கப்பட்ட/பிழையான dist கோப்புகளிள் ஒருமைப்பாட்டை மீண்டும் சரிபார்த்து, மீள்பதிவிறக்கம் செய்ய, இதை இயக்கவும்:

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/inittabBoot command invocation
rc::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 sub-directory 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/inittabTerminal definitions
c1: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/apache2apache2 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 குறுநிரலின் அடிப்படை தளவமைப்பு கீழே கொடுக்கப்பட்டுள்ளது.

குறிமுறை எடுத்துக்காட்டு init குறுநிரல் தளவமைப்பு (பாரம்பரிய)
#!/sbin/openrc-run
  
depend() {
#  (சார்புநிலை தகவல்கள்)
}
  
start() {
#  (சேவைகளைத் துவக்குவதற்குத் தேவையான கட்டளைகள்)
}
  
stop() {
#  (சேவைகளை நிறுத்துவதற்குத் தேவையான கட்டளைகள்)
}
குறிமுறை Example initscript layout (updated)
#!/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 be use logger or use 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 to use 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 defines before 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/postfixDependency information of the postfix service
depend() {
  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/portmapDependency information of the portmap service
depend() {
  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.

குறிமுறை * glob ஐ பயன்படுத்துதல்
depend() {
  before *
}

If the service must write to local disks, it should need localmount. If it places anything in /var/run/ such as a PID file, then it should start after bootmisc:

குறிமுறை Dependency setting with needing localmount and 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:

குறிமுறை Example start() function
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() செயலாற்றி
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:

குறிமுறை Example definition for a service that starts the foo script
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


குறிமுறை Example definition of restartdelay method
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 behavior 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 boot time, 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.confEnable hotplugging of the WLAN interface
rc_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/ கோப்புகளின் அகர வரிசையில் பின்னொட்டு செய்யும். கோப்பு பெயர்கள் இரண்டு பதின்ம இலக்கத்தில் துவங்க வேண்டும்.

குறிமுறை env-update ஆல் பயன்படுத்தப்படும் இற்றைப்படுத்தல் வரிசை
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 amd64 Handbook: Working with Gentoo/ta" overrides earlier display title "Handbook:Parts/Full/Working".