Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 170784

Summary: [patch] add --quiet option to glsa-check
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: [OLD] UnspecifiedAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: gentoobugs.eddieparker, vanya
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 237964, 268001    
Attachments: add_--quiet_option.diff
Patch to enable a -e option: behaves like -m, except silent on nothing to report

Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2007-03-13 21:03:09 UTC
i'd like to run glsa-check from cron - this way i would 
automatically receive an email when glsa-check finds my 
systems vulnerable... 

currently i would receive email whenever glsa-check is run.

my very first python patch will be attached in a second.
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2007-03-13 21:08:02 UTC
Created attachment 113216 [details]
add_--quiet_option.diff

this is against version 0.7 (gentoolkit-0.2.3)

thank you for glsa-check (and all the other stuff:)!
Comment 2 Ivan Yarych 2007-04-20 08:40:07 UTC
glsa-check -q -l affected works
but glsa-check -q -l affected doesn't
could you also add the functionality for --mail option?
Developers - please include this patch - this will be really useful for cron checking GLSA vulnerabilities!
Thanks.
Comment 3 Ivan Yarych 2007-04-20 08:40:53 UTC
(In reply to comment #2)
> but glsa-check -q -l affected doesn't
I mean glsa-check -q -m affected
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2007-05-30 18:20:15 UTC
(In reply to comment #2)
> glsa-check -q -l affected works
> but glsa-check -q -m affected doesn't
> could you also add the functionality for --mail option?

Define "doesn't work"
Comment 5 Ivan Yarych 2007-05-30 18:47:22 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > glsa-check -q -l affected works
> > but glsa-check -q -m affected doesn't
> > could you also add the functionality for --mail option?
> 
> Define "doesn't work"
> 

but glsa-check -q -m did not suppress output to mail body. Mail get send with 0 vulnerabilities if system is not affected. Would be good if mail won't be sent in such case at all, but only in case there are some vulnerabilities.
Comment 6 Ivan Yarych 2007-05-30 18:52:01 UTC
Looks like my previous post wasn't clear enough. I will rephrase what I want of using -m and -q options simultaneously.
So I have set up 'glsa-check -q -m affected' in cron. I want to receive some report to my mail in case I have some GLSA vulnerabilities, but if there are no such - don't send mail at all.
Hope this is clear.
Sorry for my English.
Comment 7 Mikael Leiviskä 2007-06-25 09:50:56 UTC
In what way would using -q differ from the below?

cat /etc/cron.weekly/glsacheck.sh

#!/bin/bash
mount -o remount,rw /usr
/usr/bin/emerge -q --sync
mount -o remount,ro /usr
/usr/bin/glsa-check -t new
echo "Done!"
Comment 8 Eddie Parker 2008-01-13 21:49:37 UTC
Created attachment 140898 [details, diff]
Patch to enable a -e option: behaves like -m, except silent on nothing to report

I also wanted similar functionality, however I did not want to affect the -m option in case people were reassured by having a blank e-mail stating no glsa advisories.

-e functions exactly the same as -m, however it only e-mails if there are items to report.

Just submitting another alternative.
Comment 9 Eddie Parker 2008-01-13 21:51:29 UTC
Hrmm. 

I meant to attach this patch to this bug: http://bugs.gentoo.org/show_bug.cgi?id=182990

However apparently I was navigating to the wrong place.  Apologies - however I think this patch might solve what Vanya was looking for as well.

(I can't figure out how to remove said attachment, so I'm coming up with reasons for it's being here. :) )

Sorry!
Comment 10 Ivan Yarych 2008-12-01 07:57:02 UTC
Is it just me or this patch is an "anti-patch"? :-) Looks like it removes the functionality, not adding ;) Anyway, the feature is still good to include...
Comment 11 Paul Varner (RETIRED) gentoo-dev 2009-05-18 22:12:33 UTC
gentoolkit-0.2.4.4 and gentoolkit-0.3.0_rc6 released.