Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on dealing with a NetBSD partition.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/netbsd.e>
#           or at <http://angg.twu.net/e/netbsd.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######









# «.very-old-stuff»		(to "very-old-stuff")
# «.nbsd152-md5sums»		(to "nbsd152-md5sums")
# «.nbsd152-hda1»		(to "nbsd152-hda1")
# «.netbsd-downloading»		(to "netbsd-downloading")
# «.netbsd-bootflop»		(to "netbsd-bootflop")
# «.netbsd-manpages»		(to "netbsd-manpages")

# «.zsh-at-caramelo»		(to "zsh-at-caramelo")
# «.xterms-at-caramelo»		(to "xterms-at-caramelo")
# «.firefox-at-caramelo»	(to "firefox-at-caramelo")
# «.edrx.tgz-at-caramelo»	(to "edrx.tgz-at-caramelo")
# «.compiling-emacs-at-caramelo»  (to "compiling-emacs-at-caramelo")
# «.cvs-emacs-at-caramelo»	(to "cvs-emacs-at-caramelo")
# «.pkgsrc-cvs»			(to "pkgsrc-cvs")
# «.pkgsrc-bootstrap»		(to "pkgsrc-bootstrap")
# «.pkgsrc-tarball»		(to "pkgsrc-tarball")
# «.pkgsrc-at-freire»		(to "pkgsrc-at-freire")
# «.pkgsrc-nonroot-new-notes»	(to "pkgsrc-nonroot-new-notes")
# «.pkgsrc-notes-andre»		(to "pkgsrc-notes-andre")





#####
#
# very old stuff (this and everything below this)
# 2007dec11
#
#####

# «very-old-stuff»  (to ".very-old-stuff")


can you try wd0d maybe?
To list the partitions: fdisk /dev/rwd0
r = raw
rwd* and rsd* are what you partition/label with
wd* and sd* are what you use as partitions
like LInux's hda as the whole drive, hda1 and hda2 as seperate partitions
rwd0 as the whole drive, wd0a wd0b, etc., you got the idea

/dev/hda1 became /dev/wd0e (filesystem type: ext2fs)
try to mount from utils -> run /bin/sh
get the tgzs from an unmounted partition:
  wd0e ext2fs i386/binary/sets

cd ~/tmp/netbsd/
wget http://www.mat.puc-rio.br/~edrx/tmp/netbsd/og
wget http://www.mat.puc-rio.br/~edrx/tmp/netbsd/pkgsrc.tgz

anonftp ftp://archive.progeny.com/NetBSD/NetBSD-1.5.2/source/sets/

rsync -c -v -v \
  rsync://archive.progeny.com/NetBSD/NetBSD-1.5.2/i386/binary/sets/comp.tgz \
  comp.tgz

cd ~/public_html/tmp/netbsd/
rsync -c -v -v \
  rsync://archive.progeny.com/NetBSD/NetBSD-1.5.2/source/sets/gnusrc.tgz \
  gnusrc.tgz

  rsync://archive.progeny.com/NetBSD/NetBSD-1.5.2/i386/binary/sets/comp.tgz \
  comp.tgz




#####
#
# Check the md5sums
# 2001oct26
#
#####

# «nbsd152-md5sums»  (to ".nbsd152-md5sums")
#*
cd
mount /cdrom
cd /cdrom
find

#*
cd /cdrom/i386/installation/floppy
cd /cdrom
for i in $(find /cdrom | grep MD5); do
  cd $(dirname $i)
  pwd
  md5sum $('ls' | grep -v SUM | grep -v MD5) \
    | awk '{printf "MD5 (%s) = %s\n", $2, $1}' > /tmp/MD5
  diff MD5 /tmp/MD5
done

#*



#####
#
# Prepare to fix a broken file and install from a Linux partition
# 2001oct26
#
#####

# «nbsd152-hda1»  (to ".nbsd152-hda1")
# (find-fline "/cdrom/")
# (find-fline "/cdrom/i386/INSTALL.txt" "Installation from an unmounted file system")

