Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Strange - USE flags not honored for sys-auth/consolekit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
causality
Apprentice
Apprentice


Joined: 03 Jun 2006
Posts: 200

PostPosted: Mon Nov 20, 2017 6:28 pm    Post subject: Strange - USE flags not honored for sys-auth/consolekit Reply with quote

This may be related to another problem I'm having in which consolekit fails to start at all, with only a vague error about failing to connect to dbus ("name_lost" in DEBUG output).

I thought I would build sys-auth/consolekit with fewer optional USE flags enabled, to get a minimal build for further testing. Imagine my surprise when no changes I make to its USE flags are honored! It builds with a given set of flags no matter what I do, though the "cgroups" flag will change after several attempts (!). Portage mentions no errors. I have tried this with the current version of consolekit and the previous version.

I have this entry in /etc/portage/package.use:

Code:
sys-auth/consolekit -acl -pm-utils -cgroups -policykit


Oddly, I had to re-emerge it SEVERAL TIMES before it honored the "-acl" flag.

EIX output. Note that "policykit" is ENABLED even against my package.use config:

Code:
causality ~ # eix sys-auth/consolekit
[I] sys-auth/consolekit
     Available versions:  0.4.6 1.1.0-r1 1.1.2 1.2.0 **9999 {acl cgroups debug doc evdev pam pm-utils policykit selinux systemd-units test udev KERNEL="linux"}
     Installed versions:  1.2.0(01:22:31 PM 11/20/2017)(pam policykit udev -acl -cgroups -debug -doc -evdev -pm-utils -selinux -test KERNEL="linux")
     Homepage:            https://github.com/ConsoleKit2/ConsoleKit2 https://www.freedesktop.org/wiki/Software/ConsoleKit
     Description:         Framework for defining and tracking users, login sessions and seats

causality ~ #


Note that the selinux flag is disabled. This is correct per my settings. Now I run this command with the redundant USE environment variable, just to indicate in two places I don't want this flag:

Code:
causality ~ # USE="-policykit" emerge sys-auth/consolekit


From the output of "emerge --oneshot consolekit":

Code:
                   ConsoleKit 1.2.0
                    ========================

        prefix:                   /usr
        exec_prefix:              ${prefix}
        libdir:                   /usr/lib64
        bindir:                   ${exec_prefix}/bin
        sbindir:                  ${exec_prefix}/sbin
        sysconfdir:               /etc
        localstatedir:            /var
        rundir:                   /var/run
        datadir:                  /usr/share
        source code location:     .
        compiler:                 x86_64-pc-linux-gnu-gcc
        cflags:                   -O2 -march=native -pipe -fomit-frame-pointer -finline-functions -ftracer -fgcse-sm -fgcse-las -fipa-pta -fsched-pressure -ffat-lto-objects -fuse-linker-plugin -ftree-loop-distribution -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity
        Debugging support:        no
        build tests:              yes
        Maintainer mode:          yes

        dbus-1 system.d dir:      /etc/dbus-1/system.d
        Build backend:            linux
        PAM module dir:           /lib64/security
        Build PAM module:         yes
        Build udev-acl:           no
        udev support              yes
        cgroup support            no
        libevdev support          no
        libdrm support            yes
        session controller        udev
        SELinux support:          yes

        Build docs:               no
        xinitrc dir:              /etc/X11/xinit/xinitrc.d
        PolicyKit support         yes
        RBAC (Solaris) support:   no
>>> Source configured.


"SELinux support: yes" ?!? This appears random. Running the command again might say "yes" and it might say "no". Note that PolicyKit support can't be turned off.

I have not modified the ebuild file at all. Why won't Portage honor my flag choices?

Code:
causality ~ # emerge --info
Portage 2.3.14 (python 3.5.4-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-6.4.0, glibc-2.26-r3, 4.13.10-gentoo x86_64)
=================================================================
System uname: Linux-4.13.10-gentoo-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-gentoo-2.4.1
KiB Mem:    16371740 total,   1924804 free
KiB Swap:    2246652 total,   2243056 free
Timestamp of repository gentoo: Mon, 20 Nov 2017 15:15:01 +0000
Head commit of repository gentoo: 83d598d5fabd4fce1ea167ac8fbacfe81e43ebeb
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.8::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.ca.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:

andy
    location: /var/lib/layman/andy
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -finline-functions -ftracer -fgcse-sm -fgcse-las -fipa-pta -fsched-pressure -ffat-lto-objects -fuse-linker-plugin -ftree-loop-distribution -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -finline-functions -ftracer -fgcse-sm -fgcse-las -fipa-pta -fsched-pressure -ffat-lto-objects -fuse-linker-plugin -ftree-loop-distribution -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--strip-debug -Wl,-flto=4"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext X \ a52 aac aalib acl acpi activities alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg jpeg2k kde kipi kwallet lcms ldap libnotify lzma mad mng modules mp3 mp4 mpeg mplayer multilib mysql ncurses nptl offensive ogg opengl openmp openssl pam pango pcre pdf phonon plasma png policykit ppds python qml qt3support qt4 qt5 readline sdl seccomp session socks5 spell ssl startup-notification svg symlink tcpd tiff truetype udev udisks unicode upower usb videos vorbis widgets win32codecs wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xscreensaver xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

