手斧Linux – 从LFS到Funtoo (90)

如果缺少这些用户和组,在后面用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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值