pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools
Module Name: pkgsrc
Committed By: agc
Date: Wed Mar 11 21:54:31 UTC 2026
Modified Files:
pkgsrc/pkgtools: Makefile
Added Files:
pkgsrc/pkgtools/depgraph: DESCR Makefile PLIST
pkgsrc/pkgtools/depgraph/files: 1.expected 2.expected 3.expected
4.expected 5.expected 6.expected 7.expected Makefile README
depgraph.1 depgraph.sh test.sh
Log Message:
Add depgraph-20260309 to pkgsrc.
This package prints out dependency graphs for installed packages.
Individual packages can be selected, or all user-installed packages - see
pkg_info(1). The full version of the package can be printed, as well as its
licensing information, as well as all pre-requisite packages.
Metadata about the machine on which the report is running can also be displayed.
Output can be in standard format, or in JSON.
The aim of this package is to aid in producing SBOM information, as may be
required in certain legal jurisdictions soon.
The README is probably the most informative about this package, pasted here for
completeness:
This is depgraph, which prints a dependency graph of packages
installed in a system, and can be used for reporting on individual
packages, or on all user-installed -- see pkg_info(1) -- packages on a
system. This is intended to aid in SBOM reporting.
> ./depgraph.sh clang
clang
|--libxml2
|----xmlcatmgr
|--llvm
|----libxml2
|------xmlcatmgr
|----python313
|------libffi
|------libuuid
|------mpdecimal
|------readline
|------sqlite3
|----zstd
|------lz4
|--perl
|--python313
|----libffi
|----libuuid
|----mpdecimal
|----readline
|----sqlite3
>
It can also be used to print full name and version information about each package
> ./depgraph.sh -v clang
clang-19.1.7nb2
|--libxml2-2.14.6nb2
|----xmlcatmgr-2.2nb1
|--llvm-19.1.7nb1
|----libxml2-2.14.6nb2
|------xmlcatmgr-2.2nb1
|----python313-3.13.12
|------libffi-3.5.2
|------libuuid-2.40.2
|------mpdecimal-4.0.1
|------readline-8.3nb1
|------sqlite3-3.51.2
|----zstd-1.5.7
|------lz4-1.10.0
|--perl-5.42.0nb1
|--python313-3.13.12
|----libffi-3.5.2
|----libuuid-2.40.2
|----mpdecimal-4.0.1
|----readline-8.3nb1
|----sqlite3-3.51.2
>
It can also be used to print licensing information about each package
> ./depgraph.sh -l -v clang
clang-19.1.7nb2 (apache-2.0)
|--libxml2-2.14.6nb2 (modified-bsd)
|----xmlcatmgr-2.2nb1 (modified-bsd)
|--llvm-19.1.7nb1 (apache-2.0)
|----libxml2-2.14.6nb2 (modified-bsd)
|------xmlcatmgr-2.2nb1 (modified-bsd)
|----python313-3.13.12 (python-software-foundation)
|------libffi-3.5.2 (mit)
|------libuuid-2.40.2 (modified-bsd)
|------mpdecimal-4.0.1 (2-clause-bsd)
|------readline-8.3nb1 (gnu-gpl-v3)
|------sqlite3-3.51.2 (public-domain)
|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
|------lz4-1.10.0 (2-clause-bsd)
|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
|--python313-3.13.12 (python-software-foundation)
|----libffi-3.5.2 (mit)
|----libuuid-2.40.2 (modified-bsd)
|----mpdecimal-4.0.1 (2-clause-bsd)
|----readline-8.3nb1 (gnu-gpl-v3)
|----sqlite3-3.51.2 (public-domain)
>
It can also be used to print metadata about the machine
> ./depgraph.sh -l -v -m clang
# Report version: 20260309
# Machine metadata: NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
# Date run: Wed Mar 11 21:00:44 UTC 2026
# localbase: /usr/pkg
# uptime: 2:00PM up 2 days, 1:18, 5 users, load averages: 8.30, 7.70, 5.62
clang-19.1.7nb2 (apache-2.0)
|--libxml2-2.14.6nb2 (modified-bsd)
|----xmlcatmgr-2.2nb1 (modified-bsd)
|--llvm-19.1.7nb1 (apache-2.0)
|----libxml2-2.14.6nb2 (modified-bsd)
|------xmlcatmgr-2.2nb1 (modified-bsd)
|----python313-3.13.12 (python-software-foundation)
|------libffi-3.5.2 (mit)
|------libuuid-2.40.2 (modified-bsd)
|------mpdecimal-4.0.1 (2-clause-bsd)
|------readline-8.3nb1 (gnu-gpl-v3)
|------sqlite3-3.51.2 (public-domain)
|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
|------lz4-1.10.0 (2-clause-bsd)
|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
|--python313-3.13.12 (python-software-foundation)
|----libffi-3.5.2 (mit)
|----libuuid-2.40.2 (modified-bsd)
|----mpdecimal-4.0.1 (2-clause-bsd)
|----readline-8.3nb1 (gnu-gpl-v3)
|----sqlite3-3.51.2 (public-domain)
>
And finally, all output can be formatted in JSON:
> ./depgraph.sh -l -v -m -j clang
{"Report version":"20260309","metadata":"NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm","date":"Wed Mar 11 21:01:32 UTC 2026","localbase":"/usr/pkg","uptime":" 2:01PM up 2 days, 1:19, 5
users, load averages: 8.25, 7.77,
5.77"}{"package":"clang-19.1.7nb2","license":"apache-2.0","prereq0":{"package":"libxml2-2.14.6nb2","license":"modified-bsd","prereq0":{"package":"xmlcatmgr-2.2nb1","license":"modified-bsd"}},"prereq1":{"package":"llvm-19.1.7nb1","license":"apache-2.0","prereq0":{"package":"libxml2-2.14.6nb2","license":"modified-bsd","prereq0":{"package":"xmlcatmgr-2.2nb1","license":"modified-bsd"}},"prereq1":{"package":"python313-3.13.12","license":"python-software-foundation","prereq0":{"package":"libffi-3.5.2","license":"mit"},"prereq1":{"package":"libuuid-2.40.2","license":"modified-bsd"},"prereq2":
{"package":"mpdecimal-4.0.1","license":"2-clause-bsd"},"prereq3":{"package":"readline-8.3nb1","license":"gnu-gpl-v3"},"prereq4":{"package":"sqlite3-3.51.2","license":"public-domain"}},"prereq2":{"package":"zstd-1.5.7","license":"modified-bsd
OR gnu-gpl-v2","prereq0":{"package":"lz4-1.10.0","license":"2-clause-bsd"}}},"prereq2":{"package":"perl-5.42.0nb1","license":"gnu-gpl-v2 OR
artistic"},"prereq3":{"package":"python313-3.13.12","license":"python-software-foundation","prereq0":{"package":"libffi-3.5.2","license":"mit"},"prereq1":{"package":"libuuid-2.40.2","license":"modified-bsd"},"prereq2":{"package":"mpdecimal-4.0.1","license":"2-clause-bsd"},"prereq3":{"package":"readline-8.3nb1","license":"gnu-gpl-v3"},"prereq4":{"package":"sqlite3-3.51.2","license":"public-domain"}}}>
or, seen through the eyes of a JSON formatter:
[2026/03/11 Wed 14:02:20] agc@agc-vm-20250222 ~/local/sbom-20260309 [5261] > ./depgraph.sh -l -v -m -j clang | jq .
{
"Report version": "20260309",
"metadata": "NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm",
"date": "Wed Mar 11 21:02:31 UTC 2026",
"localbase": "/usr/pkg",
"uptime": " 2:02PM up 2 days, 1:20, 5 users, load averages: 8.14, 7.83, 5.92"
}
{
"package": "clang-19.1.7nb2",
"license": "apache-2.0",
"prereq0": {
"package": "libxml2-2.14.6nb2",
"license": "modified-bsd",
"prereq0": {
"package": "xmlcatmgr-2.2nb1",
"license": "modified-bsd"
}
},
"prereq1": {
"package": "llvm-19.1.7nb1",
"license": "apache-2.0",
"prereq0": {
"package": "libxml2-2.14.6nb2",
"license": "modified-bsd",
"prereq0": {
"package": "xmlcatmgr-2.2nb1",
"license": "modified-bsd"
}
},
"prereq1": {
"package": "python313-3.13.12",
"license": "python-software-foundation",
"prereq0": {
"package": "libffi-3.5.2",
"license": "mit"
},
"prereq1": {
"package": "libuuid-2.40.2",
"license": "modified-bsd"
},
"prereq2": {
"package": "mpdecimal-4.0.1",
"license": "2-clause-bsd"
},
"prereq3": {
"package": "readline-8.3nb1",
"license": "gnu-gpl-v3"
},
"prereq4": {
"package": "sqlite3-3.51.2",
"license": "public-domain"
}
},
"prereq2": {
"package": "zstd-1.5.7",
"license": "modified-bsd OR gnu-gpl-v2",
"prereq0": {
"package": "lz4-1.10.0",
"license": "2-clause-bsd"
}
}
},
"prereq2": {
"package": "perl-5.42.0nb1",
"license": "gnu-gpl-v2 OR artistic"
},
"prereq3": {
"package": "python313-3.13.12",
"license": "python-software-foundation",
"prereq0": {
"package": "libffi-3.5.2",
"license": "mit"
},
"prereq1": {
"package": "libuuid-2.40.2",
"license": "modified-bsd"
},
"prereq2": {
"package": "mpdecimal-4.0.1",
"license": "2-clause-bsd"
},
"prereq3": {
"package": "readline-8.3nb1",
"license": "gnu-gpl-v3"
},
"prereq4": {
"package": "sqlite3-3.51.2",
"license": "public-domain"
}
}
}
>
Alistair Crooks
agc%netbsd.org@localhost
Wed Mar 11 14:06:16 PDT 2026
To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 pkgsrc/pkgtools/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/depgraph/DESCR \
pkgsrc/pkgtools/depgraph/Makefile pkgsrc/pkgtools/depgraph/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/depgraph/files/1.expected \
pkgsrc/pkgtools/depgraph/files/2.expected \
pkgsrc/pkgtools/depgraph/files/3.expected \
pkgsrc/pkgtools/depgraph/files/4.expected \
pkgsrc/pkgtools/depgraph/files/5.expected \
pkgsrc/pkgtools/depgraph/files/6.expected \
pkgsrc/pkgtools/depgraph/files/7.expected \
pkgsrc/pkgtools/depgraph/files/Makefile \
pkgsrc/pkgtools/depgraph/files/README \
pkgsrc/pkgtools/depgraph/files/depgraph.1 \
pkgsrc/pkgtools/depgraph/files/depgraph.sh \
pkgsrc/pkgtools/depgraph/files/test.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/Makefile
diff -u pkgsrc/pkgtools/Makefile:1.128 pkgsrc/pkgtools/Makefile:1.129
--- pkgsrc/pkgtools/Makefile:1.128 Fri Jan 9 14:40:01 2026
+++ pkgsrc/pkgtools/Makefile Wed Mar 11 21:54:30 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.128 2026/01/09 14:40:01 wiz Exp $
+# $NetBSD: Makefile,v 1.129 2026/03/11 21:54:30 agc Exp $
#
COMMENT= Tools for use in the packages collection
@@ -13,6 +13,7 @@ SUBDIR+= check-portability
SUBDIR+= compat_headers
SUBDIR+= createbuildlink
SUBDIR+= cwrappers
+SUBDIR+= depgraph
SUBDIR+= dfdisk
SUBDIR+= digest
SUBDIR+= distbb
Added files:
Index: pkgsrc/pkgtools/depgraph/DESCR
diff -u /dev/null pkgsrc/pkgtools/depgraph/DESCR:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/DESCR Wed Mar 11 21:54:30 2026
@@ -0,0 +1,22 @@
+This is depgraph, which prints a dependency graph of packages
+installed in a system, and can be used for reporting on individual
+packages, or on all user-installed -- see pkg_info(1) -- packages on a
+system. This is intended to aid in SBOM reporting.
+
+% depgraph libxml2
+libxml2
+|--xmlcatmgr
+% depgraph -v libxml2
+libxml2-2.14.6nb2
+|--xmlcatmgr-2.2nb1
+% depgraph -v -l libxml2
+libxml2-2.14.6nb2 (modified-bsd)
+|--xmlcatmgr-2.2nb1 (modified-bsd)
+% depgraph -j libxml2 | jq .
+{
+ "package": "libxml2",
+ "prereq0": {
+ "package": "xmlcatmgr"
+ }
+}
+%
Index: pkgsrc/pkgtools/depgraph/Makefile
diff -u /dev/null pkgsrc/pkgtools/depgraph/Makefile:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/Makefile Wed Mar 11 21:54:30 2026
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2026/03/11 21:54:30 agc Exp $
+
+DISTNAME= depgraph-${VERSION}
+CATEGORIES= pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= agc%NetBSD.org@localhost
+HOMEPAGE= https://www.NetBSD.org/
+COMMENT= Print dependency graph for packages
+LICENSE= modified-bsd
+
+USE_BSD_MAKEFILE= yes
+INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
+MAKEFLAGS+= SCRIPTSDIR=${PREFIX}/bin
+INSTALL_MAKE_FLAGS+= PREFIX=${DESTDIR}${PREFIX}
+
+.include "../../mk/bsd.prefs.mk"
+
+VERSION!= ${AWK} -F= '/^DEPGRAPH_VERSION=/ {print $$2}' ${FILESDIR}/depgraph.sh
+
+do-extract:
+ ${CP} -R ${FILESDIR} ${WRKSRC}
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/pkgtools/depgraph/PLIST
diff -u /dev/null pkgsrc/pkgtools/depgraph/PLIST:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/PLIST Wed Mar 11 21:54:30 2026
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2026/03/11 21:54:30 agc Exp $
+bin/depgraph
+man/man1/depgraph.1
Index: pkgsrc/pkgtools/depgraph/files/1.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/1.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/1.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,21 @@
+clang
+|--libxml2
+|----xmlcatmgr
+|--llvm
+|----libxml2
+|------xmlcatmgr
+|----python313
+|------libffi
+|------libuuid
+|------mpdecimal
+|------readline
+|------sqlite3
+|----zstd
+|------lz4
+|--perl
+|--python313
+|----libffi
+|----libuuid
+|----mpdecimal
+|----readline
+|----sqlite3
Index: pkgsrc/pkgtools/depgraph/files/2.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/2.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/2.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,21 @@
+clang-19.1.7nb2
+|--libxml2-2.14.6nb2
+|----xmlcatmgr-2.2nb1
+|--llvm-19.1.7nb1
+|----libxml2-2.14.6nb2
+|------xmlcatmgr-2.2nb1
+|----python313-3.13.12
+|------libffi-3.5.2
+|------libuuid-2.40.2
+|------mpdecimal-4.0.1
+|------readline-8.3nb1
+|------sqlite3-3.51.2
+|----zstd-1.5.7
+|------lz4-1.10.0
+|--perl-5.42.0nb1
+|--python313-3.13.12
+|----libffi-3.5.2
+|----libuuid-2.40.2
+|----mpdecimal-4.0.1
+|----readline-8.3nb1
+|----sqlite3-3.51.2
Index: pkgsrc/pkgtools/depgraph/files/3.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/3.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/3.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,108 @@
+libnbcompat
+cwrappers
+mktools
+bootstrap-mk-files
+bmake
+|--bootstrap-mk-files
+pkg_install
+checkperms
+boost-libs
+|--icu
+|--zstd
+|----lz4
+bvi
+clang
+|--libxml2
+|----xmlcatmgr
+|--llvm
+|----libxml2
+|------xmlcatmgr
+|----python313
+|------libffi
+|------libuuid
+|------mpdecimal
+|------readline
+|------sqlite3
+|----zstd
+|------lz4
+|--perl
+|--python313
+|----libffi
+|----libuuid
+|----mpdecimal
+|----readline
+|----sqlite3
+git-base
+|--curl
+|----libidn2
+|------libunistring
+|----nghttp2
+|------libxml2
+|--------xmlcatmgr
+|--pcre2
+google-benchmark
+googletest
+idiff
+jq
+|--oniguruma
+kakoune
+|--ncurses
+liboqs
+lynx
+|--gettext-tools
+|----gettext-lib
+mksandbox
+mtr
+mozilla-rootcerts-openssl
+oqs-provider
+|--liboqs
+pkglint
+py313-hg-evolve
+|--py313-mercurial
+|----python313
+|------libffi
+|------libuuid
+|------mpdecimal
+|------readline
+|------sqlite3
+|--python313
+|----libffi
+|----libuuid
+|----mpdecimal
+|----readline
+|----sqlite3
+rust
+|--curl
+|----libidn2
+|------libunistring
+|----nghttp2
+|------libxml2
+|--------xmlcatmgr
+|--libunwind
+|--llvm
+|----libxml2
+|------xmlcatmgr
+|----python313
+|------libffi
+|------libuuid
+|------mpdecimal
+|------readline
+|------sqlite3
+|----zstd
+|------lz4
+screen
+scrypt
+sudo
+vile
+|--perl
+yt-dlp
+|--python313
+|----libffi
+|----libuuid
+|----mpdecimal
+|----readline
+|----sqlite3
+port2pkg
+|--perl
+|--pkglint
+neatvi
Index: pkgsrc/pkgtools/depgraph/files/4.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/4.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/4.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,108 @@
+libnbcompat-20251029
+cwrappers-20220403
+mktools-20250213
+bootstrap-mk-files-20250601
+bmake-20240909
+|--bootstrap-mk-files-20250601
+pkg_install-20250417
+checkperms-1.12
+boost-libs-1.90.0nb3
+|--icu-78.2
+|--zstd-1.5.7
+|----lz4-1.10.0
+bvi-1.5.0
+clang-19.1.7nb2
+|--libxml2-2.14.6nb2
+|----xmlcatmgr-2.2nb1
+|--llvm-19.1.7nb1
+|----libxml2-2.14.6nb2
+|------xmlcatmgr-2.2nb1
+|----python313-3.13.12
+|------libffi-3.5.2
+|------libuuid-2.40.2
+|------mpdecimal-4.0.1
+|------readline-8.3nb1
+|------sqlite3-3.51.2
+|----zstd-1.5.7
+|------lz4-1.10.0
+|--perl-5.42.0nb1
+|--python313-3.13.12
+|----libffi-3.5.2
+|----libuuid-2.40.2
+|----mpdecimal-4.0.1
+|----readline-8.3nb1
+|----sqlite3-3.51.2
+git-base-2.53.0nb1
+|--curl-8.18.0nb2
+|----libidn2-2.3.7
+|------libunistring-1.2
+|----nghttp2-1.68.0nb1
+|------libxml2-2.14.6nb2
+|--------xmlcatmgr-2.2nb1
+|--pcre2-10.47
+google-benchmark-1.9.5
+googletest-1.17.0
+idiff-1.0
+jq-1.8.1
+|--oniguruma-6.9.10
+kakoune-2025.06.03
+|--ncurses-6.6
+liboqs-0.14.0
+lynx-2.9.2nb7
+|--gettext-tools-0.22.5nb1
+|----gettext-lib-0.22.5
+mksandbox-1.12
+mtr-0.95nb13
+mozilla-rootcerts-openssl-2.20
+oqs-provider-0.10.0nb1
+|--liboqs-0.14.0
+pkglint-23.20.0
+py313-hg-evolve-11.1.10
+|--py313-mercurial-7.1.2
+|----python313-3.13.12
+|------libffi-3.5.2
+|------libuuid-2.40.2
+|------mpdecimal-4.0.1
+|------readline-8.3nb1
+|------sqlite3-3.51.2
+|--python313-3.13.12
+|----libffi-3.5.2
+|----libuuid-2.40.2
+|----mpdecimal-4.0.1
+|----readline-8.3nb1
+|----sqlite3-3.51.2
+rust-1.91.1nb1
+|--curl-8.18.0nb2
+|----libidn2-2.3.7
+|------libunistring-1.2
+|----nghttp2-1.68.0nb1
+|------libxml2-2.14.6nb2
+|--------xmlcatmgr-2.2nb1
+|--libunwind-19.1.7nb1
+|--llvm-19.1.7nb1
+|----libxml2-2.14.6nb2
+|------xmlcatmgr-2.2nb1
+|----python313-3.13.12
+|------libffi-3.5.2
+|------libuuid-2.40.2
+|------mpdecimal-4.0.1
+|------readline-8.3nb1
+|------sqlite3-3.51.2
+|----zstd-1.5.7
+|------lz4-1.10.0
+screen-5.0.0nb4
+scrypt-1.3.3
+sudo-1.9.17p1
+vile-9.8zanb2
+|--perl-5.42.0nb1
+yt-dlp-2026.2.4
+|--python313-3.13.12
+|----libffi-3.5.2
+|----libuuid-2.40.2
+|----mpdecimal-4.0.1
+|----readline-8.3nb1
+|----sqlite3-3.51.2
+port2pkg-1.15nb9
+|--perl-5.42.0nb1
+|--pkglint-23.20.0
+neatvi-09
Index: pkgsrc/pkgtools/depgraph/files/5.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/5.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/5.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,108 @@
+libnbcompat-20251029 (2-clause-bsd AND modified-bsd)
+cwrappers-20220403 (modified-bsd)
+mktools-20250213 (modified-bsd)
+bootstrap-mk-files-20250601 (original-bsd)
+bmake-20240909 (modified-bsd)
+|--bootstrap-mk-files-20250601 (original-bsd)
+pkg_install-20250417 (modified-bsd)
+checkperms-1.12 (modified-bsd)
+boost-libs-1.90.0nb3 (boost-license)
+|--icu-78.2 (unicode-v3 AND modified-bsd AND mit)
+|--zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
+|----lz4-1.10.0 (2-clause-bsd)
+bvi-1.5.0 ()
+clang-19.1.7nb2 (apache-2.0)
+|--libxml2-2.14.6nb2 (modified-bsd)
+|----xmlcatmgr-2.2nb1 (modified-bsd)
+|--llvm-19.1.7nb1 (apache-2.0)
+|----libxml2-2.14.6nb2 (modified-bsd)
+|------xmlcatmgr-2.2nb1 (modified-bsd)
+|----python313-3.13.12 (python-software-foundation)
+|------libffi-3.5.2 (mit)
+|------libuuid-2.40.2 (modified-bsd)
+|------mpdecimal-4.0.1 (2-clause-bsd)
+|------readline-8.3nb1 (gnu-gpl-v3)
+|------sqlite3-3.51.2 (public-domain)
+|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
+|------lz4-1.10.0 (2-clause-bsd)
+|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
+|--python313-3.13.12 (python-software-foundation)
+|----libffi-3.5.2 (mit)
+|----libuuid-2.40.2 (modified-bsd)
+|----mpdecimal-4.0.1 (2-clause-bsd)
+|----readline-8.3nb1 (gnu-gpl-v3)
+|----sqlite3-3.51.2 (public-domain)
+git-base-2.53.0nb1 (gnu-gpl-v2)
+|--curl-8.18.0nb2 (mit)
+|----libidn2-2.3.7 (gnu-gpl-v2)
+|------libunistring-1.2 (gnu-lgpl-v3 OR gnu-gpl-v2)
+|----nghttp2-1.68.0nb1 (mit)
+|------libxml2-2.14.6nb2 (modified-bsd)
+|--------xmlcatmgr-2.2nb1 (modified-bsd)
+|--pcre2-10.47 (modified-bsd)
+google-benchmark-1.9.5 (apache-2.0)
+googletest-1.17.0 (modified-bsd)
+idiff-1.0 ()
+jq-1.8.1 (mit)
+|--oniguruma-6.9.10 (2-clause-bsd)
+kakoune-2025.06.03 (unlicense)
+|--ncurses-6.6 (mit)
+liboqs-0.14.0 (mit)
+lynx-2.9.2nb7 (gnu-gpl-v2)
+|--gettext-tools-0.22.5nb1 (gnu-gpl-v3)
+|----gettext-lib-0.22.5 (gnu-gpl-v3)
+mksandbox-1.12 (2-clause-bsd)
+mtr-0.95nb13 (gnu-gpl-v2)
+mozilla-rootcerts-openssl-2.20 (modified-bsd)
+oqs-provider-0.10.0nb1 (mit)
+|--liboqs-0.14.0 (mit)
+pkglint-23.20.0 (2-clause-bsd)
+py313-hg-evolve-11.1.10 (gnu-gpl-v2)
+|--py313-mercurial-7.1.2 (gnu-gpl-v2 OR gnu-gpl-v3)
+|----python313-3.13.12 (python-software-foundation)
+|------libffi-3.5.2 (mit)
+|------libuuid-2.40.2 (modified-bsd)
+|------mpdecimal-4.0.1 (2-clause-bsd)
+|------readline-8.3nb1 (gnu-gpl-v3)
+|------sqlite3-3.51.2 (public-domain)
+|--python313-3.13.12 (python-software-foundation)
+|----libffi-3.5.2 (mit)
+|----libuuid-2.40.2 (modified-bsd)
+|----mpdecimal-4.0.1 (2-clause-bsd)
+|----readline-8.3nb1 (gnu-gpl-v3)
+|----sqlite3-3.51.2 (public-domain)
+rust-1.91.1nb1 (mit OR apache-2.0)
+|--curl-8.18.0nb2 (mit)
+|----libidn2-2.3.7 (gnu-gpl-v2)
+|------libunistring-1.2 (gnu-lgpl-v3 OR gnu-gpl-v2)
+|----nghttp2-1.68.0nb1 (mit)
+|------libxml2-2.14.6nb2 (modified-bsd)
+|--------xmlcatmgr-2.2nb1 (modified-bsd)
+|--libunwind-19.1.7nb1 (apache-2.0)
+|--llvm-19.1.7nb1 (apache-2.0)
+|----libxml2-2.14.6nb2 (modified-bsd)
+|------xmlcatmgr-2.2nb1 (modified-bsd)
+|----python313-3.13.12 (python-software-foundation)
+|------libffi-3.5.2 (mit)
+|------libuuid-2.40.2 (modified-bsd)
+|------mpdecimal-4.0.1 (2-clause-bsd)
+|------readline-8.3nb1 (gnu-gpl-v3)
+|------sqlite3-3.51.2 (public-domain)
+|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
+|------lz4-1.10.0 (2-clause-bsd)
+screen-5.0.0nb4 (gnu-gpl-v3)
+scrypt-1.3.3 (2-clause-bsd)
+sudo-1.9.17p1 (isc AND modified-bsd)
+vile-9.8zanb2 (gnu-gpl-v2)
+|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
+yt-dlp-2026.2.4 (unlicense)
+|--python313-3.13.12 (python-software-foundation)
+|----libffi-3.5.2 (mit)
+|----libuuid-2.40.2 (modified-bsd)
+|----mpdecimal-4.0.1 (2-clause-bsd)
+|----readline-8.3nb1 (gnu-gpl-v3)
+|----sqlite3-3.51.2 (public-domain)
+port2pkg-1.15nb9 ()
+|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
+|--pkglint-23.20.0 (2-clause-bsd)
+neatvi-09 (isc)
Index: pkgsrc/pkgtools/depgraph/files/6.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/6.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/6.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,108 @@
+libnbcompat (2-clause-bsd AND modified-bsd)
+cwrappers (modified-bsd)
+mktools (modified-bsd)
+bootstrap-mk-files (original-bsd)
+bmake (modified-bsd)
+|--bootstrap-mk-files (original-bsd)
+pkg_install (modified-bsd)
+checkperms (modified-bsd)
+boost-libs (boost-license)
+|--icu (unicode-v3 AND modified-bsd AND mit)
+|--zstd (modified-bsd OR gnu-gpl-v2)
+|----lz4 (2-clause-bsd)
+bvi ()
+clang (apache-2.0)
+|--libxml2 (modified-bsd)
+|----xmlcatmgr (modified-bsd)
+|--llvm (apache-2.0)
+|----libxml2 (modified-bsd)
+|------xmlcatmgr (modified-bsd)
+|----python313 (python-software-foundation)
+|------libffi (mit)
+|------libuuid (modified-bsd)
+|------mpdecimal (2-clause-bsd)
+|------readline (gnu-gpl-v3)
+|------sqlite3 (public-domain)
+|----zstd (modified-bsd OR gnu-gpl-v2)
+|------lz4 (2-clause-bsd)
+|--perl (gnu-gpl-v2 OR artistic)
+|--python313 (python-software-foundation)
+|----libffi (mit)
+|----libuuid (modified-bsd)
+|----mpdecimal (2-clause-bsd)
+|----readline (gnu-gpl-v3)
+|----sqlite3 (public-domain)
+git-base (gnu-gpl-v2)
+|--curl (mit)
+|----libidn2 (gnu-gpl-v2)
+|------libunistring (gnu-lgpl-v3 OR gnu-gpl-v2)
+|----nghttp2 (mit)
+|------libxml2 (modified-bsd)
+|--------xmlcatmgr (modified-bsd)
+|--pcre2 (modified-bsd)
+google-benchmark (apache-2.0)
+googletest (modified-bsd)
+idiff ()
+jq (mit)
+|--oniguruma (2-clause-bsd)
+kakoune (unlicense)
+|--ncurses (mit)
+liboqs (mit)
+lynx (gnu-gpl-v2)
+|--gettext-tools (gnu-gpl-v3)
+|----gettext-lib (gnu-gpl-v3)
+mksandbox (2-clause-bsd)
+mtr (gnu-gpl-v2)
+mozilla-rootcerts-openssl (modified-bsd)
+oqs-provider (mit)
+|--liboqs (mit)
+pkglint (2-clause-bsd)
+py313-hg-evolve (gnu-gpl-v2)
+|--py313-mercurial (gnu-gpl-v2 OR gnu-gpl-v3)
+|----python313 (python-software-foundation)
+|------libffi (mit)
+|------libuuid (modified-bsd)
+|------mpdecimal (2-clause-bsd)
+|------readline (gnu-gpl-v3)
+|------sqlite3 (public-domain)
+|--python313 (python-software-foundation)
+|----libffi (mit)
+|----libuuid (modified-bsd)
+|----mpdecimal (2-clause-bsd)
+|----readline (gnu-gpl-v3)
+|----sqlite3 (public-domain)
+rust (mit OR apache-2.0)
+|--curl (mit)
+|----libidn2 (gnu-gpl-v2)
+|------libunistring (gnu-lgpl-v3 OR gnu-gpl-v2)
+|----nghttp2 (mit)
+|------libxml2 (modified-bsd)
+|--------xmlcatmgr (modified-bsd)
+|--libunwind (apache-2.0)
+|--llvm (apache-2.0)
+|----libxml2 (modified-bsd)
+|------xmlcatmgr (modified-bsd)
+|----python313 (python-software-foundation)
+|------libffi (mit)
+|------libuuid (modified-bsd)
+|------mpdecimal (2-clause-bsd)
+|------readline (gnu-gpl-v3)
+|------sqlite3 (public-domain)
+|----zstd (modified-bsd OR gnu-gpl-v2)
+|------lz4 (2-clause-bsd)
+screen (gnu-gpl-v3)
+scrypt (2-clause-bsd)
+sudo (isc AND modified-bsd)
+vile (gnu-gpl-v2)
+|--perl (gnu-gpl-v2 OR artistic)
+yt-dlp (unlicense)
+|--python313 (python-software-foundation)
+|----libffi (mit)
+|----libuuid (modified-bsd)
+|----mpdecimal (2-clause-bsd)
+|----readline (gnu-gpl-v3)
+|----sqlite3 (public-domain)
+port2pkg ()
+|--perl (gnu-gpl-v2 OR artistic)
+|--pkglint (2-clause-bsd)
+neatvi (isc)
Index: pkgsrc/pkgtools/depgraph/files/7.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/7.expected:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/7.expected Wed Mar 11 21:54:30 2026
@@ -0,0 +1,432 @@
+{
+ "package": "libnbcompat-20251029",
+ "license": "2-clause-bsd AND modified-bsd"
+}
+{
+ "package": "cwrappers-20220403",
+ "license": "modified-bsd"
+}
+{
+ "package": "mktools-20250213",
+ "license": "modified-bsd"
+}
+{
+ "package": "bootstrap-mk-files-20250601",
+ "license": "original-bsd"
+}
+{
+ "package": "bmake-20240909",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "bootstrap-mk-files-20250601",
+ "license": "original-bsd"
+ }
+}
+{
+ "package": "pkg_install-20250417",
+ "license": "modified-bsd"
+}
+{
+ "package": "checkperms-1.12",
+ "license": "modified-bsd"
+}
+{
+ "package": "boost-libs-1.90.0nb3",
+ "license": "boost-license",
+ "prereq0": {
+ "package": "icu-78.2",
+ "license": "unicode-v3 AND modified-bsd AND mit"
+ },
+ "prereq1": {
+ "package": "zstd-1.5.7",
+ "license": "modified-bsd OR gnu-gpl-v2",
+ "prereq0": {
+ "package": "lz4-1.10.0",
+ "license": "2-clause-bsd"
+ }
+ }
+}
+{
+ "package": "bvi-1.5.0",
+ "license": ""
+}
+{
+ "package": "clang-19.1.7nb2",
+ "license": "apache-2.0",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ },
+ "prereq1": {
+ "package": "llvm-19.1.7nb1",
+ "license": "apache-2.0",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ },
+ "prereq1": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ },
+ "prereq2": {
+ "package": "zstd-1.5.7",
+ "license": "modified-bsd OR gnu-gpl-v2",
+ "prereq0": {
+ "package": "lz4-1.10.0",
+ "license": "2-clause-bsd"
+ }
+ }
+ },
+ "prereq2": {
+ "package": "perl-5.42.0nb1",
+ "license": "gnu-gpl-v2 OR artistic"
+ },
+ "prereq3": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ }
+}
+{
+ "package": "git-base-2.53.0nb1",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "curl-8.18.0nb2",
+ "license": "mit",
+ "prereq0": {
+ "package": "libidn2-2.3.7",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "libunistring-1.2",
+ "license": "gnu-lgpl-v3 OR gnu-gpl-v2"
+ }
+ },
+ "prereq1": {
+ "package": "nghttp2-1.68.0nb1",
+ "license": "mit",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ }
+ }
+ },
+ "prereq1": {
+ "package": "pcre2-10.47",
+ "license": "modified-bsd"
+ }
+}
+{
+ "package": "google-benchmark-1.9.5",
+ "license": "apache-2.0"
+}
+{
+ "package": "googletest-1.17.0",
+ "license": "modified-bsd"
+}
+{
+ "package": "idiff-1.0",
+ "license": ""
+}
+{
+ "package": "jq-1.8.1",
+ "license": "mit",
+ "prereq0": {
+ "package": "oniguruma-6.9.10",
+ "license": "2-clause-bsd"
+ }
+}
+{
+ "package": "kakoune-2025.06.03",
+ "license": "unlicense",
+ "prereq0": {
+ "package": "ncurses-6.6",
+ "license": "mit"
+ }
+}
+{
+ "package": "liboqs-0.14.0",
+ "license": "mit"
+}
+{
+ "package": "lynx-2.9.2nb7",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "gettext-tools-0.22.5nb1",
+ "license": "gnu-gpl-v3",
+ "prereq0": {
+ "package": "gettext-lib-0.22.5",
+ "license": "gnu-gpl-v3"
+ }
+ }
+}
+{
+ "package": "mksandbox-1.12",
+ "license": "2-clause-bsd"
+}
+{
+ "package": "mtr-0.95nb13",
+ "license": "gnu-gpl-v2"
+}
+{
+ "package": "mozilla-rootcerts-openssl-2.20",
+ "license": "modified-bsd"
+}
+{
+ "package": "oqs-provider-0.10.0nb1",
+ "license": "mit",
+ "prereq0": {
+ "package": "liboqs-0.14.0",
+ "license": "mit"
+ }
+}
+{
+ "package": "pkglint-23.20.0",
+ "license": "2-clause-bsd"
+}
+{
+ "package": "py313-hg-evolve-11.1.10",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "py313-mercurial-7.1.2",
+ "license": "gnu-gpl-v2 OR gnu-gpl-v3",
+ "prereq0": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ }
+ },
+ "prereq1": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ }
+}
+{
+ "package": "rust-1.91.1nb1",
+ "license": "mit OR apache-2.0",
+ "prereq0": {
+ "package": "curl-8.18.0nb2",
+ "license": "mit",
+ "prereq0": {
+ "package": "libidn2-2.3.7",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "libunistring-1.2",
+ "license": "gnu-lgpl-v3 OR gnu-gpl-v2"
+ }
+ },
+ "prereq1": {
+ "package": "nghttp2-1.68.0nb1",
+ "license": "mit",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ }
+ }
+ },
+ "prereq1": {
+ "package": "libunwind-19.1.7nb1",
+ "license": "apache-2.0"
+ },
+ "prereq2": {
+ "package": "llvm-19.1.7nb1",
+ "license": "apache-2.0",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ },
+ "prereq1": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ },
+ "prereq2": {
+ "package": "zstd-1.5.7",
+ "license": "modified-bsd OR gnu-gpl-v2",
+ "prereq0": {
+ "package": "lz4-1.10.0",
+ "license": "2-clause-bsd"
+ }
+ }
+ }
+}
+{
+ "package": "screen-5.0.0nb4",
+ "license": "gnu-gpl-v3"
+}
+{
+ "package": "scrypt-1.3.3",
+ "license": "2-clause-bsd"
+}
+{
+ "package": "sudo-1.9.17p1",
+ "license": "isc AND modified-bsd"
+}
+{
+ "package": "vile-9.8zanb2",
+ "license": "gnu-gpl-v2",
+ "prereq0": {
+ "package": "perl-5.42.0nb1",
+ "license": "gnu-gpl-v2 OR artistic"
+ }
+}
+{
+ "package": "yt-dlp-2026.2.4",
+ "license": "unlicense",
+ "prereq0": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ }
+}
+{
+ "package": "port2pkg-1.15nb9",
+ "license": "",
+ "prereq0": {
+ "package": "perl-5.42.0nb1",
+ "license": "gnu-gpl-v2 OR artistic"
+ },
+ "prereq1": {
+ "package": "pkglint-23.20.0",
+ "license": "2-clause-bsd"
+ }
+}
+{
+ "package": "neatvi-09",
+ "license": "isc"
+}
Index: pkgsrc/pkgtools/depgraph/files/Makefile
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/Makefile:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/Makefile Wed Mar 11 21:54:30 2026
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2026/03/11 21:54:30 agc Exp $
+
+SCRIPTS= depgraph
+SCRIPTSDIR= @PREFIX@/bin
+MAN= depgraph.1
+CLEANFILES+= ${SCRIPTS}
+
+.include <bsd.prog.mk>
Index: pkgsrc/pkgtools/depgraph/files/README
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/README:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/README Wed Mar 11 21:54:30 2026
@@ -0,0 +1,217 @@
+This is depgraph, which prints a dependency graph of packages
+installed in a system, and can be used for reporting on individual
+packages, or on all user-installed -- see pkg_info(1) -- packages on a
+system. This is intended to aid in SBOM reporting.
+
+> ./depgraph.sh clang
+clang
+|--libxml2
+|----xmlcatmgr
+|--llvm
+|----libxml2
+|------xmlcatmgr
+|----python313
+|------libffi
+|------libuuid
+|------mpdecimal
+|------readline
+|------sqlite3
+|----zstd
+|------lz4
+|--perl
+|--python313
+|----libffi
+|----libuuid
+|----mpdecimal
+|----readline
+|----sqlite3
+>
+
+It can also be used to print full name and version information about each package
+
+> ./depgraph.sh -v clang
+clang-19.1.7nb2
+|--libxml2-2.14.6nb2
+|----xmlcatmgr-2.2nb1
+|--llvm-19.1.7nb1
+|----libxml2-2.14.6nb2
+|------xmlcatmgr-2.2nb1
+|----python313-3.13.12
+|------libffi-3.5.2
+|------libuuid-2.40.2
+|------mpdecimal-4.0.1
+|------readline-8.3nb1
+|------sqlite3-3.51.2
+|----zstd-1.5.7
+|------lz4-1.10.0
+|--perl-5.42.0nb1
+|--python313-3.13.12
+|----libffi-3.5.2
+|----libuuid-2.40.2
+|----mpdecimal-4.0.1
+|----readline-8.3nb1
+|----sqlite3-3.51.2
+>
+
+It can also be used to print licensing information about each package
+
+> ./depgraph.sh -l -v clang
+clang-19.1.7nb2 (apache-2.0)
+|--libxml2-2.14.6nb2 (modified-bsd)
+|----xmlcatmgr-2.2nb1 (modified-bsd)
+|--llvm-19.1.7nb1 (apache-2.0)
+|----libxml2-2.14.6nb2 (modified-bsd)
+|------xmlcatmgr-2.2nb1 (modified-bsd)
+|----python313-3.13.12 (python-software-foundation)
+|------libffi-3.5.2 (mit)
+|------libuuid-2.40.2 (modified-bsd)
+|------mpdecimal-4.0.1 (2-clause-bsd)
+|------readline-8.3nb1 (gnu-gpl-v3)
+|------sqlite3-3.51.2 (public-domain)
+|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
+|------lz4-1.10.0 (2-clause-bsd)
+|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
+|--python313-3.13.12 (python-software-foundation)
+|----libffi-3.5.2 (mit)
+|----libuuid-2.40.2 (modified-bsd)
+|----mpdecimal-4.0.1 (2-clause-bsd)
+|----readline-8.3nb1 (gnu-gpl-v3)
+|----sqlite3-3.51.2 (public-domain)
+>
+
+It can also be used to print metadata about the machine
+
+> ./depgraph.sh -l -v -m clang
+# Report version: 20260309
+# Machine metadata: NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
+# Date run: Wed Mar 11 21:00:44 UTC 2026
+# localbase: /usr/pkg
+# uptime: 2:00PM up 2 days, 1:18, 5 users, load averages: 8.30, 7.70, 5.62
+clang-19.1.7nb2 (apache-2.0)
+|--libxml2-2.14.6nb2 (modified-bsd)
+|----xmlcatmgr-2.2nb1 (modified-bsd)
+|--llvm-19.1.7nb1 (apache-2.0)
+|----libxml2-2.14.6nb2 (modified-bsd)
+|------xmlcatmgr-2.2nb1 (modified-bsd)
+|----python313-3.13.12 (python-software-foundation)
+|------libffi-3.5.2 (mit)
+|------libuuid-2.40.2 (modified-bsd)
+|------mpdecimal-4.0.1 (2-clause-bsd)
+|------readline-8.3nb1 (gnu-gpl-v3)
+|------sqlite3-3.51.2 (public-domain)
+|----zstd-1.5.7 (modified-bsd OR gnu-gpl-v2)
+|------lz4-1.10.0 (2-clause-bsd)
+|--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
+|--python313-3.13.12 (python-software-foundation)
+|----libffi-3.5.2 (mit)
+|----libuuid-2.40.2 (modified-bsd)
+|----mpdecimal-4.0.1 (2-clause-bsd)
+|----readline-8.3nb1 (gnu-gpl-v3)
+|----sqlite3-3.51.2 (public-domain)
+>
+
+And finally, all output can be formatted in JSON:
+
+> ./depgraph.sh -l -v -m -j clang
+{"Report version":"20260309","metadata":"NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm","date":"Wed Mar 11 21:01:32 UTC 2026","localbase":"/usr/pkg","uptime":" 2:01PM up 2 days, 1:19, 5
users, load averages: 8.25, 7.77,
5.77"}{"package":"clang-19.1.7nb2","license":"apache-2.0","prereq0":{"package":"libxml2-2.14.6nb2","license":"modified-bsd","prereq0":{"package":"xmlcatmgr-2.2nb1","license":"modified-bsd"}},"prereq1":{"package":"llvm-19.1.7nb1","license":"apache-2.0","prereq0":{"package":"libxml2-2.14.6nb2","license":"modified-bsd","prereq0":{"package":"xmlcatmgr-2.2nb1","license":"modified-bsd"}},"prereq1":{"package":"python313-3.13.12","license":"python-software-foundation","prereq0":{"package":"libffi-3.5.2","license":"mit"},"prereq1":{"package":"libuuid-2.40.2","license":"modified-bsd"},"prereq2":
+{"package":"mpdecimal-4.0.1","license":"2-clause-bsd"},"prereq3":{"package":"readline-8.3nb1","license":"gnu-gpl-v3"},"prereq4":{"package":"sqlite3-3.51.2","license":"public-domain"}},"prereq2":{"package":"zstd-1.5.7","license":"modified-bsd
OR gnu-gpl-v2","prereq0":{"package":"lz4-1.10.0","license":"2-clause-bsd"}}},"prereq2":{"package":"perl-5.42.0nb1","license":"gnu-gpl-v2 OR
artistic"},"prereq3":{"package":"python313-3.13.12","license":"python-software-foundation","prereq0":{"package":"libffi-3.5.2","license":"mit"},"prereq1":{"package":"libuuid-2.40.2","license":"modified-bsd"},"prereq2":{"package":"mpdecimal-4.0.1","license":"2-clause-bsd"},"prereq3":{"package":"readline-8.3nb1","license":"gnu-gpl-v3"},"prereq4":{"package":"sqlite3-3.51.2","license":"public-domain"}}}>
+
+or, seen through the eyes of a JSON formatter:
+
+[2026/03/11 Wed 14:02:20] agc@agc-vm-20250222 ~/local/sbom-20260309 [5261] > ./depgraph.sh -l -v -m -j clang | jq .
+{
+ "Report version": "20260309",
+ "metadata": "NetBSD agc-vm-20250222.localdomain 11.99.5 NetBSD 11.99.5 (GENERIC64) #0: Sun Mar 8 23:54:17 PDT 2026
agc@agc-vm-20250222.localdomain:/usr/build/obj/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm",
+ "date": "Wed Mar 11 21:02:31 UTC 2026",
+ "localbase": "/usr/pkg",
+ "uptime": " 2:02PM up 2 days, 1:20, 5 users, load averages: 8.14, 7.83, 5.92"
+}
+{
+ "package": "clang-19.1.7nb2",
+ "license": "apache-2.0",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ },
+ "prereq1": {
+ "package": "llvm-19.1.7nb1",
+ "license": "apache-2.0",
+ "prereq0": {
+ "package": "libxml2-2.14.6nb2",
+ "license": "modified-bsd",
+ "prereq0": {
+ "package": "xmlcatmgr-2.2nb1",
+ "license": "modified-bsd"
+ }
+ },
+ "prereq1": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ },
+ "prereq2": {
+ "package": "zstd-1.5.7",
+ "license": "modified-bsd OR gnu-gpl-v2",
+ "prereq0": {
+ "package": "lz4-1.10.0",
+ "license": "2-clause-bsd"
+ }
+ }
+ },
+ "prereq2": {
+ "package": "perl-5.42.0nb1",
+ "license": "gnu-gpl-v2 OR artistic"
+ },
+ "prereq3": {
+ "package": "python313-3.13.12",
+ "license": "python-software-foundation",
+ "prereq0": {
+ "package": "libffi-3.5.2",
+ "license": "mit"
+ },
+ "prereq1": {
+ "package": "libuuid-2.40.2",
+ "license": "modified-bsd"
+ },
+ "prereq2": {
+ "package": "mpdecimal-4.0.1",
+ "license": "2-clause-bsd"
+ },
+ "prereq3": {
+ "package": "readline-8.3nb1",
+ "license": "gnu-gpl-v3"
+ },
+ "prereq4": {
+ "package": "sqlite3-3.51.2",
+ "license": "public-domain"
+ }
+ }
+}
+>
+
+Alistair Crooks
+agc%netbsd.org@localhost
+Wed Mar 11 14:06:16 PDT 2026
Index: pkgsrc/pkgtools/depgraph/files/depgraph.1
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/depgraph.1:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/depgraph.1 Wed Mar 11 21:54:30 2026
@@ -0,0 +1,108 @@
+.\" $NetBSD: depgraph.1,v 1.1 2026/03/11 21:54:30 agc Exp $
+.\"
+.\" Copyright (c) 2026 Alistair Crooks <agc%NetBSD.org@localhost>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd March 10, 2026
+.Dt DEPGRAPH 1
+.Os
+.Sh NAME
+.Nm depgraph
+.Nd script to show third party package dependencies and licensing information
+.Sh SYNOPSIS
+.Nm
+.Op Fl V
+.Op Fl a
+.Op Fl j
+.Op Fl l
+.Op Fl m
+.Op Fl v
+.Op Fl x
+.Op Ar component No ...
+.Sh DESCRIPTION
+The
+.Nm
+script displays the dependency graph for packages, and
+optionally candisplay version information, and licensing
+information, where known, for the individual packages.
+It is useful for finding out the installed versions of
+the packages installed on a system.
+The
+.Nm
+utility can also record some metadata about the machine on which
+the report is run.
+It can also output the information as a normal dependency graph,
+or, alternatively, in JSON format.
+This is useful for reporting into ingest engines, for further data analysis,
+and also to inform Software Bill Of Materials (SBOM) reporting.
+.Sh OPTIONS
+The following options are available:
+.Bl -tag -width inits
+.It Fl V
+This option prints the version number of the utility to standard output, and exits.
+.It Fl a
+prints all metadata information, such as license, metadata, full name and version
+of each package, and machine uptime.
+.It Fl j
+Output the information to standard output formatted as standard JSON.
+This could be useful for further analysis of the data, or for SBOM
+reporting.
+.It Fl l
+Output the licensing information for each package that is selected.
+.It Fl m
+Output the metadata of the machine and build of the kernel onto
+standard output.
+.It Fl v
+When printing dependency graphs, output the name and version numbers of all selected packages.
+.It Fl x
+Allow internal debugging information to be displayed as the dependency graph is produced.
+.El
+.Pp
+Packages may be selected by placing either their base name, or full name and version, on the command line,
+after any options.
+If no package names are proivided, then the information for all user-installed packages are reported.
+See
+.Xr pkg_info 1
+and its
+.It Fl u
+option for more information on what constitutes a user-installed package.
+.Sh EXIT STATUS
+.Nm
+exits with status 2 if an unknown option is given,
+otherwise, with status 0.
+.Sh SEE ALSO
+.Xr awk 1 ,
+.Xr pkg_info 1 ,
+.Xr sed 1 ,
+.Xr uname 1 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+program was first seen in
+.Nx 12 .
+.Sh AUTHORS
+The
+.Nm
+script was written by
+.An Alistair Crooks Aq Mt agc%NetBSD.org@localhost .
Index: pkgsrc/pkgtools/depgraph/files/depgraph.sh
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/depgraph.sh Wed Mar 11 21:54:30 2026
@@ -0,0 +1,201 @@
+#! /bin/sh
+
+# Copyright (c) 2026 Alistair Crooks <agc%NetBSD.org@localhost>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Usage: depgraph [-V] [-v] [pkg...]
+
+DEPGRAPH_VERSION=20260309
+
+case "$(uname -s)" in
+NetBSD)
+ PATH=$(sysctl -n user.cs_path)
+ export PATH
+ ;;
+esac
+
+# some defaults for running this
+json=false
+license=false
+nameversion=false
+metadata=false
+
+# short script to look for an executable $2, and if found, to place
+# path in $1
+# taken from pkgsrc bootstrap
+which_prog()
+{
+ local IFS _var _name _d -
+ set -f
+
+ _var="$1"; _name="$2"
+
+ eval _d=\"\$$_var\"
+ if [ -n "$_d" ]; then
+ # Variable is already set (by the user, for example)
+ return 0
+ fi
+
+ IFS=:
+ for _d in $PATH ; do
+ if [ -f "$_d/$_name" ] && [ -x "$_d/$_name" ]; then
+ # Program found
+ eval $_var=\""$_d/$_name"\"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+# get the correct programs
+which_prog awk awk
+which_prog date date
+which_prog pkg_info pkg_info
+which_prog sed sed
+which_prog sort sort
+which_prog uname uname
+which_prog uptime uptime
+
+# print json pkg info
+pkg_print_json() {
+ local name="$1"
+ local lic="$2"
+
+ printf "{\"package\":\"%s\"" "${s}"
+ if ${license}; then
+ printf ",\"license\":\"%s\"" "${lic}"
+ fi
+}
+
+# print normal pkg info
+pkg_print_normal() {
+ local bar="$1"
+ local str="$2"
+ local s="$3"
+ local lic="$4"
+
+ printf "%s%s%s%s\n" "${bar}" "${str}" "${s}" "${lic}"
+}
+
+# print info for a package, recursing when pre-reqs are found
+dopkg() {
+ local name="$1"
+ local str="$2"
+ local prereq=0
+
+ case "${name}" in
+ "") ;;
+ *)
+ case "${str}" in
+ "") bar="" ;;
+ *) bar="|" ;;
+ esac
+ if ${license}; then
+ lic="$(pkg_info -Q LICENSE ${name})"
+ if ! ${json}; then
+ lic=" (${lic})"
+ fi
+ else
+ lic=""
+ fi
+ if ${nameversion}; then
+ s=$(${pkg_info} -e "${name}")
+ else
+ s="${name}"
+ fi
+ if ${json}; then
+ pkg_print_json "${s}" "${lic}"
+ else
+ pkg_print_normal "${bar}" "${str}" "${s}" "${lic}"
+ fi
+ str="${str}--"
+ # we do the sort -u here because sometimess packages have duplicate REQUIRES in them
+ # Information for clang-19.1.7nb2:
+ # Requires:
+ # llvm-19.1.7{,nb*}
+ # llvm>=19.1.7
+ deps=$(${pkg_info} -nq "${name}" | \
+ ${sed} -E -e 's/(>=.*|\-\[0\-\9\]\*|\-[0-9.]+)(\{.*\})?$//' | \
+ ${sort} -u)
+ for dep in ${deps}; do
+ if ${json}; then
+ printf ",\"prereq%d\":" "${prereq}"
+ fi
+ dopkg "${dep}" "${str}"
+ prereq=$(( prereq + 1 ))
+ done
+ if ${json}; then
+ printf "}"
+ fi
+ ;;
+ esac
+}
+
+# process any options
+while getopts "Vajlmvx" a; do
+ case "$a" in
+ V) printf "depgraph-%s\n" "${DEPGRAPH_VERSION}"; exit 0 ;;
+ a) license=true
+ metadata=true
+ nameversion=true
+ ;;
+ j) json=true ;;
+ l) license=true ;;
+ m) metadata=true ;;
+ v) nameversion=true ;;
+ x) set -x ;;
+ *) printf "Unknown option: \"${a}\"" >&2; exit 2 ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+if ${metadata}; then
+ mach="$(${uname} -a)"
+ t="$(${date} -u)"
+ localbase="$(${pkg_info} -Q LOCALBASE digest)"
+ up="$(${uptime})"
+ if ${json}; then
+ printf "{\"Report version\":\"%s\",\"metadata\":\"%s\",\"date\":\"%s\",\"localbase\":\"%s\",\"uptime\":\"%s\"}" \
+ "${DEPGRAPH_VERSION}" "${mach}" "${t}" "${localbase}" "${up}"
+ else
+ printf "# Report version: %s\n# Machine metadata: %s\n# Date run: %s\n# localbase: %s\n# uptime: %s\n" \
+ "${DEPGRAPH_VERSION}" "${mach}" "${t}" "${localbase}" "${up}"
+ fi
+fi
+
+# if no packages specified, then do for all user-installed packages
+if [ $# -eq 0 ]; then
+ # force name and version for all of the sub packages
+ for i in $(${pkg_info} -u | ${awk} '{ print $1 }'); do
+ base=$(echo $i | ${sed} -E -e 's/\-[0-9.a-z]*((p|pl|nb)[0-9]+)?$//')
+ dopkg "$base" ""
+ done
+else
+ while [ $# -gt 0 ]; do
+ dopkg "$1" ""
+ shift
+ done
+fi
+
+exit 0
Index: pkgsrc/pkgtools/depgraph/files/test.sh
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/test.sh:1.1
--- /dev/null Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/test.sh Wed Mar 11 21:54:31 2026
@@ -0,0 +1,40 @@
+#! /bin/sh
+
+set -e
+
+./depgraph.sh -V
+
+echo "1. test basics"
+./depgraph.sh clang > 1.out
+diff 1.expected 1.out
+rm -f 1.out
+
+echo "2. name and version"
+./depgraph.sh -v clang > 2.out
+diff 2.expected 2.out
+rm -f 2.out
+
+echo "3. test everything"
+./depgraph.sh > 3.out
+diff 3.expected 3.out
+rm -f 3.out
+
+echo "4. test everything with versions"
+./depgraph.sh -v > 4.out
+diff 4.expected 4.out
+rm -f 4.out
+
+echo "5. test everything with versions and licenses"
+./depgraph.sh -v -l > 5.out
+diff 5.expected 5.out
+rm -f 5.out
+
+echo "6. test everything with licenses"
+./depgraph.sh -l > 6.out
+diff 6.expected 6.out
+rm -f 6.out
+
+echo "7. license, version numbers and json"
+./depgraph.sh -l -v -j | jq . > 7.out
+diff 7.expected 7.out
+rm -f 7.out
Home |
Main Index |
Thread Index |
Old Index