Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832350 - sys-power/apcupsd-3.14.14-r3 (and older) replaces upstream's generated apcupsd.conf with a very old static file
Summary: sys-power/apcupsd-3.14.14-r3 (and older) replaces upstream's generated apcups...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: John Einar Reitan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-30 00:05 UTC by Michael Yagliyan
Modified: 2022-02-28 16:52 UTC (History)
5 users (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 Yagliyan 2022-01-30 00:05:20 UTC
I kept wondering why the version number in /etc/apcupsd/apcupsd.conf was much older than my package version, and did not seem to be affected by any changes in my USE flags (as the upstream package's apcupsd.conf.in file would seem to indicate it would), then I realized the Gentoo ebuild is replacing the file generated by the upstream package's configure step with this static copy:
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-power/apcupsd/files/apcupsd.conf

You can see this in the ebuild's src_install(), the following line:
doins "${FILESDIR}"/apcupsd.conf

The static file's Git log shows it was committed first in 2015 and never updated since:
https://gitweb.gentoo.org/repo/gentoo.git/log/sys-power/apcupsd/files/apcupsd.conf
The log messages do not indicate why it was created, and there have been several new apcupsd versions since.

Please remove this static config file and the corresponding line from the ebuild.

It may also be a good time to review whether the patches are still relevant -- they all seem to be for much older apcupsd versions and maybe they're no longer necessary (or worse, are breaking thing).
Comment 1 Michael Yagliyan 2022-01-30 03:38:06 UTC
The only setting in Gentoo's override config that seems to me like obviously a good idea is the override for the NISIP option.  Upstream's default is 0.0.0.0, but Gentoo's override of only binding to 127.0.0.1 is safer.  This could perhaps be accomplished with some kind of post-installation patch rather than a complete config replacement.