Solved nanobsd does not install packages

Hello I am newbie with FreeBSD. My version is FreeBSD radius 11.3-RELEASE

I did created successfully nanobsd with default setting when I try to install Packages it gives me strange error.

Pkg downloaded in /PKg folder with pkg fetch -o ./ -d pkg dnsmasq

My command is sh nanobsd.sh -b -c hexcare.conf.

hexcare.conf file only two lines.
Code:
NANO_NAME="HEXCARE"
customize_cmd cust_pkgng
Previously created world and kernel.
Code:
Error:   _.cust.cust_pkgng in file

+ cust_pkgng
+ mkdir -p /usr/obj/nanobsd.HEXCARE/_.w/usr/local/etc
+ local 'PKG_CONF=/usr/obj/nanobsd.HEXCARE/_.w/usr/local/etc/pkg.conf'
+ local 'PKGCMD=env ASSUME_ALWAYS_YES=YES PKG_DBDIR=/var/db/pkg SIGNATURE_TYPE=none /usr/sbin/pkg'
+ touch /usr/obj/nanobsd.HEXCARE/_.w/usr/local/etc/pkg.conf
+ grep -Eiq '^PKG_DBDIR:.*' /usr/obj/nanobsd.HEXCARE/_.w/usr/local/etc/pkg.conf
+ echo 'PKG_DBDIR: "/var/db/pkg"'
+ [ ! -d /usr/src/tools/tools/nanobsd/Pkg ]
+ find -s /usr/src/tools/tools/nanobsd/Pkg -iname 'pkg-*'
+ basename /usr/src/tools/tools/nanobsd/Pkg/All/pkg-1.14.2.txz
+ _NANO_PKG_PACKAGE=pkg-1.14.2.txz
+ basename /usr/src/tools/tools/nanobsd/Pkg/pkg-1.14.2.txz
+ _NANO_PKG_PACKAGE=pkg-1.14.2.txz
+ [ -z pkg-1.14.2.txz -o ! -f /usr/src/tools/tools/nanobsd/Pkg/pkg-1.14.2.txz ]
+ NANO_PACKAGE_LIST='pkg-1.14.2.txz *'
+ mkdir -p /usr/obj/nanobsd.HEXCARE/_.w/_.p
+ mount -t nullfs -o noatime -o ro /usr/src/tools/tools/nanobsd/Pkg /usr/obj/nanobsd.HEXCARE/_.w/_.p
+ trap 'umount /usr/obj/nanobsd.HEXCARE/_.w/_.p ; rm -rf /usr/obj/nanobsd.HEXCARE/_.w/_.p' 1 2 15 EXIT
+ echo 'pkg-1.14.2.txz *'
+ awk '{ print NF }'
+ todo=2
+ echo '=== TODO: 2'
=== TODO: 2
+ echo 'pkg-1.14.2.txz *'
pkg-1.14.2.txz *
+ echo '==='
===
+ CR 'env ASSUME_ALWAYS_YES=YES PKG_DBDIR=/var/db/pkg SIGNATURE_TYPE=none /usr/sbin/pkg add /_.p/pkg-1.14.2.txz'
+ chroot /usr/obj/nanobsd.HEXCARE/_.w /bin/sh -exc 'env ASSUME_ALWAYS_YES=YES PKG_DBDIR=/var/db/pkg SIGNATURE_TYPE=none /usr/sbin/pkg add /_.p/pkg-1.14.2.txz'
+ env 'ASSUME_ALWAYS_YES=YES' 'PKG_DBDIR=/var/db/pkg' 'SIGNATURE_TYPE=none' /usr/sbin/pkg add /_.p/pkg-1.14.2.txz
Installing pkg-1.14.2...
Extracting pkg-1.14.2: .......... done
pkg-static: Cannot open /dev/null:No such file or directory
+ CR 'env ASSUME_ALWAYS_YES=YES PKG_DBDIR=/var/db/pkg SIGNATURE_TYPE=none /usr/sbin/pkg add /_.p/hexcare.conf'
+ chroot /usr/obj/nanobsd.HEXCARE/_.w /bin/sh -exc 'env ASSUME_ALWAYS_YES=YES PKG_DBDIR=/var/db/pkg SIGNATURE_TYPE=none /usr/sbin/pkg add /_.p/hexcare.conf'
+ env 'ASSUME_ALWAYS_YES=YES' 'PKG_DBDIR=/var/db/pkg' 'SIGNATURE_TYPE=none' /usr/sbin/pkg add /_.p/hexcare.conf
pkg: /_.p/hexcare.conf: No such file or directory
pkg: Was 'pkg install /_.p/hexcare.conf' meant?

Failed to install the following 1 package(s): /_.p/hexcare.conf
+ umount /usr/obj/nanobsd.HEXCARE/_.w/_.p
+ rm -rf /usr/obj/nanobsd.HEXCARE/_.w/_.p
+ echo 'NANO RM -rf /usr/obj/nanobsd.HEXCARE/_.w/_.p'
NANO RM -rf /usr/obj/nanobsd.HEXCARE/_.w/_.p
+ uname -r
+ command rm -x -rf /usr/obj/nanobsd.HEXCARE/_.w/_.p

Any help really appreciated.

Thanks in advance.

Vic
 
Solved as of now.

I have added following for my custom config file. With out this config parameter it is not working, bug in default.sh (NANO_PACKAGE_LIST="*" is wrong it should be NANO_PACKAGE_LIST="")

Code:
NANO_PACKAGE_LIST="isc-dhcp44-server-4.4.2.txz nano-4.8.txz nginx-1.16.1_12,2.txz"
There is problem with defaults.sh script.
Correction in defaults.sh as per link below
http://freebsd.1045724.x6.nabble.com/NanoBSD-cust-pkgng-problem-td6335603.html
Code:
# Mount packages into chroot
+ mount -t devfs devfs ${NANO_WORLDDIR}/dev
mkdir -p ${NANO_WORLDDIR}/_.p
mount -t nullfs -o noatime -o ro ${NANO_PACKAGE_DIR}
${NANO_WORLDDIR}/_.p

@@ -802,7 +803,7 @@
)

CR0 "${PKGCMD} info"
-
+ umount ${NANO_WORLDDIR}/dev
trap - 1 2 15 EXIT
umount ${NANO_WORLDDIR}/_.p
rm -rf ${NANO_WORLDDIR}/_.p
After this it is working.
 
Back
Top