Re: Find installed contrib and non-free packages

2008-06-12 Thread Sam Morris
On Fri, 13 Jun 2008 07:17:54 +1000, Andrew Vaughan wrote:

> On Friday 13 June 2008 06:10, W. Martin Borgert wrote:
>> On Thu, Jun 12, 2008 at 12:27:12PM +0200, Vladislav Kurz wrote:
>> > 1. remove contrib and non-free from /etc/apt/sources.list 2. run
>> > dselect (update, select) and you will see all contrib and non-free
>> > packages as obsolete/local packages.
>>
>> Good, because it will show other suspects as well. E.g. packages from
>> non-Debian apt sources, which are also unsupported security-wise. I
>> wonder how I can achieve the same using just apt-get/apt-cache? I
>> remember, that I once wrote a script using python-apt to get this
>> information, but the script is lost :~(
>  
> In lenny
> $ aptitude search "~o"
> 
> In etch I think this will work (but very slow) $ for i in `aptitude
> search "~i" -F "%p"` ; do apt-show-versions $i ; done | grep "No
> available version in archive$"

I prefer 'aptitude search ~S~i!~Odebian' over ~o because it also lists 
packages that are installed, but for which the installed version is not 
available from any apt repositories, whereas ~o will not.

-- 
Sam Morris
http://robots.org.uk/
 
PGP key id 1024D/5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread W. Martin Borgert
On Fri, Jun 13, 2008 at 07:40:15AM +1000, Andrew Vaughan wrote:
> On Friday 13 June 2008 07:17, Andrew Vaughan wrote:
> > In lenny
> > $ aptitude search "~o"
...
> Actually no need for aptitude,  
> $ apt-show-versions |grep "No available version in archive$"
> will do the job.

This is probably The solution. Both apt-show-versions and
aptitude are reasonable fast for the job. The shell script
posted elsewhere in this thread needs about forever and a bit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Frank Dietrich
Hi Martin,

"W. Martin Borgert" <[EMAIL PROTECTED]> wrote:
>Good, because it will show other suspects as well. E.g. packages
>from non-Debian apt sources, which are also unsupported
>security-wise. I wonder how I can achieve the same using just
>apt-get/apt-cache? I remember, that I once wrote a script using
>python-apt to get this information, but the script is lost :~(

Maybe this snippet could help you as well.

awk '/^Package/ {
  pkg=$2
} 
/^Section.*(contrib|non-free)/ {
  printf("%-20s - %-60s\n", $2, pkg)
}' /var/lib/dpkg/status | sort

regards
Frank
-- 
[EMAIL PROTECTED] /root]# man real-life
No manual entry for real-life


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Jim Popovitch
On Thu, Jun 12, 2008 at 5:58 PM, Jim Popovitch <[EMAIL PROTECTED]> wrote:
> grep -v '^Filename: pool\/main\/'   will get everything not in main,
> which is the OP's intention, IIRC.

Just to be clear, this cmd shows me all pkgs not in main:

for pkg in `dpkg -l | grep ii | awk '{print $2}'` ; do if [ `apt-cache
show $pkg | grep '^Filename: pool/main/' | wc -l` -eq 0 ]; then echo
$pkg; fi; done

-Jim P.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Jim Popovitch
On Thu, Jun 12, 2008 at 4:06 PM, W. Martin Borgert <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 12, 2008 at 11:38:33AM +0200, Filip Husak wrote:
>> I think the following command resolves your problem:
>>
>> for pkg in `dpkg -l | grep ii | awk '{print $2}'` ; do if [ `apt-cache
>> show $pkg | grep 'contrib\|non-free' | wc -l` -ne 0 ]; then echo $pkg;
>> fi; done
>
> You should grep for "^Filename: pool/\(contrib\|non-free\)/" to
> prevent false positives. And: Packages that have been installed
> from non-Debian apt sources or via dpkg --install are missed.

grep -v '^Filename: pool\/main\/'   will get everything not in main,
which is the OP's intention, IIRC.

(unless backports is supported by Debian security)

