Date: Sat, 10 Apr 2010 17:11:11 -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: <s2q7d6fde3d1004101711rd5f0d507r560d45beeeb314e8@mail.gmail.com> In-Reply-To: <l2z7d6fde3d1004101708o3946d155pfe2f9644daff329c@mail.gmail.com> References: <x2j7d6fde3d1004101552u1b60ee9etb8ed15183fc1f26f@mail.gmail.com> <h2y7d6fde3d1004101557r12ba49ffva56a00ea42053c51@mail.gmail.com> <l2z7d6fde3d1004101708o3946d155pfe2f9644daff329c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 10, 2010 at 5:08 PM, Garrett Cooper <yanefbsd@gmail.com> wrote: > On Sat, Apr 10, 2010 at 3:57 PM, Garrett Cooper <yanefbsd@gmail.com> wrot= e: >> On Sat, Apr 10, 2010 at 3:52 PM, Garrett Cooper <yanefbsd@gmail.com> wro= te: >>> 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. > > =A0 =A0Doing 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/port= s/,,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 > > =A0 =A0Also, 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 :( : > > =A0 =A0if (Mode) > =A0 =A0 =A0 =A0if (vsystem("cd %s && /bin/chmod -R %s %s", cd_to, Mode, a= rg)) > =A0 =A0 =A0 =A0 =A0 =A0warnx("couldn't change modes of '%s' to '%s'", arg= , Mode); > =A0 =A0if (Owner && Group) { > =A0 =A0 =A0 =A0if (vsystem("cd %s && /usr/sbin/chown -R %s:%s %s", cd_to, > Owner, Group, arg)) > =A0 =A0 =A0 =A0 =A0 =A0warnx("couldn't change owner/group of '%s' to '%s:= %s'", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 arg, Owner, Group); > =A0 =A0 =A0 =A0return; > =A0 =A0} > =A0 =A0if (Owner) { > =A0 =A0 =A0 =A0if (vsystem("cd %s && /usr/sbin/chown -R %s %s", cd_to, Ow= ner, arg)) > =A0 =A0 =A0 =A0 =A0 =A0warnx("couldn't change owner of '%s' to '%s'", arg= , Owner); > =A0 =A0 =A0 =A0return; > =A0 =A0} else if (Group) > =A0 =A0 =A0 =A0if (vsystem("cd %s && /usr/bin/chgrp -R %s %s", cd_to, Gro= up, arg)) > =A0 =A0 =A0 =A0 =A0 =A0warnx("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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?s2q7d6fde3d1004101711rd5f0d507r560d45beeeb314e8>