我想编写一个脚本,为我的系统上安装的每个软件包输出许可证。
使用 dpkg --get-selections
我能够获取所有安装清单。但是,我看不到获取每个软件包的许可证信息的方法。例如,我可以aptitude show
用来获取每个软件包的属性,但其中不包括许可证:
$ aptitude show apache2
Package: apache2
State: installed
Automatically installed: no
Version: 2.2.14-5ubuntu8.6
Priority: optional
Section: httpd
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Uncompressed Size: 36.9k
Depends: apache2-mpm-worker (= 2.2.14-5ubuntu8.6) | apache2-mpm-prefork (= 2.2.14-5ubuntu8.6) | apache2-mpm-event (= 2.2.14-5ubuntu8.6) | apache2-mpm-itk (= 2.2.14-5ubuntu8.6),
apache2.2-common (= 2.2.14-5ubuntu8.6)
Provided by: apache2-mpm-event, apache2-mpm-itk, apache2-mpm-prefork, apache2-mpm-worker
Description: Apache HTTP Server metapackage
The Apache Software Foundation's goal is to build a secure, efficient and extensible HTTP server as standards-compliant open source software. The result has long been the
number one web server on the Internet.
It features support for HTTPS, virtual hosting, CGI, SSI, IPv6, easy scripting and database integration, request/response filtering, many flexible authentication schemes, and
more.
Homepage: http://httpd.apache.org/
是否存在将许可证与每个软件包相关联的第三方存储库?
下载每个源程序包并检查其许可信息听起来很痛苦,但这也许是最好的方法。