- install NetBSD 10.99.10
- put binary set on
/export/CHROOT93/usr/INSTALL
as shown below
stealth-x@makoto 22:35:18/231118(~)% ls /export/CHROOT93/usr/INSTALL/
MD5 kern-GENERIC_KASLR.tar.xz text.tar.xz
SHA512 kern-XEN3_DOM0.tar.xz xbase.tar.xz
base.tar.xz kern-XEN3_DOMU.tar.xz xcomp.tar.xz
comp.tar.xz man.tar.xz xdebug.tar.xz
debug.tar.xz misc.tar.xz xetc.tar.xz
etc.tar.xz modules.tar.xz xfont.tar.xz
games.tar.xz rescue.tar.xz xserver.tar.xz
kern-GENERIC.tar.xz tests.tar.xz
- /export/CHROOT93 に Release 9.3 を展開
open up the binaries under /export/CHROOT93
cd /export/CHROOT93/
foreach i (`cd /export/CHROOT93/usr/INSTALL; ls *xz`| grep -v kern`)
echo $i
sudo pax -pe -z -r -f /export/CHROOT93/usr/INSTALL/$i
end
- chroot の設定を調整
Adjust settings unside chroot
cd /dev; ./MAKEDEV all
vipw
home directory
/etc/resolv.conf
- /export/pkgsrc に pkgsrc を展開
develop pkgsrc at /export/pkgsrc
- Adjust Path at /etc/fstab (Path の調整)
/export/pkgsrc /export/CHROOT93/usr/pkgsrc null rw
tmpfs /export/CHROOT93/W tmpfs rw
From here on, operation inside chroot (以下 chroot 内での操作)
- bootstrap
sudo chroot /export/CHROOT
cd /usr/pkgsrc/bootstrap
./bootstap --prefix=/usr/pkg_bulk --pkgdbdir=/usr/pkg_bulk/.pkgdbdir
- pbulk-addendum を make package-install
その前に次の行を追加しておく
Add following lines at /usr/pkg_bulk/etc/mk.conf
PACKAGES= /packages_bulk
SKIP_LICENSE_CHECK= yes
cd /usr/pkgsrc/local-mef/pbulk-addendum
env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} bmake package-install
- pkg_info -u
# env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} pkg_info -u
cwrappers-20220403 pkgsrc compiler wrappers
mktools-20220614 Collection of pkgsrc mk infrastructure tools
bootstrap-mk-files-20230509 *.mk files for the bootstrap bmake utility
bmake-20200524nb1 Portable (autoconf) version of NetBSD 'make' utility
pkg_install-20211115nb1 Package management and administration tools for pkgsrc
pbulk-addendum Some additional package for pbulk
- pkg_info
# env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} pkg_info
cwrappers-20220403 pkgsrc compiler wrappers
mktools-20220614 Collection of pkgsrc mk infrastructure tools
bootstrap-mk-files-20230509 *.mk files for the bootstrap bmake utility
bmake-20200524nb1 Portable (autoconf) version of NetBSD 'make' utility
pkg_install-20211115nb1 Package management and administration tools for pkgsrc
digest-20220214 Message digest wrapper utility
m4-1.4.19nb1 GNU version of UNIX m4 macro language processor
sendmail-8.16.1nb3 The well known Mail Transport Agent
libkver-0.7.2 Shared library and sysctl(1) replacement to override system version
zsh-5.9nb2 The Z shell
libtool-base-2.4.7nb1 Generic shared library support script (the script itself)
perl-5.38.0 Practical Extraction and Report Language
pcre-8.45 Perl Compatible Regular Expressions library
osabi-NetBSD-10.99.10 Operating System version dummy-package
net-snmp-5.9.3nb2 Extensible SNMP implementation
pbulk-addendum Some additional package for pbulk
- sendmail の調整
sendmail may not be necessary. Just for my preference
make install-cf CF=netbsd-proto;
mkdir -p /var/spool/mqueue;
mkdir -p /var/spool/clientmqueue;
chown smmsp.smmsp /var/spool/clientmqueue;
ln -sf /usr/pkg_bulk/share/examples/sendmail/mailer.conf /etc/mailer.conf;
touch /etc/mail/local-host-names
rm -f netbsd-proto.cf
m4 ../m4/cf.m4 netbsd-proto.mc > netbsd-proto.cf || ( rm -f netbsd-proto.cf && exit 1 )
echo "### netbsd-proto.mc ###" >>netbsd-proto.cf
sed -e 's/^/# /' netbsd-proto.mc >>netbsd-proto.cf
chmod 444 netbsd-proto.cf
/usr/bin/install -c -o root -g wheel -m 0444 netbsd-proto.cf /etc/mail/sendmail.cf
/usr/bin/install -c -o root -g wheel -m 0444 submit.cf /etc/mail/submit.cf
- libkver を chroot の外側に写す
copy libkver staff also outside of chroot ( thanks ryoon@ )
# env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} pkg_info -qL libkver
/usr/pkg_bulk/lib/libkver.a
/usr/pkg_bulk/lib/libkver.so
/usr/pkg_bulk/lib/libkver.so.1
/usr/pkg_bulk/lib/libkver.so.1.0
/usr/pkg_bulk/man/man3/kver.3
/usr/pkg_bulk/man/man8/kver.8
/usr/pkg_bulk/sbin/kver
(at outside of chroot)
stealth-x$ sudo mkdir -p /usr/pkg_bulk/lib
stealth-x$ sudo cp -p /export/CHROOT93/usr/pkg_bulk/lib/libkver.so* /usr/pkg_bulk/lib
stealth-x$ sudo mkdir /usr/pkg_bulk/sbin
stealth-x$ sudo cp -p /export/CHROOT93/usr/pkg_bulk/sbin/kver /usr/pkg_bulk/sbin/
- libkver を使って chroot に入る
now chroot with libkver
sudo env SHELL=/usr/pkg_bulk/bin/zsh /usr/pkg_bulk/sbin/kver -r 9.3 /usr/sbin/chroot /export/CHROOT93
stealth-x@makoto 22:48:04/231118(~)% sudo sh /export/CHROOT93/chroot-sh
Password:
stealth-x# uname -a
NetBSD stealth-x.s.ki.nu 9.3 NetBSD 9.3 (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038
root@localhost:/sys/arch/amd64/compile/LIBKVER amd64
- pbulk 実は pbulk が入っていなかった
(at this time of execution, pbulk was missing, now corrected)
cd /usr/pkgsrc/pkgtools/pbulk/
env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} bmake package-install
stealth-x# env PATH=/usr/pkg_bulk/bin:/usr/pkg_bulk/sbin:${PATH} pkg_info -u
cwrappers-20220403 pkgsrc compiler wrappers
mktools-20220614 Collection of pkgsrc mk infrastructure tools
bootstrap-mk-files-20230509 *.mk files for the bootstrap bmake utility
bmake-20200524nb1 Portable (autoconf) version of NetBSD 'make' utility
pkg_install-20211115nb1 Package management and administration tools for pkgsrc
pbulk-addendum Some additional package for pbulk
pbulk-0.71 Modular bulk build framework
- pbulk.conf を調整
続く ...