Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232713 - bcfg2 requires gamin built with python bindings
Summary: bcfg2 requires gamin built with python bindings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Olexa (darkside) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 05:19 UTC by Michael Jinks
Modified: 2011-12-13 15:33 UTC (History)
1 user (show)

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 Michael Jinks 2008-07-23 05:19:37 UTC
The "server" piece of bcfg2 depends on either app-admin/fam or app-admin/gamin.  On Linux, gamin builds with python bindings, there's no option to shut them off.  But on (at least) Solaris/x64 (the only pre I have an example of), python bindings are optional for gamin, and switched off by default.

So, I'm able to install bcfg2 with the "server" USE flag, but trying to run 'bcfg2-admin init' to set up an initial server repository draws a somewhat misleading error, "Couldn't locate Fam module, exiting".  Have confirmed with upstream that this is a generic error, referring to either fam's or gamin's python modules.  Have further confirmed that re-merging gamin with USE=python fixes this issue.

The bcfg2 ebuild is "my problem", but I don't know: can this be fixed from bcfg2 -- can an ebuild require dependencies built according to certain USE flags -- or does this need to be addressed elsewhere?

Reproducible: Always

Steps to Reproduce:
(On Solaris/x64, possibly elsewhere)

1. emerge gamin without "python" in USE
2. emerge bcfg2 with "server" in USE
3. run "bcfg2-admin init" to set up a basic, blank config repository


Actual Results:  
bcfg2-admin croaks with a complaint that it couldn't find any Fam module.

