From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 06:33:17 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 675BE106564A for ; Tue, 26 Jun 2012 06:33:17 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og111.obsmtp.com (exprod7og111.obsmtp.com [64.18.2.175]) by mx1.freebsd.org (Postfix) with ESMTP id 112BF8FC0A for ; Tue, 26 Jun 2012 06:33:17 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob111.postini.com ([64.18.6.12]) with SMTP ID DSNKT+lXrCHr7+eCmfrycxWSw64OEZGZdkbI@postini.com; Mon, 25 Jun 2012 23:33:17 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 25 Jun 2012 23:30:31 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5Q6UIh41763; Mon, 25 Jun 2012 23:30:19 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id D05DA58081; Mon, 25 Jun 2012 23:30:17 -0700 (PDT) To: X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 25 Jun 2012 23:30:17 -0700 From: Simon Gerraty Message-ID: <20120626063017.D05DA58081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: sjg@juniper.net Subject: 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 06:33:17 -0000 The patch below is a step towards supporting unprivileged buildworld etc. Eg. $ cd bin/cat $ make -n install DESTDIR=/tmp install -s -o root -g wheel -m 555 cat /tmp/bin install -o root -g wheel -m 444 cat.1.gz /tmp/usr/share/man/man1 $ make -n install -DWITHOUT_INSTALL_OWN DESTDIR=/tmp install -s -m 555 cat /tmp/bin install -m 444 cat.1.gz /tmp/usr/share/man/man1 $ This is similar to the approach used in my generic mk-files, but leveraging the -DWITHOUT_* stuff in bsd.own.mk --sjg Index: share/mk/bsd.files.mk =================================================================== --- share/mk/bsd.files.mk (revision 237026) +++ share/mk/bsd.files.mk (working copy) @@ -23,6 +23,11 @@ ${group}MODE?= ${SHAREMODE} ${group}DIR?= ${BINDIR} +.if ${MK_INSTALL_OWN} != "no" +${group}_INSTALL_OWN ?= -o ${${group}OWN} -g ${${group}GRP} +${group}_INSTALL_OWN.ALLSRC ?= -o ${${group}OWN_${.ALLSRC:T}} -g ${${group}GRP_${.ALLSRC:T}} +.endif + _${group}FILES= .for file in ${${group}} .if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \ @@ -39,8 +44,8 @@ .endif installfiles: _${group}INS_${file:T} _${group}INS_${file:T}: ${file} - ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \ - -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ + ${INSTALL} ${${group}_INSTALL_OWN.ALLSRC} \ + -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else @@ -51,11 +56,11 @@ installfiles: _${group}INS _${group}INS: ${_${group}FILES} .if defined(${group}NAME) - ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} ${${group}_INSTALL_OWN} \ -m ${${group}MODE} ${.ALLSRC} \ ${DESTDIR}${${group}DIR}/${${group}NAME} .else - ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \ + ${INSTALL} ${${group}_INSTALL_OWN} \ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR} .endif .endif Index: share/mk/bsd.own.mk =================================================================== --- share/mk/bsd.own.mk (revision 237026) +++ share/mk/bsd.own.mk (working copy) @@ -353,6 +353,7 @@ INET6 \ INFO \ INSTALLLIB \ + INSTALL_OWN \ IPFILTER \ IPFW \ IPX \ @@ -645,6 +646,13 @@ CTFCONVERT_CMD= @: .endif + +.if ${MK_INSTALL_OWN} != "no" +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$x_INSTALL_OWN ?= -o ${$xOWN} -g ${$xGRP} +.endfor +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(____) Index: share/mk/bsd.lib.mk =================================================================== --- share/mk/bsd.lib.mk (revision 237026) +++ share/mk/bsd.lib.mk (working copy) @@ -259,15 +259,15 @@ .ORDER: beforeinstall _libinstall _libinstall: .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} -C ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR} .endif .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} -C ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR} .endif .if defined(SHLIB_NAME) - ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} ${STRIP} ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(SHLIB_LINK) @@ -287,7 +287,7 @@ sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${SHLIBDIR}/${SHLIB_NAME},g' \ -e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${LIBDIR},g' \ ${.CURDIR}/${SHLIB_LDSCRIPT} > lib${LIB}.ld - ${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} -S -C ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .else .if ${SHLIBDIR} == ${LIBDIR} @@ -304,11 +304,11 @@ .endif # SHLIB_LINK .endif # SHIB_NAME .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR} .endif .if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB) - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + ${INSTALL} ${LIB_INSTALL_OWN} -m ${LIBMODE} \ ${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR} .endif .endif # !defined(INTERNALLIB) Index: share/mk/bsd.prog.mk =================================================================== --- share/mk/bsd.prog.mk (revision 237026) +++ share/mk/bsd.prog.mk (working copy) @@ -157,10 +157,10 @@ _proginstall: .if defined(PROG) .if defined(PROGNAME) - ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${STRIP} ${BIN_INSTALL_OWN} -m ${BINMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME} .else - ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${STRIP} ${BIN_INSTALL_OWN} -m ${BINMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR} .endif .endif @@ -185,10 +185,15 @@ SCRIPTSOWN_${script:T}?= ${SCRIPTSOWN} SCRIPTSGRP_${script:T}?= ${SCRIPTSGRP} SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE} + +.if ${MK_INSTALL_OWN} != "no" +SCRIPTS_INSTALL_OWN.ALLSRC ?= -o ${SCRIPTSOWN_${.ALLSRC:T}} -g ${SCRIPTSGRP_${.ALLSRC:T}} +.endif + _scriptsinstall: _SCRIPTSINS_${script:T} _SCRIPTSINS_${script:T}: ${script} - ${INSTALL} -o ${SCRIPTSOWN_${.ALLSRC:T}} \ - -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \ + ${INSTALL} ${SCRIPTS_INSTALL_OWN.ALLSRC} \ + -m ${SCRIPTSMODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}/${SCRIPTSNAME_${.ALLSRC:T}} .endfor Index: share/mk/bsd.doc.mk =================================================================== --- share/mk/bsd.doc.mk (revision 237026) +++ share/mk/bsd.doc.mk (working copy) @@ -135,11 +135,11 @@ realinstall: .for _dev in ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${BIN_INSTALL_OWN} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} .endfor .for _dev in ${PRINTERDEVICE:Nhtml} - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${BIN_INSTALL_OWN} -m ${BINMODE} \ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME} .endfor Index: share/mk/bsd.man.mk =================================================================== --- share/mk/bsd.man.mk (revision 237026) +++ share/mk/bsd.man.mk (working copy) @@ -53,7 +53,7 @@ .error bsd.man.mk cannot be included directly. .endif -MINSTALL?= ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +MINSTALL?= ${INSTALL} ${MAN_INSTALL_OWN} -m ${MANMODE} CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat Index: share/mk/bsd.info.mk =================================================================== --- share/mk/bsd.info.mk (revision 237026) +++ share/mk/bsd.info.mk (working copy) @@ -180,11 +180,11 @@ .if ${MK_INFO} != "no" && defined(INFO) install: ${INSTALLINFODIRS} .if !empty(IFILES:N*.html) - ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ + ${INSTALL} ${INFO_INSTALL_OWN} -m ${INFOMODE} \ ${IFILES:N*.html} ${DESTDIR}${INFODIR} .endif .if !empty(FORMATS:Mhtml) - ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \ + ${INSTALL} ${INFO_INSTALL_OWN} -m ${INFOMODE} \ ${INFO:S/$/.info.*.html/} ${DESTDIR}${INFODIR} .endif .else Index: share/mk/bsd.incs.mk =================================================================== --- share/mk/bsd.incs.mk (revision 237026) +++ share/mk/bsd.incs.mk (working copy) @@ -25,6 +25,11 @@ ${group}MODE?= ${NOBINMODE} ${group}DIR?= ${INCLUDEDIR} +.if ${MK_INSTALL_OWN} != "no" +${group}_INSTALL_OWN ?= -o ${${group}OWN} -g ${${group}GRP} +${group}_INSTALL_OWN.ALLSRC ?= -o ${${group}OWN_${.ALLSRC:T}} -g ${${group}GRP_${.ALLSRC:T}} +.endif + _${group}INCS= .for header in ${${group}} .if defined(${group}OWN_${header:T}) || defined(${group}GRP_${header:T}) || \ @@ -41,8 +46,8 @@ .endif installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} - ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ - -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ + ${INSTALL} -C ${${group}_INSTALL_OWN.ALLSRC} \ + -m ${${group}MODE_${.ALLSRC:T}} \ ${.ALLSRC} \ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} .else @@ -53,10 +58,10 @@ installincludes: _${group}INS _${group}INS: ${_${group}INCS} .if defined(${group}NAME) - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${INSTALL} -C ${${group}_INSTALL_OWN} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} .else - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ + ${INSTALL} -C ${${group}_INSTALL_OWN} -m ${${group}MODE} \ ${.ALLSRC} ${DESTDIR}${${group}DIR} .endif .endif From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 10:54:27 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 291291065677 for ; Tue, 26 Jun 2012 10:54:27 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id DE4228FC16 for ; Tue, 26 Jun 2012 10:54:26 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id D15AE6E23; Tue, 26 Jun 2012 10:54:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6F9E78C2D; Tue, 26 Jun 2012 12:54:25 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Simon Gerraty References: <20120626063017.D05DA58081@chaos.jnpr.net> Date: Tue, 26 Jun 2012 12:54:24 +0200 In-Reply-To: <20120626063017.D05DA58081@chaos.jnpr.net> (Simon Gerraty's message of "Mon, 25 Jun 2012 23:30:17 -0700") Message-ID: <86wr2uwdgf.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org 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 10:54:27 -0000 Simon Gerraty writes: > The patch below is a step towards supporting unprivileged buildworld > etc. Eg. Wow, this is really cool - and long overdue. I've been thinking for a while that some bor^H^H^Henterprising soul should hack install(1) so that if a specific environment variable is set, it writes the file to a tarball instead of writing it to disk. Unfortunately, there would still be a ton of ${LN} etc. that would need to be handled somehow. Perhaps install(1) should have an option to create symlinks so we could use that instead of ln -s, in the interest of reducing the number of different tools used during installation. (BTW, I find INSTALL_OWN confusing - how about UNPRIVILEGED_INSTALL or USER_INSTALL?) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 13:59:29 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 DCBA3106566B for ; Tue, 26 Jun 2012 13:59:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4A28FC08 for ; Tue, 26 Jun 2012 13:59:29 +0000 (UTC) Received: by yenl8 with SMTP id l8so4474508yen.13 for ; Tue, 26 Jun 2012 06:59:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=wEVVoKnThV2SaSmpSIsu0fx03OQh3o/pkZGZSSqmYvU=; b=ebpFPCV5iaF5XvZeRxHYU6SHubdKiRJsFQUoKEKwTy1KvRdM8Ds0T4zpokCZQQaJ4j 3xbYldAmMWuIXDnnmWm5PD5gU+iFOvT80uqxR+ELqciP4oXu2GgUkaTgQ3xqYzLqEgaj OAE+VMM//CA8mo1D65/QTzrfqIUQZuPVpGC/RYPoJJDzCRU+NJfIrC/rY8/8nAFIXv2E LurHkLQ9NnxtYD8P2sc2zU/cpOqSH6jWSlrKqMFhK+5RhQsZHdRZyyhXENieio1Wg+Lw HrqeEEG6+zRzqiyjdO0NJC+GAPWgmFeUXvq7lEqsKmTbb/vTX/mNLcuE7EIieJiPcV5M Uh4A== Received: by 10.50.203.98 with SMTP id kp2mr11098338igc.42.1340719168709; Tue, 26 Jun 2012 06:59:28 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id dc7sm2089780igc.13.2012.06.26.06.59.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 06:59:28 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: <86wr2uwdgf.fsf@ds4.des.no> Date: Tue, 26 Jun 2012 07:59:26 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <367C13EE-D631-4864-B873-FE912E6727A4@bsdimp.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQne+LORUffkk542FAQ1ofuNyfPu39Y9cGrND/2U1rtdpEXohIvJgqjZEBxvPyNv0Hm/jzlZ 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 13:59:30 -0000 On Jun 26, 2012, at 4:54 AM, Dag-Erling Sm=F8rgrav wrote: > Simon Gerraty writes: >> The patch below is a step towards supporting unprivileged buildworld >> etc. Eg. >=20 > Wow, this is really cool - and long overdue. Yes. > I've been thinking for a while that some bor^H^H^Henterprising soul > should hack install(1) so that if a specific environment variable is > set, it writes the file to a tarball instead of writing it to disk. > Unfortunately, there would still be a ton of ${LN} etc. that would = need > to be handled somehow. Perhaps install(1) should have an option to > create symlinks so we could use that instead of ln -s, in the interest > of reducing the number of different tools used during installation. I'd prefer that to this hack, honestly, but this hack is cool. NetBSD = did this years ago, and bringing it and the changes to xtree would be a = good thing. There's also a number of mkdirs that also need to be = updated. Let's not reinvent the wheel here, when there's a perfectly = good wheel elsewhere. > (BTW, I find INSTALL_OWN confusing - how about UNPRIVILEGED_INSTALL or > USER_INSTALL?) Well, the former is more correct. The latter are the real goal :) I'm = not sure I like any of the names, but that will work itself out. Warner From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 14:18:18 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3C44910656B0 for ; Tue, 26 Jun 2012 14:18:18 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id DB49B8FC0C for ; Tue, 26 Jun 2012 14:18:17 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id CDCBC6EC3; Tue, 26 Jun 2012 14:18:16 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 877438C51; Tue, 26 Jun 2012 16:18:16 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Warner Losh References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <367C13EE-D631-4864-B873-FE912E6727A4@bsdimp.com> Date: Tue, 26 Jun 2012 16:18:16 +0200 In-Reply-To: <367C13EE-D631-4864-B873-FE912E6727A4@bsdimp.com> (Warner Losh's message of "Tue, 26 Jun 2012 07:59:26 -0600") Message-ID: <86obo6w40n.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 14:18:18 -0000 Warner Losh writes: > Dag-Erling Sm=C3=B8rgrav writes: > > I've been thinking for a while that some bor^H^H^Henterprising soul > > should hack install(1) so that if a specific environment variable is > > set, it writes the file to a tarball instead of writing it to disk. > > Unfortunately, there would still be a ton of ${LN} etc. that would need > > to be handled somehow. Perhaps install(1) should have an option to > > create symlinks so we could use that instead of ln -s, in the interest > > of reducing the number of different tools used during installation. > I'd prefer that to this hack, honestly, but this hack is cool. NetBSD > did this years ago, and bringing it and the changes to xtree would be > a good thing. There's also a number of mkdirs that also need to be > updated. Let's not reinvent the wheel here, when there's a perfectly > good wheel elsewhere. We already have install -d for mkdir, and in any case, very few Makefiles actually create directories. But if the Makefiles use ${LN} instead of ln, we can easily point LN at a tool (perhaps even just a shell script) that does whatever is needed to record the symlink in the tarball instead of creating it on disk. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:01:40 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 1E0C91065672 for ; Tue, 26 Jun 2012 15:01:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id DD38B8FC1B for ; Tue, 26 Jun 2012 15:01:39 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so216018pbb.13 for ; Tue, 26 Jun 2012 08:01:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=WcOkPM4yjSxe+DLXQDuSh5msklzLZ+dJkF6Wni2beJY=; b=bmrwIIP0CM5ytuK46a1Imw+ctQ2OgZGQLhB4O2MKJ+km+iN6ZOB/zqLHPxfPdI4mVg Zg+BhccsxLISBkTe8eZVst2dPdEaQcWDout2AYnLKhjvHNp79APBWf2TN4PbLlW99c1t 6CiVBEXT1C8j6UZLvqloidWgmz6ItD2wVVeWiBAoSTdWOjGKXiUQNe/W4OVauXA+4fpe p4tA6PDJfkoWKQ0sErG/YPEvBRPGBXcw3/80pI/J4RofdJSplgORDuXjom48VASJ38sD IOazpkOafx+mesdlD+jHaeX9kXPQgoJpbF6EiS9L4/rHsjK6CTMwXskZvoETqcuFs20O LMdg== Received: by 10.68.213.7 with SMTP id no7mr53372408pbc.3.1340722899401; Tue, 26 Jun 2012 08:01:39 -0700 (PDT) Received: from [10.0.0.63] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ub6sm3286439pbc.64.2012.06.26.08.01.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 08:01:37 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: <86obo6w40n.fsf@ds4.des.no> Date: Tue, 26 Jun 2012 09:01:35 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <789426A5-00FF-4880-BC51-1998BC354D46@bsdimp.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <367C13EE-D631-4864-B873-FE912E6727A4@bsdimp.com> <86obo6w40n.fsf@ds4.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQkQ/rsbu36VN9Ye/MwnEOk9U2BMrl9eUbBrQhCQBc6F4jGpk5mKpX3x+ccn7Piicx6qXYIT 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 15:01:40 -0000 On Jun 26, 2012, at 8:18 AM, Dag-Erling Sm=F8rgrav wrote: > Warner Losh writes: >> Dag-Erling Sm=F8rgrav writes: >>> I've been thinking for a while that some bor^H^H^Henterprising soul >>> should hack install(1) so that if a specific environment variable is >>> set, it writes the file to a tarball instead of writing it to disk. >>> Unfortunately, there would still be a ton of ${LN} etc. that would = need >>> to be handled somehow. Perhaps install(1) should have an option to >>> create symlinks so we could use that instead of ln -s, in the = interest >>> of reducing the number of different tools used during installation. >> I'd prefer that to this hack, honestly, but this hack is cool. = NetBSD >> did this years ago, and bringing it and the changes to xtree would be >> a good thing. There's also a number of mkdirs that also need to be >> updated. Let's not reinvent the wheel here, when there's a perfectly >> good wheel elsewhere. >=20 > We already have install -d for mkdir, and in any case, very few > Makefiles actually create directories. >=20 > But if the Makefiles use ${LN} instead of ln, we can easily point LN = at > a tool (perhaps even just a shell script) that does whatever is needed > to record the symlink in the tarball instead of creating it on disk. NetBSD's build already handles those cases with install. It would be = easy enough to bring that in. The time consuming part will be fixing = all the "short cuts" and inconsistencies in the build so that its output = can be used. Warner From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:18:17 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 756C81065743 for ; Tue, 26 Jun 2012 15:18:17 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 4ECE98FC08 for ; Tue, 26 Jun 2012 15:18:17 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q5QFI8bT035758; Tue, 26 Jun 2012 15:18:08 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 7ftgu7422dyda4pqhnysb26f2n; Tue, 26 Jun 2012 15:18:08 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Tim Kientzle In-Reply-To: <86wr2uwdgf.fsf@ds4.des.no> Date: Tue, 26 Jun 2012 08:18:05 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1278) 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 15:18:17 -0000 On 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. Eg. >=20 > Wow, this is really cool - and long overdue. >=20 > I've been thinking for a while that some bor^H^H^Henterprising soul > should hack install(1) so that if a specific environment variable is > set, it writes the file to a tarball instead of writing it to disk. > Unfortunately, there would still be a ton of ${LN} etc. that would = need > to be handled somehow. Better idea: have the build write a textual description of the tar entries. That description can then be fed to tar to build the actual tarball. The description format that tar already supports is a variant mtree format borrowed from NetBSD. Each line specifies the tar entry fields (filename, owner, permissions, etc) and the filename where the file contents are stored. Tim From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:37:59 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02DD91065687 for ; Tue, 26 Jun 2012 15:37:59 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og125.obsmtp.com (exprod7og125.obsmtp.com [64.18.2.28]) by mx1.freebsd.org (Postfix) with ESMTP id 8919F8FC0A for ; Tue, 26 Jun 2012 15:37:58 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKT+nXUNCkve0kbpYr7K9VIho8EzpQ95Bw@postini.com; Tue, 26 Jun 2012 08:37:58 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 08:33:35 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QFXZh09735; Tue, 26 Jun 2012 08:33:35 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 3215258081; Tue, 26 Jun 2012 08:33:35 -0700 (PDT) To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86wr2uwdgf.fsf@ds4.des.no> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Comments: In-reply-to: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= message dated "Tue, 26 Jun 2012 12:54:24 +0200." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 08:33:35 -0700 Message-ID: <20120626153335.3215258081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: sjg@juniper.net, freebsd-arch@freebsd.org 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 15:37:59 -0000 On Tue, 26 Jun 2012 12:54:24 +0200, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= writes : >I've been thinking for a while that some bor^H^H^Henterprising soul >should hack install(1) so that if a specific environment variable is >set, it writes the file to a tarball instead of writing it to disk. That's an interesting twist. But rather than do violence to the meaning of "install" it might be better to skip it completely. The Junos build has for many years produced install images without "installing" anything. We are working on a variant of that approach for freebsd, which should prove useful. This patch is unrelated to that btw, but provides a intermediate improvement which I thought might be useful in an of itself. Teaching makefiles to tell tools what you actually want is better than hacking tools to ignore what you told them to do ;-) >Unfortunately, there would still be a ton of ${LN} etc. that would need Not sure I follow, ln isn't an issue when "installing" into a location that you own - eg the $DESTDIR model, and if you are not doing that supressing -o etc args won't help. >(BTW, I find INSTALL_OWN confusing - how about UNPRIVILEGED_INSTALL or >USER_INSTALL?) I always say, naming stuff is hard ;-) Which is half the reason for posting the patch - to get feedback on the name. Thanks --sjg From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:42:07 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9D0E106566B for ; Tue, 26 Jun 2012 15:42:07 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkpc120.us.dell.com (aussmtpmrkpc120.us.dell.com [143.166.82.159]) by mx1.freebsd.org (Postfix) with ESMTP id 9557D8FC18 for ; Tue, 26 Jun 2012 15:42:07 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,478,1336366800"; d="scan'208";a="506453771" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkpc120.us.dell.com with ESMTP; 26 Jun 2012 10:42:07 -0500 Message-ID: <4FE9D84E.7080402@vangyzen.net> Date: Tue, 26 Jun 2012 10:42:06 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tim Kientzle References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Simon Gerraty , freebsd-arch@freebsd.org 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 15:42:07 -0000 On 06/26/2012 10:18, Tim Kientzle wrote: > > On Jun 26, 2012, at 3:54 AM, Dag-Erling Smørgrav wrote: > >> Simon Gerraty writes: >>> The patch below is a step towards supporting unprivileged buildworld >>> etc. Eg. >> >> Wow, this is really cool - and long overdue. >> >> I've been thinking for a while that some bor^H^H^Henterprising soul >> should hack install(1) so that if a specific environment variable is >> set, it writes the file to a tarball instead of writing it to disk. >> Unfortunately, there would still be a ton of ${LN} etc. that would need >> to be handled somehow. > > Better idea: have the build write a textual description of the > tar entries. That description can then be fed to tar to build > the actual tarball. > > The description format that tar already supports is a variant > mtree format borrowed from NetBSD. Each line specifies > the tar entry fields (filename, owner, permissions, etc) and > the filename where the file contents are stored. Simon: Thank you for working on this and contributing it. I expect it will help a lot of people...including me. :) Tim's idea sounds great, and would cover several use-cases. Specifically, it leaves the build artifacts in the usual places so other, later builds can build against them, whereas writing the artifacts directly to a tar file does not. Building a manifest would also be very handy, and even necessary for correct packaging of the artifacts from an unprivileged build, where the on-disk meta data are not "correct". I'm already doing something like this at $WORK, but not using buildworld/installworld (to my dismay). I manually maintain an mtree file which gets fed to makefs to build an mfsroot. Although I like the fascist control of this method, it's more work to maintain. Automation is good. Eric From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:51:06 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0724C106566B for ; Tue, 26 Jun 2012 15:51:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B78AA8FC0A for ; Tue, 26 Jun 2012 15:51:05 +0000 (UTC) Received: by obbun3 with SMTP id un3so71481obb.13 for ; Tue, 26 Jun 2012 08:51:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=lelHu3L77bQ/AQwu0NOiOpkMFBdC7bMMCVNjfb28VDg=; b=V88IU507LY7GbnKNWFBbrv95Xics5ZoxcF2MPbCTukXyfV9bGcpAVZp2CT5R720dhC /93zge0VWHBQLDAOnJJdVYrTTF9jy8/UN/nzDuILpv53sZSYPU0g9cptaT+PMvVB/Diq mMYbVSYY0WMRnhdXr4ahInBKXdFvFIvwCmn6MR//1uFoxdIr+te576+23FYGpYSI/LPA f7SSLbfWy06NQgyACTbu2WGrogdU1vrwMgcvbhaxZzaRfpD51QRt+BOmwIg8LlzVM/D3 1c9LXakMv8NFQW1abmhEhwL12sTlop43HdSYMvMxQ5uHZf2tqvUtH17ANCTnLqUTrHYg jXBw== Received: by 10.182.169.98 with SMTP id ad2mr3542276obc.23.1340725864742; Tue, 26 Jun 2012 08:51:04 -0700 (PDT) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id k5sm27784193oek.12.2012.06.26.08.51.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 08:51:04 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: <4FE9D84E.7080402@vangyzen.net> Date: Tue, 26 Jun 2012 09:51:01 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <0D02B52A-662A-4A42-A239-A9A5D3ABA403@bsdimp.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <4FE9D84E.7080402@vangyzen.net> To: Eric van Gyzen X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlf5B1MQDBZ4k+p0wq1Vg2MfR55Gytndd2PjjIJeI1dKuoTklmbeoYF6uXHfwrAYBMTtFdp Cc: Tim Kientzle , freebsd-arch@freebsd.org, Simon Gerraty , =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= 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 15:51:06 -0000 On Jun 26, 2012, at 9:42 AM, Eric van Gyzen wrote: > On 06/26/2012 10:18, Tim Kientzle wrote: >>=20 >> On Jun 26, 2012, at 3:54 AM, Dag-Erling Sm=F8rgrav wrote: >>=20 >>> Simon Gerraty writes: >>>> The patch below is a step towards supporting unprivileged = buildworld >>>> etc. Eg. >>>=20 >>> Wow, this is really cool - and long overdue. >>>=20 >>> I've been thinking for a while that some bor^H^H^Henterprising soul >>> should hack install(1) so that if a specific environment variable is >>> set, it writes the file to a tarball instead of writing it to disk. >>> Unfortunately, there would still be a ton of ${LN} etc. that would = need >>> to be handled somehow. >>=20 >> Better idea: have the build write a textual description of the >> tar entries. That description can then be fed to tar to build >> the actual tarball. >>=20 >> The description format that tar already supports is a variant >> mtree format borrowed from NetBSD. Each line specifies >> the tar entry fields (filename, owner, permissions, etc) and >> the filename where the file contents are stored. >=20 > Simon: Thank you for working on this and contributing it. I expect = it will help a lot of people...including me. :) >=20 > Tim's idea sounds great, and would cover several use-cases. = Specifically, it leaves the build artifacts in the usual places so = other, later builds can build against them, whereas writing the = artifacts directly to a tar file does not. Building a manifest would = also be very handy, and even necessary for correct packaging of the = artifacts from an unprivileged build, where the on-disk meta data are = not "correct". >=20 > I'm already doing something like this at $WORK, but not using = buildworld/installworld (to my dismay). I manually maintain an mtree = file which gets fed to makefs to build an mfsroot. Although I like the = fascist control of this method, it's more work to maintain. Automation = is good. Yea. NetBSD's build already can produce the mtree files that makefs can = then use to create images with the right ownership without needing root = on the host, or to have the metadata live in the filesystem. Warner= From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 16:01:19 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 87B8E1065672 for ; Tue, 26 Jun 2012 16:01:19 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkps320.us.dell.com (aussmtpmrkps320.us.dell.com [143.166.224.254]) by mx1.freebsd.org (Postfix) with ESMTP id 52D2C8FC17 for ; Tue, 26 Jun 2012 16:01:19 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,478,1336366800"; d="scan'208";a="535428341" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkps320.us.dell.com with ESMTP; 26 Jun 2012 11:01:18 -0500 Message-ID: <4FE9DCCE.1060104@vangyzen.net> Date: Tue, 26 Jun 2012 11:01:18 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Simon J. Gerraty" References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626153335.3215258081@chaos.jnpr.net> In-Reply-To: <20120626153335.3215258081@chaos.jnpr.net> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-arch@freebsd.org 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 16:01:19 -0000 On 06/26/2012 10:33, Simon J. Gerraty wrote: > > On Tue, 26 Jun 2012 12:54:24 +0200, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= writes > : >> I've been thinking for a while that some bor^H^H^Henterprising soul >> should hack install(1) so that if a specific environment variable is >> set, it writes the file to a tarball instead of writing it to disk. > > That's an interesting twist. > But rather than do violence to the meaning of "install" it might be > better to skip it completely. > > The Junos build has for many years produced install images without > "installing" anything. We are working on a variant of that approach > for freebsd, which should prove useful. > > This patch is unrelated to that btw, but provides a intermediate improvement > which I thought might be useful in an of itself. > > Teaching makefiles to tell tools what you actually want is better than > hacking tools to ignore what you told them to do ;-) Agreed, on all points. (Not that my opinion carries much weight. I'm just an interested user.) Perhaps packages--such as a tarball or mfsroot--would be built from targets in src/release/Makefile. >> (BTW, I find INSTALL_OWN confusing - how about UNPRIVILEGED_INSTALL or >> USER_INSTALL?) > > I always say, naming stuff is hard ;-) > Which is half the reason for posting the patch - to get feedback on the > name. Indeed. Names are the handles by which we grasp the world, and everybody's hand is unique. INSTALL_OWN is a bit cumbersome. Its name also doesn't cover other privileged attributes, such as the schg flag. I like UNPRIVILEGED_INSTALL or USER_INSTALL. The user can set those to tell the build system what he/she wants. The build system can then set the other internal variables to make that happen. Those internal variables can change over time, but the user will still get the right behavior. The ports system uses INSTALL_AS_USER; the precedent is worth considering. Eric From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 16:15:38 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06668106566C for ; Tue, 26 Jun 2012 16:15:38 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B94158FC08 for ; Tue, 26 Jun 2012 16:15:37 +0000 (UTC) Received: by obbun3 with SMTP id un3so105506obb.13 for ; Tue, 26 Jun 2012 09:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7pmH39pC896jisu+EimGVgl5XOzCKJj6Y8HuPxYIumU=; b=o18eAXWHhqc46nztTM3aPaGWGXfmvdD5OVRjaF/Awr2EemGJ48bUtVKWZggQGr32lA PYdaLtS39W9fnGFgzIaQbFTg31JXgagDPw4iROWgzI5l0HYDR+KbRcYb0Fi8swdW6Ylx 7TfgvulrNclHaQ+TaWFMMfr9RQTdVknLoT/L85ThTsnXMRqGNdyBIhLauDcWssmS/EkV QDGXcJ34VEcVyICHswcVKgaKldlhyXWdH4jB02oKu0y0rcYU1OE2H03xh2DobUP3xTY9 QjHQnb7jHHs8fZoWJD312Tbe8415+GLZLPPDzqM5FWET1Pctz5kiAnQVplZTJ0mbTG9v Oebg== MIME-Version: 1.0 Received: by 10.182.114.97 with SMTP id jf1mr16919491obb.59.1340727337206; Tue, 26 Jun 2012 09:15:37 -0700 (PDT) Received: by 10.182.74.72 with HTTP; Tue, 26 Jun 2012 09:15:37 -0700 (PDT) In-Reply-To: <4FE9DCCE.1060104@vangyzen.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626153335.3215258081@chaos.jnpr.net> <4FE9DCCE.1060104@vangyzen.net> Date: Tue, 26 Jun 2012 09:15:37 -0700 Message-ID: From: Mehmet Erol Sanliturk To: Eric van Gyzen Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= , freebsd-arch@freebsd.org, "Simon J. 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 16:15:38 -0000 On Tue, Jun 26, 2012 at 9:01 AM, Eric van Gyzen wrote: > On 06/26/2012 10:33, Simon J. Gerraty wrote: > >> >> On Tue, 26 Jun 2012 12:54:24 +0200, =?utf-8?Q?Dag-Erling_Sm=C3=**B8rgrav?= >> writes >> : >> >>> I've been thinking for a while that some bor^H^H^Henterprising soul >>> should hack install(1) so that if a specific environment variable is >>> set, it writes the file to a tarball instead of writing it to disk. >>> >> >> That's an interesting twist. >> But rather than do violence to the meaning of "install" it might be >> better to skip it completely. >> >> The Junos build has for many years produced install images without >> "installing" anything. We are working on a variant of that approach >> for freebsd, which should prove useful. >> >> This patch is unrelated to that btw, but provides a intermediate >> improvement >> which I thought might be useful in an of itself. >> >> Teaching makefiles to tell tools what you actually want is better than >> hacking tools to ignore what you told them to do ;-) >> > > Agreed, on all points. (Not that my opinion carries much weight. I'm > just an interested user.) > > Perhaps packages--such as a tarball or mfsroot--would be built from > targets in src/release/Makefile. > > (BTW, I find INSTALL_OWN confusing - how about UNPRIVILEGED_INSTALL or >>> USER_INSTALL?) >>> >> >> I always say, naming stuff is hard ;-) >> Which is half the reason for posting the patch - to get feedback on the >> name. >> > > Indeed. Names are the handles by which we grasp the world, and > everybody's hand is unique. > > INSTALL_OWN is a bit cumbersome. Its name also doesn't cover other > privileged attributes, such as the schg flag. > > I like UNPRIVILEGED_INSTALL or USER_INSTALL. The user can set those to > tell the build system what he/she wants. The build system can then set the > other internal variables to make that happen. Those internal variables can > change over time, but the user will still get the right behavior. > > The ports system uses INSTALL_AS_USER; the precedent is worth considering. > > Eric > ______________________________**_________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@**freebsd.org > " > My vote is as follows where (1) : Most wanted (4) : Least wanted : (1) INSTALL_AS_USER (2) USER_INSTALL (3) UNPRIVILEGED_INSTALL (4) INSTALL_OWN Another name may be used for its context : INSTALL_AS_ROOT When names are sorted : INSTALL_AS_ROOT INSTALL_AS_USER they will come very near to each other . Thank you very much . Mehmet Erol Sanliturk From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 16:17:37 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEB291065670 for ; Tue, 26 Jun 2012 16:17:37 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mx1.freebsd.org (Postfix) with ESMTP id 953368FC1A for ; Tue, 26 Jun 2012 16:17:36 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKT+ngngXKwyvOTYmD+1pp+Aq7t9ovZNlG@postini.com; Tue, 26 Jun 2012 09:17:37 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 09:16:07 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QGG5h45630; Tue, 26 Jun 2012 09:16:05 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 5082A58081; Tue, 26 Jun 2012 09:16:05 -0700 (PDT) To: Tim Kientzle In-Reply-To: References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Comments: In-reply-to: Tim Kientzle message dated "Tue, 26 Jun 2012 08:18:05 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 09:16:05 -0700 Message-ID: <20120626161605.5082A58081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-arch@freebsd.org, sjg@juniper.net 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 16:17:37 -0000 On Tue, 26 Jun 2012 08:18:05 -0700, Tim Kientzle writes: >Better idea: have the build write a textual description of the >tar entries. That description can then be fed to tar to build >the actual tarball. Yes, that's what we do - manifest files that tar and other tools use to produce the install images. >The description format that tar already supports is a variant >mtree format borrowed from NetBSD. Each line specifies >the tar entry fields (filename, owner, permissions, etc) and >the filename where the file contents are stored. Yes, we've added that support to makefs - I believe it is already in -current. There's still quite a bit to do. From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 16:24:22 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E11BE106566C for ; Tue, 26 Jun 2012 16:24:22 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og110.obsmtp.com (exprod7og110.obsmtp.com [64.18.2.173]) by mx1.freebsd.org (Postfix) with ESMTP id 7A4E58FC0C for ; Tue, 26 Jun 2012 16:24:20 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob110.postini.com ([64.18.6.12]) with SMTP ID DSNKT+niNCcfM9EH1664cDx176wz7ZbmJ+ae@postini.com; Tue, 26 Jun 2012 09:24:22 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 09:21:44 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QGLfh50981; Tue, 26 Jun 2012 09:21:42 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 8CE5058081; Tue, 26 Jun 2012 09:21:41 -0700 (PDT) To: Eric van Gyzen In-Reply-To: <4FE9D84E.7080402@vangyzen.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <4FE9D84E.7080402@vangyzen.net> Comments: In-reply-to: Eric van Gyzen message dated "Tue, 26 Jun 2012 10:42:06 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 09:21:41 -0700 Message-ID: <20120626162141.8CE5058081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: Tim Kientzle , freebsd-arch@freebsd.org, sjg@juniper.net, =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= 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 16:24:23 -0000 On Tue, 26 Jun 2012 10:42:06 -0500, Eric van Gyzen writes: >Tim's idea sounds great, and would cover several use-cases. >Specifically, it leaves the build artifacts in the usual places so >other, later builds can build against them, whereas writing the Yes, this is almost exactly what we are planning to do. >artifacts directly to a tar file does not. Building a manifest would >also be very handy, and even necessary for correct packaging of the >artifacts from an unprivileged build, where the on-disk meta data are >not "correct". Exactly. >I'm already doing something like this at $WORK, but not using >buildworld/installworld (to my dismay). I manually maintain an mtree FWIW we don't plan to use buildworld either ;-) But until we can offer a useful alternative, incremental improvements can be helpful. >file which gets fed to makefs to build an mfsroot. Although I like the >fascist control of this method, it's more work to maintain. Automation >is good. We've been using essentially this method for many years (10+), but using a hacked version of mkisofs - for freebsd we are re-doing it for makefs. The maintenance isn't that big a deal - and yes automation wins. --sjg From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 17:00:29 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79E271065670 for ; Tue, 26 Jun 2012 17:00:29 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mx1.freebsd.org (Postfix) with ESMTP id 1C4708FC18 for ; Tue, 26 Jun 2012 17:00:29 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKT+nqrOxVcMwC1g103E8beIm7+QaLhO0s@postini.com; Tue, 26 Jun 2012 10:00:29 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 09:57:09 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QGbAh67506; Tue, 26 Jun 2012 09:37:10 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 7452158081; Tue, 26 Jun 2012 09:37:10 -0700 (PDT) To: Eric van Gyzen In-Reply-To: <4FE9DCCE.1060104@vangyzen.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626153335.3215258081@chaos.jnpr.net> <4FE9DCCE.1060104@vangyzen.net> Comments: In-reply-to: Eric van Gyzen message dated "Tue, 26 Jun 2012 11:01:18 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 09:37:10 -0700 Message-ID: <20120626163710.7452158081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-arch@freebsd.org 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:00:29 -0000 On Tue, 26 Jun 2012 11:01:18 -0500, Eric van Gyzen writes: >INSTALL_OWN is a bit cumbersome. Its name also doesn't cover other >privileged attributes, such as the schg flag. > >I like UNPRIVILEGED_INSTALL or USER_INSTALL. The user can set those to >tell the build system what he/she wants. The build system can then set >the other internal variables to make that happen. Those internal >variables can change over time, but the user will still get the right >behavior. > >The ports system uses INSTALL_AS_USER; the precedent is worth considering. Thanks - assuming the functionality is wanted, some agreement on the name of the knob will arise. From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 17:27:13 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED109106564A for ; Tue, 26 Jun 2012 17:27:13 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id A92598FC18 for ; Tue, 26 Jun 2012 17:27:13 +0000 (UTC) Received: by obbun3 with SMTP id un3so207805obb.13 for ; Tue, 26 Jun 2012 10:27:13 -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=CHtn362u9uORRHWkKkjTlptDRNQlQY4M72eIjCbqGmc=; b=uxCrNgdizh45XrwBz45mpm0+Xxgk57c+IMcd3AT3QyUMDRFhUtv7KdpEpJH6sra/rD GujIo84dpYbYs/zgHa3yavnWRfHjvrlxGPUJw34uNu0DgV8kiDputXSBK2dBlAai/6Hc cG8UF8A/In34HdKMP6+z6DSC51ywyALflI+KQ= 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=CHtn362u9uORRHWkKkjTlptDRNQlQY4M72eIjCbqGmc=; b=hl1kezF/i7blfLcAqnB/uoy+oYJ8ZqK+flCX2rUQEOMMjTUjzyYmdALrr9vegVxP3P XT7bHxm9wiCeKzt/1FFjnwKarM5wCFNxi5CK0xXsgo1qtf/aHPblf6k2aAtck49n1Yl+ o5bipOEQDbSQy1sESQ+aKBPjwmWbHEF4MSXQMdxfsqyW7/mCFVOFI/LqobGeqHXj44DM GAXUM2G0MsztDNDeiXPeg9XvhyHB+1BzlAXzbxDbOyQJfpm2TVJpvO+zKgS7MO/Rlq7F BOUzx3HsS/aQpz7/PcjFcAa960opxjgnxJYi96OTF7QO4AnWpxuiuiIlxy67Nz8h+WwF yWjg== MIME-Version: 1.0 Received: by 10.182.169.98 with SMTP id ad2mr3907236obc.23.1340731633044; Tue, 26 Jun 2012 10:27:13 -0700 (PDT) Received: by 10.182.115.35 with HTTP; Tue, 26 Jun 2012 10:27:12 -0700 (PDT) In-Reply-To: <86wr2uwdgf.fsf@ds4.des.no> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Date: Tue, 26 Jun 2012 10:27:12 -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: ALoCoQmvu6w74sYOtZ/T1qkdLs0H5jmJbsRnTFDEsWtvVDf/DBrdnkz9ZIxCGBOE5y2taZ9LtrEm 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:27:14 -0000 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. I've been doing this on the command line for user installs for a while.. There'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=3Dy .... .... installworld .. before going crazy. Having a single knob to do it would be much more convenient. --=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 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 From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 19:05:15 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 64F011065689 for ; Tue, 26 Jun 2012 19:05:15 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og127.obsmtp.com (exprod7og127.obsmtp.com [64.18.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id 515CC8FC18 for ; Tue, 26 Jun 2012 19:05:14 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob127.postini.com ([64.18.6.12]) with SMTP ID DSNKT+oH41RN6oSSjb+px7vYznLNNQvNPWgW@postini.com; Tue, 26 Jun 2012 12:05:15 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 12:03:50 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QJ3nh03738; Tue, 26 Jun 2012 12:03:50 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 98D5B58081; Tue, 26 Jun 2012 12:03:49 -0700 (PDT) To: Peter Wemm In-Reply-To: References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Comments: In-reply-to: Peter Wemm message dated "Tue, 26 Jun 2012 10:36:41 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 12:03:49 -0700 Message-ID: <20120626190349.98D5B58081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , freebsd-arch@freebsd.org 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 19:05:15 -0000 On Tue, 26 Jun 2012 10:36:41 -0700, Peter Wemm writes: >> make BINOWN=3D`id -u` BINGRP=3D`id -g` SHAREOWN=3D`id -u` ... NO_FSCHG=3D= >y >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. Good point. >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. Well if folk don't think -o ${USER} etc is too ugly (I've used that approach before too ;-) It has the distinct advantage of not needing to frob every Makefile that uses ${INSTALL} So the patch would become just something like the following to bsd.own.mk (WITH_INSTALL_AS_USER ignored for root) and the result looks like: $ make -C bin/cat -n install -DWITH_INSTALL_AS_USER DESTDIR=/tmp install -s -o 420 -g 690 -m 555 cat /tmp/bin install -o 420 -g 690 -m 444 cat.1.gz /tmp/usr/share/man/man1 $ Index: share/mk/bsd.own.mk =================================================================== --- share/mk/bsd.own.mk (revision 237964) +++ share/mk/bsd.own.mk (working copy) @@ -427,6 +427,7 @@ HESIOD \ ICONV \ IDEA \ + INSTALL_AS_USER \ LIBCPLUSPLUS \ NAND \ OFED \ @@ -645,6 +646,15 @@ CTFCONVERT_CMD= @: .endif +_uid!= id -u +.if ${MK_INSTALL_AS_USER} != "no" && ${_uid} != 0 +_gid!= id -g +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$xOWN = ${_uid} +$xGRP = ${_gid} +.endfor +.endif + .endif # !_WITHOUT_SRCCONF .endif # !target(____) From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 19:11:40 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAD561065676 for ; Tue, 26 Jun 2012 19:11:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 671CC8FC19 for ; Tue, 26 Jun 2012 19:11:40 +0000 (UTC) Received: by obbun3 with SMTP id un3so355552obb.13 for ; Tue, 26 Jun 2012 12:11:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=gyNzKD8QxsQAeWCzo6318wlBhx05nWBGnfMZpE+G93c=; b=fQMVXF9Xul6skQBwBkUp9T9pZ76pojvuskgP7Y/DTfQEYiBUXudd2iEicc+HAfH2S4 fAiW8erJ/Q4/yC6rIch381+3NoZjewn3VB99jj2S4vL7eP2WZP5TtgDYlZWv230NJNJZ xO9XcQ7TDZa64k6Tu29SYURYxzMrwWiPclbCO95jeAY67OXr/KjG6RNf+PxTDxPZeQht f0sQtAYrI19r9dniz7artx7rbROAHcqD7mHE45ed7IMMU/DBAg9pFbikDQmeT/3JowzN SOwQnDbA1M4b9001fgTBNyUS4EAnwpG584qv6h8zsYu3k1HFNj3rgdi9GPENp9ah7S4d p2WA== Received: by 10.182.17.42 with SMTP id l10mr17525695obd.52.1340737899731; Tue, 26 Jun 2012 12:11:39 -0700 (PDT) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id n6sm7534653oba.9.2012.06.26.12.11.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jun 2012 12:11:38 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120626190349.98D5B58081@chaos.jnpr.net> Date: Tue, 26 Jun 2012 13:11:36 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <97FE8A0B-1836-4C60-9086-9C30A1123CE9@bsdimp.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626190349.98D5B58081@chaos.jnpr.net> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlCPXsPoSOusJJBGzErPEENCGo9lHHRzKwqmnzYym99w8b0yQaTW02Kx2RkyCKOVb4uv1W6 Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , freebsd-arch@freebsd.org 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 19:11:40 -0000 On Jun 26, 2012, at 1:03 PM, Simon J. Gerraty wrote: > On Tue, 26 Jun 2012 10:36:41 -0700, Peter Wemm writes: >>> make BINOWN=3D3D`id -u` BINGRP=3D3D`id -g` SHAREOWN=3D3D`id -u` ... = NO_FSCHG=3D3D=3D >> y >=20 >> 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. >=20 > Good point. >=20 >> 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} \ >>=20 >> It works either way for me, of course. >=20 > Well if folk don't think -o ${USER} etc is too ugly (I've used that > approach before too ;-) > It has the distinct advantage of not needing to frob every Makefile > that uses ${INSTALL} >=20 > So the patch would become just something like the following to > bsd.own.mk (WITH_INSTALL_AS_USER ignored for root)=20 > and the result looks like: >=20 > $ make -C bin/cat -n install -DWITH_INSTALL_AS_USER DESTDIR=3D/tmp > install -s -o 420 -g 690 -m 555 cat /tmp/bin > install -o 420 -g 690 -m 444 cat.1.gz /tmp/usr/share/man/man1 > $ >=20 > Index: share/mk/bsd.own.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/mk/bsd.own.mk (revision 237964) > +++ share/mk/bsd.own.mk (working copy) > @@ -427,6 +427,7 @@ > HESIOD \ > ICONV \ > IDEA \ > + INSTALL_AS_USER \ > LIBCPLUSPLUS \ > NAND \ > OFED \ > @@ -645,6 +646,15 @@ > CTFCONVERT_CMD=3D @: > .endif=20 >=20 > +_uid!=3D id -u > +.if ${MK_INSTALL_AS_USER} !=3D "no" && ${_uid} !=3D 0 > +_gid!=3D id -g > +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE > +$xOWN =3D ${_uid} > +$xGRP =3D ${_gid} > +.endfor > +.endif > + > .endif # !_WITHOUT_SRCCONF >=20 > .endif # !target(____) I like this a lot more. Warner From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 19:42:55 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 3EE451065675 for ; Tue, 26 Jun 2012 19:42:55 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkps320.us.dell.com (aussmtpmrkps320.us.dell.com [143.166.224.254]) by mx1.freebsd.org (Postfix) with ESMTP id 064CE8FC16 for ; Tue, 26 Jun 2012 19:42:54 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,480,1336366800"; d="scan'208";a="535457048" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkps320.us.dell.com with ESMTP; 26 Jun 2012 14:42:54 -0500 Message-ID: <4FEA10BD.2080504@vangyzen.net> Date: Tue, 26 Jun 2012 14:42:53 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: Warner Losh References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626190349.98D5B58081@chaos.jnpr.net> <97FE8A0B-1836-4C60-9086-9C30A1123CE9@bsdimp.com> In-Reply-To: <97FE8A0B-1836-4C60-9086-9C30A1123CE9@bsdimp.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?rgrav?= , freebsd-arch@freebsd.org, =?ISO-8859-1?Q?Dag-Erling_Sm=F8?=, "Simon J. 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 19:42:55 -0000 On 06/26/2012 14:11, Warner Losh wrote: > > On Jun 26, 2012, at 1:03 PM, Simon J. Gerraty wrote: >> On Tue, 26 Jun 2012 10:36:41 -0700, Peter Wemm writes: >>>> make BINOWN=3D`id -u` BINGRP=3D`id -g` SHAREOWN=3D`id -u` ... NO_FSCHG=3D= >>> y >> >>> 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. >> >> Good point. >> >>> 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. >> >> Well if folk don't think -o ${USER} etc is too ugly (I've used that >> approach before too ;-) >> It has the distinct advantage of not needing to frob every Makefile >> that uses ${INSTALL} >> >> So the patch would become just something like the following to >> bsd.own.mk (WITH_INSTALL_AS_USER ignored for root) >> and the result looks like: >> >> $ make -C bin/cat -n install -DWITH_INSTALL_AS_USER DESTDIR=/tmp >> install -s -o 420 -g 690 -m 555 cat /tmp/bin >> install -o 420 -g 690 -m 444 cat.1.gz /tmp/usr/share/man/man1 >> $ >> >> Index: share/mk/bsd.own.mk >> =================================================================== >> --- share/mk/bsd.own.mk (revision 237964) >> +++ share/mk/bsd.own.mk (working copy) >> @@ -427,6 +427,7 @@ >> HESIOD \ >> ICONV \ >> IDEA \ >> + INSTALL_AS_USER \ >> LIBCPLUSPLUS \ >> NAND \ >> OFED \ >> @@ -645,6 +646,15 @@ >> CTFCONVERT_CMD= @: >> .endif >> >> +_uid!= id -u >> +.if ${MK_INSTALL_AS_USER} != "no"&& ${_uid} != 0 >> +_gid!= id -g >> +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE >> +$xOWN = ${_uid} >> +$xGRP = ${_gid} >> +.endfor >> +.endif >> + >> .endif # !_WITHOUT_SRCCONF >> >> .endif # !target(____) > > I like this a lot more. Me too. We're doing almost exactly that, directly in make.conf. Yours is cleaner, of course. Eric From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 20:11:53 2012 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 912C4106566B; Tue, 26 Jun 2012 20:11:53 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 64A708FC12; Tue, 26 Jun 2012 20:11:53 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q5QKBlAU014146; Tue, 26 Jun 2012 13:11:47 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q5QKBlDt014145; Tue, 26 Jun 2012 13:11:47 -0700 (PDT) (envelope-from obrien) Date: Tue, 26 Jun 2012 13:11:46 -0700 From: "David O'Brien" To: Baptiste Daroussin Message-ID: <20120626201146.GA13937@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Baptiste Daroussin , arch@FreeBSD.org References: <20120526235510.GB90668@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120526235510.GB90668@ithaqua.etoilebsd.net> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: arch@FreeBSD.org Subject: Re: switch tounconditionnal boostrapping while to build the tree X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org 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 20:11:53 -0000 On Sun, May 27, 2012 at 01:55:10AM +0200, Baptiste Daroussin wrote: > After I replace yacc(1) by byacc(1) on current, we discovered than now it is > impossible to build 9 on current, because byacc(1) is not 100% backward > compatible with our yacc(1). Can this backward compatibility not be addressed? What are the details of the incompatibility. > this is because building a boostrap yacc(1) is conditionned on the > version of the host that is building world. Looking at Makefile.inc1 I > can see that lots of tools are conditionned like this. I think if we > want to go to be able to cross build the tree (I remember from > EuroBSDcon that this is something we want to do) then we need to remove > the conditions and always boostrap any tool necessary to be able to > build the tree. The problem with this approach is it leads to building things 2 and 3 times. How long until 'make buildworld' is actually the sum of two 'make buildworld's? I cannot wait for the day that we get to build clang first as a cross-tool and then as a target-tool like we do with GCC. Just building clang once already dominates the time of 'make buildworld' even with GCC built twice. > so if no one care I'll remove the condition to boostrap at least > yacc(1) and lex(1) on current, 9, 8 and 7. Please keep the conditional to the minimal that's needed to build 10-CURRENT. If that is all of 9, 8, 7 -- then I guess that is unconditioning, but if the new byacc is MFC'ed to 9, then I'd like to see it only bootstrapped on older 9. -- -- David (obrien@FreeBSD.org) From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 20:19:57 2012 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FB651065670; Tue, 26 Jun 2012 20:19:57 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 197088FC08; Tue, 26 Jun 2012 20:19:57 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q5QKJuDX014211; Tue, 26 Jun 2012 13:19:56 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q5QKJugF014210; Tue, 26 Jun 2012 13:19:56 -0700 (PDT) (envelope-from obrien) Date: Tue, 26 Jun 2012 13:19:56 -0700 From: "David O'Brien" To: Baptiste Daroussin Message-ID: <20120626201956.GB13937@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Baptiste Daroussin , arch@FreeBSD.org References: <20120526235510.GB90668@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120526235510.GB90668@ithaqua.etoilebsd.net> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: arch@FreeBSD.org Subject: Re: switch tounconditionnal boostrapping while to build the tree X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org 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 20:19:57 -0000 On Sun, May 27, 2012 at 01:55:10AM +0200, Baptiste Daroussin wrote: > so if no one care I'll remove the condition to boostrap at least > yacc(1) and lex(1) on current, 9, 8 and 7. Note that we do a run-time test of make(1) ['upgrade_checks' target] to decide if we need to build a bootstrap version. How hard would it be to do that for yacc/lex? /usr/src/Makefile: # Make sure we have an up-to-date make(1). Only world and buildworld # should do this as those are the initial targets used for upgrades. # The user can define ALWAYS_CHECK_MAKE to have this check performed # for all targets. # .if defined(ALWAYS_CHECK_MAKE) ${TGTS}: upgrade_checks .else buildworld: upgrade_checks .endif # Perform a few tests to determine if the installed tools are adequate # for building the world. # upgrade_checks: @if ! (cd ${.CURDIR}/tools/build/make_check && \ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \ then \ (cd ${.CURDIR} && ${MAKE} make); \ fi -- -- David (obrien@FreeBSD.org) From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 20:28:33 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAF47106564A for ; Tue, 26 Jun 2012 20:28:33 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og102.obsmtp.com (exprod7og102.obsmtp.com [64.18.2.157]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF3B8FC0A for ; Tue, 26 Jun 2012 20:28:33 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob102.postini.com ([64.18.6.12]) with SMTP ID DSNKT+obcS6crLAZAY6vK028SAr7857FAGFz@postini.com; Tue, 26 Jun 2012 13:28:33 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB03-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Tue, 26 Jun 2012 13:24:53 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q5QKOqh77601; Tue, 26 Jun 2012 13:24:52 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 3028158081; Tue, 26 Jun 2012 13:24:52 -0700 (PDT) To: Eric van Gyzen In-Reply-To: <4FEA10BD.2080504@vangyzen.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626190349.98D5B58081@chaos.jnpr.net> <97FE8A0B-1836-4C60-9086-9C30A1123CE9@bsdimp.com> <4FEA10BD.2080504@vangyzen.net> Comments: In-reply-to: Eric van Gyzen message dated "Tue, 26 Jun 2012 14:42:53 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Tue, 26 Jun 2012 13:24:52 -0700 Message-ID: <20120626202452.3028158081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: =?ISO-8859-1?Q?rgrav?= , =?ISO-8859-1?Q?Dag-Erling_Sm=F8?=, Warner Losh , freebsd-arch@freebsd.org 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 20:28:33 -0000 On Tue, 26 Jun 2012 14:42:53 -0500, Eric van Gyzen writes: >>> >>> +_uid!= id -u >>> +.if ${MK_INSTALL_AS_USER} != "no"&& ${_uid} != 0 >>> +_gid!= id -g >>> +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE >>> +$xOWN = ${_uid} >>> +$xGRP = ${_gid} >> I like this a lot more. > >Me too. We're doing almost exactly that, directly in make.conf. Yours >is cleaner, of course. A final? tweak, I've moved the _uid!= id -u inside the first .if and added another to avoid id -u if MK_INSTALL_AS_USER==no, the extra .if is much cheaper than running 'id'. +.if ${MK_INSTALL_AS_USER} != "no" +_uid!= id -u +.if ${_uid} != 0 +_gid!= id -g +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +$xOWN= ${_uid} +$xGRP= ${_gid} From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 21:54:12 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 3B089106566C for ; Tue, 26 Jun 2012 21:54:12 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkpc120.us.dell.com (aussmtpmrkpc120.us.dell.com [143.166.82.159]) by mx1.freebsd.org (Postfix) with ESMTP id 05A6C8FC0C for ; Tue, 26 Jun 2012 21:54:11 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,480,1336366800"; d="scan'208";a="506489892" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkpc120.us.dell.com with ESMTP; 26 Jun 2012 16:54:11 -0500 Message-ID: <4FEA2F82.3080705@vangyzen.net> Date: Tue, 26 Jun 2012 16:54:10 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Simon J. Gerraty" References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626190349.98D5B58081@chaos.jnpr.net> <97FE8A0B-1836-4C60-9086-9C30A1123CE9@bsdimp.com> <4FEA10BD.2080504@vangyzen.net> <20120626202452.3028158081@chaos.jnpr.net> In-Reply-To: <20120626202452.3028158081@chaos.jnpr.net> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?v?= , Warner Losh , =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgra?=, freebsd-arch@freebsd.org 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 21:54:12 -0000 On 06/26/2012 15:24, Simon J. Gerraty wrote: > > On Tue, 26 Jun 2012 14:42:53 -0500, Eric van Gyzen writes: >>>> >>>> +_uid!= id -u >>>> +.if ${MK_INSTALL_AS_USER} != "no"&& ${_uid} != 0 >>>> +_gid!= id -g >>>> +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE >>>> +$xOWN = ${_uid} >>>> +$xGRP = ${_gid} > >>> I like this a lot more. >> >> Me too. We're doing almost exactly that, directly in make.conf. Yours >> is cleaner, of course. > > A final? tweak, I've moved the _uid!= id -u inside the first .if and > added another to avoid id -u if MK_INSTALL_AS_USER==no, the extra .if is > much cheaper than running 'id'. > > +.if ${MK_INSTALL_AS_USER} != "no" > +_uid!= id -u > +.if ${_uid} != 0 > +_gid!= id -g > +.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE > +$xOWN= ${_uid} > +$xGRP= ${_gid} Nice catch. Avoiding the "id" in the common case is a good thing. IMHO, the uid test isn't necessary, but it's no big deal. Looks good. Thanks again for the work. Eric From owner-freebsd-arch@FreeBSD.ORG Wed Jun 27 08:14:37 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 52F9D1065670 for ; Wed, 27 Jun 2012 08:14:37 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 125248FC0C for ; Wed, 27 Jun 2012 08:14:37 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id A2BFD61D5; Wed, 27 Jun 2012 08:14:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 43B758D0C; Wed, 27 Jun 2012 10:14:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Eric van Gyzen References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <4FE9D84E.7080402@vangyzen.net> Date: Wed, 27 Jun 2012 10:14:28 +0200 In-Reply-To: <4FE9D84E.7080402@vangyzen.net> (Eric van Gyzen's message of "Tue, 26 Jun 2012 10:42:06 -0500") Message-ID: <86hatxw4rf.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Tim Kientzle , Simon Gerraty , freebsd-arch@freebsd.org 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: Wed, 27 Jun 2012 08:14:37 -0000 Eric van Gyzen writes: > Tim's idea sounds great, and would cover several use-cases. > Specifically, it leaves the build artifacts in the usual places so > other, later builds can build against them, whereas writing the > artifacts directly to a tar file does not. I'm not sure what you mean. The "build artifacts" would still be in the obj tree. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed Jun 27 08:17:02 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 91D691065672 for ; Wed, 27 Jun 2012 08:17:02 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 521C68FC12 for ; Wed, 27 Jun 2012 08:17:02 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id B528161D9; Wed, 27 Jun 2012 08:17:01 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 88A7C8D0E; Wed, 27 Jun 2012 10:17:01 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Simon J. Gerraty" References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626153335.3215258081@chaos.jnpr.net> Date: Wed, 27 Jun 2012 10:17:01 +0200 In-Reply-To: <20120626153335.3215258081@chaos.jnpr.net> (Simon J. Gerraty's message of "Tue, 26 Jun 2012 08:33:35 -0700") Message-ID: <86d34lw4n6.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org 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: Wed, 27 Jun 2012 08:17:02 -0000 "Simon J. Gerraty" writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > Unfortunately, there would still be a ton of ${LN} etc. that would need > Not sure I follow, ln isn't an issue when "installing" into a location > that you own - eg the $DESTDIR model, and if you are not doing that > supressing -o etc args won't help. I don't want to install at all. I just want a tarball. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed Jun 27 08:35:14 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 840D2106564A for ; Wed, 27 Jun 2012 08:35:14 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4228C8FC14 for ; Wed, 27 Jun 2012 08:35:14 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 8CBB061E2; Wed, 27 Jun 2012 08:35:13 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 554CA8D13; Wed, 27 Jun 2012 10:35:13 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Wemm References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> Date: Wed, 27 Jun 2012 10:35:13 +0200 In-Reply-To: (Peter Wemm's message of "Tue, 26 Jun 2012 10:36:41 -0700") Message-ID: <868vf9w3su.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Wed, 27 Jun 2012 08:35:14 -0000 Peter Wemm writes: > 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. There was no default owner or group in 2.0.5, which was the furthest back I could be bothered to check. As far as I can tell, there were no commits to install(1) between BSD 4.4 Lite and FreeBSD 2.0.5. > And it did something obnoxious like delete the original file... Yep, but luckily -c has been the default for years now. I wish -C were the default... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed Jun 27 15:23:32 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 AC18F1065670 for ; Wed, 27 Jun 2012 15:23:32 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkps320.us.dell.com (aussmtpmrkps320.us.dell.com [143.166.224.254]) by mx1.freebsd.org (Postfix) with ESMTP id 7693B8FC0A for ; Wed, 27 Jun 2012 15:23:32 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,484,1336366800"; d="scan'208";a="535569160" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkps320.us.dell.com with ESMTP; 27 Jun 2012 10:23:26 -0500 Message-ID: <4FEB256D.6000700@vangyzen.net> Date: Wed, 27 Jun 2012 10:23:25 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <4FE9D84E.7080402@vangyzen.net> <86hatxw4rf.fsf@ds4.des.no> In-Reply-To: <86hatxw4rf.fsf@ds4.des.no> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Cc: Tim Kientzle , Simon Gerraty , freebsd-arch@freebsd.org 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: Wed, 27 Jun 2012 15:23:32 -0000 On 06/27/2012 03:14, Dag-Erling Smørgrav wrote: > Eric van Gyzen writes: >> Tim's idea sounds great, and would cover several use-cases. >> Specifically, it leaves the build artifacts in the usual places so >> other, later builds can build against them, whereas writing the >> artifacts directly to a tar file does not. > > I'm not sure what you mean. The "build artifacts" would still be in the > obj tree. But they would be in a different directory layout than an installed FreeBSD system. It would be convenient to tell other builds to look for headers and libraries in the usual paths, but rooted in $DESTDIR, not on the build host. Eric From owner-freebsd-arch@FreeBSD.ORG Thu Jun 28 00:01:06 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 31620106564A for ; Thu, 28 Jun 2012 00:01:06 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 7BEFA8FC12 for ; Thu, 28 Jun 2012 00:01:05 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q5RNxls1005560; Wed, 27 Jun 2012 18:59:47 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q5RNxjmV005559; Wed, 27 Jun 2012 18:59:45 -0500 (CDT) (envelope-from brooks) Date: Wed, 27 Jun 2012 18:59:45 -0500 From: Brooks Davis To: "Simon J. Gerraty" Message-ID: <20120627235945.GE243@lor.one-eyed-alien.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626161605.5082A58081@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yRA+Bmk8aPhU85Qt" Content-Disposition: inline In-Reply-To: <20120626161605.5082A58081@chaos.jnpr.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Tim Kientzle , freebsd-arch@freebsd.org, Dag-Erling Sm?rgrav 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: Thu, 28 Jun 2012 00:01:06 -0000 --yRA+Bmk8aPhU85Qt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 26, 2012 at 09:16:05AM -0700, Simon J. Gerraty wrote: >=20 > On Tue, 26 Jun 2012 08:18:05 -0700, Tim Kientzle writes: > >Better idea: have the build write a textual description of the > >tar entries. That description can then be fed to tar to build > >the actual tarball. >=20 > Yes, that's what we do - manifest files that tar and other tools use to > produce the install images. >=20 > >The description format that tar already supports is a variant > >mtree format borrowed from NetBSD. Each line specifies > >the tar entry fields (filename, owner, permissions, etc) and > >the filename where the file contents are stored. >=20 > Yes, we've added that support to makefs - I believe it is already in > -current. There's still quite a bit to do. It's there except that makefs uses the FreeBSD mtree code which doesn't support the crucial absolute path support in NetBSD's mtree. I took a look at what's required to bring that in a week or two ago. We need to bring in a number of new or improved functions in libc and we'll have to kill or rename FreeBSD's -i options, but it looks doable. Not a two hour project, but doable and worthwhile. Once I get the demo I 'm currently working on out the door I'm planning to start work to bring in NetBSD's mtree and either the related install changes or NetBSD's install. If someone else wants to start the process that would also be fine with me. My notes on the issues are below if anyone cares. -- Brooks FreeBSD Features not in NetBSD: -i (indent output) conflicts with: -i If specified, set the schg and/or sappnd flags. -n (Don't emit name) -q (Quiet mode) -w Make some errors non-fatal warnings Missing keywords: ripemd160digest seems to be spelled rmd160(digest) nochange missing Missing library features: flags_to_string() string_to_flags(char **, unsigned long *, unsigned long *); strsvis() pwcache_userdb() pwcache_groupdb() gid_from_group() uid_from_user() --yRA+Bmk8aPhU85Qt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFP655xXY6L6fI4GtQRAgNcAKDMOPZbGUqzQqGEz9KsrzjKCYEHJgCgkbyY VRLJEfTXHGSAAZBlk1BDgOU= =iTsZ -----END PGP SIGNATURE----- --yRA+Bmk8aPhU85Qt-- From owner-freebsd-arch@FreeBSD.ORG Thu Jun 28 04:12:45 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 5AF53106564A; Thu, 28 Jun 2012 04:12:45 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 184C98FC0A; Thu, 28 Jun 2012 04:12:44 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q5S4CfPK048297; Thu, 28 Jun 2012 04:12:41 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id rc69ifb589dqipg4wmgvpkh4p2; Thu, 28 Jun 2012 04:12:41 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <20120627235945.GE243@lor.one-eyed-alien.net> Date: Wed, 27 Jun 2012 21:12:39 -0700 Content-Transfer-Encoding: 7bit Message-Id: <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626161605.5082A58081@chaos.jnpr.net> <20120627235945.GE243@lor.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.1278) Cc: Dag-Erling Sm?rgrav , freebsd-arch@freebsd.org, "Simon J. 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: Thu, 28 Jun 2012 04:12:45 -0000 On Jun 27, 2012, at 4:59 PM, Brooks Davis wrote: > On Tue, Jun 26, 2012 at 09:16:05AM -0700, Simon J. Gerraty wrote: >> >> On Tue, 26 Jun 2012 08:18:05 -0700, Tim Kientzle writes: >>> Better idea: have the build write a textual description of the >>> tar entries. That description can then be fed to tar to build >>> the actual tarball. >> >> Yes, that's what we do - manifest files that tar and other tools use to >> produce the install images. >> >>> The description format that tar already supports is a variant >>> mtree format borrowed from NetBSD. Each line specifies >>> the tar entry fields (filename, owner, permissions, etc) and >>> the filename where the file contents are stored. >> >> Yes, we've added that support to makefs - I believe it is already in >> -current. There's still quite a bit to do. > > It's there except that makefs uses the FreeBSD mtree code which doesn't > support the crucial absolute path support in NetBSD's mtree. If it helps: libarchive can read NetBSD's mtree format. > I took a > look at what's required to bring that in a week or two ago. We need to > bring in a number of new or improved functions in libc and we'll have to > kill or rename FreeBSD's -i options, but it looks doable. Not a two > hour project, but doable and worthwhile. Once I get the demo I 'm > currently working on out the door I'm planning to start work to bring in > NetBSD's mtree and either the related install changes or NetBSD's > install. If someone else wants to start the process that would also be > fine with me. My notes on the issues are below if anyone cares. > > -- Brooks > > FreeBSD Features not in NetBSD: > -i (indent output) conflicts with: > -i If specified, set the schg and/or sappnd flags. > > -n (Don't emit name) > > -q (Quiet mode) > > -w Make some errors non-fatal warnings > > Missing keywords: > ripemd160digest seems to be spelled rmd160(digest) > > nochange missing > > Missing library features: > flags_to_string() > string_to_flags(char **, unsigned long *, unsigned long *); > strsvis() > pwcache_userdb() > pwcache_groupdb() > gid_from_group() > uid_from_user() > From owner-freebsd-arch@FreeBSD.ORG Thu Jun 28 14:10:44 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD59D1065672 for ; Thu, 28 Jun 2012 14:10:44 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC708FC19 for ; Thu, 28 Jun 2012 14:10:44 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 8FE8066BD; Thu, 28 Jun 2012 14:10:43 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 585AB8E4C; Thu, 28 Jun 2012 16:10:43 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Eric van Gyzen References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <4FE9D84E.7080402@vangyzen.net> <86hatxw4rf.fsf@ds4.des.no> <4FEB256D.6000700@vangyzen.net> Date: Thu, 28 Jun 2012 16:10:43 +0200 In-Reply-To: <4FEB256D.6000700@vangyzen.net> (Eric van Gyzen's message of "Wed, 27 Jun 2012 10:23:25 -0500") Message-ID: <867gursf18.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Tim Kientzle , Simon Gerraty , freebsd-arch@freebsd.org 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: Thu, 28 Jun 2012 14:10:44 -0000 Eric van Gyzen writes: > But they would be in a different directory layout than an installed > FreeBSD system. It would be convenient to tell other builds to look > for headers and libraries in the usual paths, but rooted in $DESTDIR, > not on the build host. You are clearly trying to solve a completely different problem than I am. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Thu Jun 28 18:27:17 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 ED681106564A for ; Thu, 28 Jun 2012 18:27:16 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 3F27A8FC0A for ; Thu, 28 Jun 2012 18:27:16 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q5SIPvhA015763; Thu, 28 Jun 2012 13:25:57 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q5SIPvgp015762; Thu, 28 Jun 2012 13:25:57 -0500 (CDT) (envelope-from brooks) Date: Thu, 28 Jun 2012 13:25:57 -0500 From: Brooks Davis To: Tim Kientzle Message-ID: <20120628182557.GA15593@lor.one-eyed-alien.net> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626161605.5082A58081@chaos.jnpr.net> <20120627235945.GE243@lor.one-eyed-alien.net> <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Dag-Erling Sm?rgrav , freebsd-arch@freebsd.org, "Simon J. 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: Thu, 28 Jun 2012 18:27:17 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2012 at 09:12:39PM -0700, Tim Kientzle wrote: >=20 > On Jun 27, 2012, at 4:59 PM, Brooks Davis wrote: >=20 > > On Tue, Jun 26, 2012 at 09:16:05AM -0700, Simon J. Gerraty wrote: > >>=20 > >> On Tue, 26 Jun 2012 08:18:05 -0700, Tim Kientzle writes: > >>> Better idea: have the build write a textual description of the > >>> tar entries. That description can then be fed to tar to build > >>> the actual tarball. > >>=20 > >> Yes, that's what we do - manifest files that tar and other tools use to > >> produce the install images. > >>=20 > >>> The description format that tar already supports is a variant > >>> mtree format borrowed from NetBSD. Each line specifies > >>> the tar entry fields (filename, owner, permissions, etc) and > >>> the filename where the file contents are stored. > >>=20 > >> Yes, we've added that support to makefs - I believe it is already in > >> -current. There's still quite a bit to do. > >=20 > > It's there except that makefs uses the FreeBSD mtree code which doesn't > > support the crucial absolute path support in NetBSD's mtree. >=20 > If it helps: libarchive can read NetBSD's mtree format. I actually found this because I wanted to use libarchive's mtree output as input to makefs. -- Brooks >=20 > > I took a > > look at what's required to bring that in a week or two ago. We need to > > bring in a number of new or improved functions in libc and we'll have to > > kill or rename FreeBSD's -i options, but it looks doable. Not a two > > hour project, but doable and worthwhile. Once I get the demo I 'm > > currently working on out the door I'm planning to start work to bring in > > NetBSD's mtree and either the related install changes or NetBSD's > > install. If someone else wants to start the process that would also be > > fine with me. My notes on the issues are below if anyone cares. > >=20 > > -- Brooks > >=20 > > FreeBSD Features not in NetBSD: > > -i (indent output) conflicts with: > > -i If specified, set the schg and/or sappnd flags. > >=20 > > -n (Don't emit name) > >=20 > > -q (Quiet mode) > >=20 > > -w Make some errors non-fatal warnings > >=20 > > Missing keywords: > > ripemd160digest seems to be spelled rmd160(digest) > >=20 > > nochange missing > >=20 > > Missing library features: > > flags_to_string() > > string_to_flags(char **, unsigned long *, unsigned long *); > > strsvis() > > pwcache_userdb() > > pwcache_groupdb() > > gid_from_group() > > uid_from_user() > >=20 >=20 --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFP7KG0XY6L6fI4GtQRAr0zAJ9ciIeSjBZNLshdlyr6pTh6eOeItgCgtEIM Kl4e36S0SKKZrVYi8yu+eMg= =7Jrz -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-freebsd-arch@FreeBSD.ORG Fri Jun 29 08:15:00 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B0C31065688; Fri, 29 Jun 2012 08:15:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 45F068FC14; Fri, 29 Jun 2012 08:15:00 +0000 (UTC) Received: from JRE-MBP-2.local (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q5T8En8r007833 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 29 Jun 2012 01:14:50 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4FED63F4.7010203@freebsd.org> Date: Fri, 29 Jun 2012 01:14:44 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Tim Kientzle References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626161605.5082A58081@chaos.jnpr.net> <20120627235945.GE243@lor.one-eyed-alien.net> <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> In-Reply-To: <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Simon J. Gerraty" , Dag-Erling Sm?rgrav , Brooks Davis , freebsd-arch@freebsd.org 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: Fri, 29 Jun 2012 08:15:00 -0000 On 6/27/12 9:12 PM, Tim Kientzle wrote: > On Jun 27, 2012, at 4:59 PM, Brooks Davis wrote: > >> >> It's there except that makefs uses the FreeBSD mtree code which doesn't >> support the crucial absolute path support in NetBSD's mtree. > If it helps: libarchive can read NetBSD's mtree format. then all we want is for makefs to do the same so we can have a single description and multiple output possibilities. > From owner-freebsd-arch@FreeBSD.ORG Fri Jun 29 14:02:14 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 70C6B106566C for ; Fri, 29 Jun 2012 14:02:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 37B268FC0A for ; Fri, 29 Jun 2012 14:02:14 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so5040429pbb.13 for ; Fri, 29 Jun 2012 07:02:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=qvgQa7gg1QQoaPHHgCfuI6PEGKnIp65WMRQxaQcO9Hs=; b=oIOREEfqLXLeBDnOad3VjJ7T5kTPB90OLzYUfU9ovZ677iBRprA9otal7Crr3rQ4Oo 8z60Ol0AB4RKSaqtRtECLLxtMkJX8uXq5TsofwGHCT8d54DbHYmq4qIS/ExIKBjzGxWI ShVekCyd6rL+reTwr43IBLAot4MKIPfPr98o2C6EsPNYUalMczGZi5OkHrxl97dAioUX 2epoTZJnyBYYZxzQfBWyP1igAjcXBE1L1ZWUEzv6KAPat0tJz7xGHagmutd7tClg0AwI PQ6lVcTMDsnCHyFJhI/jsiyN+InuJ9ElVe/dOjK2vadNvo+6mAejSVjYcmTg6/aAk7b1 Esiw== Received: by 10.66.79.100 with SMTP id i4mr999142pax.78.1340978533967; Fri, 29 Jun 2012 07:02:13 -0700 (PDT) Received: from [10.0.0.63] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id pn5sm5528310pbb.74.2012.06.29.07.02.11 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jun 2012 07:02:13 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4FED63F4.7010203@freebsd.org> Date: Fri, 29 Jun 2012 08:02:09 -0600 Content-Transfer-Encoding: 7bit Message-Id: <3D211D73-D9F6-4B4D-A952-ED624292D131@bsdimp.com> References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> <20120626161605.5082A58081@chaos.jnpr.net> <20120627235945.GE243@lor.one-eyed-alien.net> <52A78E4A-948B-4A79-A95D-0FC7D225BC00@kientzle.com> <4FED63F4.7010203@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQl85J20iunlDCBfjVOKHMLJn4TY+lQkvQbksDglfeYAysmh06VXV4TWgmlwxFYiaiNRlvft Cc: Tim Kientzle , Dag-Erling Sm?rgrav , Brooks Davis , freebsd-arch@freebsd.org, "Simon J. 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: Fri, 29 Jun 2012 14:02:14 -0000 On Jun 29, 2012, at 2:14 AM, Julian Elischer wrote: > On 6/27/12 9:12 PM, Tim Kientzle wrote: >> On Jun 27, 2012, at 4:59 PM, Brooks Davis wrote: >> >>> >>> It's there except that makefs uses the FreeBSD mtree code which doesn't >>> support the crucial absolute path support in NetBSD's mtree. >> If it helps: libarchive can read NetBSD's mtree format. > > then all we want is for makefs to do the same > so we can have a single description and multiple output possibilities. Importing NetBSD mtree will give us that. Warner