Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124314 - net-misc/cfengine: no ROOT support
Summary: net-misc/cfengine: no ROOT support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lance Albertson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-27 15:22 UTC by Ciaran McCreesh
Modified: 2008-12-05 08:27 UTC (History)
5 users (show)

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


Attachments
cfengine-2.1.18-cfkey-root.patch (cfengine-2.1.18-cfkey-root.patch,1.24 KB, patch)
2006-02-27 16:44 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ciaran McCreesh 2006-02-27 15:22:21 UTC
(Assigning this to klieber / ramereth since bugzilla doesn't like sysadmin@ as a n assignee. Does it have a bugzilla account?)

From cfengine-2.1.18.ebuild:

pkg_postinst() {
Comment 1 Ciaran McCreesh 2006-02-27 15:22:21 UTC
(Assigning this to klieber / ramereth since bugzilla doesn't like sysadmin@ as a n assignee. Does it have a bugzilla account?)

From cfengine-2.1.18.ebuild:

pkg_postinst() {
»···if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]
»···»···then
»···»···einfo "Generating keys for localhost."
»···»···/usr/sbin/cfkey
»···fi


This needs to be updated to honour $ROOT. Does cfkey provide an easy way of changing the output location?


»···cp /usr/sbin/cf{agent,servd,execd} /var/cfengine/bin/


Same here. Can this one not be moved to src_install?

Another minor issue, since I'm filing a bug anyway: we try to avoid using dodoc on INSTALL files unless they contain something particularly useful.
Comment 2 Lance Albertson (RETIRED) gentoo-dev 2006-02-27 15:44:34 UTC
(In reply to comment #0)
> (Assigning this to klieber / ramereth since bugzilla doesn't like sysadmin@ as
> a n assignee. Does it have a bugzilla account?)

That probably needs to be updated. I don't think its a valid herd.

> From cfengine-2.1.18.ebuild:
> 
> pkg_postinst() {
> 
Comment 3 Lance Albertson (RETIRED) gentoo-dev 2006-02-27 15:44:34 UTC
(In reply to comment #0)
> (Assigning this to klieber / ramereth since bugzilla doesn't like sysadmin@ as
> a n assignee. Does it have a bugzilla account?)

That probably needs to be updated. I don't think its a valid herd.

> From cfengine-2.1.18.ebuild:
> 
> pkg_postinst() {
> »···if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]
> »···»···then
> »···»···einfo "Generating keys for localhost."
> »···»···/usr/sbin/cfkey
> »···fi

Yup, that needs changed. I'll get to that.

> This needs to be updated to honour $ROOT. Does cfkey provide an easy way of
> changing the output location?

Unforunately, I don't see any option for cfkey to change the default location of that. I will need to ask upstream about this most likely.
 
> »···cp /usr/sbin/cf{agent,servd,execd} /var/cfengine/bin/
> 
> 
> Same here. Can this one not be moved to src_install?

I would think so unless Kurt remembers why we did it this way.

> Another minor issue, since I'm filing a bug anyway: we try to avoid using dodoc
> on INSTALL files unless they contain something particularly useful.

There's a few useful things near the top that mentions needing the newest version of openssl and db before installing. I'm not sure if that falls under the "particularly useful" category or not, but its better than just the default file without anything added to it.

Thanks for pointing these QA issues out.
Comment 4 solar (RETIRED) gentoo-dev 2006-02-27 16:44:09 UTC
Created attachment 80870 [details, diff]
cfengine-2.1.18-cfkey-root.patch

This patch should allow you todo use cfkey with an alt root prefix.
It changes the handling of the cfkey so that the first argv is assumed to 
be the prefix for the CFWORKDIR.

In the ebuild you will want todo something like

# Note the trailing slash
cfkey ${ROOT}/
Comment 5 Mark Loeser (RETIRED) gentoo-dev 2006-05-19 22:06:28 UTC
Ramereth/klieber:  does this patch work for you? :)
Comment 6 Lance Albertson (RETIRED) gentoo-dev 2006-05-19 22:20:04 UTC
I tried it a while back and had a few issues getting it to patch right. I was working on fixing the patch but never got it completed. Been on my todo list to finish.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2007-12-17 03:38:07 UTC
klieber/ramereth:  Any update here?
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2008-01-10 03:33:01 UTC
marineam: You did a couple of commits to this package.  Do you want to fix this issue for us, and do you want to maintain this package?  Unless ramereth or klieber want to take it back :)

This is a pretty old bug, so lets do something with it soon please.
Comment 9 Micheal Marineau (RETIRED) gentoo-dev 2008-01-10 03:47:20 UTC
(In reply to comment #8)
> marineam: You did a couple of commits to this package.  Do you want to fix this
> issue for us, and do you want to maintain this package?  Unless ramereth or
> klieber want to take it back :)
> 
> This is a pretty old bug, so lets do something with it soon please.
> 

Hm, either I'll start maintaining the package or I'll start shooting Ramereth in the back of the head with nerf darts until he takes it back. Either way someone will take it.
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2008-03-27 02:28:09 UTC
marineam: So...what's going on? :)  Someone want to take this package?  I don't want to apply changes like this without someone familiar with the package checking it out first.
Comment 11 Lance Albertson (RETIRED) gentoo-dev 2008-04-28 15:39:12 UTC
Sorry for my neglect with this package and this patch. I'll take a look at it soon and see how it works.

Thanks-
Comment 12 Lance Albertson (RETIRED) gentoo-dev 2008-05-12 18:51:52 UTC
Running cfkey really belongs in pkg_config. With that being said, so the files it produce still need to honor $ROOT? I have a feeling that upstream may have a problem accepting this patch since it breaks their security model. I could just make it a gentoo specfic patch, but I'd rather not do that. Is there any other way I can get around this problem? I would think moving it to pkg_config would at least minimize the issue a lot more.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-12-05 08:27:02 UTC
cfkey has been moved to pkg_config now.