#*
mount /hda1 -o remount,rw
cd /cdrom
cp -diPpvR i386 /hda1/

#*
cd /hda1/i386/binary/sets/
md5sum comp.tgz
grep comp.tgz MD5

#*
# (find-man "1 rsync")
# (find-man "1 rsync" "-I, --size-only")
# (find-man "1 rsync" "-c, --checksum\n")
# (find-man "1 rsync" "Two -v")

cd /hda1/i386/binary/sets/
rsync -c -v -v \
  rsync://archive.progeny.com/NetBSD/NetBSD-1.5.2/i386/binary/sets/comp.tgz \
  comp.tgz

#*


#*
# (find-es "grub" "menu.lst")
mount /hda1 -o remount,rw
cp -iv /netbsd/netbsd /hda1/boot/grub/
#*

anonftp ftp://archive.progeny.com/NetBSD/NetBSD-1.5.2/
anonftp ftp://archive.progeny.com/NetBSD/NetBSD-1.5.2/source/sets/





#####
#
# Compiling things using the "ports" system
# 2001oct27
#
#####

# (find-shttpw3 "cvsweb.netbsd.org/bsdweb.cgi/")

#*
cd /usr/src/
rm -R pkgsrc
tar -xvzf $SNETBSD/source/sets/pkgsrc.tgz
cd /usr/src/pkgsrc/
find * | sort > .files

#*
# (find-fline "/usr/src/pkgsrc/.files")
# (find-fline "/usr/src/pkgsrc/")
# (find-fline "/usr/src/pkgsrc/Packages.txt" "make fetch-list")
# (find-fline "/usr/src/pkgsrc/shells/bash2/")
# (find-fline "/usr/src/pkgsrc/shells/bash2/Makefile" "DISTFILES")

# (find-fline "/netbsd/usr/share/mk/")
# (find-fline "/netbsd/root/o")

psne $FNETBSD/packages/distfiles/
cd $SNETBSD/packages/distfiles/
lynx -dump -nolist index.html > index.txt
# (find-fline "$SNETBSD/packages/distfiles/")
# (find-fline "$SNETBSD/packages/distfiles/index.txt")

psne $FNETBSD/packages/distfiles/zoularis-20010704.tar.gz


cd $SNETBSD/packages/distfiles/
anonftp $FNETBSD/packages/distfiles/

#*
cp -v $SNETBSD/source/sets/pkgsrc.tgz /hda1/tmp/

cd $S/ftp/ftp.gnu.org/pub/gnu/bash/
  cp -v bash-2.05.tar.gz bash-doc-2.05.tar.gz /hda1/tmp/
cd $S/ftp/ftp.gnu.org/pub/gnu/gettext/
  cp -v gettext-0.10.35.tar.gz /hda1/tmp/
cd $S/ftp/ftp.netbsd.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/
  cp -v libtool-ml-20010219.tar.gz /hda1/tmp/

cp -v $SDEBIAN/pool/main/e/emacs21/emacs21_21.1.orig.tar.gz    /hda1/tmp/
cp -v $SDEBIAN/pool/main/f/fileutils/fileutils_4.1.orig.tar.gz /hda1/tmp/
cp -v $S/ftp/ftp.zsh.org/zsh/old/zsh-3.0.8.tar.gz              /hda1/tmp/

cd $SNETBSD/packages/distfiles/
cp -v CGI.pm-2.75.tar.gz       /hda1/tmp/
cp -v DProf-19990108.tar.gz    /hda1/tmp/
cp -v Data-Dumper-2.101.tar.gz /hda1/tmp/
cp -v perl-5.6.0.tar.gz        /hda1/tmp/
cp -v make-3.79.1.tar.gz       /hda1/tmp/

#*
cat > /hda1/tmp/1 <<'---'
mkdir /hda1
mount -t ext2fs /dev/wd0e /hda1
---

cat > /hda1/tmp/1m <<'---'
echo /dev/wd0e /hda1 ext2fs rw 1 2 >> /etc/fstab
---

