[RFC] Remove @owner and @user from package list

Garrett Cooper yanefbsd at gmail.com
Sun Apr 11 00:11:12 UTC 2010


On Sat, Apr 10, 2010 at 5:08 PM, Garrett Cooper <yanefbsd at gmail.com> wrote:
> On Sat, Apr 10, 2010 at 3:57 PM, Garrett Cooper <yanefbsd at gmail.com> wrote:
>> On Sat, Apr 10, 2010 at 3:52 PM, Garrett Cooper <yanefbsd at gmail.com> wrote:
>>> Hi again arch,
>>>    When 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;
>>>    FWIW this functionality (just like @exec and @unexec) can be
>>> implemented via pkg-install or more reliably via an mtree file.
>>>    Thoughts?
>>
>> 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);

Sorry -- forgot @group...

$ grep -Ilr @group /scratch/freebsd/ports/ | sed 's,/scratch/freebsd/ports/,,g'
biology/p5-bioperl/files/patch-Bio-Root-Build.pm
databases/phpmyadmin/pkg-plist-chunk
databases/phpmyadmin211/pkg-plist-chunk
games/falconseye/pkg-plist
games/omega/pkg-plist
games/sol/pkg-plist
games/wanderer/pkg-plist
games/zangband/pkg-plist
irc/inspircd/pkg-plist
japanese/gawk/files/patch-sec1
japanese/zangband/pkg-plist
lang/tcc/files/texi2pod.pl
mail/sendmail/pkg-plist
mail/vpopmail/pkg-install
mail/vpopmail-devel/pkg-install
math/freemat/pkg-plist
net/freebsd-uucp/pkg-plist
net/mediatomb/pkg-plist
net/phpldapadmin/pkg-plist-chunk
net/phpldapadmin098/pkg-plist-chunk
news/cnews/pkg-plist
news/ifmail/pkg-plist
security/sfs/pkg-plist

Thanks,
-Garrett


More information about the freebsd-arch mailing list