+++ Sunday 27 July 2025 +++ Running pkgsrc in a FreeBSD jail ================================ On IRC, anthk advised me to take a look at pkgsrc to install some software on the old Power Mac G4. Also anthk was so kind to point me to a compiler for this system, that might support pkgsrc. I think that when I foobar this Power Mac, it will be problematic to recover it, I think I don't have any installation media. I don't have any recent experience with pkgsrc and I decided that it would be best to first do some practicing with pkgsrc. FreeBSD jail ------------ A test jail runs on the little FreeBSD server in our home network. This jail is only used for test work, and can be killed at any moment. I stopped this jail, did a zfs rollback and fetched the pkgsrc sources. fetch https://cdn.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.xz tar -zxvf pkgsrc.tar Also in preparation for a so-called unprivileged install, I changed the path settings by adding two lines at the bottom of `~/.shrc': PATH=$HOME/bin:$HOME/sbin:$PATH MANPATH=$HOME/man During some test runs, pkgsrc notified a problem: "pkg_add error: was built for a different platform" There was some confusion between "amd64" and "x86_64". This is resolved by adding a line near the top of $HOME/etc/mk.conf: MACHINE_ARCH= x86_64 With this out of the way, we can bootstrap pkgsrc: cd ~/pkgsrc/bootstrap ./bootstrap --unprivileged --prefix /home/matto \ --prefer-pkgsrc yes --make-jobs 4 cd ~/pkgsrc/pkgtools/pkg_install make install clean The choice unprivileged install makes sure everything is installed in the home directory, like in $HOME/bin, $HOME/sbin, and so on. Installing packages ------------------- To install a package, go into its directory and issue the command: make install clean First, let's start with cvs and rcs. cvs is needed to keep the pkgsrc source tree up to date. Not having rcs was one of the issues I ran into during the Old Computer Challenge. cd ~/pkgsrc/devel/openrcs make install clean cd ~/pkgsrc/devel/scmcvs make install clean Now rcs can be used for version control of small files, like config files. I keep my phlog in a RCS-direcory, that is why I wanted to use it during the Challenge. Update the pkgsrc source tree with: cvs update -dP Next follows the installation of lynx. Lynx is very useful TUI gopher and web browser. In the past, it used to be part of the default install of several Linux distro's. Unfortunately, this is no longer the case. cd ~/pkgsrc/www/lynx make install clean After this, I expect to be able to cope with pkgsrc just in order to install openrcs and perhaps some other packages on the Power Mac G4. During the web search I did for all this, I ran in some interesting web pages, like Rubenerds post "Using NetBSD’s pkgsrc everywhere I can" [1]. According to this post, Rubenerd uses the systems native package manger to install desktop- or server applications, and uses pkgsrc for additional packages. I like the idea of running a system that's mainly build from pkgsrc package, but for this I need more knowledge, like deviating to a specific version of a certain program and stuff like that. I'm looking forward to spending more time with pkgsrc :) [1]: https://rubenerd.com/using-netbsds-pkgsrc-everywhere-i-can/ Last edited: $Date: 2025/07/27 19:17:35 $