Bug#922533: please document location of accounting file

2024-01-22 Thread Marc Haber
On Sun, Feb 17, 2019 at 08:50:35PM +0100, Marc Haber wrote:
> my package atop needs to adapt itself to acct being installed or not. If
> acct is installed, atop reads from acct's log files, while establishing
> its own accounting interface it acct is not installed.

The situation seems to have settled down, and atop now seems to find the
accounting file okay. It has been like that for at least two stable
releases.

Feel free to close this bug report. Thanks for helping!

Greetings
Marc



Bug#922533: please document location of accounting file

2019-02-22 Thread Marcos Fouces
On 22/2/19 16:55, Marc Haber wrote:
> I am not sure whether this was a brilliant idea, many local mechanisms
> on existing installations might be looking for the file in the old
> place. Also, migration probably needs a gazillion of tests to make sure
> that nothing breaks. For how long has the data been in /var/log/?

Hello Marc

The /var/log/account/ path was introduced by a previous maintainer in
6.3.99+6.4pre1-3 release (2006).

I can't figure out any reason for that. In fact, there were several bugs
reporting troubles caused by this change (#377835
, #380744
, #385626
, #392045
, #396444
).

Instead of reverting this change to the standard path (/var/account), he
decided to fix them setting this new path properly in all pertinent
files and it was in use it since then. AFAIK, you could define any path
you want for store log files.

Greetings,

Marcos.




Bug#922533: please document location of accounting file

2019-02-22 Thread Marc Haber
Hi Marcos,

On Fri, Feb 22, 2019 at 12:08:35AM +0100, Marcos Fouces wrote:
> I did some investigation about the localization for pacct in various
> distros and i saw that /var/account is the more widely used (Fedora,
> RedHat, Gentoo...). This path is the standard even on {Free,Net,Open}BSD
> where this file is called acct. So, i migrated the log files to this new
> path.

I am not sure whether this was a brilliant idea, many local mechanisms
on existing installations might be looking for the file in the old
place. Also, migration probably needs a gazillion of tests to make sure
that nothing breaks. For how long has the data been in /var/log/?

> If so, could you consider sponsor the package?

I am currently not in the position to do the necessary testing, sorry.

Greetings
Marc

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#922533: please document location of accounting file

2019-02-21 Thread Marcos Fouces
Hello Marc

I did some investigation about the localization for pacct in various
distros and i saw that /var/account is the more widely used (Fedora,
RedHat, Gentoo...). This path is the standard even on {Free,Net,Open}BSD
where this file is called acct. So, i migrated the log files to this new
path.

I uploaded a new revision to salsa.d.o [0] but i am not sure if this bug
fixing worths an upload in the middle of a freeze.

If so, could you consider sponsor the package?

Greetings,

Marcos

[0] https://salsa.debian.org/pkg-security-team/acct/



