From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 17:36:42 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D728B10656AC for ; Tue, 26 Jun 2012 17:36:42 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gh0-f182.google.com (mail-gh0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 857AB8FC08 for ; Tue, 26 Jun 2012 17:36:42 +0000 (UTC) Received: by ghbz22 with SMTP id z22so223185ghb.13 for ; Tue, 26 Jun 2012 10:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=bxkjz0p4FS0M94+2IuDAd9ML8XRvq5EK7o60p+BnBf4=; b=innM/b7tqwE2N+paGuVfGvBFqO3ADkhffRL2VVWPS5BaHQR/Q4pI0Lg0eKrujCw+6e qMYS2bAI70xWggK1vxoWCnO5ZlFbYUb5XAlIjX6JS7zqgCnw+PvIhxbPj4Nm9HaPT/m+ uuM/rdLV8qAfHBe5dsl9Ldsj69EqOWbantHeQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=bxkjz0p4FS0M94+2IuDAd9ML8XRvq5EK7o60p+BnBf4=; b=enY7vW4qv4sRCd7b+kSAPafFM3fbWh/weCD9Dl+yOXdm0fj0967BsnACMPzbZPX2le mdYI1utqLAyYPtZ3AkFMQA2NVTRFlZwUlif8rCSYU07gCf/38aoPVq8WAAS9OrNcIDXg JxBACXwZOX6mflpBciH5XxykcRaG/yXOxL8poAQYgSvfO91Yj5JWynA9WDxafZWHXASK /v2vXqbuvAZNZRtSjd8ErsnZ+M7xyXvom9tM8AgjUeqPh/ogMeCPSzTNVzqOxfglPwNZ 2F2hfdTEZ0XWPd+vPqoPu1BnqKSWIA4iT72pgX1qa9Ll8Uv4I+0C6YaSDkp0IUelS4i2 jAdg== MIME-Version: 1.0 Received: by 10.60.171.174 with SMTP id av14mr17122934oec.61.1340732201076; Tue, 26 Jun 2012 10:36:41 -0700 (PDT) Received: by 10.182.115.35 with HTTP; Tue, 26 Jun 2012 10:36:41 -0700 (PDT) In-Reply-To: References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Date: Tue, 26 Jun 2012 10:36:41 -0700 Message-ID: From: Peter Wemm To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmCVkRe9k8FrMSjWFckrJZwP+vuVOiws0RDW10eXOkjd7Uw4zntOP8BO64WtPP8RtLzChQU Cc: freebsd-arch@freebsd.org, Simon Gerraty Subject: Re: Allow user install X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 17:36:42 -0000 On Tue, Jun 26, 2012 at 10:27 AM, Peter Wemm wrote: > On Tue, Jun 26, 2012 at 3:54 AM, Dag-Erling Sm=F8rgrav wrote= : >> Simon Gerraty writes: >>> The patch below is a step towards supporting unprivileged buildworld >>> etc. =A0Eg. >> >> Wow, this is really cool - and long overdue. > > Yep. =A0I've been doing this on the command line for user installs for a > while.. =A0There's only so many times you can type things like: > > make BINOWN=3D`id -u` BINGRP=3D`id -g` SHAREOWN=3D`id -u` ... NO_FSCHG=3D= y > .... .... installworld > > .. before going crazy. =A0Having a single knob to do it would be much > more convenient. For what its worth, the footprint of the diff can be reduced considerably if you take advantage of the fact that "install -o $you -g $you ..." works and is a no-op. In the attached patch, things like this wouldn't strictly be needed if it was done that way. - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${BIN_INSTALL_OWN} -m ${BINMODE} \ It works either way for me, of course. I'm probably mistaken but I had a vague recollection that install(8) used to default to "-o root -g wheel" if you didn't specify something. And it did something obnoxious like delete the original file... --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell