From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: rottlog daily test Date: Mon, 18 Jul 2016 18:13:24 +0200 Message-ID: <8737n6divv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPBB1-00050b-G1 for guix-devel@gnu.org; Mon, 18 Jul 2016 12:13:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPBAv-0007RO-41 for guix-devel@gnu.org; Mon, 18 Jul 2016 12:13:49 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hi I tried running rottlog by hand and found that it needs `packdir' to be set, and it needs a config file if you want to run it daily (e.g., for testing. Patch attached. Then I tried to get cron run rottlog each day at 5 doing: (use-package-modules admin) (use-service-modules mcron) (define (rottlog-service) (service mcron-service-type (mcron-configuration (jobs (list (mcron-job (user "root") (specification #~(job '(next-hour '(5)) (lambda () (system (string-append rottlog "/sbin/rottlog"))))))))))) (operating-system ... (services ... (rottlog-service))) but I did not see this working. Greetings, Jan --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-admin-rottlog-daily.patch >From 192c442b597e9e54bc7ab787f680861f919b37e1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 18 Jun 2016 22:37:48 +0200 Subject: [PATCH] admin: rottlog: daily --- gnu/packages/admin.scm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 415a35a..e10483e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -769,11 +769,21 @@ over ssh connections.") (assoc-ref %outputs "out") "/etc") "--localstatedir=/var") - #:phases (alist-cons-after - 'install 'install-info - (lambda _ - (zero? (system* "make" "install-info"))) - %standard-phases))) + #:phases (modify-phases %standard-phases + (add-after 'build 'set-packdir + (lambda _ + (substitute* "rc/rc" + (("packdir=\"\"") + "packdir=\"/var/log\"")))) + (add-after 'install 'install-daily + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "mv" + (string-append out "/etc/weekly") + (string-append out "/etc/daily")))))) + (add-after 'install 'install-info + (lambda _ + (zero? (system* "make" "install-info"))))))) (native-inputs `(("texinfo" ,texinfo) ("util-linux" ,util-linux))) ; for 'cal' (home-page "http://www.gnu.org/software/rottlog/") -- 2.8.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--