On 20/2/19 17:46, Marc Haber wrote:
> Hi Marcos,
>
> thanks for your answer.
>
> My suggestion is to have a well documented file in a stable location
> that says where to find the actual accounting file. Currently, atop's
> code is full of constructs like
>
> for PACCTFILE in /var/account/pacct /var/log/pacct
> do
> if [ -f "$PACCTFILE" ]  # file exists?
> then
>
> (which is obviously missing the current plac /var/log/account/pacct)
>
> otoh, if this will be a Debianism, atop's code won't get any easier since atop
> will need to continue handling all those places in other
> distributions.
>
> Greetings
> Marc
>
>
> On Tue, Feb 19, 2019 at 11:44:39PM +0100, Marcos Fouces wrote:
>> From: Marcos Fouces 
>> Subject: Re: Bug#922533: please document location of accounting file
>> To: Marc Haber , 922...@bugs.debian.org,
>>  Debian Bug Tracking System 
>> Date: Tue, 19 Feb 2019 23:44:39 +0100
>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
>>  Thunderbird/60.5.0
>> X-Spam-Score: (--) -2.1
>> X-Spam-Report: torres.zugschlus.de  Content analysis details:   (-2.1
>>  points, 5.0 required)   pts  rule name  description  
>>  -- --- -1.9
>>  BAYES_00   BODY: Bayes spam probability is 0 to 1%
>>  [score: 0.] -0.0 RCVD_IN_DNSWL_NONE
>>  RBL: Sender listed at http://www.dnswl.org/,
>>  no trust
>>  [2a00:1450:4864:20:0:0:0:42c listed in]
>>  [list.dnswl.org]  0.0 FREEMAIL_FROM
>>   Sender email is commonly abused enduser mail
>>  provider (marcos.fouces[at]gmail.com) -0.0
>>  SPF_PASS   SPF: sender matches SPF record -0.1 DKIM_VALID_AU
>>   Message has a valid DKIM or DK signature from
>>  author's domain  0.1 DKIM_SIGNED
>> Message has a DKIM or DK signature, not necessarily
>>  valid -0.1 DKIM_VALID_EF  Message has
>>  a valid DKIM or DK signature from
>>  envelope-from domain -0.1 DKIM_VALID
>>  Message has at least one valid DKIM or DK signature
>>
>> Hi Marc
>>
>> In Debian, the pacct file is located in /var/log/account/pacct while in
>> Fedora it is in /var/account/pacct.
>>
>> I don't see the reason to be less parsable in that location.
>>
>> What is your suggestion?
>>
>> Greetings,
>>
>> Marcos
>>
>> On 17/2/19 20:50, Marc Haber wrote:
>>> Package: acct
>>> Version: 6.6.4-2
>>> Severity: wishlist
>>>
>>> Hi,
>>>
>>> my package atop needs to adapt itself to acct being installed or not. If
>>> acct is installed, atop reads from acct's log files, while establishing
>>> its own accounting interface it acct is not installed.
>>>
>>> Historically, the pacct file is found in various different places,
>>> varying across distribution, so atop's upstream code does through
>>> various contortions to find the correct file. It for example acts on
>>> /etc/logrotate.d/psacct to find the file being rotated, which fails on
>>> Debian since Debian's acct package uses savelog in /etc/cron.d/acct.
>>>
>>> atop on Debian is currently growing code to parse for the savelog line
>>> in /etc/cron.d/acct to find out the acct file being used.
>>>
>>> Would it be possible ot have the acct file's location in a more easily
>>> parsable location? Thanks for helping!
>>>
>>> Greetings
>>> Marc
>>>
>>>
>>> -- System Information:
>>> Debian Release: buster/sid
>>>   APT prefers unstable
>>>   APT policy: (500, 'unstable'), (500, 'stable')
>>> Architecture: amd64 (x86_64)
>>> Foreign Architectures: i386
>>>
>>> Kernel: Linux 4.20.8-zgws1 (SMP w/4 CPU cores)
>>> Kernel taint flags: TAINT_OOT_MODULE
>>> Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
>>> (charmap=UTF-8)
>>> Shell: /bin/sh linked to /bin/dash
>>> Init: systemd (via /run/systemd/system)
>>>
>>> Versions of packages acct depends on:
>>> ii  dpkg  1.19.4
>>> ii  install-info  6.5.0.dfsg.1-4+b1
>>> ii  libc6 2.28-7
>>> ii  lsb-base  10.2018112800
>>>
>>> acct recommends no packages.
>>>
>>> acct suggests no packages.
>>>



Bug#922533: please document location of accounting file

2019-02-20 Thread Marc Haber
Hi Marcos,

thanks for your answer.

My suggestion is to have a well documented file in a stable location
that says where to find the actual accounting file. Currently, atop's
code is full of constructs like

for PACCTFILE in /var/account/pacct /var/log/pacct
do
if [ -f "$PACCTFILE" ]  # file exists?
then

(which is obviously missing the current plac /var/log/account/pacct)

otoh, if this will be a Debianism, atop's code won't get any easier since atop
will need to continue handling all those places in other
distributions.

Greetings
Marc


