Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486270 - app-admin/conky: dev-util/cmake can't find non-readable programs
Summary: app-admin/conky: dev-util/cmake can't find non-readable programs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Gentoo KDE team
URL: https://gitlab.kitware.com/cmake/cmak...
Whiteboard:
Keywords:
: 562222 562472 564020 (view as bug list)
Depends on:
Blocks: 561750
  Show dependency tree
 
Reported: 2013-09-28 08:08 UTC by Daniel Pielmeier
Modified: 2017-03-09 18:53 UTC (History)
13 users (show)

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


Attachments
development ebuild for conky (conky-9999.ebuild,4.95 KB, text/plain)
2013-09-28 08:08 UTC, Daniel Pielmeier
Details
emerge --info (emerge.info,5.09 KB, text/plain)
2013-09-28 08:09 UTC, Daniel Pielmeier
Details
build log (build.log,24.99 KB, text/plain)
2013-09-28 08:09 UTC, Daniel Pielmeier
Details
ebuild environment (environment,162.25 KB, text/plain)
2013-09-28 08:11 UTC, Daniel Pielmeier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pielmeier gentoo-dev 2013-09-28 08:08:27 UTC
Created attachment 359666 [details]
development ebuild for conky

The new development version of conky uses cmake instead of autotools. When configuring, the package fails with:

CMake Error at cmake/ConkyPlatformChecks.cmake:386 (message):
  Unable to find program 'man'
Call Stack (most recent call first):
  CMakeLists.txt:37 (include)


The relevant line in cmake/ConkyPlatformChecks.cmake is:

find_program(APP_MAN man)


So for some reason the it can not find "man". There are a lot of other invocations of find_program before which work.

If I disable userpriv in FEATURES conky compiles fine.

I will attach the relevant ebuild, the build log emerge --info and the ebuild environment.
Comment 1 Daniel Pielmeier gentoo-dev 2013-09-28 08:09:00 UTC
Created attachment 359668 [details]
emerge --info
Comment 2 Daniel Pielmeier gentoo-dev 2013-09-28 08:09:26 UTC
Created attachment 359670 [details]
build log
Comment 3 Daniel Pielmeier gentoo-dev 2013-09-28 08:11:00 UTC
Created attachment 359672 [details]
ebuild environment
Comment 4 Daniel Pielmeier gentoo-dev 2013-11-30 14:57:16 UTC
No comments on this one?
Comment 5 Sebastian Luther (few) 2013-11-30 15:45:32 UTC
@cmake maintainers: Any comments?
Comment 6 Michael Palimaka (kensington) gentoo-dev 2014-01-10 05:18:36 UTC
I guess CMake can't handle the setgid bit:

$ ls -l /usr/bin/man
-r-xr-s--x 1 root man 52968 Aug 22 13:41 /usr/bin/man

13912 access("/usr/bin/man", R_OK)      = -1 EACCES (Permission denied)

