build は i386 なので、schroot の環境を作成
$ sudo aptitude install cdebootstrap schroot
$ sudo cdebootstrap --arch=i386 --flavour=build squeeze squeeze-i386 \ http://ftp.jp.debian.org/debian
$ sudo groupadd pnuts
自分をpnuts グループに追加
[sarge-i386]
# Optional. The chroot with alias 'default' is used if you just type
# 'schroot' without the -c option.
aliases=testing,default
# Whatever you like
description=Debian sarge
# Relative to what was /mnt until a moment ago
location=/sarge-i386
# Below here is standard for all the chroots
# Adjust according to the space available and size of builds you'll do
lvm-snapshot-options=--size 2G
device=/dev/デバイス
type=lvm-snapshot
priority=3
groups=pnuts,root
root-groups=pnuts,root
source-groups=pnuts,root
source-root-groups=root
$ sudo schroot -c squeeze-i386-source
(squeeze-i386-source)root@debian:~# apt-get upgrade
(squeeze-i386-source)root@debian:~# apt-get install devscripts vim-tiny sudo \ fakeroot aptitude build-essential
(squeeze-i386-source)root@debian:~# apt-get clean
ここから、pnut 用の環境作成
デフォルトの設定をコピー
$ cd /etc/schroot
$ sudo cp -a defaults pnut
schroot.conf を編集して、
script-config=pnut/config
を追加。
pnut/config を編集
FSTAB="/etc/schroot/pnut/fstab"
COPYFILES="/etc/schroot/pnut/copyfiles"
pnut/fstab に次の行を追加
/mnt/src /mnt/src none rw,rbind 0 0
(適当にbind でマウントする.)
pnut/copyfiles も適当に追加
0 件のコメント:
コメントを投稿