causality ~ #
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16925
Location: here

PostPosted: Mon Nov 20, 2017 6:40 pm    Post subject: Reply with quote

policykit is forced by plasma profile
/usr/portage/profiles/targets/desktop/plasma/use.force:
# Force policykit on, other configurations are *maybe* possible but
# not supported. If you know how to disable this mask, you also know enough to
# handle the consequences.
policykit

You should use /etc/portage/profile/package.use.mask or /etc/portage/profile/use.mask for disable it, but "If you know how to disable this mask, you also know enough to handle the consequences.".
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
causality
Apprentice
Apprentice


Joined: 03 Jun 2006
Posts: 200

PostPosted: Mon Nov 20, 2017 6:49 pm    Post subject: Reply with quote

Thank you, that does explain the policykit flag. It does not explain the selinux flag however. In the actual emerge output (during the configure phase) sometimes this gets turned on, and sometimes not. The whole time, portage correctly shows -selinux.

On my system policykit fails to start because consolekit fails to start which is why I wanted to try -policykit in the first place, to see if at least consolekit would run.

Apparently no one else ever had these mysterious consolekit problems because I can't find solutions to why it can't connect to dbus, nor can I even get meaningful error messages. It looks like this:

Code:
causality ~ # console-kit-daemon --debug --no-daemon
console-kit-daemon[8097]: DEBUG: Debugging enabled
console-kit-daemon[8097]: DEBUG: initializing console-kit-daemon 1.2.0
console-kit-daemon[8097]: DEBUG: name_lost

console-kit-daemon[8097]: DEBUG: Disconnected from D-Bus
causality ~ #


I have a more detailed post under Desktop Environments because that seems to be the main use case for consolekit. Its failure to start has hosed my ability to run KDE so for now I'm posting this under lxde.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16925
Location: here

PostPosted: Mon Nov 20, 2017 7:43 pm    Post subject: Reply with quote

causality wrote:
In the actual emerge output (during the configure phase) sometimes this gets turned on, and sometimes not. The whole time, portage correctly shows -selinux.

I don't know also in my system say "SELinux support: yes" and I don't have selinux
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
causality
Apprentice
Apprentice


Joined: 03 Jun 2006
Posts: 200

PostPosted: Mon Nov 20, 2017 7:52 pm    Post subject: Reply with quote

From this output plus a cursory reading of the ebuild file, it seems this is some kind of failure to apply the USE flag correctly. Could this be a bug in portage?

I'd be interested in whether you get the same results as me -- re-emerge consolekit a few times and see if "selinux: yes" and "selinux: no" appears random. I've never noticed this kind of behavior from portage before. It's normally rock solid and does exactly what you specify.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16925
Location: here

PostPosted: Mon Nov 20, 2017 8:05 pm    Post subject: Reply with quote

causality wrote:
From this output plus a cursory reading of the ebuild file, it seems this is some kind of failure to apply the USE flag correctly. Could this be a bug in portage?

I don't think this is a portage bug. I looked in consolekit configure.ac file and I see
Code:
if test x"$POLKIT_FOUND" = x"yes"; then
echo "        SELinux support:          yes"
else
echo "        SELinux support:          no"
fi

If polkit_found?? For me is a consolekit configure test problem
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
causality
Apprentice
Apprentice


Joined: 03 Jun 2006
Posts: 200

PostPosted: Mon Nov 20, 2017 8:12 pm    Post subject: Reply with quote

Does that explain the randomness over several re-emerges when polkit is installed the entire time?

Of course my system could be a bad example because neither consolekit nor policykit (and thus not udisks either) are working for me, all because consolekit fails to start.

It's rather frustrating that I can't even get a good error message (reminds me of why I quit using Windows years ago). Consolekit is not segfaulting or otherwise crashing, it's just exiting with an error about dbus. I suspect the problem here is with dbus, but reinstalling that (or trying different versions) has no effect.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 11434

PostPosted: Tue Nov 21, 2017 2:36 am    Post subject: Reply with quote

Random results for the value of $POLKIT_FOUND are probably a result of a buggy test for Polkit upstream, but could also be explained by the test being overly fragile (which is arguably a bug). However, fedeliallalinea's point (which I agree with) is that upstream examines the result of $POLKIT_FOUND then describes it as SELinux found/absent. This is wrong. They should be examining the result of SELinux detection for that section. Some lines later, the script again examines $POLKIT_FOUND and this time describes it as PolicyKit found/absent. This looks like a standard copy/paste mistake.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16925
Location: here

PostPosted: Tue Nov 21, 2017 7:33 am    Post subject: Reply with quote

Hu wrote:
Some lines later, the script again examines $POLKIT_FOUND and this time describes it as PolicyKit found/absent. This looks like a standard copy/paste mistake.

Agree, I reported upstream
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum