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

Bug 271480

Summary: sys-power/apcupsd needs sys-apps/openrc (>=sys-apps/baselayout-2) for powerfail initd (mount-ro service is missing in baselayout-1)
Product: Gentoo Linux Reporter: Robert T Childers <robert.t.childers>
Component: Current packagesAssignee: Diego Elio Pettenò (RETIRED) <flameeyes>
Status: VERIFIED FIXED    
Severity: normal CC: axs, base-system, gentoo_bugs_peep, grzegorz.chwesewicz, ikelos, remy, scott, sniper
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: results of paludis -qD apcupsd-3.14.5-r2
Diff on apcupsd-3.14.5-r2 ebuild with added baselayout-2 dependency

Description Robert T Childers 2009-05-28 02:39:44 UTC
apcupsd.powerfail shows that it needs the service mount-ro in its init script. apcupsd doesn't install a mount-ro service to be used with apcupsd.powerfail

Reproducible: Always
Comment 1 Konstantin 2009-05-28 12:28:05 UTC
mount-ro available only on baselayout2 which not stable yet, and apcupsd-3.14 not asking to install it.
So, confirm that.
Comment 2 Robert T Childers 2009-05-29 22:09:18 UTC
Created attachment 192937 [details]
results of paludis -qD apcupsd-3.14.5-r2

Added a list of the dependencies of the apcupsd-3.14.5 build.
Comment 3 Philippe Chaintreuil 2009-06-02 20:09:23 UTC
There are confused people in the forums wondering about this: http://forums.gentoo.org/viewtopic-t-711759.html
Comment 4 Robert T Childers 2009-06-09 02:57:47 UTC
Created attachment 193961 [details]
Diff on apcupsd-3.14.5-r2 ebuild with added baselayout-2 dependency

I added in the dependency for baselayout-2 to apcupsd-3.14.5-r2 version. After adding the new dependency and changing my system from baselayout-1 to baselayout-2 the errors for the missing service have gone away.
Comment 5 Philippe Chaintreuil 2009-06-09 12:38:04 UTC
Sorry, I'm not up to speed with the baselayout-2 stuff, aside from what was mentioned in #c1.

If your patch was checked into the tree, would that pull the masses (baselayout-1) to baselayout-2, or would it simply keep us (something akin to masking) from getting this latest version?
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-09 12:54:30 UTC
I'm _not_ going to add a forced dep on baselayout 2; the powerfail script while very useful is not strictly necessary, you can use apcupsd with baselayout 1 with reduced features, but still working.

I'll see to find a different solution.
Comment 7 Robert T Childers 2009-06-09 22:21:02 UTC
The main reason that I went ahead and moved on to baselayout-2 was because I didn't want to downgrade apcupsd and mask off >=3.14. in order to get it to properly shutdown and restart. The problems I was having with 3.14, in that it didn't want to properly shutdown via /etc/init.d/apcupsd stop went away. It was also giving me trouble getting status info out of it. Why I am not sure, but now that I have fixed the mount-ro service, the multimon.cgi script works properly as well. Since this is depending on something that is still marked unstable (baselayout-2) I don't know what to tell you as far as marking stable or masking it in the repository.

I just know that now that I have put in the little patch and upgraded to baselayout-2, its working correctly.
Comment 8 Ian Stakenvicius (RETIRED) gentoo-dev 2009-06-16 13:57:14 UTC
As far as I've been able to tell (grepping the sources, etc), APCUPSD itself doesn't need a powerfail init script, it's just for the new baselayout or openrc.

Until the new baselayout goes stable, can this package install the new initscripts with a has_version conditional on baselayout-2 or openrc, and install old-style init scripts otherwise??  That way us +arch'ers  still have a package that installs appropriately for baselayout-1.

Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-16 14:05:39 UTC
That's actually what I had locally, just forgot to commit it the other day; should be fine now.

Comment 10 snIP3r 2009-07-02 09:53:14 UTC
(In reply to comment #9)
> That's actually what I had locally, just forgot to commit it the other day;
> should be fine now.
> 

is there a change for getting a new ebuild? or do i have to apply the diff manually?
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-07-02 09:54:06 UTC
It already is IN the sync server.
Comment 12 snIP3r 2009-08-09 18:37:18 UTC
(In reply to comment #11)
> It already is IN the sync server.
> 

hi flameeyes!

according to http://gentoo-portage.com/sys-power/apcupsd the changes are not in the ebuild available in portage tree yet.

greets
snIP3r
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-08-09 18:39:52 UTC
I'm not sure what are you saying. The changes _ARE_ in tree for quite a while already.
Comment 14 snIP3r 2009-08-09 18:54:16 UTC
(In reply to comment #13)
> I'm not sure what are you saying. The changes _ARE_ in tree for quite a while
> already.
> 

hmmm, ok perhaps some misunderstanding. if i check my local portage tree in /usr/portage/sys-power/apcupsd and the ebuild apcupsd-3.14.7.ebuild i get this:

...
DEPEND="
        cgi? ( >=media-libs/gd-1.8.4
                ${WEBAPP_DEPEND} )
        nls? ( sys-devel/gettext )
        snmp? ( net-analyzer/net-snmp )
        gnome? ( >=x11-libs/gtk+-2.4.0
                >=dev-libs/glib-2.0
                >=gnome-base/gconf-2.0 )"
...

but i assume i should look like this:

...
DEPEND="
        cgi? ( >=media-libs/gd-1.8.4
                ${WEBAPP_DEPEND} )
        nls? ( sys-devel/gettext )
        snmp? ( net-analyzer/net-snmp )
        gnome? ( >=x11-libs/gtk+-2.4.0
                >=dev-libs/glib-2.0
                >=gnome-base/gconf-2.0 )
        >=sys-apps/baselayout-2.0.0"
...
also please take a loook here: http://forums.gentoo.org/viewtopic-t-711759.html 
other users have the same issue.
what has to be done to get the new ebuild?
thx
snIP3r

Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-08-09 18:57:54 UTC
Please read what I wrote, the ChangeLog and whatever else:

I'm _not_ going to add a forced dep on baselayout 2; the powerfail script while
very useful is not strictly necessary, you can use apcupsd with baselayout 1
with reduced features, but still working.

THE EBUILD IS GOOD AS IT IS.
Comment 16 Scott Dial 2009-08-17 00:31:59 UTC
(In reply to comment #15)
> THE EBUILD IS GOOD AS IT IS.

I don't see how having my system now reporting:

 * Caching service dependencies ...
 *  Can't find service 'mount-ro' needed by 'apcupsd.powerfail';  continuing...                                     [ ok ]

, every time I run an init.d script is "GOOD AS IT IS".

As the original reporter suggested, you are misreporting the dependencies in apcupsd-3.14.5-r2. You should not be including an init.d script with an unresolved dependency in a stable package. I don't really know how apcupsd.powerfail is used, nor do I really care. But, you attitude about this is wrong. Plain and simple.

As per the ChangeLog entry:

16 Jun 2009; Diego E. Pettenò <flameeyes@gentoo.org>
apcupsd-3.14.6.ebuild:
Only install the powerfail init script if openrc is installed; this way
it's not polluting the installation for baselayout 1 users. Closes bug
#271480.

, this should be done in a apcupsd-3.14.5-r3 and -r2 should be removed from portage. If you did that, then you would actually CLOSE this bug. As it is, you corrected a different bug (against apcupsd-3.14.6).