cat > /hda1/tmp/2 <<'---'
mkdir /usr/src/
cd /usr/src/
tar -xvzf /hda1/tmp/pkgsrc.tgz
---

cat > /hda1/tmp/3 <<'---'
cd /usr/src/pkgsrc/distfiles/
cp /hda1/tmp/bash-2.05.tar.gz .
cp /hda1/tmp/bash-doc-2.05.tar.gz .
cp /hda1/tmp/gettext-0.10.35.tar.gz .
cp /hda1/tmp/libtool-ml-20010219.tar.gz .

cp /hda1/tmp/zsh-3.0.8.tar.gz .
cp /hda1/tmp/CGI.pm-2.75.tar.gz .
cp /hda1/tmp/DProf-19990108.tar.gz .
cp /hda1/tmp/Data-Dumper-2.101.tar.gz .
cp /hda1/tmp/perl-5.6.0.tar.gz .
cp /hda1/tmp/make-3.79.1.tar.gz .

# cd /usr/src/pkgsrc/shells/bash2/
# cd /usr/src/pkgsrc/shells/zsh/
# cd /usr/src/pkgsrc/lang/perl5/
cd /usr/src/pkgsrc/devel/gmake/
make fetch-list  | tee ~/o
---

#*
makeLedrxtgz
cp -v ~/TH/L/edrx.tgz /hda1/tmp/

cat > /hda1/tmp/3e <<'---'
cp /hda1/tmp/edrx.tgz /root/
cd /root
mkdir edrx
cd /root/edrx
tar -xvzf ../edrx.tgz
---

#*

# (find-fline "/netbsd/")
# (find-fline "/netbsd/etc/fstab")
# (find-fline "/netbsd/usr/src/pkgsrc/shells/zsh/")
# (find-fline "/netbsd/usr/src/pkgsrc/lang/perl5/")
# (find-fline "/netbsd/usr/src/pkgsrc/devel/gmake/")

anonftp ftp://ftp.zsh.org/zsh/
psne ftp://ftp.zsh.org/zsh/old/zsh-3.0.8.tar.gz

psne $FDEBIAN_MAIN/pool/main/f/fileutils/fileutils_4.1.orig.tar.gz -c
psne $FNETBSD/packages/distfiles/make-3.79.1.tar.gz



#*
# (find-fline "/hda1/tmp/")

# (find-shttpw3 "www.mclink.it/personal/MG2508/nbsdeng/netbsd.html")
# (find-shttpw3 "www.mclink.it/personal/MG2508/nbsdeng/chap-x.html")
# (find-shttpw3 "www.mclink.it/personal/MG2508/nbsdeng/chap-cons.html")
# (find-shttpw3 "www.mclink.it/personal/MG2508/nbsdeng/chap-pack.html")




#####
#
# netbsd - downloading
# 2000oct13
#
#####

# «netbsd-downloading»  (to ".netbsd-downloading")
# (find-angg ".zshrc" "BSD")
export FNBSD=ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.2/i386
export SNBSD=$S/ftp/ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.2/i386

# (code-c-d "nbsd"   "$SNBSD/")
# (code-c-d "nbsdbs" "$SNBSD/binary/sets/")
# (find-nbsdw3 "INSTALL.html")
# (find-nbsdw3 "INSTALL.html" "*Binary Distribution Sets*")
# (find-nbsdw3 "INSTALL.html" "* Getting the NetBSD System on to Useful Media *")
# (find-nbsdpw3 "INSTALL.html" "15. Installation from an unmounted filesystem")
# (find-nbsdpw3 "INSTALL.html" "boot-small.fs")

# (find-node "(wget)Download Options" "`--continue'")
# (find-fline "$SNBSD/binary/sets/")

psne ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.2/i386/installation/misc/README.files

# (find-fline "$SNBSD/")

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.2/i386/binary/sets/

Reading the MFS from a floppy:
mount -t mfs /dev/fd0 /mnt
man mount_mfs
mount_mfs -F /dev/fd0 /mnt
-F /tmp/floppy.img

