Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#40058 - [atop] Invalid log file name in atop.service file

Attached to Project: Community Packages
Opened by Konstantin (kstep) - Wednesday, 23 April 2014, 22:21 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 25 April 2014, 13:25 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Invalid log file name in atop.service file.
Log file should contain timestamp as year-month-day triplet.
Now atop.service contains this line:

ExecStart=/bin/sh -c '/usr/bin/atop -a -w /var/log/atop/atop_$(date +%Y%m%d) 600'

Which produces the following command (systemctl status atop.service):

CGroup: /system.slice/atop.service
└─2495 /usr/bin/atop -a -w /var/log/atop/atop_2014ba7a28bdbd8743ac910d282ea4153d3523 600

According to systemd.unit docs '%m' string is replaced with machine id (ba7a28bdbd8743ac910d282ea4153d35 in my case):

"%m" Machine ID The machine ID of the running system, formatted as string. See machine-id(5) for more information.

from (http://www.freedesktop.org/software/systemd/man/systemd.unit.html).

To fix it one should double all percent signs in the command from atop.service, so the command should look like:

ExecStart=/bin/sh -c '/usr/bin/atop -a -w /var/log/atop/atop_$(date +%%Y%%m%%d) 600'

Now only '%m' has special meaning in systemd service files, but given they use percent-letter format for different
placeholder, one should consider risk of stumbling upon future changes in systemd, so all percent signs should be
double in this case.

Please fix it in package ASAP. Thank you.

Additional info:
* package version(s): 2.0.2-1
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 25 April 2014, 13:25 GMT
Reason for closing:  Fixed
Comment by Konstantin (kstep) - Wednesday, 23 April 2014, 22:25 GMT
Seems like I forgot to enter summary, I'm really sorry for this. Unfortunately I don't have permissions to edit the ticket. Should to come accross the ticket, could you please change the title to something more meaningful? Usually I don't do such silly mistakes, but it's almost 1:30 am here, so I'm a bit dizzy now. Sorry.
Comment by Doug Newgard (Scimmia) - Thursday, 24 April 2014, 00:49 GMT
The service file comes from upstream, not from Arch, so they're the ones that need to fix the problem. Please report to them.
Comment by Konstantin (kstep) - Thursday, 24 April 2014, 06:52 GMT
Thank you for prompt reply.

I reported back to upstream author at http://www.atoptool.nl/index.php, I'll see what they say.
Comment by Konstantin (kstep) - Friday, 25 April 2014, 12:58 GMT
No answer from upstream as of now. Is it possible Arch package can include some kind of patch for the issue? I know, this is far from being important ticket here, but it bothers me anyway =)

Loading...