Expected Results:  
a bcfg2 config repository under /var/lib/bcfg2, or wherever
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-07-23 13:02:55 UTC
(In reply to comment #0)

> The bcfg2 ebuild is "my problem", but I don't know: can this be fixed from
> bcfg2 -- can an ebuild require dependencies built according to certain USE
> flags -- or does this need to be addressed elsewhere?

Yes. What package needs to be merged or is it just that gamin NEEDS to USE=python? What about fam, should the ebuild just depend on gamin then?
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-07-23 14:34:56 UTC
Not a prefix problem, twork is fixing.
Comment 3 Kamil Kisiel 2008-08-09 03:28:55 UTC
Also, for some reason, the current ebuild specifies gamin and fam in DEPEND even on the client. As far as I know, neither are required to run a BCFG2 client. The gamin and fam depends should be only in RDEPEND and only if the server USE flag is specified.
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-09 03:36:24 UTC
(In reply to comment #3)
> Also, for some reason, the current ebuild specifies gamin and fam in DEPEND
> even on the client. As far as I know, neither are required to run a BCFG2
> client. The gamin and fam depends should be only in RDEPEND and only if the
> server USE flag is specified.
> 

They should be in DEPEND if they are required for the package to build. RDEPEND if they are required to be on the system to RUN. In both is ok too, if needed.
Comment 5 Michael Jinks 2008-12-31 23:35:43 UTC
(In reply to comment #3)
> Also, for some reason, the current ebuild specifies gamin and fam in DEPEND
> even on the client. As far as I know, neither are required to run a BCFG2
> client. The gamin and fam depends should be only in RDEPEND and only if the
> server USE flag is specified.

I've just attached a proposed ebuild for 0.9.6 at bug 252146.  It removes the whole python 2.4 clause under DEPEND, including the fam and gamin stuff.
Comment 6 Michael Jinks 2008-12-31 23:43:59 UTC
(In reply to comment #1)
> (In reply to comment #0)
> 
> > The bcfg2 ebuild is "my problem", but I don't know: can this be fixed from
> > bcfg2 -- can an ebuild require dependencies built according to certain USE
> > flags -- or does this need to be addressed elsewhere?
> 
> Yes. What package needs to be merged or is it just that gamin NEEDS to
> USE=python? What about fam, should the ebuild just depend on gamin then?

Shame on me: darkside and I talked through the fix for this, back when the bug was fresh.  I was going to implement it RSN, I got pulled onto other things, and now I have completely forgotten everything from that conversation.

To clarify from the above: Yes, the issue is that gamin (if present) needs to have its python support enabled.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-01-08 02:20:33 UTC
Fixed in version bump by depending on app-admin/gamin[python]
Comment 8 Michael Jinks 2009-01-08 16:26:30 UTC
Just tried to build bcfg2 with server USE flag and discovered a glitch.  Looks like a typo in the corrected ebuild script:

  RDEPEND="app-portage/gentoolkit
      dev-python/lxml
      server? (
          dev-python/pyopenssl
          || ( app-admin/gamini[python] app-admin/fam ) )"
                              ^
Since there's no "gamini" package, emerge tries to pull in fam, which is blocked by gamin.
Comment 9 Michael Jinks 2009-01-08 17:20:38 UTC
(In reply to comment #8)
>           || ( app-admin/gamini[python] app-admin/fam ) )"

Fixing that typo unveils another issue: in the current tree, at least on x86, gamin has been replaced with two packages, app-admin/gam-server and dev-libs/libgamin.  So trying to build bcfg2 server triggers a downgrade back to gamin.

Okay, so I tried changing that line to:

          || ( app-admin/gamin[python] app-admin/gam-server app-admin/fam ) )"

...thinking, well, I'll give it the option to depend on any of the three, right?  But apparently that's wrong because it still tries to downgrade to gamin-0.1.9-r1 instead of using my installed copy of gam-server-0.1.10.

I also don't know (haven't had time to check) whether the [python] option still applies after the switch to gam-server in non-x86 platforms.
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-01-08 17:46:48 UTC
(In reply to comment #9)
> (In reply to comment #8)
> >           || ( app-admin/gamini[python] app-admin/fam ) )"
> 
> Fixing that typo unveils another issue: in the current tree, at least on x86,
> gamin has been replaced with two packages, app-admin/gam-server and
> dev-libs/libgamin.  So trying to build bcfg2 server triggers a downgrade back
> to gamin.
> 
> Okay, so I tried changing that line to:
> 
>           || ( app-admin/gamin[python] app-admin/gam-server app-admin/fam ) )"
> 
> ...thinking, well, I'll give it the option to depend on any of the three,
> right?  But apparently that's wrong because it still tries to downgrade to
> gamin-0.1.9-r1 instead of using my installed copy of gam-server-0.1.10.
> 
> I also don't know (haven't had time to check) whether the [python] option still
> applies after the switch to gam-server in non-x86 platforms.
> 

Let's just be done with this mess and strictly depend on gam-server. 
Comment 11 Michael Jinks 2009-01-08 19:40:02 UTC
Just finished with the new ebuild, server builds and runs fine.
Comment 12 MCassaniti 2011-12-13 11:34:02 UTC
The current (1.2.0_rc2) version of bcfg2 requires libgamin to be built with USE=python. At present I'm doing a service restart every time I update bcfg2 configuration.

I'm assuming it is quite trivial to add this requirement into the ebuild? I've already added 'dev-libs/libgamin python' to my /etc/portage/package.use file and tested bcfg2 successfully with this USE flag.

Also, the init script requires a minor change (change --startas to --exec) but I can file another bug for that if you like.
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-12-13 15:33:45 UTC
(In reply to comment #12)
> The current (1.2.0_rc2) version of bcfg2 requires libgamin to be built with
> USE=python. At present I'm doing a service restart every time I update bcfg2
> configuration.
> 
> I'm assuming it is quite trivial to add this requirement into the ebuild? I've
> already added 'dev-libs/libgamin python' to my /etc/portage/package.use file
> and tested bcfg2 successfully with this USE flag.
> 
> Also, the init script requires a minor change (change --startas to --exec) but
> I can file another bug for that if you like.

Yes, you should be opening new bugs instead of "hijacking" bugs that have been long since closed (~3 years) and possibly unrelated. Please open 2 new bugs for the above mentioned issues.