如果缺少这些用户和组,在后面用ebuild制做软件包时,会出错。
第5节 安装portage树
这里选用2012-12-02发而的portage树。树放在一个git库里,其中包含很多版本,这里取出的版本己验证过。命令如下:
cd /usr
tar xvf /sources/portage-latest.tar.xz
cd portage
git checkout -f b10b694c3d05f47cad9ca79022703b156f6e9d54
第6节 手工配置portage
1. 建立文件/etc/portage/bin/post_sync。
mkdir -pv /etc/portage/bin
cat >/etc/portage/bin/post_sync <<"EOF"
#!/bin/sh
# Copyright 2006-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
for f in /etc/portage/postsync.d/* ; do
[ -x "${f}" ] && "${f}"
done
:
EOF
2. 建立文件/etc/portage/make.conf。
cat >/etc/portage/make.conf <<"EOF"
# These settings were set by the metro build script that automatically built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-mtune=generic -O2 -pipe"
CXXFLAGS="-mtune=generic -O2 -pipe"
MAKEFLAGS="-j10"
EOF
-j10是个示意,10表示同时开始的编译任务数,这个值推荐值是N+1或N*2,N是系统的CPU总核数。
这个文件的优先级比/etc/make.conf低。但portage推荐使用这个文件。
3. 建立文件/etc/portage/make.profile。
mkdir -pv /etc/portage/make.profile
cat >/etc/portage/make.profile/parent <<"EOF"
gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
gentoo:funtoo/1.0/linux-gnu/build/current