Closed Doeme closed 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.
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"
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
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:
ebuild
to drop privilegesebuild
"drop" privileges to root user