freebsd / pkg

Package management tool for FreeBSD. Help at #pkg on Libera Chat or pkg@FreeBSD.org
Other
748 stars 279 forks source link

pkg-query ignore package if license information missing #1037

Open ocochard opened 10 years ago

ocochard commented 10 years ago

I met a problem with pkg-query on 10.1-BETA1 with pkg 1.3.7.

Here is an example with my list of installed package:

[root@router]~# pkg info
bird-1.4.4                     Dynamic IP routing daemon (IPv4 version)
bird6-1.4.4                    Dynamic IP routing daemon (IPv6 version)
bsnmp-regex-0.6_1              bsnmpd module allowing creation of counters from log files
bsnmp-ucd-0.4.0                bsnmpd module that implements parts of UCD-SNMP-MIB
dhcprelya-4.8_1                Lightweight DHCP relay agent. Yandex edition
dlmalloc-2.8.6                 Small, fast malloc library by Doug Lea
easy-rsa-2.2.0.m               Small RSA key management package based on openssl
freevrrpd-1.1                  This a VRRP RFC2338 Compliant implementation under FreeBSD
indexinfo-0.2                  Utility to regenerate the GNU info page index
iperf-2.0.5                    Tool to measure maximum TCP and UDP bandwidth
ipmitool-1.8.14_1              CLI to manage IPMI systems
ipsec-tools-0.8.1_7            KAME racoon IKE daemon, ipsec-tools version
isc-dhcp43-server-4.3.1        The ISC Dynamic Host Configuration Protocol server
libevent2-2.0.21_2             API for executing callback functions on events or timeouts
libgcrypt-1.6.1_5              General purpose crypto library based on code used in GnuPG
libgpg-error-1.13_1            Common error values for all GnuPG components
lzo2-2.08                      Portable speedy, lossless data compression library
mcast-tools-20061214_1         IPv6 multicast routing daemons and tools
mpd5-5.7_1                     Multi-link PPP daemon based on netgraph(4)
openldap-client-2.4.39_2       Open source LDAP client implementation
openvpn-2.3.4                  Secure IP/Ethernet tunnel daemon
openvpn-auth-radius-2.1_2      RADIUS authentication plugin for OpenVPN
pimd-devel-2.1.8               Lightweight stand-alone PIM-SM v2 multicast routing daemon
pimdd-0.2.1.0_1                UO Dense Protocol-Independent Multicast (PIM-DM) daemon for IPv4
pkg-1.3.7                      Package manager
quagga-0.99.22.4_4             Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software
ssmtp-2.64_1                   Extremely simple MTA to get mail off the system to a mail hub
strongswan-5.2.0_1             Open Source IKEv2 IPsec-based VPN solution
sudo-1.8.10.p3_1               Allow others to run commands as root
tayga-0.9.2                    Userland stateless NAT64 daemon
tmux-1.9.a_2                   Terminal Multiplexer
ucarp-1.5.2_2                  Userlevel Common Address Redundancy Protocol

Now I want to pretty display all their licenses and website:

[root@router]~# pkg query -a 'Software: %n, License: %L, WWW: %w'
Software: bird, License: GPLv2, WWW: http://bird.network.cz/
Software: bird6, License: GPLv2, WWW: http://bird.network.cz/
Software: bsnmp-regex, License: BSD, WWW: http://thewalter.net/stef/software/bsnmp-regex/
Software: bsnmp-ucd, License: BSD2CLAUSE, WWW: http://bsnmp-ucd.googlecode.com/
Software: dhcprelya, License: BSD3CLAUSE, WWW: UNKNOWN
Software: easy-rsa, License: GPLv2, WWW: https://community.openvpn.net/openvpn/wiki/GettingEasyRsa
Software: indexinfo, License: BSD2CLAUSE, WWW: http://fossil.etoilebsd.net/indexinfo
Software: iperf, License: BSD2CLAUSE, WWW: http://iperf.sourceforge.net/
Software: ipmitool, License: BSD3CLAUSE, WWW: http://ipmitool.sourceforge.net/
Software: isc-dhcp43-server, License: ISCL, WWW: https://www.isc.org/products/DHCP/
Software: libevent2, License: BSD3CLAUSE, WWW: http://libevent.org/
Software: libgcrypt, License: LGPL21, WWW: http://www.gnupg.org/
Software: libgcrypt, License: GPLv2, WWW: http://www.gnupg.org/
Software: lzo2, License: GPLv2, WWW: http://www.oberhumer.com/opensource/lzo/
Software: openldap-client, License: OPENLDAP, WWW: http://www.OpenLDAP.org/
Software: openvpn, License: GPLv2, WWW: http://openvpn.net/index.php/open-source.html
Software: openvpn-auth-radius, License: GPLv2, WWW: http://www.nongnu.org/radiusplugin/index.html
Software: pimd-devel, License: BSD3CLAUSE, WWW: http://troglobit.com/pimd.html
Software: pkg, License: BSD2CLAUSE, WWW: http://wiki.freebsd.org/pkgng
Software: quagga, License: GPLv2, WWW: http://www.quagga.net/
Software: sudo, License: sudo, WWW: http://www.sudo.ws/
Software: tayga, License: GPLv2, WWW: http://www.litech.org/tayga/
Software: tmux, License: BSD2CLAUSE, WWW: http://www.sourceforge.net/projects/tmux/

Some packages are missing! Like: ipsec-tools, mpd5, mcast-tools, ucarp, strongswan, ssmtp, quagga, pimdd. And theses packages have something in common: They don't have LICENSE in their Makefile. We can reproduce this behavior with a simple usage:

[root@router]~# pkg query -a "%n"
bird
bird6
bsnmp-regex
bsnmp-ucd
dhcprelya
dlmalloc
easy-rsa
freevrrpd
indexinfo
iperf
ipmitool
ipsec-tools
isc-dhcp43-server
libevent2
libgcrypt
libgpg-error
lzo2
mcast-tools
mpd5
openldap-client
openvpn
openvpn-auth-radius
pimd-devel
pimdd
pkg
quagga
ssmtp
strongswan
sudo
tayga
tmux
ucarp
ThomasAdam commented 7 years ago

This should be fixed in git now.