From owner-freebsd-ports Thu Sep 26 9:39:29 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AC0B37B401 for ; Thu, 26 Sep 2002 09:39:27 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id B064343E6E for ; Thu, 26 Sep 2002 09:39:26 -0700 (PDT) (envelope-from swear@attbi.com) Received: from localhost.localdomain ([12.242.158.67]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020926163926.RWUJ1515.sccrmhc01.attbi.com@localhost.localdomain> for ; Thu, 26 Sep 2002 16:39:26 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id g8QGfq3q090408 for ; Thu, 26 Sep 2002 09:41:52 -0700 (PDT) (envelope-from swear@attbi.com) Received: (from jojo@localhost) by localhost.localdomain (8.12.5/8.12.5/Submit) id g8QGfkKu090405; Thu, 26 Sep 2002 09:41:46 -0700 (PDT) (envelope-from swear@attbi.com) X-Authentication-Warning: localhost.localdomain: jojo set sender to swear@attbi.com using -f To: freebsd-ports@freebsd.org Subject: Installing ports as non-root user. From: swear@attbi.com (Gary W. Swearingen) Date: 26 Sep 2002 09:41:46 -0700 Message-ID: Lines: 50 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org (I've tried discussing this on -questions a few times with poor results, so please excuse me for bothering you here with so much to read.) It has always given me the creeps to run downloaded installation scripts (Makefiles, etc) while running as "root" on a system which I've spent much time trying to secure so people can't run their scripts as root. Without spending inordinate amounts of times dissecting install scripts and installing "by hand", I've seem compelled to run these scripts as root. People have implied that the ports system has the means to improve this situation and I had high hopes about it which have turned sour as I've tried to make it work. Main Question: Is the ports system designed to make it possible to install (all?) ports without being "root"? Now, obviously, there are ports which one will eventually WANT to run as root or even install as root, but should I be ABLE to do it as non-root? Am I nuts in thinking this sort of thing should be feasible? Or is it just of matter of the port creators/maintainers being (understandably) unwilling to patch up the source scripts which insist on doing things as root? People have implied that I just need to change a few env.vars. and everything should be fine, but it looked like that would be very messy, so I simply created a new user "local" and gave it ownership of dir. trees /usr/ports, /usr/local, /var/db/pkg. I soon learned to add the /usr/X11R6 and /usr/compat trees too. Now I'm discovering that Makefiles insist on doing things as "root" and want to install stuff to base-OS dirs and I can't find envars in bsd.ports.mk to override it. For example, the linux-gtk port seems to ignore USE_LINUX_PREFIX and wants to install to /etc and /usr/lib (though it tries to deinstall from /compat/linux). And the libwww port says (lines deleted): Warning: not superuser, you may get some errors during installation. Warning: not superuser, can't run mtree. /bin/sh ../../../libtool --mode=install /usr/bin/install -c -o root -g wheel libxmltok.la /usr/local/lib/libxmltok.la /usr/bin/install -c -o root -g wheel .libs/libxmltok.so.1 /usr/local/lib/libxmltok.so.1 install: /usr/local/lib/libxmltok.so.1: chown/chgrp: Operation not permitted Note that it's trying to install as root:wheel when I'm running as "local". I've seen the above problems in other ports too. Should I consider ports which won't (easily?) install as non-root to be broken and ask for them to be fixed? I realize that I can't expect them to be fixed immediately, but should it be expected at all that (all?) ports should be able to be installed to non-root places as non-root? Thanks for slogging your way through this long, dense message. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message