hns - 日記自動生成システム - Version 2.19.9

先月 2023年11月 来月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2023年11月18日() 旧暦 [n年日記] [更新:"2004/08/09 23:43:33"]

#1 [pkgsrc] pbulk and chroot

  • CHROOT の中で bootstrap
    bootstrap inside CHROOT
  • OS Release は 10.99.10 を使い、 CHROOT の中は libkver を使って 9.3 とする
    Base OS release 10.99.10, but inside CHROOT will be 9.3 by libkver
以前から使っている覚え but I'm referring quite often
  1. install NetBSD 10.99.10
  2. 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
    
  3. /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
    
  4. chroot の設定を調整
    Adjust settings unside chroot
    cd /dev; ./MAKEDEV all
    vipw
    home directory
    /etc/resolv.conf
    
  5. /export/pkgsrc に pkgsrc を展開
    develop pkgsrc at /export/pkgsrc
  6. 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 内での操作)
  7. bootstrap
    sudo chroot /export/CHROOT
    cd /usr/pkgsrc/bootstrap
    ./bootstap --prefix=/usr/pkg_bulk --pkgdbdir=/usr/pkg_bulk/.pkgdbdir
    
  8. 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
    
  9. 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
    
  10. 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
    
  11. 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
    
    
  12. 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/
    
  13. 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
    
  14. 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
    
  15. pbulk.conf を調整
続く ...



最近の日記
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
2024年01月14日
pbulk client checklist
2024年01月12日
pkglint issue
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)