| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Introducing Dokkio, a new service from the creators of PBworks. Find and manage the files you've stored in Dropbox, Google Drive, Gmail, Slack, and more. Try it for free today.

View
 

NetBSD using pkgsrc guide HOW-TO

Page history last edited by trunasuci 9 years, 6 months ago

NetBSD, like other BSD flavour also have alternative package management tools where it will download the package sources, extract, compile, and install to your system, rather than using precompiled binaries to install. Well the choice is yours anyway.. In FreeBSD/OpenBSD this is called ports.

 

First, u need to download the latest pkgsrc tarballs from the netbsd sites:

 

 

 

# ftp ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz
Trying 2001:4f8:3:7:230:48ff:fec6:9aaa:21 ...
ftp: Can't connect to `2001:4f8:3:7:230:48ff:fec6:9aaa:21': No route to host
Trying 204.152.190.15:21 ...
Connected to ftp.NetBSD.org.
220 ftp.NetBSD.org FTP server (NetBSD-ftpd 20100320) ready.
331 Guest login ok, type your name as password.
230-


    The NetBSD Project FTP Server located in Redwood City, CA, USA
    1 Gbps connectivity courtesy of                          ,        ,
    Internet Systems Consortium                 WELCOME!    /(        )`
                                                            \ \___   / |
      +--- Currently Supported Platforms ----+              /- _  `-/  '
      |  acorn[26,32], algor, alpha, amd64,  |             (/\/ \ \   /\
      |   amiga[,ppc], arc, atari, bebox,    |             / /   | `    \
      |   cats, cesfic, cobalt, dreamcast,   |             O O   ) /    |
      |  evb[arm,mips,ppc,sh3], hp[300,700], |             `-^--'`<     '
      |       hpc[arm,mips,sh], i386,        |            (_.)  _  )   /
      |      ibmnws, iyonix, luna68k,        |              .___/`    /
      |    mac[m68k,ppc], mipsco, mmeye,     |               `-----' /
      |      mvme[m68k,ppc], netwinders,     |  <----.     __ / __   \
      |   news[m68k,mips], next68k, ofppc,   |  <----|====O)))==) \) /====
      | playstation2, pmax, prep, sandpoint, |  <----'    `--' `.__,' \
      |  sbmips, sgimips, shark, sparc[,64], |               |        |
      |      sun[2,3], vax, x68k, xen        |                \       /
      +--------------------------------------+           ______( (_  / \_____
      See our website at http://www.NetBSD.org/        ,'  ,-----'   |       \
       We log all FTP transfers and commands.          `--{__________)  (FL) \/
230-
    EXPORT NOTICE

    Please note that portions of this FTP site contain cryptographic
    software controlled under the Export Administration Regulations (EAR).

    None of this software may be downloaded or otherwise exported or
    re-exported into (or to a national or resident of) Cuba, Iran, Libya,
    Sudan, North Korea, Syria or any other country to which the U.S. has
    embargoed goods.

    By downloading or using said software, you are agreeing to the
    foregoing and you are representing and warranting that you are not
    located in, under the control of, or a national or resident of any
    such country or on any such list.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
250-
    Please read the file README
      it was last modified on Tue Nov 18 09:53:20 2008 - 614 days ago
250 CWD command successful.
250 CWD command successful.
local: pkgsrc.tar.gz remote: pkgsrc.tar.gz
227 Entering Passive Mode (204,152,190,15,200,2)
150 Opening BINARY mode data connection for 'pkgsrc.tar.gz' (31035612 bytes).
 10% |*********                                                                                        |  3048 KiB  126.97 KiB/s    03:34 ETA

 

 

 

 

when it's done, extract it to /usr

tar -zxvf pkgsrc.tar.gz -C /usr

 

 

 

Then we can say the pkgsrc is ready to use. But i prefer we updates it first, and I prefer we using cvsup. So just install cvsup via pkgsrc.

# cd /usr/pkgsrc/devel/cvsup
# make install clean
=> Bootstrap dependency digest>=20010302: found digest-20080510
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
=> Fetching cvsup-snap-16.1h.tar.gz
=> Total size: 430951 bytes
Trying 2001:4f8:0:2::e:21 ...
ftp: Can't connect to `2001:4f8:0:2::e:21': No route to host
Trying 2001:6c8:2:600::132:21 ...
ftp: Can't connect to `2001:6c8:2:600::132:21': No route to host
Trying 87.51.34.132:21 ...
Connected to ftp.freebsd.org.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
local: cvsup-snap-16.1h.tar.gz remote: cvsup-snap-16.1h.tar.gz
227 Entering Passive Mode (87,51,34,132,207,68)
150 Opening BINARY mode data connection for 'cvsup-snap-16.1h.tar.gz' (430951 bytes).
 57% |*******************************************************                                 

 

 

 

It'll take some time to finish, and after finish, u can test it via command cvsup:

