Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191424 - gnome-keyring-2.20 installs pam module to wrong directory
Summary: gnome-keyring-2.20 installs pam module to wrong directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on: 194785
Blocks:
  Show dependency tree
 
Reported: 2007-09-05 19:19 UTC by Xake
Modified: 2007-10-06 07:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2007-09-05 19:19:14 UTC
gnome-keyring-2.19 does have a pam_module and installs it into /usr/lib.
However the default pam-dir is /lib/security and the modules should be installed there.
Please adjust ebuild to inherit pam and configure with "--with-pam-dir=$(getpam_mod_dir)" (./configure says is supports it).
Comment 1 Xake 2007-09-05 19:48:50 UTC
--- /usr/portage/local/layman/gnome-experimental/gnome-base/gnome-keyring/gnome-keyring-2.19.91.ebuild  2007-08-27 21:52:13.000000000 +0200
+++ gnome-keyring-2.19.91.ebuild        2007-09-05 21:47:19.000000000 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-keyring/gnome-keyring-0.8.1.ebuild,v 1.1 2007/04/21 14:06:05 remi Exp $
 
-inherit gnome2 eutils
+inherit gnome2 eutils pam
 
 DESCRIPTION="Password and keyring managing daemon"
 HOMEPAGE="http://www.gnome.org/"
@@ -26,5 +26,5 @@
 DOCS="AUTHORS ChangeLog NEWS README TODO"
 
 pkg_setup() {
-       G2CONF="$(use_enable hal) $(use_enable pam) $(use_enable test tests)"
+       G2CONF="$(use_enable hal) $(use_enable pam) $(use_with pam pam-dir $(getpam_mod_dir)) $(use_enable test tests)"
 }
Comment 2 Xake 2007-09-05 20:46:51 UTC
Ok, it was not that easy.
Seems like configre sets $(PAM_DEST_DIR) in the Makefiles to /lib/security, but still installs it to /usr/lib...
Comment 3 Xake 2007-09-06 13:04:46 UTC
UPSTREAM bugreport:
http://bugzilla.gnome.org/show_bug.cgi?id=474219

Faults in pam/Makefile.in. Working (but do not know if it is "right") patch attached upstream.
Comment 4 Xake 2007-09-20 11:43:10 UTC
According to upstream you have to do "make install" and after that do "make install-pam" to copye the pam-module into path specified by ./configure --with-pam-dir.
This seems to be a hack to get past "make distcheck" but since I am not a automake-guru nor seems upstream to be this is the way to go until someone comes up with another solution.
Comment 5 Xake 2007-10-02 12:31:47 UTC
gnome-keyring-2.20 in portage still installs pam_gnome_keyring.so top /usr/lib and not to /lib/security where pam looks for it.
Fix by run "make install-pam" after "make install".
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2007-10-02 18:24:48 UTC
If you could tell me how to setup pam_gnome_keyring once it's properly installed in the right directory, I'll try to patch things up and fix the ebuild.

Is there a howto or something? Thanks
Comment 7 Xake 2007-10-02 19:35:17 UTC
I think you should talk to Diego (flameeyes) about that. It involves /etc/pam.d and I have heard he has been pretty mad at people messing around there [1] and I do not know if I have the knowledge to be sure it all works as intended.



[1] http://farragut.flameeyes.is-a-geek.org/articles/2007/07/11/im-gonna-go-nuts
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2007-10-02 19:53:32 UTC
I meant the configuration aspect of pam_gnome_keyring. Do you have a working setup I could reproduce? I'd gladly help but I don't have enough time to learn how to do stuff in PAM. The more you tell me, the better :)

Cheers
Comment 9 Xake 2007-10-02 20:04:47 UTC
How to set up according to Gnome.

http://live.gnome.org/GnomeKeyring/Pam
Comment 10 Xake 2007-10-02 21:19:48 UTC
As far as I can see Gnomes instructions works.
But they include changes in /etc/pam.d/passwd and /etc/pam.d/login, two files I think flameeyes would be very sad if we touch without telling (they are mentioned in his blogpost).
Maybe CC him and have him comment on the best approch about this files?

But until he is back I think the best approach would be to install the module where it should be with a post-install message directing people to Gnomes guide about how to do things.
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-10-02 22:18:57 UTC
Thanks for the pointers. I had planned on fixing this a while ago but was busy irl. Anyway, just commenting to say that there is no way we touch the files in /etc/pam.d, the best approach like you said, it to point to user to a package-provided README and/or the website with BIG PHAT WARNINGS that they might screw up their system and get locked out :) which is really easy to do when you play with PAM.
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2007-10-03 05:36:17 UTC
Ditto on what Gilles said. We'll fix the ebuild so that it installs stuff in the right directories and add an elog message in pkg_postinst() pointing people to the url you've just provided.

I'll get to it as soon as I can. Thanks :)
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2007-10-03 06:35:13 UTC
I've attached a patch upstream. I'll commit an updated ebuild later ... I'm late for work!
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2007-10-03 09:20:00 UTC
Alright, I just committed gnome-keyring-2.20.0-r1 (still under p.mask). It contains the same patch I've sent upstream.

So please tell me if it works as I won't be able to test it really soon.

@herd, if you guys had some time to try this out, I'd like to "copy" the upstream wiki page for gnome-keyring and explain how to make it work specifically for gentoo (and add it to our project page). So anyone telling me they got it to work is going to be a big help :) Thanks
Comment 15 Xake 2007-10-03 13:45:21 UTC
gnome-keyring-2.20.0-r1 does now miss a buildtime-depend as automake needs gtk-doc for this package (details below). Either add depend or make (ugly) patch against Makefiles instead.
Other then that the patch seems to work. 
Now off to see if I can make pam_gnome_keyring.so unlock not only the "login" but also the "default" keychain.


 * Running elibtoolize in: gnome-keyring-2.20.0
 *   Applying portage-1.5.10.patch ...
 *   Applying sed-1.5.6.patch ...
 * Applying gnome-keyring-2.20.0-fix_pam.patch ...                                                                                                               [ ok ]
 * Running eautoreconf in '/var/tmp/portage/gnome-base/gnome-keyring-2.20.0-r1/work/gnome-keyring-2.20.0' ...
 * Running aclocal ...                                                                                                                                           [ ok ]
 * Running libtoolize --copy --force --automake ...                                                                                                              [ ok ]
 * Running aclocal ...                                                                                                                                           [ ok ]
 * Running autoconf ...                                                                                                                                          [ ok ]
 * Running autoheader ...                                                                                                                                        [ ok ]
 * Running automake --add-missing --copy ...                                                                                                                     [ !! ]

 * Failed Running automake !
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/gnome-base/gnome-keyring-2.20.0-r1/temp/automake-28555.out

 * 


*** Contents of /var/tmp/portage/gnome-base/gnome-keyring-2.20.0-r1/temp/automake-28555.out
***** automake *****

gtk-doc.make:7: GTK_DOC_USE_LIBTOOL does not appear in AM_CONDITIONAL
reference/Makefile.am:88:   `gtk-doc.make' included from here
gtk-doc.make:43: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL
reference/Makefile.am:88:   `gtk-doc.make' included from here
gtk-doc.make:136: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL
reference/Makefile.am:88:   `gtk-doc.make' included from here
Comment 16 Rémi Cardona (RETIRED) gentoo-dev 2007-10-03 16:01:09 UTC
I'll add the gtk-doc depend for now. Thanks for testing it out :)
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2007-10-06 07:42:25 UTC
Fixed in CVS. No more gtk-doc required.