On Tue, Feb 19, 2019 at 11:44:39PM +0100, Marcos Fouces wrote:
> From: Marcos Fouces 
> Subject: Re: Bug#922533: please document location of accounting file
> To: Marc Haber , 922...@bugs.debian.org,
>  Debian Bug Tracking System 
> Date: Tue, 19 Feb 2019 23:44:39 +0100
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
>  Thunderbird/60.5.0
> X-Spam-Score: (--) -2.1
> X-Spam-Report: torres.zugschlus.de  Content analysis details:   (-2.1
>  points, 5.0 required)   pts  rule name  description  
>  -- --- -1.9
>  BAYES_00   BODY: Bayes spam probability is 0 to 1%
>  [score: 0.] -0.0 RCVD_IN_DNSWL_NONE
>  RBL: Sender listed at http://www.dnswl.org/,
>  no trust
>  [2a00:1450:4864:20:0:0:0:42c listed in]
>  [list.dnswl.org]  0.0 FREEMAIL_FROM
>   Sender email is commonly abused enduser mail
>  provider (marcos.fouces[at]gmail.com) -0.0
>  SPF_PASS   SPF: sender matches SPF record -0.1 DKIM_VALID_AU
>   Message has a valid DKIM or DK signature from
>  author's domain  0.1 DKIM_SIGNED
> Message has a DKIM or DK signature, not necessarily
>  valid -0.1 DKIM_VALID_EF  Message has
>  a valid DKIM or DK signature from
>  envelope-from domain -0.1 DKIM_VALID
>  Message has at least one valid DKIM or DK signature
> 
> Hi Marc
> 
> In Debian, the pacct file is located in /var/log/account/pacct while in
> Fedora it is in /var/account/pacct.
> 
> I don't see the reason to be less parsable in that location.
> 
> What is your suggestion?
> 
> Greetings,
> 
> Marcos
> 
> On 17/2/19 20:50, Marc Haber wrote:
> > Package: acct
> > Version: 6.6.4-2
> > Severity: wishlist
> >
> > Hi,
> >
> > my package atop needs to adapt itself to acct being installed or not. If
> > acct is installed, atop reads from acct's log files, while establishing
> > its own accounting interface it acct is not installed.
> >
> > Historically, the pacct file is found in various different places,
> > varying across distribution, so atop's upstream code does through
> > various contortions to find the correct file. It for example acts on
> > /etc/logrotate.d/psacct to find the file being rotated, which fails on
> > Debian since Debian's acct package uses savelog in /etc/cron.d/acct.
> >
> > atop on Debian is currently growing code to parse for the savelog line
> > in /etc/cron.d/acct to find out the acct file being used.
> >
> > Would it be possible ot have the acct file's location in a more easily
> > parsable location? Thanks for helping!
> >
> > Greetings
> > Marc
> >
> >
> > -- System Information:
> > Debian Release: buster/sid
> >   APT prefers unstable
> >   APT policy: (500, 'unstable'), (500, 'stable')
> > Architecture: amd64 (x86_64)
> > Foreign Architectures: i386
> >
> > Kernel: Linux 4.20.8-zgws1 (SMP w/4 CPU cores)
> > Kernel taint flags: TAINT_OOT_MODULE
> > Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
> > (charmap=UTF-8)
> > Shell: /bin/sh linked to /bin/dash
> > Init: systemd (via /run/systemd/system)
> >
> > Versions of packages acct depends on:
> > ii  dpkg  1.19.4
> > ii  install-info  6.5.0.dfsg.1-4+b1
> > ii  libc6 2.28-7
> > ii  lsb-base  10.2018112800
> >
> > acct recommends no packages.
> >
> > acct suggests no packages.
> >

-- 
-
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany|  lose things."Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421



Bug#922533: please document location of accounting file

2019-02-19 Thread Marcos Fouces
Hi Marc

In Debian, the pacct file is located in /var/log/account/pacct while in
Fedora it is in /var/account/pacct.

I don't see the reason to be less parsable in that location.

What is your suggestion?

Greetings,

Marcos

On 17/2/19 20:50, Marc Haber wrote:
> Package: acct
> Version: 6.6.4-2
> Severity: wishlist
>
> Hi,
>
> my package atop needs to adapt itself to acct being installed or not. If
> acct is installed, atop reads from acct's log files, while establishing
> its own accounting interface it acct is not installed.
>
> Historically, the pacct file is found in various different places,
> varying across distribution, so atop's upstream code does through
> various contortions to find the correct file. It for example acts on
> /etc/logrotate.d/psacct to find the file being rotated, which fails on
> Debian since Debian's acct package uses savelog in /etc/cron.d/acct.
>
> atop on Debian is currently growing code to parse for the savelog line
> in /etc/cron.d/acct to find out the acct file being used.
>
> Would it be possible ot have the acct file's location in a more easily
> parsable location? Thanks for helping!
>
> Greetings
> Marc
>
>
> -- System Information:
> Debian Release: buster/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'stable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.20.8-zgws1 (SMP w/4 CPU cores)
> Kernel taint flags: TAINT_OOT_MODULE
> Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
> (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages acct depends on:
> ii  dpkg  1.19.4
> ii  install-info  6.5.0.dfsg.1-4+b1
> ii  libc6 2.28-7
> ii  lsb-base  10.2018112800
>
> acct recommends no packages.
>
> acct suggests no packages.
>



Bug#922533: please document location of accounting file

2019-02-17 Thread Marc Haber
Package: acct
Version: 6.6.4-2
Severity: wishlist

Hi,

my package atop needs to adapt itself to acct being installed or not. If
acct is installed, atop reads from acct's log files, while establishing
its own accounting interface it acct is not installed.

Historically, the pacct file is found in various different places,
varying across distribution, so atop's upstream code does through
various contortions to find the correct file. It for example acts on
/etc/logrotate.d/psacct to find the file being rotated, which fails on
Debian since Debian's acct package uses savelog in /etc/cron.d/acct.

atop on Debian is currently growing code to parse for the savelog line
in /etc/cron.d/acct to find out the acct file being used.

Would it be possible ot have the acct file's location in a more easily
parsable location? Thanks for helping!

Greetings
Marc


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.20.8-zgws1 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages acct depends on:
ii  dpkg  1.19.4
ii  install-info  6.5.0.dfsg.1-4+b1
ii  libc6 2.28-7
ii  lsb-base  10.2018112800

acct recommends no packages.

acct suggests no packages.