Back to wiki start page
Category: General
Post installation notes
Author
Mikhail Kolesnik
Description
It is a list of common steps someone might want to perform just after the first boot (an extended and updated version of Jukka Heino's text found somewhere in the google's cache). Take it as an example and adjust to your needs with care.
Instructions
Note
It's recommended to select opt/sudo during install. You'll be able to skip some steps if it's not a cleanly installed system.
- Add a pkgmk user and group for building ports without root privileges
# groupadd pkgmk
# useradd -m -g pkgmk pkgmk
- Set up fakeroot building in /etc/prt-get.conf
makecommand sudo -H -u pkgmk /usr/bin/fakeroot /usr/bin/pkgmk
addcommand sudo /usr/bin/pkgadd
Note
Manual invocations of pkgmk in the port directory will not be affected by these
/etc/prt-get.conf settings. If you plan to run pkgmk by hand, as an unprivileged user, then you should be aware that the -i|--install|-u|--upgrade flags do not currently trigger any logic to customize the addcommand (hard-coded as /usr/bin/pkgadd in pkgutils 5.40.10). A
proposed extension of pkgmk would endow this script with the ability to respect a new flag --addcommand, and then it will be possible to build and install in one step (rather than a
fakeroot pkgmk followed by a
sudo pkgadd).
- Set up source and package directories in /etc/pkgmk.conf
PKGMK_SOURCE_DIR="/home/pkgmk/distfiles"
PKGMK_PACKAGE_DIR="/home/pkgmk/packages"
PKGMK_WORK_DIR="/home/pkgmk/work/$name"
- Make the directories
# mkdir /home/pkgmk/{distfiles,packages,work}
# chown pkgmk:pkgmk /home/pkgmk/*
# chmod 775 /home/pkgmk/*
- Optional: enable contrib repository
# mv /etc/ports/contrib.rsync.inactive /etc/ports/contrib.rsync
- Retrieve ports
# ports -u
- Get fakeroot
# prt-get install fakeroot
- Some people like to enable extra permissions for wheel group in /etc/sudoers
%wheel ALL=(ALL) ALL
- Add a normal user
# useradd -m -G wheel,pkgmk -s /bin/bash jukka
# passwd jukka