Summary: | sys-libs/glibc devpts check fails with <linux-2.6.25 kernels | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | William Throwe <wtt6> |
Component: | Prefix Support | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | prefix, yac |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | pkg_preinst patch |
Description
William Throwe
2013-10-27 00:06:16 UTC
Created attachment 362948 [details, diff]
pkg_preinst patch
After thinking about this for a while I'm worried that checking /etc/mtab might break chroot installs or some other corner case I'm not thinking of, so I propose instead just skipping the /proc/mounts test for kernels that are too old.
The attached patch only contains the changes to the eblit. The ebuilds also need to be modified to inherit linux-info.
This is failing for me with openrc-0.12.X and 3.11.X. datastore4 ~ # grep devpts /proc/mounts devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0 datastore4 ~ # grep devpts /etc/mtab devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0 datastore4 ~ # uname -a Linux datastore4 3.11.5-gentoo-datastore4 #1 SMP Wed Oct 16 12:29:53 EDT 2013 x8 6_64 Intel(R) Xeon(R) CPU E31230 @ 3.20GHz GenuineIntel GNU/Linux For me the failure appears to be caused by lxc. http://forums.gentoo.org/viewtopic-t-977048-highlight-.html I'm experiencing this on normal amd64 gentoo too. root@swanson.yac # grep pts /etc/mtab /dev/pts /dev/pts devpts rw,relatime,mode=600 0 0 root@swanson.yac # grep pts /etc/fstab /dev/pts /dev/pts devpts defaults 0 root@swanson.yac # uname -a Linux swanson.yac 3.6.11-gentoo #4 SMP Sat Aug 24 02:53:37 CEST 2013 x86_64 Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz GenuineIntel GNU/Linux maybe in my case it is because this is ancient system and I shouldn't have pts in fstab anymore. running:: umount -l /dev/pts; mount devpts -t devpts /dev/pts -o rw,nosuid,noexec,relatime,gid=5,mode=620 fixed it for me. Comment on attachment 362948 [details, diff]
pkg_preinst patch
unfortunately, yes, we cannot rely on /etc/mtab being correct. if you do `mount -t devpts /foo`, you will break the mount options of /dev/dpts too (as all devpts instances are shared). or if someone does a remount with the -n flag.
(In reply to William Throwe from comment #0) that commit made it into 2.6.25. the # of people who are using <2.6.25 is probably low, so we could just make it into a warning if your kernel is that old and hope for the best. I hit it again but now I at least know what may be causing messages:: root@swanson.yac # xsel -b xsel: Can't open display: (null) : Success It started right after the failed install of glibc. Would it be possible to add a check on the proper devpts, *before* the glibc is compiled so it fails fast? Oh wait, I'm being an idiot, the xsel error is unrelated but the rest is still valid. should be all set now in the tree; thanks for the report! Commit message: Do not die when the devpts check fails and we are on an old kernel http://sources.gentoo.org/sys-libs/glibc/files/eblits/pkg_preinst.eblit?r1=1.11&r2=1.12 |