Como construir uma versão customizada do FreeBSD sem privilégios de root?

2

Eu estou tentando construir uma imagem de disco personalizada do FreeBSD a partir do código que eu poderia carregar com o bhyve.

Aqui está o script que eu uso:

export MAKEOBJDIRPREFIX="$HOME/obj"
export CHROOTDIR="$HOME/var"
ncpu="$(sysctl hw.ncpu | awk '{print $2}')"

set -e   

cd 
mkdir -p obj
mkdir -p var

svn co http://svn.freebsd.org/base/head ./src
cd src
make -j$ncpu -DNO_CLEAN buildworld buildkernel

cd release
make release -DNODOC -DNOSRC -DNOPORTS
make install DESTDIR=../../var

Meu problema é que make release falha.

O que está errado?

Aqui estão algumas partes da mensagem de erro make release :

...

.:      user (0, 1001, not modified: Operation not permitted)
bin:    user (0, 1001, not modified: Operation not permitted)
boot:   user (0, 1001, not modified: Operation not permitted)
boot/defaults:
        user (0, 1001, not modified: Operation not permitted)
boot/dtb:
        user (0, 1001, not modified: Operation not permitted)
boot/firmware:
        user (0, 1001, not modified: Operation not permitted)
boot/kernel:
        user (0, 1001, not modified: Operation not permitted)
boot/modules:
        user (0, 1001, not modified: Operation not permitted)
boot/zfs:
        user (0, 1001, not modified: Operation not permitted)
dev:    user (0, 1001, not modified: Operation not permitted)
etc:    user (0, 1001, not modified: Operation not permitted)

...

--------------------------------------------------------------
>>> Distributing everything
--------------------------------------------------------------
cd /usr/home/m/src; make -f Makefile.inc1 distribute
===> lib (distribute)
===> lib/csu (distribute)
===> lib/csu/amd64 (distribute)
cd /usr/home/m/src/lib/csu/amd64;  make install installconfig -DNO_SUBDIR DESTDIR=/usr/home/m/obj/usr/home/m/src/release/dist/base SHARED=copies
install  -o root -g wheel  -m 444 crt1.o crti.o crtn.o Scrt1.o gcrt1.o /usr/home/m/obj/usr/home/m/src/release/dist/base/usr/lib/
install: /usr/home/m/obj/usr/home/m/src/release/dist/base/usr/lib/crt1.o: chown/chgrp: Operation not permitted
*** Error code 71

...

    
por Mateusz Piotrowski 05.09.2017 / 14:58

1 resposta

0

É possível transmitir a variável NO_ROOT environmental para make : consulte Makefile.inc1 para mais detalhes.

    
por 03.12.2017 / 16:05

Tags