(The official MirPorts homepage can always be reached at http://mirbsd.de/ports which redirects to a "known working" mirror.)
On this page:
- Set-up instructions
- Platform-specific notes
- Using the MirPorts Framework
MirPorts—a derivative of the OpenBSD ports tree—is our solution for installing additional software packages not contained in the base system.
Both MirOS and MirPorts should put most of the “dotfiles” in users’ home directories in a single directory named “.etc”. You can have your own programs and scripts in ~/.etc/bin.
MirPorts is portable. It has support for the following operating systems:
- MirOS BSD (-stable and -current)
- OpenBSD (-stable and -current)
- Mac OS X (10.4 and newer) / Darwin
- Interix / SFU 3.5 (to a lesser degree)
Even on stable releases, using the newest MirPorts version is recommended. For all platforms, we are still searching for developers as well as testers to build packages and to submit bug reports.
Please refer to the installer’s manual page for an invocation reference of the Setup.sh script.
The system-wide setup is usually carried out by a user who can run commands as root by using sudo(8).
- First, MirPorts must be checked out from CVS into either /usr/ports
or /usr/mirports. If you are on MirOS and installed the ports10.ngz
set, you can skip this step, and you will find the sources unpacked in
/usr/ports. In the following commands, replace “mirports” by “ports”
to use the /usr/ports directory.
$ cd /usr $ sudo mkdir mirports $ sudo chown 2999 mirports $ cvs -d firstname.lastname@example.org:/cvs co -d mirports ports
- Now you need to run the setup script. It will automatically use
sudo(8) to gain root privileges where necessary. If the -e flag is
given below, the configuration files will be placed inside
/usr/mpkg/etc instead of /etc. If you do not have mksh, replace it by
$ cd /usr/mirports $ mksh Setup.sh -e
On MirOS, you can skip this step if you installed the pkgutl10.ngz set during the installation. If not, then run
$ cd /usr/ports ; make setup
instead of the commands above.
- On non-MirOS systems, to use MirPorts, some environment variables
(PATH etc.) have to be set. For Bourne shells (mksh, bash or similar),
run the following command:
$ . /usr/mpkg/db/SetEnv.sh
and add it to your ~/.profile or /etc/profile (for all users). For tcsh, the command is
$ source /usr/mpkg/db/SetEnv.csh
To make the changes permanent, the command must be added to ~/.tcshrc.
Installation as an unprivileged user
For an unprivileged installation, the same three steps as above are necessary. In the Setup.sh invocation, the -u flag is used to select an unprivileged setup, and the target directory is selected with the -l flag. This directory is usually located in your home directory and will contain all installed packages, configuration files and the package database. In the following, we will use for this directory.
$ cvs -d email@example.com:/cvs co -d mirports ports
$ cd ports $ mkdir -p /bin $ MKSH=/bin/mksh bash Setup.sh -uel
- Set environment variables:
$ . /db/SetEnv.sh
Or for tcsh:
$ source /db/SetEnv.csh
To install MirPorts system-wide on MirOS BSD, just execute
$ cd /usr/ports $ make setup
as an unprivileged user. The sudo command is invoked automatically to gain root privileges where needed.
Mac OS X
Before using MirPorts, you need to install the Developer Tools from the separate DVD provided, as well as the X11 package from the installation DVD.
MidnightBSD support is experimental, and it currently lacks support for the “i386-unknown-midnightbsd0.2” gnutarget in most applications. This should be unproblematic due to MirLibtool.
You must install perl from mports before setting up MirPorts, as parts of the infrastructure are written in Perl.
Note that the MirPorts Framework always uses the MirBSD Korn Shell internally to run command lines embedded in the Makefiles, configure scripts, etc. Since mksh lives as /bin/mksh in MidnightBSD, there is no need to install it; however, if a more recent version is available, you can upgrade it from shells/mksh; export MKSH=/mksh then (or overwrite the system’s copy).
Using MirPorts on OpenBSD is currently untested but should work well in principle. It does not conflict with the OpenBSD ports tree. You can use ksh for the Setup.sh invocation in step 2 above.
If you use MirPorts on OpenBSD and are willing to help us test, please drop an e-mail to the miros-discuss@ mailing list. Thanks!
Using the MirPorts Framework
The directories below /usr/ports are the categories for ports. Each port is contained in its own subdirectory and contains a Makefile. Just executing mmake install in such a directory will download the source code, compile it, create a binary package and install it. Dependencies are automatically installed when necessary. Some ports exist in different “flavours”, e.g. with or without X support.
For example, to install the “joe” port from the “editors” category, use the following commands:
$ cd /usr/ports/editors/joe $ mmake install clean
Always use mmake instead of make for invoking MirPorts commands. Some other useful commands are:
- To search for ports whose name contains “foo”, run the following
command in the top-level directory:
$ mmake search name=foo
- To show all flavours of a given port, run:
$ mmake show=FLAVOURS
- To install the package with, say, the “foo” and without the
“bar” flavour, run:
$ env FLAVOUR='foo no-bar' mmake install cleanNote that you must not place the assignment after the mmake invocation.