Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493064 - sys-libs/glibc: preinst phase failed: mount & fix your /dev/pts settings
Summary: sys-libs/glibc: preinst phase failed: mount & fix your /dev/pts settings
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 20:59 UTC by fcrvincent
Modified: 2013-12-03 17:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=sys-libs/glibc-2.16.0::gentoo' (log,5.10 KB, text/plain)
2013-12-01 21:03 UTC, fcrvincent
Details
emerge --info (emerge.info,5.05 KB, text/plain)
2013-12-02 09:46 UTC, Rene Meier
Details
build.log.bz2 (build.log.bz2,350.87 KB, application/x-bzip)
2013-12-02 12:35 UTC, Rene Meier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fcrvincent 2013-12-01 20:59:08 UTC
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
Comment 1 fcrvincent 2013-12-01 21:03:04 UTC
Created attachment 364380 [details]
emerge --info '=sys-libs/glibc-2.16.0::gentoo'
Comment 2 fcrvincent 2013-12-01 21:43:35 UTC
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.
Comment 3 fcrvincent 2013-12-01 21:46:51 UTC
Same error if I add the  following line to /etc/fstab:
devpts           /dev/pts              devpts  gid=5,mode=620  0 0
Comment 4 Rene Meier 2013-12-02 09:43:00 UTC
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.
Comment 5 Rene Meier 2013-12-02 09:46:06 UTC
Created attachment 364434 [details]
emerge --info
Comment 6 fcrvincent 2013-12-02 11:29:23 UTC
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
Comment 7 fcrvincent 2013-12-02 11:45:15 UTC
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?
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-02 11:47:33 UTC
Please attach the entire build log to this bug report.
Comment 9 fcrvincent 2013-12-02 12:29:07 UTC
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
Comment 10 Rene Meier 2013-12-02 12:35:08 UTC
Created attachment 364444 [details]
build.log.bz2
Comment 11 fcrvincent 2013-12-03 10:40:39 UTC
bzip2 compressed build log (less than 200KB) does not upload when I press submit from bugs.gentoo.org??
Comment 12 fcrvincent 2013-12-03 12:01:15 UTC
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
Comment 13 fcrvincent 2013-12-03 12:15:38 UTC
(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
Comment 14 SpanKY gentoo-dev 2013-12-03 16:10:39 UTC
(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.
Comment 15 fcrvincent 2013-12-03 17:16:26 UTC
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..