make release talvez




#####
#
# NetBSD - installation using the boot floppies
# 2001jun04 
#
#####

# «netbsd-bootflop»  (to ".netbsd-bootflop")
lynx $SNBSD/INSTALL.html#"Getting the NetBSD System on to Useful Media"
w3m $FLH/$SNBSD/INSTALL.html#"Getting the NetBSD System on to Useful Media"

#*
# (find-fline "$SNBSD/installation/floppy/")
# (find-es "floppy" "superformat")
cd $SNBSD/installation/floppy/
superformat -B /dev/fd0 hd
cat boot1.fs > /dev/fd0
#cat boot2.fs > /dev/fd0

#*
# (find-fline "/etc/fstab" "/freebsd")
fdisk -l /dev/hd{a,c,d} | tee /tmp/ofdisk
grep '^/dev/hd' /tmp/ofdisk \
  | grep -v Extended

mycat /proc/ide/hd{a,c,d}/{geometry,model}

#*
cd $SNBSD/binary/sets
tar -xOvzf base.tgz ./dev/MAKEDEV > /tmp/MAKEDEV-netbsd
# (find-fline "/tmp/MAKEDEV-netbsd")
laf /tmp/MAKEDEV-netbsd

#*
rm -Rv /tmp/tmpdev/
mkdir  /tmp/tmpdev/
cd     /tmp/tmpdev/
sh -x ../MAKEDEV-netbsd wd2
laf

#*
# To activate, from the boot floppy shell:
# mkdir /hda1
# mount -o rdonly /dev/wd0e /hda1
# . /hda1/netbsds

mount /dev/hda1 -o remount,rw

cd $SNBSD/binary/sets
tar -xOvzf $SNBSD/binary/sets/base.tgz ./dev/MAKEDEV > /hda1/MAKEDEV-netbsd

cat > /hda1/netbsds <<'---'
  alias laf='ls -lAF'
  alias head='dd count=1'
  SCRIPTDIR=/hda1
  alias l=more
  cd /dev/
  sh -x $SCRIPTDIR/MAKEDEV-netbsd wd2
---

cd $SNBSD/
cp -diPpvR binary/sets/ /hda1/
#*




#####
#
# NetBSD manpages
# 2001jul24
#
#####

# «netbsd-manpages»  (to ".netbsd-manpages")
# (find-es "man" "freebsd_manpages")

#*
rm -Rv /var/_netbsdman/
mkdir  /var/_netbsdman/
cd /netbsd/
cp -diPpvR usr/share/man usr/share/perl/man usr/pkg/man /var/_netbsdman/

cd /var/_netbsdman/ \
  && chmod 777 $(find * -type d)

#*
cd /var/_netbsdman/; find * | grep ws
cd /var/_netbsdman/; find * | grep trace

#*
# Note that the first time we run this man will think for a long time
# (~1min) before showing anything; to understand what it is doing
# during this time we can run it with the "-d" switch:
#
# (find-man "1 man" "--debug")
# (find-angg ".zshrc" "bsd_manpages")
# (find-angg "bin/netbsdman")

MANPATH=$NETBSDMANPATH man vtimes
MANPATH=$NETBSDMANPATH man -a wsfontload
#*

# (find-fline "/netbsd/usr/share/doc/psd/05.sysman/")
# (find-fline "/netbsd/usr/share/wscons/fonts/")

# (find-es "emacs" "man")
# (find-efile "man.el" "defvar manual-program")

(find-man "ktrace")
(let ((manual-program "netbsdman")) (find-man "ktrace"))









#####
#
# installing zsh globally at caramelo
# (plus some notes on open xterms there)
# 2007dec12
#
#####

# «zsh-at-caramelo»  (to ".zsh-at-caramelo")
# `find-caramelofile' and `eepitch-caramelo' are defined here:
# (find-angg ".emacs" "caramelo")

# (find-man "1 ssh")
# (find-man "1 ssh" "-X")