$ cat /usr/bin/man
cat: /usr/bin/man: Permission denied
Comment 7 Daniel Pielmeier gentoo-dev 2014-01-10 19:18:24 UTC
(In reply to Michael Palimaka (kensington) from comment #6)
> I guess CMake can't handle the setgid bit:
> 
> $ ls -l /usr/bin/man
> -r-xr-s--x 1 root man 52968 Aug 22 13:41 /usr/bin/man
> 
> 13912 access("/usr/bin/man", R_OK)      = -1 EACCES (Permission denied)
> 
> $ cat /usr/bin/man
> cat: /usr/bin/man: Permission denied

Looks like it. If I temporarily make man world-readable the error goes away.

The strange thing is that this has worked before and I don't think the permissions of man have changed recently. The bug you refer to is almost three years old, so I wonder why I did not hit that earlier.
Comment 8 Sven Eden 2015-09-30 11:34:16 UTC
This happens again for the new conky-1.10.0 (See bug 557500)

I have to say that I have sys-apps/man-db installed and not sys-apps/man.
Comment 9 Daniel Pielmeier gentoo-dev 2015-10-04 10:38:19 UTC
*** Bug 562222 has been marked as a duplicate of this bug. ***
Comment 10 Daniel Pielmeier gentoo-dev 2015-10-07 20:18:52 UTC
*** Bug 562472 has been marked as a duplicate of this bug. ***
Comment 11 Juergen Rose 2015-10-18 09:55:01 UTC
Any news? It still fails for me.
Comment 12 Michael Palimaka (kensington) gentoo-dev 2015-10-18 14:32:25 UTC
(In reply to Juergen Rose from comment #11)
> Any news? It still fails for me.

Unfortunately there's been no upstream activity on the bug in several years, and I'm not aware of any workaround.
Comment 13 Gary E. Miller 2015-10-24 02:12:33 UTC
Workaround:

# chmod 555 /usr/bin/man
# emerge ckony
# chmod 2551 /usr/bin/man
Comment 14 Daniel Pielmeier gentoo-dev 2015-10-25 20:40:25 UTC
*** Bug 564020 has been marked as a duplicate of this bug. ***
Comment 15 Patrick McMunn 2015-11-26 06:26:18 UTC
I can confirm that this workaround allowed me to emerge conky 1.10.0. I was using cmake 3.4.0-r1. The one caveat is that the original permissions for /usr/bin/man on my system were -rws--x--x, so I had to use 'chmod 4711' to return it to its prior state (on my Funtoo system).
Comment 16 Juergen Rose 2015-11-26 08:26:15 UTC
The same issue happens now with conky-1.10.1.
Comment 17 Patrick McMunn 2015-11-27 17:02:04 UTC
I was checking the cmake mailing list to try to find some clues. I only found a little additional info at https://cmake.org/pipermail/cmake-developers/2014-December/023996.html but not solutions. Basically this is a permissions issue. /usr/bin/man can only be read by root by default. Hence it emerges without problem when userpriv is disabled (so disabling userpriv is probably the easiest workaround).

I think the easiest fix to this problem would be to simply have conky's ebuild check for the presence of /usr/bin/man and patch's conky's configure script to disable it's own checking for /usr/bin/man. I haven't tried it yet, but that ought to fix the problem pretty straightforwardly.
Comment 18 selurvedu 2015-12-01 11:55:01 UTC
(In reply to Gary E. Miller from comment #13)
> Workaround:
> 
> # chmod 555 /usr/bin/man
> # emerge ckony
> # chmod 2551 /usr/bin/man

(In reply to Patrick McMunn from comment #15)
> I can confirm that this workaround allowed me to emerge conky 1.10.0. I was
> using cmake 3.4.0-r1. The one caveat is that the original permissions for
> /usr/bin/man on my system were -rws--x--x, so I had to use 'chmod 4711' to
> return it to its prior state (on my Funtoo system).

How can I find out the default permissions for /usr/bin/man for a regular Gentoo installation? I forgot to check out the original value before changing it to 555. These two replies confused me because they are different.
Comment 19 Patrick McMunn 2015-12-01 14:54:33 UTC
If you have already changed them and are unsure, I think that re-emerging man will reinstall it with the default permissions. Check to be sure, but I think man-db is the default man program, so that would be the ebuild to emerge.
Comment 20 selurvedu 2015-12-03 12:00:39 UTC
(In reply to Patrick McMunn from comment #19)
> If you have already changed them and are unsure, I think that re-emerging
> man will reinstall it with the default permissions. Check to be sure, but I
> think man-db is the default man program, so that would be the ebuild to
> emerge.

That idea was too simple and obvious so I managed to subconsciously reject it. Thanks. :)
Comment 21 zlg (RETIRED) gentoo-dev 2015-12-08 07:33:52 UTC
(In reply to selurvedu from comment #18)
[snip]
> How can I find out the default permissions for /usr/bin/man for a regular
> Gentoo installation? I forgot to check out the original value before
> changing it to 555. These two replies confused me because they are different.

I have the issue and haven't used the workaround yet. Permissions by default seem to be 4711.

# stat /usr/bin/man
  File: ‘/usr/bin/man’
  Size: 104408          Blocks: 208        IO Block: 4096   regular file
Device: 802h/2050d      Inode: 1181424     Links: 1
Access: (4711/-rws--x--x)  Uid: (   13/     man)   Gid: (    0/    root)
Access: 2015-11-07 22:41:02.000000000 -0800
Modify: 2015-11-07 22:41:02.000000000 -0800
Change: 2015-11-07 22:41:03.482621857 -0800
 Birth: -
Comment 22 Daniel Pielmeier gentoo-dev 2016-08-24 18:18:24 UTC
For the newer versions of conky 1.10.1 and 1.10.3 I disabled the installation of man pages which "fixes" this issue.
Comment 23 Daniel Pielmeier gentoo-dev 2017-03-09 18:53:54 UTC
*** Bug 612124 has been marked as a duplicate of this bug. ***