lastcomm cannot find /var/account/pacct

Bug #682211 reported by Ian! D. Allen
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Acct
Invalid
Undecided
Unassigned
acct (Ubuntu)
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: acct

SRU JUSTIFICATION:

Without changes, acct reporting utilities are unusable with their default use without parameters; since they expect a data file in an incorrect path. The patch is minimal and with low impact (just path changes for default filenames).

TEST CASES:

1) install acct
2) run a few commands, such as 'ls', 'cat', etc. (even doing nothing after installing may be sufficient depending on the shell)
3) run 'sa' or 'lastcomm'

With this patch, 'sa' and 'lastcomm' should output reports of the last commands used. Without the patch, they should complain about a missing pacct file under '/var/account/pacct'.

---

Default install of acct package doesn't enable "lastcomm" to work:

<PRE>
# apt-get install acct
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acct
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 111kB of archives.
After this operation, 360kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu/ maverick/main acct i386 6.5.4-2ubuntu1 [111kB]
0% [1 acct 0B/111kB 0%]
Fetched 111kB in 0s (115kB/s)
Selecting previously deselected package acct.
(Reading database ... 125574 files and directories currently installed.)
Unpacking acct (from .../acct_6.5.4-2ubuntu1_i386.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for install-info ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up acct (6.5.4-2ubuntu1) ...
Turning on process accounting, file set to '/var/log/account/pacct'.
 * Done.

# lastcomm
couldn't open file '/var/account/pacct': No such file or directory

# ls -l /var/account
ls: cannot access /var/account: No such file or directory

# ln -s log/account /var/account

# lastcomm
bash F root pts/0 0.00 secs Fri Nov 19 00:54
ln root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
ls root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
lastcomm root pts/0 0.00 secs Fri Nov 19 00:54
bash F root pts/0 0.00 secs Fri Nov 19 00:54
lastcomm root pts/0 0.00 secs Fri Nov 19 00:54
[...etc...]

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: acct 6.5.4-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Sat Nov 27 14:07:58 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LC_CTYPE=en_CA.utf8
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=C
 SHELL=/bin/bash
SourcePackage: acct

Related branches

Revision history for this message
Ian! D. Allen (idallen) wrote :
Revision history for this message
Wren Turkal (wt-penguintechs-org) wrote :

***FIX INCLUDED***

This appears to actually be a result of the default accounting file path being /var/log/account instead of /var/account. I looked at the source, and it appears that the configure code for setting the default file location is simply not working. The config check looking for the file includes a C program that appears to work as I copied it out into a blah.c and compiled and ran it. However, the configure is not picking up the options for WTMP_FILE_LOC, ACCT_FILE_LOC, SAVACCT_FILE_LOC, and USRACCT_FILE_LOC.

***The Fix***
I have found that simply regenerating the configure script with autoconf fixes this issue with the build.
***End of the Fix***

Revision history for this message
Wren Turkal (wt-penguintechs-org) wrote :

I should mention that I am using the autoconf packaged for meerkat (i.e. version 2.67-2ubuntu1) to regenerate the configure script.

Revision history for this message
Wren Turkal (wt-penguintechs-org) wrote :

Is there a better tag than patch to indicate that I have added a fix, if not a patch, to this bug.

tags: added: patch
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Not an issue in upstream acct, just with packaging.

Warren, there isn't another tag. I'm already aware of the issue though, and how to fix it (and it's fixed in Debian).

tags: removed: patch
Changed in acct:
status: New → Invalid
Changed in acct (Ubuntu):
status: New → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Marking Fix released since the updates are in Natty already, and Invalid for the Acct project since it's not an upstream issue.

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Maverick still installs the broken version of the package:

$ sudo apt-get install acct
[sudo] password for sarnold:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acct
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 118kB of archives.
After this operation, 381kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main acct amd64 6.5.4-2ubuntu1 [118kB]
Fetched 118kB in 1s (63.5kB/s)
Selecting previously deselected package acct.
(Reading database ... 247875 files and directories currently installed.)
Unpacking acct (from .../acct_6.5.4-2ubuntu1_amd64.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for install-info ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up acct (6.5.4-2ubuntu1) ...
Turning on process accounting, file set to '/var/log/account/pacct'.
 * Done.
$ sa
couldn't open file '/var/account/pacct': No such file or directory
$

description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted acct into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in acct (Ubuntu Maverick):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Any news about this? Has anyone had a change to test it?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've followed the test case and can confirm that the proposed package indeed fix the bug, marking this as verification-done, thanks all.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acct - 6.5.4-2ubuntu1.1

---------------
acct (6.5.4-2ubuntu1.1) maverick-proposed; urgency=low

  * debian/rules: call autoreconf to make sure the acct file patch changes are
    applied. (LP: #682211)
  * debian/control: add Build-Depends on autoconf and automake for autoreconf.
 -- Mathieu Trudel-Lapierre <email address hidden> Fri, 04 Mar 2011 16:34:17 -0500

Changed in acct (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.