* (eepitch-shell)
ssh -X edrx@caramelo
cd /usr/pkgsrc/shells/zsh/
sudo make install 2>&1 | tee ~/o




#####
#
# xterms at caramelo (being displayed on my machine)
# 2007dec12
#
#####

# «xterms-at-caramelo»  (to ".xterms-at-caramelo")
# (find-man "1 xterm")
# (find-man "1 xterm" "-Sccn")
# (find-eev "eev-mini-steps.el" "eexterm")

# (find-man "1 xhost")
* (find-sh0 "xhost +caramelo")
* (fvwm-sloppy-focus)
* (eexterm "caramelo" "ssh -X edrx@caramelo")
* (fvwm-click-to-focus)
edrx
export DISPLAY=10.1.0.101:0
xterm -geometry +527+0 &
nohup xterm &
disown %1
exit

# Should I add this to my .zshrc?
# Or to one of my ".zshrc.local"s?...
# (find-zsh "set" "machine")
if [[ $machine == caramelo ]]; then export DISPLAY=10.1.0.101:0; fi

# (find-efunction 'eexterm)
# (find-man "1 nohup")
# (find-node "(coreutils)")
# (find-node "(coreutils)nohup invocation")




#####
#
# firefox at caramelo
# 2008jan23
#
#####

# «firefox-at-caramelo»  (to ".firefox-at-caramelo")

* (eepitch-caramelo)
* (eepitch-kill)
* (eepitch-caramelo)
export DISPLAY=10.1.0.101:0
nohup firefox &
disown %1



#####
#
# unpacking edrx.tgz at caramelo
# 2007dec12
#
#####

# «edrx.tgz-at-caramelo»  (to ".edrx.tgz-at-caramelo")
# `find-caramelofile' and `eepitch-caramelo' are defined here:
# (find-angg ".emacs" "caramelo")
# (ee-cp "~/TH/L/edrx.tgz" (ee-caramelofile "edrx.tgz") 'over)

* (eepitch-caramelo)
* (eepitch-kill)
* (eepitch-caramelo)
mv -v edrx.tgz edrx-old.tgz
wget http://angg.twu.net/edrx.tgz
tar -xvzf edrx.tgz
./run-zsh
cd
df -h
# Not enough space at ~ to compile cvs emacs, so...
ln -sf ../../edrx-tmp/bigsrc .
cd ~/bigsrc/
mkdir ~/tmp/





#####
#
# installing cvs emacs at caramelo
# 2007dec12
#
#####

# «compiling-emacs-at-caramelo»  (to ".compiling-emacs-at-caramelo")
# `find-caramelofile' and `eepitch-caramelo' are defined here:
# (find-angg ".emacs" "caramelo")

# (find-caramelofile "")
# (find-caramelofile "tmp/")
# (find-caramelofile "bigsrc/")

* (eepitch-caramelo)
* (eepitch-kill)
* (eepitch-caramelo)

rm -Rf ~/bigsrc/emacs/
mkdir  ~/bigsrc/
cd     ~/bigsrc/
tar -C ~/bigsrc/ -xvjf ~/tmp/emacs-cvs.tar.bz2

cd     ~/bigsrc/
export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/emacs co emacs  \
  2>&1 | tee ocvs

cd     ~/bigsrc/
tar -cvjf ~/tmp/emacs-cvs.tar.bz2 emacs

cd     ~/bigsrc/emacs/
./configure      2>&1 | tee oc
find * -name '*.[ch]' | sort > .files.ch
make bootstrap   2>&1 | tee omb
make TAGS        2>&1 | tee omT




#####
#
# running cvs emacs at caramelo (and making it use my X server)
# 2007dec12
#
#####

# «cvs-emacs-at-caramelo»  (to ".cvs-emacs-at-caramelo")
# (find-sh0 "xhost +caramelo")

* (eepitch-caramelo)
* (eepitch-kill)
* (eepitch-caramelo)
./run-zsh

* (find-sh0 "xhost +caramelo")
export DISPLAY=10.1.0.101:0
~/bigsrc/emacs/src/emacs &!


