New feature of bsd.port.mk: "Switching to root credentials". Do we need this ALWAYS?

Lev Serebryakov lev at FreeBSD.org
Sat Aug 2 12:01:41 PDT 2003


Hello, ports! How are you?

  I'm building my ports (ports, which I maintain) in my home
directory. I have them checked out to my home directory
(/usr/home/lev/ports) and I install them into my home directory, and I
register them in my home directory.

  So, typical command line for `make(1)' is:

make DISTDIR=/usr/home/lev/distfiles PREFIX=/usr/home/lev/local PKG_DBDIR=/usr/home/lev/var/db/pkg all
make DISTDIR=/usr/home/lev/distfiles PREFIX=/usr/home/lev/local PKG_DBDIR=/usr/home/lev/var/db/pkg install
make DISTDIR=/usr/home/lev/distfiles PREFIX=/usr/home/lev/local PKG_DBDIR=/usr/home/lev/var/db/pkg deinstall

  And now `make install' asks me for root password! And all files are
installed into my home directory with root permissions! And `make
desintall' doesn't work at all (because it don't use `su(1)')!
  I don't think, that it was good idea to `su(1)' into `root' on ANY
`make install'! It is very difficult to install port `locally' now,
and it is very uncomfortable for me as maintainer of many ports. I
don't want to install ports, which I'm upgrading, into system (before
I'm sure, that port was upgraded properly), and I don't want to become
root for this operation, and after that, pass all files to myself
(from root) for working of `make deinstall'.

  May be, `make install' should check owner of PREFIX, and if owner --
current user, skip `su(1)' phase?

               Lev Serebryakov



More information about the freebsd-ports mailing list