This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Overlay

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Ebuild repository and the translation is 79% complete.
Outdated translations are marked like this.
Resources

An ebuild repository, colloquially known as an overlay, is a structure of directories and files used to add and extend packages for a Gentoo-based system's package manager. Ebuild repositories can contain ebuilds conforming to one or more Ebuild APIs.

The main repository on a Gentoo system is known as the Gentoo ebuild repository. It contains ebuilds maintained by official Gentoo developers and members of the community (through the Proxy Maintainers project). System administrators can add additional ebuild repositories to the system using various utilities and methods described below.

저장소

Ebuild repositories are nothing more (or less) than a set of files (ebuilds, metadata files, ...). These can be pulled in from public repositories (git, CVS, SVN ...) or downloaded as tarballs and extracted manually onto the system. It is advised to use managed repositories by trusted third parties; any installed ebuild repository will cause Portage to look through the overlaid files when deciding which software to install. If compromised code is in the ebuild repository, then compromised packages could be installed on the system.

현재는 포티지 관련 여러 위치 저장소를 /etc/portage/repos.conf 파일에서 처리하는 접근 방식이 기본이며, 언급한 경로는 디렉터리가 될 수도 있습니다.

/etc/portage/repos.conf/의 저장소 정의를 통해 저장소를 업데이트할 수 있을지 어떻게 업데이트할 수 있을지 포티지에 알려주기도 합니다. emerge --sync를 호출하면 저장소도 마찬가지로 자동으로 업데이트합니다.

오래됐지만 여전히 지원하는 방식은 /etc/portage/make.conf에서 PORTDIR_OVERLAY 변수를 사용하는 방법입니다. 이 변수는 저장소(정보)가 있는 파일 시스템에 있는 하나 이상의 추가 위치를 가리킬 수 있습니다. /etc/portage/repos.conf 디렉터리 사용을 가장 선호합니다.

더 많은 정보는 /etc/portage/repos.confPortage/Sync 게시글을 참고하십시오.

우선순위

각각의 ebuild 저장소에는 유일의 우선순위가 있습니다. 여러 ebuild 저장소에 특정 버전을 발견했을 경우 확인하며, 해결 방법은 혼란스럽지 않습니다. 높은 우선순위 번호 값(예: 60)을 지닌 ebuild 저장소의 이빌드는 낮은 우선순위(예: 50)를 가진 ebuild 저장소의 이빌드보다 우선합니다.

우선순위가 붙은 ebuild 저장소 목록은 (Repositories 문자열로 찾아서) 다음 출력 목록으로 볼 수 있습니다:

user $emerge --info --verbose
user $portageq repos_config /

기본 젠투 포티지 트리는 -1000 우선순위를 갖습니다. 이는 다른 ebuild 저장소에 보통 할당하는 우선순위보다 훨씬 높은 우선순위를 배당한다는 의미입니다. ebuild 저장소를 포티지 트리 "위에 얹어놓은" 방식으로 설계했기 때문에 이런 동작은 기본입니다.

가용 프로그램

ebuild 저장소를 지원하거나 오버레이에 붙는 도구는 여러가지가 있습니다.

Layman

layman 프로그램은 여러 추가 ebuild 저장소를 쉽게 관리하고 업데이트할 수 있게 합니다. 공개 ebuild 저장소를 조회하고, 가입하거나, 탈퇴하며, 이들 저장소를 업데이트할 수 있는 명령줄 프로그램입니다.

make.conf 방식과 repos.conf 방식을 모두 지원합니다.

더 많은 정보는 LaymanenLayman 설정en을 참고하십시오

emaint

동기화(포티지 프로젝트)en게시글과 man 1 emaint를 참고하십시오.

eix

eix-synceix-update를 연달아 실행할 emerge --sync를 시작(emaint sync --auto 시작)하는 래퍼입니다. 더 자세한 내용은 Eix 글과 man 1 eix를 참고하십시오.

eselect-repository

eselect repository maintains /etc/portage/repos.conf entries for Portage to access and synchronize. See Eselect/Repository article for details.

사용법

중복 꾸러미 이머징

ebuild 저장소를 다룰 때 제각기 다른 ebuild 저장소에서 여러 버전의 동일한 꾸러미가 있을 수 있습니다. :: 표기법을 활용하여 특정 ebuild 저장소의 특정 꾸러미를 설치하도록 Portage에 지시하십시오:

root #emerge --ask category/atom::ebuild repository-name

The same notation can be used for different emerge instructions, including uninstalling a package through --depclean.

모범 사례

캐시 만들기

큰 ebuild 저장소를 설치하면, 포티지에서 의존성 확인과 같은 작업을 처리하는데 오랜 시간이 걸릴 수 있습니다. 보통 ebuild 저장소에서 메타데이터 캐시를 보유하고 있지 않기 때문입니다.

ebuild 저장소를 동기화 한 후 emerge --regen 을 실행하여 로컬 메타데이터 캐시를 만들어야합니다:

root #layman -S
root #( ulimit -n 4096 && emerge --regen )

emerge --regen 작업은 오랜 시간이 걸리니 주의하십시오. rsync 사용자(대부분의 포티지 사용자)라면 서버측 캐시를 활용하여 rsync 업데이트를 수행하므로 추천하지 않습니다. rsync 사용자는 간단하게 emerge --sync 명령(또는 eix-sync)을 실행하여 캐시를 다시 만들면 됩니다. 대규모 ebuild 저장소 사용자에 한해서만 emerge --regen 을 시도하시면 되겠습니다.

Masking installed but unsafe ebuild repositories

알 수 없는 저질의 대규모 ebuild 저장소를 활용한다면 전체 ebuild 저장소에 영구 마스크를 지정하는 것이 좋은 방법입니다.

파일 /etc/portage/package.maskebuild 저장소의 모든 꾸러미에 마스크 설정
*/*::ebuild repository-name

그 다음 설치할 꾸러미의 마스크를 해제하십시오.

파일 /etc/portage/package.unmaskebuild 저장소의 별도 꾸러미 마스크 해제
foo/bar::ebuild repository-name

추가 참조

외부 자료