# (find-node "(zsh)Jobs & Signals" "disowned")
# (find-node "(zsh)Shell Builtin Commands" "JOB ... &!")
# nohup ~/bigsrc/emacs/src/emacs &
# disown %1





#####
#
# pkgsrc: downloading from CVS
# 2007dec28
#
#####

# «pkgsrc-cvs»  (to ".pkgsrc-cvs")
# <silas> http://www.netbsd.org/docs/pkgsrc/
# <silas> tem essa documentacao sobre o bootstrapping:
# <silas> http://www.netbsd.org/docs/pkgsrc/platforms.html#bootstrapping-pkgsrc
# http://www.netbsd.org/docs/pkgsrc/platforms.html#bootstrapping-pkgsrc

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/bigsrc/pkgsrc/
mkdir  ~/bigsrc/pkgsrc/
cd     ~/bigsrc/pkgsrc/
tar -C ~/bigsrc/ -xvzf ~/bigsrc/pkgsrc-cvs.tgz
env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout pkgsrc
cd     ~/bigsrc/
tar              -cvzf ~/bigsrc/pkgsrc-cvs.tgz pkgsrc/
cd     ~/bigsrc/pkgsrc/bootstrap
./bootstrap  |& tee ob

# (find-pkgsrcsh "du -c")

# (code-c-d "pkgsrc" "~/bigsrc/pkgsrc/")
# (find-pkgsrcfile "")
# (find-pkgsrcfile "doc/pkgsrc.txt")
# (find-pkgsrcfile "doc/pkgsrc.txt" "\n2.1.1. As tar file\n")

# (find-pkgsrcfile "www/w3m/")
# (find-pkgsrcfile "www/emacs-w3m/")





#####
#
# getting a pkgsrc tarball
# 2008jan04
#
#####

# «pkgsrc-tarball»  (to ".pkgsrc-tarball")
# http://www.netbsd.org/docs/pkgsrc/getting.html#getting-via-tar
# ftp://ftp.netbsd.org/pub/pkgsrc/
# ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-2007Q4/pkgsrc-2007Q4.tar.gz

# tar -tvzf $S/ftp/ftp.netbsd.org/pub/pkgsrc/pkgsrc-2007Q4/pkgsrc-2007Q4.tar.gz > /tmp/o
# (find-fline "/tmp/o")
#*
rm -Rf ~/bigsrc/pkgsrc/
tar -C ~/bigsrc/ -xzf \
  $S/ftp/ftp.netbsd.org/pub/pkgsrc/pkgsrc-2007Q4/pkgsrc-2007Q4.tar.gz
cd     ~/bigsrc/pkgsrc/

#*
# «pkgsrc-bootstrap»  (to ".pkgsrc-bootstrap")
# (find-pkgsrcfile "bootstrap/")
# (find-pkgsrcfile "bootstrap/bootstrap")
# (find-pkgsrcfile "bootstrap/ob")

cd ~/bigsrc/pkgsrc/bootstrap
# ./bootstrap  |& tee ob
./bootstrap --unprivileged --ignore-user-check |& tee ob

#*
# (code-c-d "pkgsrc" "~/bigsrc/pkgsrc/")
# (find-pkgsrcfile "")
# (find-pkgsrcfile "bootstrap/README.Linux")
# (find-pkgsrcfile "bootstrap/ob")
# (find-pkgsrcfile "lang/lua/Makefile")
# (find-fline "~/pkg/bin/")
# (find-fline "~/pkg/")
#*
cd ~/bigsrc/pkgsrc/lang/lua/
PATH=$HOME/pkg/bin/:$PATH
bmake |& tee om

#*





#####
#
# notes about pkgsrc at freire
# 2007dec27
#
#####

# «pkgsrc-at-freire»  (to ".pkgsrc-at-freire")
# (find-man "pkgsrc")
# (find-es "netbsd" "zsh-at-caramelo")
# (find-fline "/usr/pkgsrc/")

