Re: Confused by what make package should do
- Reply: Matthew Phillips : "Re: Confused by what make package should do"
- In reply to: Kurt Hackenberg : "Re: Confused by what make package should do"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Apr 2024 19:30:14 UTC
Kurt Hackenberg <kh@panix.com> writes: > Matthew Phillips <matthew@matthewphillips.info> writes: > > It's trying to install the port itself. To /usr/local/bin specifically. > > It seems like it's running `make install` on the ports Makefile. > From man ports(7): "package Make a binary package for the port. The > port will be installed if it has not already been." This is both true, in that the `package` target implies the `stage` target with does run `make install` in $WRKSRC, and highly misleading, because the `stage` target does not install the port to your machine, which would require superuser privileges, but to a staging directory, which does not. The `install` target, which implies the `package` target, uses `pkg add` to install the package to your machine. Provided all prerequesites are already installed (use `make missing` to check), you should be able to run `make package` as an unprivileged user. I do it all the time. Note that if the port (or a missing dependency) has options, the ports framework will attempt to perform the `config` target, which requires superuser privileges (in order to store the selected configuration in `/var/db/ports`). You can disable that by defining the BATCH variable either in your environment (`export BATCH=`) or on the command line (`make BATCH= missing`, `make BATCH= package`). In that case you will have to either already have run `make config` or set the options you want to set in `/etc/make.conf` or on the command line, if you're not ok with the defaults. DES -- Dag-Erling Smørgrav - des@FreeBSD.org