κ°μ₯ λ΄μμ poudriere λλμ μμνλ κ²μ λΆκ°λ₯ν©λλ€.
# poudriere bulk -f /usr/local/etc/poudriere.d/ports-lists/Kunden-Ports -j Kunden
[00:00:00] ====>> Creating the reference jail... done
[00:01:04] ====>> Mounting system devices for Kunden-default
[00:01:04] ====>> Mounting ports/packages/distfiles
[00:01:04] ====>> Using packages from previously failed build
[00:01:04] ====>> Mounting packages from: /poudriere/data/packages/Kunden-default
[00:01:04] ====>> Mounting /var/db/ports from: /usr/local/etc/poudriere.d/Kunden-options
[00:01:04] ====>> Appending to make.conf: /usr/local/etc/poudriere.d/Kunden-make.conf
/etc/resolv.conf -> /poudriere/data/.m/Kunden-default/ref/etc/resolv.conf
[00:01:04] ====>> Starting jail Kunden-default
jail: jail_set: Operation not permitted
[00:01:04] ====>> Cleaning up
[00:01:04] ====>> Umounting file systems
μ΅λν μν€ νλͺ©μ λ°λμ§λ§ ZFSλ μ¬μ©νμ§ μμ΅λλ€. λ°λΌμ κ°μ₯μ λν λ΄ FreeBSD 10 ꡬμ±μ λ€μκ³Ό κ°μ΅λλ€.
poudriere {
path="/usr/local/jail/poudriere";
host.hostname="poudriere";
ip6.addr="2a01:4f8:150:50a5::12/64";
persist;
children.max=99;
allow.mount;
allow.mount.devfs;
allow.mount.procfs;
allow.mount.zfs;
allow.mount.nullfs;
allow.mount.tmpfs;
allow.raw_sockets;
allow.socket_af;
allow.sysvipc;
allow.chflags;
mount.devfs;
enforce_statfs=1;
interface=re0;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
μ€λ₯ λ©μμ§λ κ°μ₯ λ΄μ κ°μ₯μ λ§λ€ μ μμμ λνλ λλ€. κ·Έλ¬λ―λ‘ λλ κ·Έκ²μ μλμΌλ‘ μλνλ€ - λλ jail-poudriere μμ κ°μ₯μ λ§λ€ μ μλ€.
IPv6μ΄ μλ κ²½μ° μΆκ° ν μ€νΈλ₯Ό μν΄ κ°μ₯μ μ‘μΈμ€ν μ μμ΅λλ€.
μλ§λ 'ip4' νλͺ©μ΄ μμ΄μ μ€ν¨νμ κ²μ λλ€. 'poudriere -x bulk ... 2>log'λ₯Ό μ€ννκ³ λ‘κ·Έ νμΌμ μ λ‘λνκ±°λ λ΄κ° λ³Ό μ μλ μμΉμ νΈμ€ν ν μ μμ΅λκΉ?
μ¬κΈ°μμ λ‘κ·Έλ₯Ό λ³Ό μ μμ΅λλ€.
http://pkg.toco-domains.de/poudriere-in-jail-error.log
"ip4=inherit;ip6=inherit;"μΌλ‘ μ μμ μλνμ΅λλ€. λ§μ΅λλ€. μ΄ μ΅μ μ μ€μ νλ©΄ μλν©λλ€. :)
"μλ"μ΄λ λ€μμ μλ―Έν©λλ€.
μ€λ₯ λ©μμ§κ° μ¬λΌμ‘μ΅λλ€. μ¬μ©ν IPv4 μ£Όμκ° μκΈ° λλ¬Έμ ν¬νΈ ꡬμΆμ ν
μ€νΈν μ μμ΅λλ€. poudriereκ° ν¬νΈλ₯Ό κ°μ Έμ€μ§ λͺ»ν©λλ€. IPv4λ₯Ό ν΅ν΄ κ°μ λ‘ λ€μ΄λ‘λνλ κ² κ°μ΅λκΉ?
λ‘κ·Έλ₯Ό λ³΄κ³ μμ΅λλ€. λ€μ μ€μμ μ€λ₯κ° λ°μν©λλ€.
jail -c persist name=Kunden-default path=/poudriere/data/.m/Kunden-default/ref host.hostname=Kunden-default ip4.addr=127.0.0.1 ip6.addr=::1 allow.socket_af allow.raw_sockets allow.chflags allow.sysvipc
νμ λ€μκ³Ό κ°μ΄ λ³κ²½νλ κ²½μ°:
jail -c persist name=Kunden-default path=/mnt/ host.hostname=Kunden-default ip6.addr=2a01:4f8:150:50a5::12 allow.socket_af allow.raw_sockets allow.chflags allow.sysvipc
κ°μ₯μ΄ μ±κ³΅μ μΌλ‘ μμ±λμμ΅λλ€. λν λλ κ·Έκ²μΌλ‘ μΌν μ μμ΅λλ€. μ΄κ² λμμ΄ λκΈΈ λ°λλ€.
λͺ¨λ μμ μ κ°μ¬λ립λλ€ :)
νλμ½λ©λ IPv6 μ£Όμλ₯Ό μ€μ ν ν ν¬νΈ ꡬμΆμ΄ μμλ©λλ€.
κ·Έλ¬λ pkg-packageλ₯Ό μ»΄νμΌν μ§νμ μ€μ§λ©λλ€. μλ¬ λ©μμ§:
=== μμ ===
=========================
pkg-static: "/var/run/ld-elf.so.hints"λ₯Ό μ΄ μ μμ: ν΄λΉ νμΌμ΄λ λλ ν°λ¦¬κ° μμ΅λλ€.
*** μ€λ₯ μ½λ 1
λ©μΆλ€.
make[1]: /usr/ports/ports-mgmt/pkgμμ μ€μ§λ¨
*** μ€λ₯ μ½λ 1
λ©μΆλ€.
make: /usr/ports/ports-mgmt/pkgμμ μ€μ§λ¨
====>> wrkdir μ 리
===> pkg-1.3.5.1 μ²μ
/usr/ports/ports-mgmt/pkg λΉλκ° 2014λ
8μ 11μΌ μ 08:35:21 UTCμ μ’
λ£λ¨
λΉλ μκ°: 00:00:30
!!! λΉλ μ€ν¨κ° λ°μνμ΅λλ€!!!
[ root@poudriere /]# ls -lah /var/run/ld-elf.so.hints
=== λ ===
νμΌμ΄ μ‘΄μ¬ν©λλ€.
-r--r--r-- 1 λ£¨νΈ ν 199B 8μ 6μΌ 13:58 /var/run/ld-elf.so.hints
κ·Έλμ λλ κ·Έκ²μ΄ μ¬λ°λ₯΄κ² 볡μ¬λμ§ μμλ€κ³ μκ°ν©λκΉ?
λλ²κΉ ν μν ννΈμ λ¬Έμ κ° μμμ λ°κ²¬νμ΅λλ€. μ°Έμ‘° κ°μ₯μ λ§λ€ λ κ°μ₯μ λν κ²½λ‘λ 볡μ¬μ μ¬μ©λ©λλ€.
μ κ²½μ°μλ /usr/local/jail/poudriere/var/run -> μ΄λ©° μ΄ κ²½λ‘λ κ°μ₯ λ΄μμ μ‘΄μ¬νμ§ μμμ΅λλ€.
μ λ₯Ό μν ν΄κ²° λ°©λ²μΌλ‘ /var/runμ 볡μ¬λ₯Ό νλμ½λ©νμ΅λλ€. μ΄κ²μ μλνλ κ² κ°μ΅λλ€ :)
μ΄λ² νΈμμ μ€λͺ νλ λ¬Έμ λ Poudriereκ° μλλΌ FreeBSD κ°μ₯μ μ€κ³μ κ΄λ ¨μ΄ μμ΅λλ€.
[00:00:00] ====>> Creating the reference jail... done
[00:00:04] ====>> Mounting system devices for 10-1R_amd64-default
[00:00:04] ====>> Mounting ports/packages/distfiles
[00:00:04] ====>> Using packages from previously failed build
[00:00:04] ====>> Mounting packages from: /poudriere/data/packages/10-1R_amd64-default
[00:00:04] ====>> Appending to make.conf: /usr/local/etc/poudriere.d/10-1R_amd64-make.conf
/etc/resolv.conf -> /poudriere/data/.m/10-1R_amd64-default/ref/etc/resolv.conf
[00:00:04] ====>> Starting jail 10-1R_amd64-default
jail: jail_set: Operation not permitted
[00:00:04] ====>> Cleaning up
[00:00:04] ====>> Umounting file systems
man jail
:
Jailed νλ‘μΈμ€λ μμ λ³΄λ€ λ ν° κΆνμ λΆμ¬ν μ μμ΅λλ€.
μλ₯Ό λ€μ΄, allow.nomountλ₯Ό μ¬μ©νμ¬ κ°μ₯μ λ§λ κ²½μ°
allow.mountκ° μ€μ λ κ°μ₯μ λ§λ€ μ μμ΅λλ€. μ μ¬νκ², κ·Έλ¬ν
ip4.addr λ° securelevelκ³Ό κ°μ μ νμ μμμμ μ°νν μ μμ΅λλ€.
κ°μ₯.
λ°λΌμ IP μ£Όμ 127.0.0.1
λ° ::1
λ₯Ό μ μν΄μΌ ν©λλ€.
loopback
μΈν°νμ΄μ€ lo0
μνΌ κ°μ₯ μμ€ν
(Poudriere κ°μ₯). λ€λ₯Έ IP μ£Όμλ λ§μ°¬κ°μ§μ
λλ€. μνΌ κ°μ₯μ λν΄ μ€μ λ κ³μΈ΅μ κ°μ₯μλ§ IPλ₯Ό μ¬μ©ν μ μμ΅λλ€.
μ€ννλ©΄ μμμ μ€λͺ ν μ€λ₯κ° λ°μν©λλ€.
# jail -c persist 'name=10-1R_amd64-default' \
'path=/poudriere/data/.m/10-1R_amd64-default/ref' \
'host.hostname=10-1R_amd64-default' \
'ip4.addr=127.0.0.1' 'ip6.addr=::1' \
allow.socket_af allow.raw_sockets allow.chflags allow.sysvipc
μλ μ½λλ₯Ό μ€ννλ©΄ λ¬Έμ μμ΄ μ§νλ©λλ€.
'ip4.addr=127.0.0.1' 'ip6.addr=::1'
맀κ°λ³μκ° μ κ±°λ¨):
# jail -c persist 'name=10-1R_amd64-default' \
'path=/poudriere/data/.m/10-1R_amd64-default/ref' \
'host.hostname=10-1R_amd64-default' \
allow.socket_af allow.raw_sockets allow.chflags allow.sysvipc
λΌμΈμμ ${network}
λ³μλ₯Ό μ κ±°νμ¬ ν
μ€νΈλ₯Ό μ¬νν μ μμ΅λλ€.
/usr/local/share/poudriere/common.sh
μ€ 252
ezjail
μλ§ ν΄λΉνμ§λ§ /etc/jail.conf
μλ λμΌν λ°©λ²μ μ μ©ν μ μμ)127.0.0.1,::1
λ₯Ό κ°μ₯ IP λͺ©λ‘μ μΆκ°ν©λλ€.
/usr/local/etc/ezjail/myjail_example_org
:
export jail_myjail_example_org_ip="em0|192.168.3.6,lo0|127.0.0.1,lo0|::1"
μνΌ μ€λλ λ²κ·Έκ° λ°μ΄λ¬μ΅λλ€!
c756e1822013a763c8a5e4ccee273794bd182e11λ λμμ΄ λ©λλ€.
κ°μ₯ μ μ©ν λκΈ
μ΄λ² νΈμμ μ€λͺ νλ λ¬Έμ λ Poudriereκ° μλλΌ FreeBSD κ°μ₯μ μ€κ³μ κ΄λ ¨μ΄ μμ΅λλ€.
λ¬Έμ /μ€λ₯
μ€λͺ
man jail
:λ°λΌμ IP μ£Όμ
127.0.0.1
λ°::1
λ₯Ό μ μν΄μΌ ν©λλ€.loopback
μΈν°νμ΄μ€lo0
μνΌ κ°μ₯ μμ€ν (Poudriere κ°μ₯). λ€λ₯Έ IP μ£Όμλ λ§μ°¬κ°μ§μ λλ€. μνΌ κ°μ₯μ λν΄ μ€μ λ κ³μΈ΅μ κ°μ₯μλ§ IPλ₯Ό μ¬μ©ν μ μμ΅λλ€.ν μ€νΈ(10.1-STABLEμμ)
μ€ννλ©΄ μμμ μ€λͺ ν μ€λ₯κ° λ°μν©λλ€.
μλ μ½λλ₯Ό μ€ννλ©΄ λ¬Έμ μμ΄ μ§νλ©λλ€.
'ip4.addr=127.0.0.1' 'ip6.addr=::1'
맀κ°λ³μκ° μ κ±°λ¨):λΌμΈμμ
${network}
λ³μλ₯Ό μ κ±°νμ¬ ν μ€νΈλ₯Ό μ¬νν μ μμ΅λλ€./usr/local/share/poudriere/common.sh
μ€ 252μ루μ (
ezjail
μλ§ ν΄λΉνμ§λ§/etc/jail.conf
μλ λμΌν λ°©λ²μ μ μ©ν μ μμ)127.0.0.1,::1
λ₯Ό κ°μ₯ IP λͺ©λ‘μ μΆκ°ν©λλ€./usr/local/etc/ezjail/myjail_example_org
: