Summary: | sys-fs/static-dev fails in chroots when host is using devtmpfs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Roy Bamford <neddyseagoon> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, backbone, gentoo, himbeere, mpagano |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=454404 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Roy Bamford
2013-05-12 20:45:42 UTC
that patch is incorrect as it breaks non-chroot builds Could we introduce build USE flag? If use build, then do nothing. This would be useful in catalyst builds, as catalyst create almost all necessary device nodes. (In reply to comment #2) that won't really help. people are installing this package by hand. catalyst builds pretty much all default to udev. (In reply to comment #3) This is at least very useful in stage4 builds. I use them as templates for openvz containers. Hmm. I'm wrong. "build" use flag is only enabled on early stages. =/ Hello. Is there any progress on this bug? sys-fs/static-dev is pulled in but does not compile: >>> Installing (1 of 1) sys-fs/static-dev-0.1 * We have detected that you currently use udev or devfs or devtmpfs * and this ebuild cannot install to the same mount-point. * Please reinstall the ebuild (as root) like follows: * * mkdir /tmp/newroot * mount -o bind / /tmp/newroot * ROOT=/tmp/newroot/ emerge sys-fs/static-dev * umount /tmp/newroot * ERROR: sys-fs/static-dev-0.1 failed (preinst phase): * Cannot install on udev/devfs tmpfs. * * Call stack: * ebuild.sh, line 93: Called pkg_preinst * environment, line 141: Called die * The specific snippet of code: * die "Cannot install on udev/devfs tmpfs."; * * If you need support, post the output of `emerge --info '=sys-fs/static-dev-0.1'`, * the complete build log and the output of `emerge -pqv '=sys-fs/static-dev-0.1'`. * The complete build log is located at '/var/tmp/portage/sys-fs/static-dev-0.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/static-dev-0.1/temp/environment'. * Working directory: '/usr/lib64/portage/pym' * S: '/var/tmp/portage/sys-fs/static-dev-0.1/work/static-dev-0.1' !!! FAILED preinst: 1 >>> Failed to install sys-fs/static-dev-0.1, Log file: (In reply to SpanKY from comment #1) > that patch is incorrect as it breaks non-chroot builds So fix it. It'd be better wrapped in a function: using_udevfs(){ [[ -e ${ROOT}dev/.udev || -e ${ROOT}dev/.devfs ]] && return [[ $ROOT = / ]] && [[ -e /proc/mounts ]] || return ! awk '$2 == "/dev" && $3 == "devtmpfs" { exit 1 }' /proc/mounts } if using_udevfs; then eerror.. fi I switched -d and -c to -e, to make it easier to block in a chroot situation; less FS access for general case, but switch it back if you prefer, ofc. after mkdir /tmp/newroot mount -o bind / /tmp/newroot ROOT=/tmp/newroot/ emerge -1 sys-fs/static-dev I get * Package: sys-fs/static-dev-0.1 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: arm elibc_glibc kernel_linux userland_GNU * FEATURES: preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Source unpacked in /var/tmp/portage/sys-fs/static-dev-0.1/work >>> Compiling source in /var/tmp/portage/sys-fs/static-dev-0.1/work ... >>> Source compiled. >>> Test phase [not enabled]: sys-fs/static-dev-0.1 >>> Install static-dev-0.1 into /var/tmp/portage/sys-fs/static-dev-0.1/image/ category sys-fs >>> Completed installing static-dev-0.1 into /var/tmp/portage/sys-fs/static-dev-0.1/image/ ./ >>> Done. * checking 0 files for package collisions >>> Merging sys-fs/static-dev-0.1 to /tmp/newroot/ * We have detected that you currently use udev or devfs or devtmpfs * and this ebuild cannot install to the same mount-point. * Please reinstall the ebuild (as root) like follows: * * mkdir /tmp/newroot * mount -o bind / /tmp/newroot * ROOT=/tmp/newroot/ emerge sys-fs/static-dev * umount /tmp/newroot * ERROR: sys-fs/static-dev-0.1::gentoo failed (preinst phase): * Cannot install on udev/devfs tmpfs. * * Call stack: * ebuild.sh, line 93: Called pkg_preinst * environment, line 139: Called die * The specific snippet of code: * die "Cannot install on udev/devfs tmpfs."; * * If you need support, post the output of `emerge --info '=sys-fs/static-dev-0.1::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-fs/static-dev-0.1::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-fs/static-dev-0.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/static-dev-0.1/temp/environment'. * Working directory: '/usr/lib/portage/pym' * S: '/var/tmp/portage/sys-fs/static-dev-0.1/work/static-dev-0.1' !!! FAILED preinst: 1 on Portage 2.2.8-r1 (default/linux/arm/13.0/armv7a, gcc-4.7.3, glibc-2.19-r1, 3.4.90-00253-ge37d760 armv7l) Timestamp of tree: Sun, 07 Sep 2014 09:45:01 +0000 Commit message: Only check for devtmpfs when installing into / http://sources.gentoo.org/sys-fs/static-dev/static-dev-0.1.ebuild?r1=1.15&r2=1.16 I run today into the same issue at the tinderbox and doe wonder why the ebuild checks this just at install phase ? Wouldn't it be better to fully reject the emerge request ? : >>> Completed installing static-dev-0.1 into /var/tmp/portage/sys-fs/static-dev-0.1/image/ * We have detected that you currently use udev or devfs or devtmpfs * and this ebuild cannot install to the same mount-point. * ERROR: sys-fs/static-dev-0.1::gentoo failed (preinst phase): * Cannot install on udev/devfs tmpfs. * * Call stack: * ebuild.sh, line 93: Called pkg_preinst * environment, line 228: Called abort assignee: base-system@gentoo.org (In reply to Toralf Förster from comment #10) it's done at pkg_preinst, not src_install. historically, that was the only phase that this could be done. with EAPI=5, we could change it to pkg_pretend, and we could check MERGE_TYPE. but it still wouldn't help when you do: (1) chroot (2) bind mount /dev by definition, static-dev requires write access to /dev/ http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc958c3d516d66978ecb1b8835518fedf4cce950 i don't think there's anything more we can do here |