Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 205293
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Robin Johnson <robbat2@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Peter Gantner (a.k.a. nephros) <gentoo@nephros.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 205293 depends on: Show dependency tree
Bug 205293 blocks: 214232
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-01-11 10:50 0000
pkg_config() in the current munin ebuild tries to enter an crontab entry in
this way:

  crontab -u munin /var/lib/munin/crontab

this is correct for the vixie-cron crontab(1)and maybe others, but dcron uses a
slightly different syntax. The correct way to do it with dcron is:

  crontab  /var/lib/munin/crontab -u munin

You could say it's got it backwards, therefore emerge --config
net-analyzer/munin results in the crontab(1) help output and no crontab
installed when dcron is installed.

Not sure if there's already an eclass/function dealing with user cron entries
(cron.eclass doesn't) but extending one would probably be the intelligent fix.

Quicker: drop the automatic installation and simply print instructions on how
to add the crontab for different cron implementations.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-process/dcron
2. emerge net-analyzer/munin
3. emerge --config net-analyzer/munin
Actual Results:  
crontab V3.2
crontab file <opts>  replace crontab from file
crontab -    <opts>  replace crontab from stdin
crontab -u user      specify user
crontab -l [user]    list crontab for user
crontab -e [user]    edit crontab for user
crontab -d [user]    delete crontab for user
crontab -c dir       specify crontab directory


Expected Results:  
crontab should be installed for user munin, or warning given by pkg_config how
to add it manually.

------- Comment #1 From Robin Johnson 2008-05-31 19:25:24 0000 -------
Can I do this safely on dcron?
crontab -u munin </var/lib/munin/crontab

------- Comment #2 From Peter Gantner (a.k.a. nephros) 2008-06-01 17:23:24 0000 -------
(In reply to comment #1)
> Can I do this safely on dcron?
> crontab -u munin </var/lib/munin/crontab
> 

No, but you can do one of those two:
# crontab /var/lib/munin/crontab -u munin
# crontab - -u munin  </var/lib/munin/crontab

I have tried other combinations, which don't work:
# crontab -u munin </var/lib/munin/crontab
# crontab -u munin - </var/lib/munin/crontab
# crontab -u munin /var/lib/munin/crontab

Also, it only works as root:
$ crontab - -u munin </var/lib/munin/crontab
crontab: only the superuser may specify a user

HTH.

------- Comment #3 From Robin Johnson 2008-06-01 20:56:09 0000 -------
> # crontab - -u munin  </var/lib/munin/crontab
That one works on vixie-cron too (the file-specific on does not).


Fixed in 1.3.4 now.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug