Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155861 - Please add pam to IUSE in x11-apps/xinit ebuilds
Summary: Please add pam to IUSE in x11-apps/xinit ebuilds
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Low minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2006-11-21 08:41 UTC by ta2002
Modified: 2007-01-18 22:52 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 ta2002 2006-11-21 08:41:03 UTC
The xinit ebuilds call newpamd in the pam eclass.

Without pam in IUSE, the /etc/pam.d directory ALWAYS
gets created (with the xserver file in it), even for
people (like me) who do not have pam in their USE
flags. If I understand pam.eclass, this will not
happen if IUSE includes pam.
Comment 1 Joshua Baergen (RETIRED) gentoo-dev 2006-12-30 10:00:03 UTC
Yes, you're right.
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2006-12-31 20:01:31 UTC
I'm not convinced that we should add a USE flag for this, as it will then require a rebuilt to get a plain-text file. You can mask out /etc/pam.d if you don't want anything installed there.
Comment 3 ta2002 2006-12-31 22:27:53 UTC
(In reply to comment #2)
> I'm not convinced that we should add a USE flag for this, as it will then
> require a rebuilt to get a plain-text file.

I don't understand what you mean here. This won't affect the majority of people (who have USE=pam) at all (the ebuild will act as before, and they need not even re-emerge it).

Adding pam to IUSE (this doesn't require a new use flag, just amending the ebuild to correctly use one of the current ones), will give the behavior that people with USE=-pam expect.

I think that the ebuild should "work," and adding files for pam for people who have gone through the trouble of altering the default to not use pam seems broken to me.

> You can mask out /etc/pam.d if you don't want anything installed there.

I don't have (and don't want) /etc/pam.d in the first place.
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2006-12-31 22:44:51 UTC
Changing a USE flag and thus requiring a rebuild of the entire package to simply install small text files is broken, same as it is in the case of USE=logrotate etc. People who don't want the files can set INSTALL_MASK (see make.conf.example).
Comment 5 ta2002 2007-01-01 03:22:35 UTC
(In reply to comment #4)
> Changing a USE flag and thus requiring a rebuild of the entire package to
> simply install small text files is broken,

Again, I don't see this. No one needs to rebuild anything at all. Look at the code:

newpamd() {
        [[ $# -ne 2 ]] && die "newpamd requires two arguments"

        if hasq pam ${IUSE} && ! use pam; then
                return 0;
        fi

        INSDESTTREE=/etc/pam.d \
        INSOPTIONS="-m 0644" \
        newins "$1" "$2" || die "failed to install $1 as $2"
        cleanpamd $2
}

The pam stuff gets installed now (always), and will continue to get installed for anyone with USE=pam. Most users will never notice that anything has changed.

Adding pam to IUSE (with NO other changes necessary to the ebuild at all) will also work correctly (ie. not installing anything pam related) for those with USE=-pam.
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2007-01-01 11:03:36 UTC
Consider the user who changes USE=pam to USE=-pam or vice versa.
Comment 7 ta2002 2007-01-01 13:46:36 UTC
(In reply to comment #6)
> Consider the user who changes USE=pam to USE=-pam or vice versa.

Obviously someone who makes such a significant change (and I have done it) has to expect to rebuild a few packages (very carefully, I might add, to avoid screwing things up). Gentoo already has some good documentation that describes how to remove pam from the system.

With pam in IUSE, this package would get flagged as one to rebuild (emerge -N) whenever someone either adds or removes pam from his use flags (not a particularly common occurance in the first place).
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2007-01-18 16:11:19 UTC
I'm not going to change this because of the above-mentioned reasons. I understand your argument but disagree. You may instead add /etc/pam.d to INSTALL_MASK in make.conf.
Comment 9 ta2002 2007-01-18 22:52:14 UTC
(In reply to comment #8)
> I understand your argument but disagree.

No offense intended, but I DON'T understand your reasons.

Making this change would not require any recompiles - it would merely work the way people expect it to the next time people emerge it.

It actually seems quite bizarre to me to prefer a method (INSTALL_MASK) less well-known (I doubt the majority of Gentoo users even know it exists, less well-documented, and less flexible (no capability of overriding it on a per-package basis) than the one way that everyone expects to control the exclusion of non-desired features (especially when the USE flag already exists, and the eclass already tests for it).

> You may instead add /etc/pam.d to INSTALL_MASK in make.conf.

Forget that. I will correct the ebuild in /usr/local/portage instead. :)