Date: Sat, 10 Apr 2010 17:08:16 -0700 From: Garrett Cooper <yanefbsd@gmail.com> To: arch@freebsd.org Cc: portmgr@freebsd.org Subject: Re: [RFC] Remove @owner and @user from package list Message-ID: <l2z7d6fde3d1004101708o3946d155pfe2f9644daff329c@mail.gmail.com> In-Reply-To: <h2y7d6fde3d1004101557r12ba49ffva56a00ea42053c51@mail.gmail.com> References: <x2j7d6fde3d1004101552u1b60ee9etb8ed15183fc1f26f@mail.gmail.com> <h2y7d6fde3d1004101557r12ba49ffva56a00ea42053c51@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 10, 2010 at 3:57 PM, Garrett Cooper <yanefbsd@gmail.com> wrote: > On Sat, Apr 10, 2010 at 3:52 PM, Garrett Cooper <yanefbsd@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l2z7d6fde3d1004101708o3946d155pfe2f9644daff329c>