Summary: | apcupsd-3.9.9.ebuild - adds USB UPS devices | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Zach Welch (RETIRED) <zwelch> |
Component: | New packages | Assignee: | Zach Welch (RETIRED) <zwelch> |
Status: | VERIFIED FIXED | ||
Severity: | enhancement | ||
Priority: | Lowest | ||
Version: | 1.2 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
apcupsd-3.9.9.ebuild
apcupsd-3.9.9-add_platform.patch apcupsd-3.9.9-add_platform_pt2.patch apcupsd-3.9.9.ebuild apcupsd-3.9.9-gentoo.patch apcupsd-3.9.9-postinst.patch apcupsd-gentoo.tar.gz apcupsd-3.10.1.ebuild |
Description
Zach Welch (RETIRED)
2002-09-10 21:19:09 UTC
Created attachment 3810 [details]
apcupsd-3.9.9.ebuild
New ebuild file
Created attachment 3811 [details, diff]
apcupsd-3.9.9-add_platform.patch
Created attachment 3812 [details, diff]
apcupsd-3.9.9-add_platform_pt2.patch
Ugh, sorry for the flurry of e-mails, but here's my last few comments: - the above patches go in ..portage/sys-apps/apcupsd(/files) - i should have merged the patches - the distribution files are being built, but not used by the install. - I thought briefly about patching the package to be able to just 'make install' - that needs DESTDIR or similar makefile patching, yes? Let me know. It seems to build and work for me, but this is my first ebuild. Created attachment 3829 [details] apcupsd-3.9.9.ebuild Obsoletes attachment 3810 [details], but I don't have the privs... Okay, this new ebuild works a lot better. It requires two new patches: - apcupsd-3.9.9-gentoo.patch -- DESTDIR changes to "make install" work - apcupsd-3.9.9-postinst.patch -- fixes notifcation scripts I am seriously considering consolidating the notification scripts, so those changes were not made to the source tree. If someone says the patch is reasonable, I will pass it on to the package maintainer for incorporation into a future release. I have serious doubts about the halt script handling though, as it seems there have been improvements to the package's dynamically handling that situation (sed patch power!). Created attachment 3830 [details, diff] apcupsd-3.9.9-gentoo.patch obsoletes attachment 3811 [details, diff] Created attachment 3831 [details, diff]
apcupsd-3.9.9-postinst.patch
obsoletes 3812
Created attachment 3870 [details]
apcupsd-gentoo.tar.gz
obsoletes all previous patches (still no 'edit attachments' permissions!)
As I went to send of my patch to the developer, I found this new version. In
merging my old patch, I went ahead and improved the build significantly.
Testing then showed that 3.10.0 is *not* stable (with my UPS at least), so
ebuilds for both are being provided. 3.9.9 now includes fully workig
powerflute and multimon.cgi support, with the appropriate dependencies.
The ebuilds also include {pre|post}{rm|inst} functions to handle stopping and
starting the daemon, installing and removing runlevel links, and cleaning up
configuration files after all versions have been removed.
I have tested this extensively on my system, and I'll be happy to tweak the
patches or ebuilds if anyone has any problems.
status update: The changes included in the apcupsd-3.10.0-gentoo.patch file have been accepted by Riccardo Facchetti, the primary apcupsd maintainer. It would be nice to have these changes fully reviewed by an experienced ebuilder before he releases another stable version, and I am willing to intermediate any further changes that may need to be sent. Minor ebuild changes: * I discovered lintool and discovered the ebuilds are missing their RDEPEND env variable. The patch should be obvious for whoever pushes this into CVS. * The current ebuild installs a link to start apcupsd in the boot runlevel. This does not work as /usr may not be mounted when it is launched. This can leave the daemon in a state required root to 'rm /mnt/.init.d/started/apcupsd' in order to be able to start the daemon later. Removing the boot runlevel from the ebuild's 'rc-update add' fixes this, but I think this service should be started at that time - requiring the binaries to be moved to /sbin. This may be appropriate, but I want to hear from others. For now, tweaking the rc-update command seems to be the least path of resistance. now that we have testing keywords, I am adding going to add 3.9.9 (and the latest 3.10.1 release) to CVS. apcupsd 3.10.1 includes the patches required for 3.9.9 an ebuild for apcupsd 3.10.1 was added to portage. It requires no additional patches, as the original patches posted here were incorporated into the main package. It just works. :) Created attachment 4913 [details]
apcupsd-3.10.1.ebuild
Obsoletes all previous attachments.
Works splendid with 2.4.x series but on my 2.5.47 /etc/init.d/apcupsd just says: apcupsd FATAL ERROR in linux-usb.c at line 610 Cannot open UPS device and hangs, not like ctrl+c couldn't kill it but it just waits for something. Surely this is a kernel bug rather than bug in apcupsd, just wanted to report since all other usb things work with 2.5.47. Great work btw. I'll try on later 2.5.x when I get one working as good as this 2.5.47 does. stable in tree, closed |