IBT-FMI / gebuilder

Gentoo System and Image Builder
GNU General Public License v3.0
11 stars 0 forks source link

Initialize .gentoo environment does not work anymore #37

Closed Doeme closed 5 years ago

Doeme commented 5 years ago

The ebuild-command in https://github.com/IBT-FMI/gebuilder/blob/c2fffa772c8223c15ab90181342ed13a297d3fdf/gebuilder/scripts/initialize/default/01-setup_specialization.sh#L26 fails, because it is now executed as portage user, which does not have permission to access the specific directory. Possible solutions:

TheChymera commented 5 years ago

Ok, so what we talked about was probably nonsense, because the copy of the specialization file used here is not in the user home directory.

https://github.com/IBT-FMI/gebuilder/blob/c2fffa772c8223c15ab90181342ed13a297d3fdf/gebuilder/scripts/initialize/default/01-setup_specialization.sh#L4

I can't figure out exactly where $ROOT is coming from (see the awesome variable definition relationships below) but I assume it might be somewhere under /var/lib/gebuilder, which might reasonably belong to root.

chymera@quiethost ~/src/gebuilder/gebuilder/scripts $ ag ROOT=
openstack_image/default/30-alter_root.sh
3:TMPROOT="${ROOT}"
4:ROOT="${OPENSTACK_IMG_MNT}"

openstack_image/default/50-restore_root.sh
3:ROOT="${TMPROOT}"
chymera@quiethost ~/src/gebuilder/gebuilder/scripts $ ag TMPROOT=
openstack_image/default/30-alter_root.sh
3:TMPROOT="${ROOT}"
chymera@quiethost ~/src/gebuilder/gebuilder/scripts $ ag OPENSTACK_IMG_MNT=
openstack_image/default/15-mount_image.sh
3:OPENSTACK_IMG_MNT="${ROOT}/../mnt"
Doeme commented 5 years ago

ROOT is coming from utils/functions.sh: https://github.com/IBT-FMI/gebuilder/blob/c2fffa772c8223c15ab90181342ed13a297d3fdf/gebuilder/utils/functions.sh#L198

The whole path up to ${ROOT}/var/buildsrv/overlay needs to be readable by PORTAGE_USER