From owner-freebsd-arch@FreeBSD.ORG Sun Apr 11 00:08:18 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 4ADB91065670; Sun, 11 Apr 2010 00:08:18 +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 E3B968FC19; Sun, 11 Apr 2010 00:08:17 +0000 (UTC) Received: by qyk11 with SMTP id 11so3798908qyk.13 for ; Sat, 10 Apr 2010 17:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5Rlb3ELeFoZIXf0Yq+k21xUXPbkBC8YasoqH3jnmNXo=; b=kG76Xpyr9iONz2D7t7F3RHsvVMa019V2ix3l6kOySdzEfnwU7OfQsZ9ePLg5g5rx7x wBhIGZ8IX8BKMpc0dl6qvE4IiUpKsThIU5dy+lCq2Sz7IJENy+z/K9iYmEnOyks5OI01 Sppo63NoYvAOL2rhOU11jrGy+JMMY/U0Td16Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=t11cpl0w80/CtsvWbyqLKK3lztDse/AONE1uC0Eo2uK5ZhEzidVgT4sQbC9jyax/cF 50/h+2QZA+LyjgCB1EJhuCm/qQjb8QfQaRCglI0gAqA91uHuW8J/5q6I9CIFHDOSQCfr nxVFSJcf21FwQp57+ez/p6JOEIVmXV4R4SmjY= MIME-Version: 1.0 Received: by 10.229.28.85 with HTTP; Sat, 10 Apr 2010 17:08:16 -0700 (PDT) In-Reply-To: References: Date: Sat, 10 Apr 2010 17:08:16 -0700 Received: by 10.229.14.157 with SMTP id g29mr3204782qca.57.1270944496855; Sat, 10 Apr 2010 17:08:16 -0700 (PDT) Message-ID: From: Garrett Cooper To: arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: portmgr@freebsd.org Subject: Re: [RFC] Remove @owner and @user from package list 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: Sun, 11 Apr 2010 00:08:18 -0000 On Sat, Apr 10, 2010 at 3:57 PM, Garrett Cooper wrote: > On Sat, Apr 10, 2010 at 3:52 PM, Garrett Cooper wrot= e: >> Hi again arch, >> =A0 =A0When doing some research, it appears that while functionality in >> theory exists for @owner and @user in the package list, it isn't >> actually used in the pkg_install code at all, adding unnecessary bloat >> to package lists; >> =A0 =A0FWIW this functionality (just like @exec and @unexec) can be >> implemented via pkg-install or more reliably via an mtree file. >> =A0 =A0Thoughts? > > Nevermind; I was misreading the code. Doing some more digging, there are a handful of ports that I don't have installed that implement this functionality: @mode ... $ grep -Ilr @mode /scratch/freebsd/ports/ | sed 's,/scratch/freebsd/ports/,= ,g' databases/phpmyadmin/pkg-plist-chunk databases/phpmyadmin211/pkg-plist-chunk devel/libtai/pkg-plist dns/poweradmin/pkg-plist-chunk games/columns/pkg-plist games/falconseye/pkg-plist games/glasteroids/pkg-plist games/nethack32/pkg-plist games/nethack33/pkg-plist games/nethack34/pkg-plist games/omega/pkg-plist games/sol/pkg-plist games/wanderer/pkg-plist games/xmines/pkg-plist games/zangband/pkg-plist irc/inspircd/pkg-plist japanese/nethack32/pkg-plist japanese/nethack34/pkg-plist japanese/zangband/pkg-plist net/phpldapadmin/pkg-plist-chunk net/phpldapadmin098/pkg-plist-chunk security/cyrus-sasl2-saslauthd/pkg-plist sysutils/clockspeed/pkg-plist www/ssserver/pkg-plist @owner ... $ grep -Ilr @owner /scratch/freebsd/ports/ | sed 's,/scratch/freebsd/ports/= ,,g' games/omega/pkg-plist games/sol/pkg-plist games/zangband/pkg-plist japanese/zangband/pkg-plist net/mediatomb/pkg-plist news/cnews/pkg-plist news/ifmail/pkg-plist Also, I'm not positive, but I think that none of the released packages use this either -- so ultimately this functionality could be removed without any impact to folks unless there's a 3rd party that has implemented this outside of FreeBSD. This functionality could be delivered in mtree files, could be fixed with the upstream installation Makefiles, and IMO should not be as part of the package list, as it only obscures precedence, ownership, and permissions, and there's a great deal of overlap involved in package creation and installation; tar applies permissions bits and ownership, mtree is called next to fix permissions and ownership, if the mtree file exists, then the @owner and @mode stuff implements a hammer solution over a series of files -- note that chmod -R and chown -R are called with @owner and @mode :( : if (Mode) if (vsystem("cd %s && /bin/chmod -R %s %s", cd_to, Mode, arg)) warnx("couldn't change modes of '%s' to '%s'", arg, Mode); if (Owner && Group) { if (vsystem("cd %s && /usr/sbin/chown -R %s:%s %s", cd_to, Owner, Group, arg)) warnx("couldn't change owner/group of '%s' to '%s:%s'", arg, Owner, Group); return; } if (Owner) { if (vsystem("cd %s && /usr/sbin/chown -R %s %s", cd_to, Owner, arg)= ) warnx("couldn't change owner of '%s' to '%s'", arg, Owner); return; } else if (Group) if (vsystem("cd %s && /usr/bin/chgrp -R %s %s", cd_to, Group, arg)) warnx("couldn't change group of '%s' to '%s'", arg, Group); Thoughts? -Garrett