-Jim P.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Andrew Vaughan
On Friday 13 June 2008 07:17, Andrew Vaughan wrote:
> On Friday 13 June 2008 06:10, W. Martin Borgert wrote:
> > On Thu, Jun 12, 2008 at 12:27:12PM +0200, Vladislav Kurz wrote:
> > > 1. remove contrib and non-free from /etc/apt/sources.list
> > > 2. run dselect (update, select) and you will see all contrib and
> > > non-free packages as obsolete/local packages.
> >
> > Good, because it will show other suspects as well. E.g. packages
> > from non-Debian apt sources, which are also unsupported
> > security-wise. I wonder how I can achieve the same using just
> > apt-get/apt-cache? I remember, that I once wrote a script using
> > python-apt to get this information, but the script is lost :~(
>
> In lenny
> $ aptitude search "~o"
>
> In etch I think this will work (but very slow)
> $ for i in `aptitude search "~i" -F "%p"` ; do apt-show-versions $i ;
> done | grep "No available version in archive$"
Actually no need for aptitude,  
$ apt-show-versions |grep "No available version in archive$"
will do the job.

HTH
Andrew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Andrew Vaughan
On Friday 13 June 2008 06:10, W. Martin Borgert wrote:
> On Thu, Jun 12, 2008 at 12:27:12PM +0200, Vladislav Kurz wrote:
> > 1. remove contrib and non-free from /etc/apt/sources.list
> > 2. run dselect (update, select) and you will see all contrib and
> > non-free packages as obsolete/local packages.
>
> Good, because it will show other suspects as well. E.g. packages
> from non-Debian apt sources, which are also unsupported
> security-wise. I wonder how I can achieve the same using just
> apt-get/apt-cache? I remember, that I once wrote a script using
> python-apt to get this information, but the script is lost :~(
 
In lenny 
$ aptitude search "~o"

In etch I think this will work (but very slow)
$ for i in `aptitude search "~i" -F "%p"` ; do apt-show-versions $i ; done |
grep "No available version in archive$"


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread W. Martin Borgert
On Thu, Jun 12, 2008 at 12:27:12PM +0200, Vladislav Kurz wrote:
> 1. remove contrib and non-free from /etc/apt/sources.list
> 2. run dselect (update, select) and you will see all contrib and non-free 
> packages as obsolete/local packages. 

Good, because it will show other suspects as well. E.g. packages
from non-Debian apt sources, which are also unsupported
security-wise. I wonder how I can achieve the same using just
apt-get/apt-cache? I remember, that I once wrote a script using
python-apt to get this information, but the script is lost :~(


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread W. Martin Borgert
On Thu, Jun 12, 2008 at 11:38:33AM +0200, Filip Husak wrote:
> I think the following command resolves your problem:
>
> for pkg in `dpkg -l | grep ii | awk '{print $2}'` ; do if [ `apt-cache
> show $pkg | grep 'contrib\|non-free' | wc -l` -ne 0 ]; then echo $pkg;
> fi; done

You should grep for "^Filename: pool/\(contrib\|non-free\)/" to
prevent false positives. And: Packages that have been installed
from non-Debian apt sources or via dpkg --install are missed.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Jim Popovitch
On Thu, Jun 12, 2008 at 11:23 AM, Martin Bartenberger
<[EMAIL PROTECTED]> wrote:
> Thanks a lot guys, I like all of your suggestions (the "virtual RMS" made me
> laugh, never heard of this before).
> Seems like TIMTOWTDI, reminds me of PERL ;-)
>
> I will play around with all of them and find out which one I'll use in
> future.

Keep in mind that only looking for nonfree|contrib will not reveal
pkgs that were manually installed via dpkg -i

-Jim P.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Martin Bartenberger
Thanks a lot guys, I like all of your suggestions (the "virtual RMS" 
made me laugh, never heard of this before).

Seems like TIMTOWTDI, reminds me of PERL ;-)

I will play around with all of them and find out which one I'll use in 
future.


Greetings,
martin


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Andrew Vaughan
On Thursday 12 June 2008 20:27, Vladislav Kurz wrote:
> On Thursday 12 of June 2008, Martin Bartenberger wrote:
> > Hi,
> >
> > just a few days ago I've read at
> > http://www.debian.org/security/faq.en.html#contrib that contrib and
> > non-free packages are not supported by the Debian security team.
> >
> > Now I want to find out which contrib and non-free packages are
> > installed on my servers. Is there any special command or script for
> > this or do I have to write one?
>
> Hi, I use this method:
>
> 1. remove contrib and non-free from /etc/apt/sources.list
> 2. run dselect (update, select) and you will see all contrib and non-free
> packages as obsolete/local packages.
>
> Maybe aptitude will do the same, but I don't use it  ;-)
It does.

If contrib and non-free are still in your sources.list then

$ aptitude search "~i(~scontrib|~snon-free)"

should list all installed packages from contrib and non-free.

Andrew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Vladislav Kurz
On Thursday 12 of June 2008, Martin Bartenberger wrote:
> Hi,
>
> just a few days ago I've read at
> http://www.debian.org/security/faq.en.html#contrib that contrib and
> non-free packages are not supported by the Debian security team.
>
> Now I want to find out which contrib and non-free packages are installed
> on my servers. Is there any special command or script for this or do I
> have to write one?

Hi, I use this method:

1. remove contrib and non-free from /etc/apt/sources.list
2. run dselect (update, select) and you will see all contrib and non-free 
packages as obsolete/local packages. 

Maybe aptitude will do the same, but I don't use it  ;-)

-- 
Regards
Vladislav Kurz


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Joerg Jaspert
On 11414 March 1977, Martin Bartenberger wrote:

> Now I want to find out which contrib and non-free packages are installed
> on my servers. Is there any special command or script for this or do I
> have to write one?

vrms

-- 
bye, Joerg
Some NM:
graphviz: ouch, that license is hard to read, damn lawyer gibberish.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Alberto Gonzalez Iniesta
On Thu, Jun 12, 2008 at 11:02:29AM +0200, Martin Bartenberger wrote:
> Hi,
>
> just a few days ago I've read at  
> http://www.debian.org/security/faq.en.html#contrib that contrib and  
> non-free packages are not supported by the Debian security team.
>
> Now I want to find out which contrib and non-free packages are installed  
> on my servers. Is there any special command or script for this or do I  
> have to write one?
>
> Looking forward to your ideas and Greetings from Vienna,

Hi Martin,

You may want to install vrms.

Description: virtual Richard M. Stallman
 The vrms program will analyze the set of currently-installed packages
 on a Debian-based system, and report all of the packages from the
 non-free and contrib trees which are currently installed.

Regards,

Alberto

-- 
Alberto Gonzalez Iniesta| Formación, consultoría y soporte técnico
agi@(inittab.org|debian.org)| en GNU/Linux y software libre
Encrypted mail preferred| http://inittab.com

Key fingerprint = 9782 04E7 2B75 405C F5E9  0C81 C514 AF8E 4BA4 01C3


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Find installed contrib and non-free packages

2008-06-12 Thread Filip Husak
Martin Bartenberger wrote:
> Hi,
>
> just a few days ago I've read at
> http://www.debian.org/security/faq.en.html#contrib that contrib and
> non-free packages are not supported by the Debian security team.
>
> Now I want to find out which contrib and non-free packages are
> installed on my servers. Is there any special command or script for
> this or do I have to write one?
>
> Looking forward to your ideas and Greetings from Vienna,
>
> Martin
>
>
Hi Martin,

I think the following command resolves your problem:

for pkg in `dpkg -l | grep ii | awk '{print $2}'` ; do if [ `apt-cache
show $pkg | grep 'contrib\|non-free' | wc -l` -ne 0 ]; then echo $pkg;
fi; done

Filip.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Find installed contrib and non-free packages

2008-06-12 Thread Martin Bartenberger

Hi,

just a few days ago I've read at 
http://www.debian.org/security/faq.en.html#contrib that contrib and 
non-free packages are not supported by the Debian security team.


Now I want to find out which contrib and non-free packages are installed 
on my servers. Is there any special command or script for this or do I 
have to write one?


Looking forward to your ideas and Greetings from Vienna,

Martin


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]