# (find-sh "locate pkgsrc | grep -v disk | head -n 2000")
# (find-fline "/home/builder/pkgsrc/")
# (find-fline "/home/builder/pkgsrc/db/pkg/")
# (find-fline "/home/builder/pkgsrc/db/pkg/gmake-3.81/")

# (code-c-d "pkgdb" "/home/builder/pkgsrc/db/pkg/")
# (find-pkgdbsh0 "file pkgdb.byfile.db")
# (find-sh "cd /home/builder/pkgsrc/db/pkg/; file pkgdb.byfile.db
# pkgdb.byfile.db: Berkeley DB 1.85/1.86 (Btree, version 3, native byte-order)

# (find-sh "man locate")
# (find-sh "locate locate | grep man")
# (find-fline "/usr/sbin/")
# (find-fline "/disk/distro/")

# (find-man "pkg_add")
# (find-man "pkg_admin")
# (find-man "pkg_create")
# (find-man "pkg_delete")
# (find-man "pkg_info")
# (find-man "pkg_view")

# (find-sh "pkg_info")
# (find-sh "pkg_info | sort")
# (find-sh "pkg_info -c -a")
# (find-sh "pkg_info zsh")

# (find-sh "pkg_info -L zsh")

# (find-sh "locate bootstrap")




#####
#
# pksrc as non-root: marc simpson's hints
# 2008jan05
#
#####

# «pkgsrc-nonroot-new-notes»  (to ".pkgsrc-nonroot-new-notes")
# http://osdir.com/ml/os.netbsd.devel.packages/2003-09/msg00587.html
# http://www.webservertalk.com/archive269-2005-1-842245.html
# http://www.netbsd.org/docs/pkgsrc/faq.html
# http://mail-index.netbsd.org/tech-pkg/2003/09/27/0023.html
# http://www.feyrer.de/Texts/Own/21c3-pkgsrc-paper.pdf
#*
# Clean everything
rm -Rf ~/pkg/
rm -Rf /spare/ffs/edrx/pkg/
mkdir  /spare/ffs/edrx/pkg/
ln -sf /spare/ffs/edrx/pkg ~/pkg
# (find-sh0 "cd ~/pkg/ && /bin/pwd")

#*
# (to "pkgsrc-tarball")
# http://www.netbsd.org/docs/pkgsrc/getting.html#getting-via-tar
# ftp://ftp.netbsd.org/pub/pkgsrc/
# ftp://ftp.netbsd.org/pub/pkgsrc/pkgsrc-2007Q4/pkgsrc-2007Q4.tar.gz

rm -Rf ~/bigsrc/pkgsrc/
tar -C ~/bigsrc/ -xzf \
  $S/ftp/ftp.netbsd.org/pub/pkgsrc/pkgsrc-2007Q4/pkgsrc-2007Q4.tar.gz
cd     ~/bigsrc/pkgsrc/

cd ~/bigsrc/pkgsrc/bootstrap
# ./bootstrap --unprivileged --ignore-user-check |& tee ob
  ./bootstrap --unprivileged   2>&1 | tee ob

#*
# (code-c-d "pkgsrc" "~/bigsrc/pkgsrc/")
# (code-c-d "pkg" "~/pkg/")
# (find-pkgsrcfile "")
# (find-pkgsrcfile "bootstrap/README.Linux")
# (find-pkgsrcfile "bootstrap/ob")
# (find-pkgsrcfile "lang/lua/Makefile")
# (find-fline "~/pkg/bin/")
# (find-fline "~/pkg/")
# (find-pkgfile "var/db/pkg/")
#*
export MANPATH=:$HOME/pkg/man
export MAKECONF=$HOME/pkg/etc/mk.conf
# And I have $HOME/pkg/bin in my PATH.

cd ~/bigsrc/pkgsrc/lang/lua/
bmake clean
bmake    2>&1 | tee oma

#*
# Random tests...
cd ~/bigsrc/pkgsrc/pkgtools/digest/
bmake MAKECONF=$HOME/pkg/etc/mk.conf 2>&1 | tee om