# cvsup
Usage: cvsup [options] supfile [destDir]
  Options:
    -1           Don't retry automatically on failure (same as "-r 0")
    -a           Require server to authenticate itself to us
    -A addr      Bind local socket to a specific address
    -b base      Override supfile's "base" directory
    -c collDir   Subdirectory of "base" for collections (default "sup")
    -d delLimit  Allow at most "delLimit" file deletions (default unlimited)
    -D           Do file deletions only; skip all other updates
                   (not implemented for checkout mode)
    -e           Enable shell command execution for all collections
    -E           Disable shell command execution for all collections
    -g           Don't use the GUI (implied if $DISPLAY is not set)
    -h host      Override supfile's "host" name
    -i pattern   Include only files/directories matching pattern.
                   May be repeated for an OR operation.  Default is
                   to include each entire collection.
    -k           Keep bad temporary files when fixups are required
    -l lockfile  Lock file during update; fail if already locked
    -L n         Verbosity level for "-g" (0..2, default 1)
    -p port      Alternate server port (default 5999)
    -P range     Range for client data ports (default unrestricted)
                 Range can be a single port number or a range
                 "lo-hi".  A range of "-" selects passive mode.
                 A range of "a" selects active mode.  A range of "m"
                 selects multiplexed mode (the default).
    -r n         Maximum retries on transient errors (default unlimited)
    -s           Don't stat client files; trust the checkouts file
    -v           Print version and exit
    -x           Require detailed compare for all RCS files
    -z           Enable compression for all collections
    -Z           Disable compression for all collections

 

 

Now u need to copy the examples of cvsup config files and place it to /root folder:

# cp /usr/pkg/share/examples/cvsup/supfile-cvsup.jp.netbsd.org /root

 

 

 

Edit the files using any editor u're familiar with. Mine is using nano:

# nano supfile-cvsup.jp.netbsd.org

 

 

Edit just some line that related only to our purposes:

*default tag=.

*default base=/usr              # Location to put the sources
*default prefix=/usr            # Where to put the sup subdirectory

*default host=cvsup.jp.NetBSD.org

 

 

and uncomment only this, on next section:

netbsd-pkgsrc

 

 

save it and now we can start to update it via cvsup:

# cvsup -g -L 2 supfile-cvsup.jp.netbsd.org
Parsing supfile "./ports-supfile"
Connecting to supfile-cvsup.jp.netbsd.org
Connected to supfile-cvsup.jp.netbsd.org
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection netbsd-pkgsrc/cvs
 Edit pkgsrc/archivers/bsdtar/Makefile
  Add delta 1.17 2010.07.09.12.03.55 joerg
 Edit pkgsrc/archivers/bzip2/builtin.mk
  Add delta 1.8 2010.07.06.23.35.01 obache
 Edit pkgsrc/archivers/cabextract/Makefile
  Add delta 1.21 2010.07.24.08.45.14 wiz
 Edit pkgsrc/archivers/cabextract/distinfo
  Add delta 1.10 2010.07.24.08.45.14 wiz
 Edit pkgsrc/archivers/file-roller/Makefile
  Add delta 1.103 2010.07.06.16.43.05 drochner
 Edit pkgsrc/archivers/file-roller/distinfo
  Add delta 1.53 2010.07.06.16.43.05 drochner
 Checkout pkgsrc/archivers/gcpio/Makefile
 Edit pkgsrc/archivers/gzrecover/Makefile
  Add delta 1.7 2010.07.06.10.17.11 jmmv
 Edit pkgsrc/archivers/libarchive/Makefile
  Add delta 1.33 2010.07.09.12.03.55 joerg
 Edit pkgsrc/archivers/libarchive/files/CMakeLists.txt
  Add delta 1.1.1.3 2010.07.09.11.53.07 joerg
 Edit pkgsrc/archivers/libarchive/files/Makefile.am
  Add delta 1.5 2010.07.09.12.02.41 joerg
 Edit pkgsrc/archivers/libarchive/files/Makefile.in
  Add delta 1.6 2010.07.09.12.02.41 joerg
 Edit pkgsrc/archivers/libarchive/files/NEWS
  Add delta 1.6 2010.07.09.12.02.42 joerg
 Edit pkgsrc/archivers/libarchive/files/aclocal.m4
  Add delta 1.6 2010.07.09.12.02.42 joerg
 Edit pkgsrc/archivers/libarchive/files/build/autoconf/compile
  Add delta 1.1.1.4 2010.07.09.11.53.07 joerg
 Edit pkgsrc/archivers/libarchive/files/build/autoconf/config.guess
  Add delta 1.1.1.4 2010.07.09.11.53.07 joerg

 

Wait until it finish, now u can browse the content of /usr/pkgsrc, look for your desired packages/program then u can start installing using this command:

cd /usr/pkgsrc/***/***

make install clean

 

 

wait until it finish, edit /etc/rc.conf based on needs to make the program running, and thats it!!

 

:)

 

27/7/2010 7:15am

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Comments (0)

You don't have permission to comment on this page.