Adds ischroot USE flag to sys-apps/debianutils to install /sbin/ischroot and it's associated manpage. The new flag is off by default. Tested: $ mkdir /mnt/gentoo_chroot_test $ cp stage3-amd64-hardened+nomultilib-20191002T214502Z.tar.xz /mnt/gentoo_chroot_test $ cd /mnt/gentoo_chroot_test $ pwd /mnt/gentoo_chroot_test $ tar --xz -xpf stage3-amd64-hardened+nomultilib-20191002T214502Z.tar.xz $ mount -t proc none /mnt/gentoo_chroot_test/proc $ mount --rbind /sys /mnt/gentoo_chroot_test/sys $ mount --rbind /dev /mnt/gentoo_chroot_test/dev $ cp /sbin/ischroot /mnt/gentoo_chroot_test/sbin/ $ ischroot ; echo $? 1 $ chroot /mnt/gentoo_chroot_test/ /bin/bash client / # ischroot ; echo $? 0 Patch attached. Reproducible: Always
Created attachment 594326 [details, diff] add "ischroot" USE flag
Note: patch is reversed
Created attachment 594330 [details, diff] add "ischroot" USE flag (fixed)
Created attachment 594334 [details, diff] add "ischroot" description to metadata.xml
Comment on attachment 594330 [details, diff] add "ischroot" USE flag (fixed) Patch is still reversed. Regardless, why do we need a USE flag for this? Is there some reason not to install this unconditionally?
Created attachment 594670 [details, diff] add "ischroot" USE flag (fixed... really) I don't see a reason to not install it unconditionally. If that is what is decided, I assume it would end up in the stage3 (I checked the hardended stage3 and it includes debianutils) which would be fine for my use case. debianutils has two other programs we don't install: add-shell: https://manpages.debian.org/stretch/debianutils/add-shell.8.en.html remove-shell: https://manpages.debian.org/stretch/debianutils/remove-shell.8.en.html and a sh version of which which collides with sys-apps/which.
I also think it should be just installed unconditionally. It's a useful utility. not sure about sbin path though. I use the following hook for now, placed to > /etc/portage/env/sys-apps/debianutils > post_src_install() { > ebegin "hooked by ${BASH_SOURCE[0]} in ${FUNCNAME[0]}" > pushd "${S}" >/dev/null || die > dobin ischroot > doman ischroot.1 > popd >/dev/null || die > eend ${?} > } that way no ebuild forking required.
Created attachment 640916 [details, diff] install ischroot unconditionally
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24f43ba09c1bb9a670bf5c21d3b09af20853cf39 commit 24f43ba09c1bb9a670bf5c21d3b09af20853cf39 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-05-23 22:34:06 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-05-23 22:34:06 +0000 sys-apps/debianutils: bump to v4.9.3 Ebuild changes to previous version: - Install ischroot Closes: https://bugs.gentoo.org/698812 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> sys-apps/debianutils/Manifest | 1 + sys-apps/debianutils/debianutils-4.9.3.ebuild | 43 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+)
I picked same path a Debian (/usr/bin). I skipped the add-shell helper for now which I think we don't need.