Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172548 - app-admin/sysstat init script and new cronjob
Summary: app-admin/sysstat init script and new cronjob
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Markus Ullmann (RETIRED)
URL: http://perso.orange.fr/sebastien.goda...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 11:41 UTC by Sergiy Borodych
Modified: 2007-06-12 00:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sysstat.init.d (sysstat.init.d,524 bytes, text/plain)
2007-03-28 11:41 UTC, Sergiy Borodych
Details
sysstat-7.0.4-r1.ebuild.patch (sysstat-7.0.4-r1.ebuild.patch,894 bytes, patch)
2007-03-28 11:45 UTC, Sergiy Borodych
Details | Diff
sysstat-7.0.4-r1.ebuild.patch (sysstat-7.0.4-r1.ebuild.patch,894 bytes, patch)
2007-03-28 11:56 UTC, Sergiy Borodych
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergiy Borodych 2007-03-28 11:41:14 UTC
Follow documentation
http://perso.orange.fr/sebastien.godard/documentation.html

for configuring sysstat need cron.d and init.d files

I atach patch to ebuild and init.d script,
crond file and crontab.example take from distribution,
exists crontab.example from $FILESDIR not use (may delete)
Comment 1 Sergiy Borodych 2007-03-28 11:41:54 UTC
Created attachment 114711 [details]
sysstat.init.d

sysstat.init.d
Comment 2 Sergiy Borodych 2007-03-28 11:45:19 UTC
Created attachment 114713 [details, diff]
sysstat-7.0.4-r1.ebuild.patch

sysstat-7.0.4-r1.ebuild.patch

also in this patch use ecompress instead gzip
see 
http://bugs.gentoo.org/show_bug.cgi?id=171601
Comment 3 Sergiy Borodych 2007-03-28 11:56:05 UTC
Created attachment 114715 [details, diff]
sysstat-7.0.4-r1.ebuild.patch

sysstat-7.0.4-r1.ebuild.patch

fix sysstat.crond install with right perms
Comment 4 Markus Ullmann (RETIRED) gentoo-dev 2007-05-31 10:09:00 UTC
Fixed in CVS, thankies :)
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2007-06-07 18:26:48 UTC
This patch has several problems.

Firstly, sysstat.crond.in is merely a crontab example (i.e. cronjob fields that one might choose to put in one's system or root crontab) and should not be installed as a shell script in /etc/cron.d/sysstat without at the very least a big fat warning.

Secondly, as an example it doesn't work for sys-process/dcron because dcron doesn't accept or use the user field on a cronjob line like some other cron interpretations, and proceeds to send messages like these:

------
From: "root@epia" <root@epia>
To: root
Subject: cron: root /usr/lib/sa/sa1 -d 1 1
Date: Thu,  7 Jun 2007 20:00:06 +0200

/bin/sh: root: command not found
------

As an aside, dcron fails to ignore comments (lines starting with #) in that file as well.

Thirdly, these changes seem to have been implemented in an ebuild (a revision bump) that went straight to stable, apparently with very little testing.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2007-06-09 03:53:48 UTC
I removed the two lines in the ebuild which installed sysstat.crond:

Note that the same file is still installed to /usr/share/doc/sysstat-7.0.4/crontab.example(.bz2).

--- sysstat-7.0.4-r2.ebuild	2007/05/31 10:08:50	1.1
+++ sysstat-7.0.4-r2.ebuild	2007/06/08 11:03:52	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-admin/sysstat/sysstat-7.0.4-r2.ebuild,v 1.1 2007/05/31 10:08:50 jokey Exp $
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-admin/sysstat/sysstat-7.0.4-r2.ebuild,v 1.2 2007/06/08 11:03:52 jer Exp $
 
 inherit multilib
 
@@ -53,7 +53,5 @@
 	rm "${D}/usr/share/doc/${PF}/COPYING"
 	ecompress "${D}/usr/share/doc/${PF}/"*[^mz]
 	newdoc sysstat.crond.sample crontab.example
-	insinto /etc/cron.d
-	newins sysstat.crond sysstat
 	newinitd "${FILESDIR}"/sysstat.init.d sysstat
 }
Comment 7 Michiel de Bruijne 2007-06-12 00:02:49 UTC
(In reply to comment #6)
> I removed the two lines in the ebuild which installed sysstat.crond:
> 
> Note that the same file is still installed to
> /usr/share/doc/sysstat-7.0.4/crontab.example(.bz2).

Hi Jeroen,

Is it possible to create a useflag for this, like sys-apps/pciutils and sys-apps/usbutils?
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2007-06-12 00:17:37 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I removed the two lines in the ebuild which installed sysstat.crond:
> > 
> > Note that the same file is still installed to
> > /usr/share/doc/sysstat-7.0.4/crontab.example(.bz2).
> 
> Hi Jeroen,
> 
> Is it possible to create a useflag for this, like sys-apps/pciutils and
> sys-apps/usbutils?

Hardly.

sys-apps/pciutils:network-cron - Monthly cronjob the update-pciids script
sys-apps/usbutils:network-cron - Monthly cronjob the update-usbids script

These cronjobs are being installed in /etc/cron.monthly and are run each month. The cronjobs in the example are supposed to be run every 10 minutes, so it's better to set them up in the crontab. Automating this is a matter of runtime configuration, IMHO.