| Summary: | logwatch adds wrong crontab entry: logwatch.pl v. logwatch | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | B. K. Oxley (binkley) <binkley> |
| Component: | New packages | Assignee: | Jared H. Hudson (RETIRED) <jhhudso> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gentoo, nicholas |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
change logwatch.pl -> logwatch
fixes /usr/sbin -> /usr/bin |
||
Created attachment 10677 [details, diff]
change logwatch.pl -> logwatch
This diff makes a logwatch-4.3.2-r1.ebuild that only removes the errant suffix.
There is one other issue: /usr/bin/logwatch is the correct path, not /usr/sbin/logwatch.pl. It isn't just the suffix .pl but also the path. I've updated my proposed patch to reflect this. Created attachment 10684 [details, diff]
fixes /usr/sbin -> /usr/bin
Replaces previous suggested patch.
Since logwatch-4.3.2 creates a /usr/sbin/logwatch.pl executable, I think the cron updating script is correct as is. If your filesystem has a /usr/bin/logwatch, then that might be from an older install of logwatch. I'm open towards renaming logwatch.pl to just logwatch (via rename or symbolic link), but I think logwatch should remain in /usr/sbin, since it is a system (sbin) type program, not a normal user binary (bin) program. If your filesystem contains a /usr/bin/logwatch or /usr/sbin/logwatch, install gentoolkit and perform a 'epm -qf /usr/bin/logwatch to see what version of logwatch it belongs to, or re-emerge logwatch and make note of what files it says it's >> (installing). Either way, thanks for submitting this bug report. Because of this I discovered a different bug: the logwatch man page refers to a /etc/log.d/logwatch.conf (as a symbolic link to the currently existing /etc/log.d/conf/logwatch.conf) which we do not have please see the comment above. Thanks for the suggestion! /usr/bin/logwatch is owned by no one and I have no file named /usr/sbin/logwatch*. And reemerging reveals: # ls -l /usr/bin/*logw* lrwxrwxrwx 1 root root 39 Apr 18 19:55 /usr/bin/logwatch -> /usr/share/logwatch/scripts/logwatch.pl # ls -l /usr/sbin/*logw* ls: /usr/sbin/*logw*: No such file or directory So something is still interesting. The emerge installed sys-apps/logwatch 4.2.1. I emerged logwatch for the first time less than a week ago. It is sys-apps/logwatch-4.2.1 . The crontab-entry wants to use /usr/sbin/logwatch, which does not exist. What exists is: -rwxr-xr-x 1 root root 22537 2003-04-27 05:17 /usr/share/logwatch/scripts/logwatch.pl and lrwxrwxrwx 1 root root 39 2003-04-27 05:17 /usr/bin/logwatch -> /usr/share/logwatch/scripts/logwatch.pl I agree that it *should* be in /usr/sbin . What also puzzles me is the permissions on /usr/share/logwatch/scripts/logwatch.pl . -rwxr-x--- would seem more appropiate to me. *** Bug 20150 has been marked as a duplicate of this bug. *** this bug can be safely closed since the logwatch ebuild doesn't modify the crontab anymore (cfr logwatch-4.3.2.ebuild) you're right, close :) |
The 4.2.2 ebuild for sys-apps/logwatch adds the wrong crontab entry in pkg_postinst. It should run /usr/sbin/logwatch but instead runs /usr/sbin/logwatch.pl. I'm sure this is because that's what happens in the original source tarball for logwatch. The fix is trivial: remove the .pl suffix in the ebuild. The diff is below: *** fixed-logwatch-4.3.2.ebuild Tue Apr 15 08:10:01 2003 --- logwatch-4.3.2.ebuild Tue Apr 15 08:09:38 2003 *************** *** 55,61 **** if [ "`grep logwatch.pl ${ROOT}var/spool/cron/crontabs/root`" == "" ]; then einfo "adding to cron..." ! echo "0 0 * * * ${ROOT}usr/sbin/logwatch 2>&1 > /dev/null" \ >> ${ROOT}var/spool/cron/crontabs/root fi } --- 55,61 ---- if [ "`grep logwatch.pl ${ROOT}var/spool/cron/crontabs/root`" == "" ]; then einfo "adding to cron..." ! echo "0 0 * * * ${ROOT}usr/sbin/logwatch.pl 2>&1 > /dev/null" \ >> ${ROOT}var/spool/cron/crontabs/root fi } Reproducible: Always Steps to Reproduce: 1. 2. 3.