You are not logged in.

#26 2008-06-12 18:17:11

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: Archlinux and free software

I've written a script to print out non-free packages.
The problem is that many free packages also have license=('custom') set.

#!/usr/bin/env python
# Shows nonfree packages installed on system

import subprocess as S

whitelist_packages="db subversion dbus dhclient docbook-sgml docbook-xml boost hal hal-info imagmagick file gd db4.1".split(' ')

whitelist = lambda p: (p in whitelist_packages) or (p[:3] == 'lib')

free_licenses = "GPL MPL LGPL BSD3 none GPL2 GPL3 BSD None APACHE CCPL PerlArtistic ZPL RUBY PHP LPPL LGPL2 LGPL3 FDL EPL CPL CDDLi vim MIT Xiph ISC PSF".split(" ")
free_licenses += map(lambda x: 'custom:'+x, free_licenses)
execo = lambda s: S.Popen(s.split(' '), stdout=S.PIPE).communicate()[0]
license = lambda s: filter(lambda n: n != '', execo('pacman -Qi '+s).split("\n")[3][17:].split(" "))
nonfree = lambda p: (len(filter(lambda l: l not in free_licenses, license(p))) > 0) and not whitelist(p)
packages = execo('pacman -Qq').split("\n")[:-1]

print "\n".join(filter(nonfree, packages))

I manually added some packages to the whitelist so that it wouldn't come, but there
are many more packages which will come up as nonfree though they are really free.
Also I've assumed that all libs are free; many libs seem to have a custom license.

Last edited by abhidg (2008-06-12 18:17:53)

Offline

#27 2008-06-12 19:02:23

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: Archlinux and free software

Mimi wrote:
anykey wrote:

Iceweasel? Icedove?

Bon Echo? tongue
I like the debian philosophy, it's good to know which packages are free and which not and to make a free decision you have to be informed.
Maybe we need something like "The Virtual Richard M. Stallman" (vrms) for Arch. wink

total senseless discussion!
from man PKGBUILD

license (array)
           This field specifies the license(s) that apply to the package...

just use pacman -Qii package.
i would rather say the debian way of calling a non open-source package nonfree is quite dumb: non-free can be everything (take a look at virtualbox or mozilla). and  btw i really hate the debian names (iceweasel???wtf???) phiosophers often loose themselves in terminology..

vlad

Offline

#28 2008-06-12 19:12:28

jerryluc
Member
From: Norway
Registered: 2008-05-20
Posts: 95

Re: Archlinux and free software

abhidg wrote:

I've written a script to print out non-free packages.
The problem is that many free packages also have license=('custom') set.

#!/usr/bin/env python
# Shows nonfree packages installed on system

import subprocess as S

whitelist_packages="db subversion dbus dhclient docbook-sgml docbook-xml boost hal hal-info imagmagick file gd db4.1".split(' ')

whitelist = lambda p: (p in whitelist_packages) or (p[:3] == 'lib')

free_licenses = "GPL MPL LGPL BSD3 none GPL2 GPL3 BSD None APACHE CCPL PerlArtistic ZPL RUBY PHP LPPL LGPL2 LGPL3 FDL EPL CPL CDDLi vim MIT Xiph ISC PSF".split(" ")
free_licenses += map(lambda x: 'custom:'+x, free_licenses)
execo = lambda s: S.Popen(s.split(' '), stdout=S.PIPE).communicate()[0]
license = lambda s: filter(lambda n: n != '', execo('pacman -Qi '+s).split("\n")[3][17:].split(" "))
nonfree = lambda p: (len(filter(lambda l: l not in free_licenses, license(p))) > 0) and not whitelist(p)
packages = execo('pacman -Qq').split("\n")[:-1]

print "\n".join(filter(nonfree, packages))

I manually added some packages to the whitelist so that it wouldn't come, but there
are many more packages which will come up as nonfree though they are really free.
Also I've assumed that all libs are free; many libs seem to have a custom license.

I really liked this script. Since Pacman already have a license tag I don't think it's necessary to change how it works.
But I think it would be great to separate "custom-free" and "custom-proprietary"...

Offline

#29 2008-06-12 19:28:17

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: Archlinux and free software

@abhidg: I love your script because:

- It's useful.
- It's a good example of Python functional programming using lambda smile

EDIT: typo

Last edited by catwell (2008-06-12 19:28:33)

Offline

#30 2008-06-12 22:52:06

Mimi
Member
From: Germany
Registered: 2008-06-06
Posts: 39

Re: Archlinux and free software

DonVlad wrote:

just use pacman -Qii package.

I'll do that with the packages abhidg's "Virtual Richard M. Stallman" listed. Thanks for the script! smile

i would rather say the debian way of calling a non open-source package nonfree is quite dumb: non-free can be everything (take a look at virtualbox or mozilla).

I don't understand what's wrong with that. They just came up with some guidelines defining what is free and everything that doesn't follow these guidelines is non-free. 
http://www.debian.org/social_contract.e … guidelines

and  btw i really hate the debian names (iceweasel???wtf???)

Iceweasel is really cute!

But you are right, senseless discussion.

-- Mimi


It is what you make it. Even if you don't know what to make it.

Offline

#31 2008-06-13 10:49:33

anykey
Member
From: Trier, Germany
Registered: 2004-06-12
Posts: 79

Re: Archlinux and free software

Call them anything you like, "non-free", "proprietary", "closed", whatever (most people use these terms synonymously anyway), it is just names.

Just don't mutate them into forming a seperate repository please. That was all I wanted to get at above.

Offline

Board footer

Powered by FluxBB