emerge glibc ends up with "ERROR: sys-libs/glibc-2.16.0::gentoo failed (preinst phase): mount & fix your /dev/pts settings". Reproducible: Always Steps to Reproduce: 1.emerge glibc 2. 3. Actual Results: Error message returned by portage: "Failed to install sys-libs/glibc-2.16.0" See log file attached Expected Results: glibc-2.16 installed See attached portage log file
Created attachment 364380 [details] emerge --info '=sys-libs/glibc-2.16.0::gentoo'
Full error messages: * Defaulting /etc/host.conf:multi to on * In order to use glibc with USE=-suid, you must make sure that * you have devpts mounted at /dev/pts with the gid=5 option. * Openrc should do this for you, so you should check /etc/fstab * and make sure you do not have any invalid settings there. * ERROR: sys-libs/glibc-2.16.0::gentoo failed (preinst phase): * mount & fix your /dev/pts settings * * Call stack: * ebuild.sh, line 93: Called pkg_preinst * environment, line 3057: Called eblit-run 'pkg_preinst' * environment, line 939: Called eblit-glibc-pkg_preinst * pkg_preinst.eblit, line 57: Called die * The specific snippet of code: * die "mount & fix your /dev/pts settings" * * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.16.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.16.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment'. * Working directory: '/' * S: '/var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0' !!! FAILED preinst: 1 >>> Failed to install sys-libs/glibc-2.16.0, Log file: >>> '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/build.log' * GNU info directory index is up-to-date.
Same error if I add the following line to /etc/fstab: devpts /dev/pts devpts gid=5,mode=620 0 0
I experience the same problem. A few checks give me: # mount | grep pts devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) but: # grep pts /proc/mounts devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600,ptmxmode=000 0 0 The problem is somehow related to eblit-glibc-pkg_preinst() in /usr/portage/sys-libs/glibc/files/eblits/pkg_preinst.eblit. But I don know whats wrong.
Created attachment 364434 [details] emerge --info
Here is my /proc/mounts: - as far as I can tell the gid=5 for devpts is present rootfs / rootfs rw 0 0 proc /proc proc rw,relatime 0 0 udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=220607,mode=755 0 0 devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0 /dev/sda3 / ext4 rw,noatime,data=ordered 0 0 tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=192512k,mode=755 0 0 mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0 shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0 configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0 cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode =755 0 0 fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0 openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent =/lib/rc/sh/cgroup-release-agent.sh,name=openrc 0 0 cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0 cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0 cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0 /dev/sda2 /boot ext2 rw,noatime,errors=continue 0 0 /dev/sda1 /mnt/lfs ext3 rw,relatime,errors=continue,user_xattr,acl,commit=5,barri er=1,data=writeback 0 0 /dev/mapper/vg-home /home ext4 rw,relatime,data=ordered 0 0
Should the suid flag be added to /etc/portage/package.use? I am not too clear on what this new suid flag does for glibc2.16?
Please attach the entire build log to this bug report.
I think the error is in the pkg_preinst.eblit file Line 57 reads: if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then but it should be: if awk '$3 == "devpts" && $4 !~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then That is the error i triggered if "gid=5" is NOT present (i.e. !~) in /proc/mounts
Created attachment 364444 [details] build.log.bz2
bzip2 compressed build log (less than 200KB) does not upload when I press submit from bugs.gentoo.org??
I just realised the following behavior of /proc/mounts: after a fresh reboot it includes the line: "devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0" but after the first sudo su command the devpts line becomes: "devpts /dev/pts devpts rw,relatime,mode=600 0 0" the "gid=5" is gone! may be this is part of the issue
(In reply to fcrvincent from comment #9) > I think the error is in the pkg_preinst.eblit file > > Line 57 reads: > > if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; > then > > but it should be: > > if awk '$3 == "devpts" && $4 !~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; > then > > That is the error i triggered if "gid=5" is NOT present (i.e. !~) in > /proc/mounts After further thought this does not seem to be the issue
(In reply to fcrvincent from comment #12) i doubt sudo or su is messing with your mounts. are you sure you don't have commands in your root's login shells that are doing this ? glibc is correct -- if your /dev/pts is mounted this way, it is broken, and it should not let itself be installed.
My bad it was a bashrc in my root directory that messed up my devpts mount! Many thanks for your great support and sorry for the false alarm..