From owner-freebsd-arch@FreeBSD.ORG Wed Apr 7 09:41:29 2010 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 EAD8A106564A for ; Wed, 7 Apr 2010 09:41:29 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id A8EDF8FC15 for ; Wed, 7 Apr 2010 09:41:29 +0000 (UTC) Received: by qyk11 with SMTP id 11so167665qyk.13 for ; Wed, 07 Apr 2010 02:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:cc:content-type; bh=zfI4IvL3IjUS0VouZhOI203LUmECDw10o7FYuClWsGc=; b=BBaJ9YMhL0ZqIkOC3hQfmNYFK3ACZ1P2WAsz7chAIfRqNS/mdX3FRJIyeuPSgXvGfD nhlUvxcS99vPgKU2+qPoo+mO7jZtfVf9UqpX9Uph6qx26O9f87iNtxZ/8Cb/P1dLxYbY 7BqduGHSbZAbnFUI8/DThdDg0jdnFHmXhM5D4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=ZeC3Kpd6Yod2vdApq5ACZP7eoya/qHGzkxEHaTzpcrEi2fil0n5FdsOS7Ey9lDYg7S gle+z3c42uDvF3nwxC18i9kn2TgWSUKl9TsmuKnprqlKrMX8zKL4l4yQf9Conay7N21F 9NEZjgE7PwfIja7TncpVitXH3OPI9UKUcwI18= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Wed, 7 Apr 2010 02:16:37 -0700 (PDT) Date: Wed, 7 Apr 2010 02:16:37 -0700 Received: by 10.229.192.10 with SMTP id do10mr3356983qcb.48.1270631797779; Wed, 07 Apr 2010 02:16:37 -0700 (PDT) Message-ID: From: Garrett Cooper To: arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: portmgr@freebsd.org Subject: [RFC] Remove pkg_add -C (chroot functionality) 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, 07 Apr 2010 09:41:30 -0000 Hi Arch folks, I've talked with flz really briefly about this, and while he said it was ok, I want to make sure that removing the functionality makes logical sense. There's an outstanding bug to fix chroot(2)'ing functionality with pkg_add(1) [1]. Anyone that has tried this functionality knows that it's currently crippled. Whilst fixing this seems trivial (apply a chroot to only the top-level caller), it would require API changes, as well as converting some of the vsystem (variadic system(3) lib-) calls to fork(3) -> exec(3) to get things working properly with chroot(2), and could in fact further add to the spaghetti mess that is pkg_install(1) today. The goal that several folks are undertaking to improve pkg_install is to simplify it by pruning away unnecessary features (wherever possible), and this functionality isn't actively used in any of the mainstream tools (portmaster, portupgrade, sysinstall, etc). Does anyone pragmatically oppose this change? If so, why? Also, I'll be sure to run it through ports@ too so people get a little bit of say in this (unless I receive an astounding no here), but given that there was only one situation where this functioned for me, I'd much rather have a complete functional solution in < 20 lines of script that I can adjust to my needs than a broken (and pretty useless) feature in pkg_add(1). Thanks, -Garrett [1] bin/109334 Reasons for removing the feature: 1. Broken. 2. There's a large degree of environment setup required in order to have a functional chroot / jail, that can't be resolved by pkg_add -C . 3. The equivalent command is simple: chroot $DESTDIR pkg_add <...> 4. Certain pkg_install(8) operations can only be performed on a live system (adding a user for instance, checking a font cache, etc).