CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

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.
  1. Add a pkgmk user and group for building ports without root privileges
    # groupadd pkgmk
    # useradd -m -g pkgmk pkgmk
    
  2. 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).
  1. 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"
    
  2. Make the directories
    # mkdir /home/pkgmk/{distfiles,packages,work}
    # chown pkgmk:pkgmk /home/pkgmk/*
    # chmod 775 /home/pkgmk/*
    
  3. Optional: enable contrib repository
    # mv /etc/ports/contrib.rsync.inactive /etc/ports/contrib.rsync
    
  4. Retrieve ports
    # ports -u
    
  5. Get fakeroot
    # prt-get install fakeroot 
    
  6. Some people like to enable extra permissions for wheel group in /etc/sudoers
    %wheel ALL=(ALL) ALL
    
  7. Add a normal user
    # useradd -m -G wheel,pkgmk -s /bin/bash jukka
    # passwd jukka