cd ~/bigsrc/pkgsrc/lang/lua/
bmake clean
bmake MAKECONF=$HOME/pkg/etc/mk.conf 2>&1 | tee oma

#*
# (find-pkgsrcfile "lang/lua/om")
# (ee-cp (ee-pkgsrcfile "lang/lua/om") (ee-twupfile "lang_lua_om") 'over)
# http://angg.twu.net/lang_lua_om
#   ^ The output, including the error, is here...
# (find-pkgfile "")
# (find-pkgfile "etc/mk.conf")
# (ee-cp (ee-pkgfile "etc/mk.conf") (ee-twupfile "etc_mk.conf") 'over)
# http://angg.twu.net/etc_mk.conf
#   ^ The mk.conf file is here.

# A test for the traffic light chars:
(prompt) command
output
  ^ note





#####
#
# pkgsrc: andre's notes
# 2008jan14
#
#####

# «pkgsrc-notes-andre»  (to ".pkgsrc-notes-andre")
# https://ghetto.homeunix.net/~andre/code.projects/build.neil/builder-doc.txt
# http://angg.twu.net/e/netbsd.e.html#pkgsrc-nonroot-new-notes
# (find-es "netbsd")
# (find-es "netbsd" "pkgsrc-nonroot-new-notes")

# pkgsrc environment

. create user 'builder';
. add to its environment variables the following sequence:

	$ export MY_HOME=${HOME}/pkgsrc
	$ export LOCALBASE=${MY_HOME}/pkg
	$ export PKG_DBDIR=${MY_HOME}/db/pkg
	$ export PKGSRCDIR=/spare/ffs/pkgsrc
	$ export VARBASE=${MY_HOME}/var

. according to the pkgsrc-guide we should also set this env var, to avoid
	troubles with privileges:

	$ export UNPRIVILEGED=yes

. bootstrap netbsd through the command:

	$ cd pkgsrc/bootstrap
	$ ./bootstrap --prefix=${LOCALBASE} \
		--pkgdbdir=${PKG_DBDIR} \
		--ignore-user-check

. add the environment variables to .profile
. add ${HOME}/pkgsrc/bin to ${PATH} of 'builder' user:

	export ${PATH}=:${MY_HOME}/pkg/bin:${MY_HOME}/pkg/sbin:${PATH}:

. link ${HOME}/pkgsrc/pkgsrc.dir to ${PKGSRCDSIR}
	
	$ ln -s ${PKGSRCDIR} pkgsrc/pkgsrc.dir

. create a shell function 'pkglocate()', with the command:

	pkglocate()
	{
		cd ${PKGSRCDIR}
		./pkglocate -i $@ | \
			awk -F: '{ print $1 }' | \
			uniq -c
		cd -
	}
. create some alias, for ls, mv, rm, and 'pkgsrcdir' (which moves user to the
	current dir to ${PKGSRCDIR})

	alias pkgsrcdir='cd ${PKGSRCDIR}; pwd'

# installing expect

$ pkgsrcdir
$ cd lang/tcl-expect
$ make install

# installing qemu

$ pkgsrcdir
$ cd emulators/qemu
$ make install












# http://pkgsrc.se/pkgtools
# http://pkgsrc.se/www/w3m
# http://pkgsrc.se/www/emacs-w3m
# (find-fline "/disk/distro/pkgsrc/www/w3m/")
# (find-fline "/disk/distro/pkgsrc/mk/bsd.options.mk")
# (find-fline "/disk/distro/pkgsrc/www/emacs-w3m/")

# (find-sh "locate qmail")
# (find-sh "pkg_info")
# (find-sh "pkg_info | sort")
# (find-sh "pkg_info qmail")
# (find-fline "/var/qmail/doc/")
# (find-fline "/opt/")
# (find-fline "/opt/qt4.2/doc/html/")

# (find-sh "mbmon")
# (find-man "mbmon")








#  Local Variables:
#  coding:               utf-8-unix
#  End: