Deb软件包的许可证信息 [英] license info of a deb package

查看:107
本文介绍了Deb软件包的许可证信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取已卸载的deb软件包的许可证信息.
dpkg --info <package-name>.deb没有提供该信息.
ubuntu中是否有任何命令可以提供此信息?
(在rpm世界中,rpm -qpi提供该信息)

I am trying to get license information of uninstalled deb packages.
dpkg --info <package-name>.deb does not give that information.
Is there any command in ubuntu which will give this info?
(In rpm world rpm -qpi gives that info)

推荐答案

我没有一个简单的命令.您可以执行以下操作:

There's no simple command that I know of. You can do something like this:

dpkg-deb --fsys-tarfile foo.deb |tar -xvO ./usr/share/doc/foo/copyright

这会将文件打印到标准输出.

This prints the file to standard output.

编辑嗯,听起来很难.快速浏览我的Debian系统上的apt缓存后,我发现了一些可能有用的短语:

Edit Hmm, that sounds hard. After a quick perusal of the apt cache on my Debian system, I found some phrases that might be useful:

  • "GNU通用公共许可证"
  • 上述版权声明和此许可声明",请确保您先解开行
  • "/usr/share/common-licenses/*"

这似乎是您最接近的标准许可证,但是请小心,因为 packaging 通常是在通用许可证下进行的,而软件包中的内容是在单独的许可证下进行的. /p>

  • ^License: MPL-1.1 | GPL-2+ | Apache-2.0
  • This seems to be the closest to a standard license you'll get, but be careful since often the packaging is under a common-license, but the package contents are under a separate license.

    但是,某些软件包(ImageMagick)仅在版权文件中具有自由格式的许可证,该许可证实际上并不符合任何股票许可证,只是有人认为它是DFSG批准的.

    However, some packages (ImageMagick) simply have a free-form license in the copyright file that doesn't really conform to any stock license, except that someone considered it DFSG-approved.

    Update 2012 :随着debian/copyright文件

    Update 2012: This is beginning to change, as the debian/copyright file is now required to be machine-interpretable, so you can look forward to this in the future.

    这篇关于Deb软件包的许可证信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