First time porter seeks guidance on 'make package' (as user)

Yuri yuri at rawbw.com
Tue Jan 9 03:22:36 UTC 2018


On 01/08/18 12:46, James E Keenan wrote:
> Can someone offer guidance as to how to proceed? 


As a root:

1. Check out the ports tree: svn checkout 
https://svn.FreeBSD.org/ports/head /usr/ports (if you don't have it 
checked out yet)

2. Change the ports tree to your user: chown -R {username}:users /usr/ports

3. Install sudo: pkg install sudo

4. Add yourself to sudoers: /usr/local/etc/sudoers (alternatively, add 
yourself to the 'wheel' group and enable '%wheel ALL=(ALL) ALL' in the 
sudoers file)

5. Add these 2 lines to sudoers:

Defaults        env_reset,timestamp_timeout=240
Defaults        !tty_tickets

6. In /etc/make.conf: add the line 'SU_CMD= /usr/local/bin/sudo -E sh -c'

As your own user:

7. Go into any port directory: cd /usr/ports/{category}/{portdir}

8. commands like 'make makesum', 'make install', 'make package', 'make 
clean' will only require your password once in 4 hours

You can download tarballs, build, install, uninstall, build packages, 
all without typing in your password more often than once in 240 minutes.

Using this method, you never need to do anything as a root again within 
the ports tree.


How to work with poudriere - is another story. :-)


Hope this helps,

Yuri




More information about the freebsd-ports mailing list