Pkgsrc private code repositories

get the pkgsrc source

for us we will make GNU hello, as it’s super simple..

mkdir -p local/hello
cd local/hello
url2pkg https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz

if you get an error about:

pkg_add: No valid signature found, rejected
pkg_add: 1 package addition failed
*** Error code 1

then change /opt/pkg/etc/pkg_install.conf and comment out the line: VERIFIED_INSTALLATION=always see bug for details. and then run url2pkg again. once it finishes running without error, then: bmake build

then bmake print-PLIST and put the output in the PLIST file then you can install it

/opt/pkg/bin/bmake install

then: hello should work!

This gets you most of the way there to a private pkgsrc repo. put pkgsrc/local in your VCS of choice.