Summary: | sys-process/acct-6.6.4-r3: stabilise (was: ac/sa/etc... fail like: '@WTMP_FILE_LOC@': No such file or directory) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Gentoo Linux | Reporter: | Richard Gray <richard> | ||||||
Component: | Stabilization | Assignee: | Gentoo's Team for Core System packages <base-system> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | normal | CC: | giuseppe, sam, whissi | ||||||
Priority: | Normal | Keywords: | CC-ARCHES | ||||||
Version: | unspecified | Flags: | nattka:
sanity-check+
|
||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Package list: |
sys-process/acct-6.6.4-r3
|
Runtime testing required: | No | ||||||
Attachments: |
|
Description
Richard Gray
2017-10-24 01:25:22 UTC
Same problem with sys-process/acct-6.6.4-r1: couldn't open file '@ACCT_FILE_LOC@': No such file or directory I guess the problem came from the patch: acct-6.6.4-cross-compile.patch https://savannah.gnu.org/patch/?7473 Maybe that "mv" command is missing in the ebuild? svn mv files.h.in files.h G. Vitillaro. Issue is still present. # equery l acct * Searching for acct ... [IP-] [ ] sys-process/acct-6.6.4-r1:0 # ac --version ac: GNU Accounting Utilities (release 6.6.4) # sa --version sa: GNU Accounting Utilities (release 6.6.4) # ac couldn't open file '@WTMP_FILE_LOC@': No such file or directory total 0.00 # sa couldn't open file '@ACCT_FILE_LOC@': No such file or directory The patch included by gentoo, files/acct-6.6.4-cross-compile.patch is clearly bogus and should not have been included in the first place. It cannot possibly work as it is - it misunderstands how configure and automake work - and even if it is corrected [files.h.in should have #define WTMP_FILE_LOC WTMP_FILE ] it doesn't add any value for gentoo - it just hardcodes what should be configurable at configuration time. I suggest the patch be dropped. and acct-6.6.4-cross-compile.patch be removed from FILESDIR. Other issues: The other files in in FILESDIR have to be updated for acct as the default file locations in upstream have changed from /var/log to /var/log/account. I'm attaching a patch which updates FILESDIR to reflect the upstream location, Another issue is acct stops logging if the filesystem with pacct is low on diskspace. This is adjusted by /proc/sys/kernel/acct sysctls. Gentoo could package an acct file for etc/sysctl.d but there are issues about when these settings are applied. Perhaps the ebuild should print an elog message during installation alerting the user to the fact that this syctl setting may need to be adjusted. Created attachment 598868 [details, diff] patch sys-process/acct FILESDIR to update locations Ref comment 3 Created attachment 598888 [details, diff]
acct patch
You are completely right Madhu, the "acct-6.6.4-cross-compile.patch" is definitely wrong, it hardcodes the acct paths to:
#define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
#define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
#define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
#define USRACCT_FILE_LOC "@USRACCT_FILE_LOC@
but, in some way, can still be useful.
The really simple patch I attached, hardcode the Gentoo usual acct paths:
#define WTMP_FILE_LOC "/var/log/wtmp"
#define ACCT_FILE_LOC "/var/account/pacct"
#define SAVACCT_FILE_LOC "/var/account/savacct"
#define USRACCT_FILE_LOC "/var/account/usracct
and, for what I can see, sys-process/acct-6.6.4-r1 works correctly again, with this user patch applied on top of the Gentoo package without needs of any further change.
Side note. This simple "hack" it is probably not a solution, but it can be usefil to other acct users in the meanwhile the problem is definitely solved. You know, this BUG is open from about 2 years ... ;-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1361812f3c383d5dd6e0eb7ce5f9ba41459b9cdf commit 1361812f3c383d5dd6e0eb7ce5f9ba41459b9cdf Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-07-24 02:37:24 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-07-24 02:38:15 +0000 sys-process/acct: revbump, fix file paths before: $ sa -h ... The system's default process accounting files are: raw process accounting data: @ACCT_FILE_LOC@ summary by command name: @SAVACCT_FILE_LOC@ summary by username: @USRACCT_FILE_LOC@ after: $ sa -h ... The system's default process accounting files are: raw process accounting data: /var/account/pacct summary by command name: /var/account/savacct summary by username: /var/account/usracct Bug: https://bugs.gentoo.org/635262 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> sys-process/acct/acct-6.6.4-r2.ebuild | 46 ++++ .../files/acct-6.6.4-cross-compile-fixed.patch | 232 +++++++++++++++++++++ 2 files changed, 278 insertions(+) sorry for taking so long, decided to use sa and discovered this old bug myself. apparently patch was rebased incorrectly *** Bug 812356 has been marked as a duplicate of this bug. *** x86 done amd64 done arm done arm64 done ppc done all arches done |