Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 443666

Summary: lxde-base/lxdm-0.4.1-r5 - Should not hard depend on ConsoleKit
Product: Gentoo Linux Reporter: milton
Component: New packagesAssignee: LXDE team <lxde>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 488014    
Attachments: Output of ./configure on a ConsoleKit free system
Requested ebuild diff
Requested ebuild change
Requested ebuild change with consolekit USE flag
Patch to add --enable-consolekit
Requested ebuild change with consolekit USE flag
Modified Patch for fail on enableconsolekit but no consolekit
New ebuild for consolekit use flag

Description milton 2012-11-17 18:36:55 UTC
lxde-base/lxdm-0.4.1-r5 supports both PAM and ConsoleKit, and can very well be used without ConsoleKit, with PAM.
I have looked at the code and it seems to be well made and uses ConsoleKit only if it is there.
I have tested it on a ConsoleKit less system and it builds/runs well without ConsoleKit.
See output of the ./configure attached.

Please add a consolekit USE flag for the dependency to sys-auth/consolekit

Reproducible: Always

Steps to Reproduce:
1. emerge lxdm
2. requires sys-auth/consolekit

Actual Results:  
hard dependency to consolekit

Expected Results:  
a USE flag should be there to tell if we want to use consolekit or not.
Comment 1 milton 2012-11-17 18:38:47 UTC
Created attachment 329740 [details]
Output of ./configure on a ConsoleKit free system
Comment 2 milton 2012-11-17 18:39:21 UTC
Created attachment 329742 [details, diff]
Requested ebuild diff
Comment 3 milton 2012-11-17 18:48:17 UTC
also present in the lxdm.spec.in file:
""
BuildRequires:  gtk2-devel pam-devel intltool
""
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2012-11-17 18:57:29 UTC
(In reply to comment #2)
> Created attachment 329742 [details, diff] [details, diff]
> Requested ebuild diff

This is wrong. the dependency should be made optional instead of just removing it
Comment 5 milton 2012-11-17 22:46:37 UTC
Created attachment 329770 [details, diff]
Requested ebuild change
Comment 6 milton 2012-11-17 22:51:13 UTC
Created attachment 329772 [details, diff]
Requested ebuild change with consolekit USE flag
Comment 7 milton 2012-11-17 22:53:09 UTC
(In reply to comment #4)
> This is wrong. the dependency should be made optional instead of just
> removing it

Yes, as mentioned in my bug report, new diff is up! :)
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2012-11-18 00:50:04 UTC
Still the logic is not correct. Even if you use '-consolekit' to build the package, but you have consolekit installed, then it will use consolekit. There must be a way to disable consolekit in the source code or using --enable/--with consolekit when you are configuring the package
Comment 9 milton 2012-11-18 13:13:44 UTC
Created attachment 329826 [details, diff]
Patch to add --enable-consolekit

The configure.ac does not support a flag for ConsoleKit support, only environment variables. This adds the option in configure.ac.
Comment 10 milton 2012-11-18 13:15:11 UTC
Created attachment 329828 [details, diff]
Requested ebuild change with consolekit USE flag

New ebuild patch, supporting the --enable-consolekit configure option.
Comment 11 milton 2012-11-18 13:45:38 UTC
actually this patch defaults to the current behaviour for --enable-consolekit, which means:
--enable-consolekit(default value): will check for ConsoleKit but if not found will issue a warning and continue to build without it.
--disable-console-kit: will not check for ConsoleKit and will not use it at all.

If we want to stop the build when having --enable-consolekit, but no ConsoleKit found, you can replace:
"echo "ConsoleKit devel package not found""
with
"AC_MSG_ERROR([ConsoleKit devel package not found])"
in the patch, to have the build stopped.
Comment 12 Gino McCarty 2013-12-20 03:11:42 UTC
Hey guys can we get this closed up?
A year old now...
anyway here is the patch modified with your suggestion, (not that its needed anymore r7 seems to build without error against non-consolekit users i.e. me...

also attached is the new ebuild file
Comment 13 Gino McCarty 2013-12-20 03:17:23 UTC
Created attachment 365718 [details, diff]
Modified Patch for fail on enableconsolekit but no consolekit
Comment 14 Gino McCarty 2013-12-20 03:20:04 UTC
Created attachment 365720 [details, diff]
New ebuild for consolekit use flag

Ok good to go now?? I hope so.
Comment 15 Markos Chandras (RETIRED) gentoo-dev 2013-12-22 12:03:33 UTC
I don't think the patch works.

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -DCONFIG_FILE=\"/etc/lxdm/lxdm.conf\" -DXSESSIONS_DIR=\"/usr/share/xsessions\" -DLXDM_DATA_DIR=/usr/share/lxdm -DLXDM_NUMLOCK_PATH=\"/usr/libexec/lxdm-numlock\"  -Werror-implicit-function-declaration -Wall  -O2 -march=native -pipe -DENABLE_PASSWORD -DLXDM_DEBUG -DLXDM_XCONN_XCB -MT lxdm_binary-lxdm.o -MD -MP -MF .deps/lxdm_binary-lxdm.Tpo -c -o lxdm_binary-lxdm.o `test -f 'lxdm.c' || echo './'`lxdm.c
lxdm.c:70:26: fatal error: ck-connector.h: No such file or directory
Comment 16 Markos Chandras (RETIRED) gentoo-dev 2013-12-22 12:07:30 UTC
The upstream patch is wrong. I will fix it.