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)
dpkg is a package manager for Debian based systems. To see contents, use option '--contents' or '-c' for dpkg command.
A DEB file is a software package used by the Debian Linux distribution and its variants, such as Ubuntu. DEB files are used primarily to install or update Unix applications. Each DEB file is a standard Unix archive that contains two . TAR archives: one for installer control information and another for installable data.
deb is used to signify a collection of files managed by the Debian packages management system. So, deb is an abbreviation for Debian package, as opposed to source package. You can install a downloaded Debian package using dpkg in a terminal: dpkg -i *.
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.
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:
"/usr/share/common-licenses/*
"
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.
^License: MPL-1.1 | GPL-2+ | Apache-2.0
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: 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With