Date: Thu, 10 Jul 2014 09:55:43 -0700 From: Sean Fagan <sef@ixsystems.com> To: Brooks Davis <brooks@freebsd.org> Cc: hackers@freebsd.org Subject: Re: Expanding on NO_ROOT: Categorizing installed files Message-ID: <132F1812-310F-4941-A08B-90D5DB83A7C8@ixsystems.com> In-Reply-To: <20140710164113.GA17057@lor.one-eyed-alien.net> References: <048B595B-6B91-40B6-84A4-E23948423354@ixsystems.com> <20140710153530.GA16174@lor.one-eyed-alien.net> <D7C345D3-6027-45BC-AACB-8DEA03D5924F@ixsystems.com> <20140710164113.GA17057@lor.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 10, 2014, at 9:41 AM, Brooks Davis <brooks@freebsd.org> wrote: > I'd prefer we just expand the use of tags. Thus far a seperator isn't > defined, but : seems as good as any. It would be worth checking if > NetBSD (where -T came from) uses anything. I'd use commas, as I'm already using : to indicate sub-categories. (And my packagifying script does use that.) Using the same option, however, causes some problems here: the use of environment variables to allow easy inheritence. Note the effort = that the various makefiles go to to ensure that INSTALL and its various = options get passed around properly; using the environment variable simplified = that significantly. And that means it can't simply let the command-line = override the environment variable, because someone adding a tag for debugging (as you indicated it was used) would result in a mis-categorization, = *or* it means that you can't have the environment variable and then over-ride it with the command-line option. Let me think about this for a couple of days, and experiment a bit with = it. >>=20 >> So I opted for the most flexible variant, which was to keep NO_ROOT = behaving as it did, >> and add another case that used most of the work from NO_ROOT. >>=20 >> Does that make sense? >=20 > Yes. I'm reluctant to add yet another option to the toplevel make as > that's one more thing to test or break. I understand that. But I did try it both ways, and having it as another = option gave me a lot more flexibility and desirable results. > Ideally we'd add support for filtering on catagory/tag to libarchive = and > do all that stuff there. >=20 > Purly FYI, my eventual plan is to generate a METALOG as part of > buildworld/buildkernel so the install* targets just run tar and > dramatically limit root privilage use. Hm, interesting. That's a lot of makefile rewriting, I think (both for = the top-level makefiles, the included makefiles, and the individual = makefiles). >>>=20 >>> I think the .EXPORTVAR is gratutious here and in the other >>> lib/*/Makefiles. For that matter, I don't understand why it's = needed at >>> all given the presence of META_CATEGORY in lib/Makefile. >>=20 >> I didn't put it in all of the Makefiles, and the reason for having it = in >> the environment was to allow for sub-directories to pick it up; it = also >> allows for them to easily over-ride it. (E.g., for any library in = src/lib >> which someone might decide shouldn't really be part of base.) >=20 > I think I wasn't clear here. Given that META_CATEGORY=3Dbase should = be in > the environment already, I don't see why you need to define it in some > of the library make files. Thinking about it more, I find my self > wondering if it's a workaround for the failure to use Makefile.inc. Possibly. As I said, I'll try it later. Some of it may also be = hold-over from before I was using the environment variable. Fewer changes make me a happier person. :) >=20 >>>> diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile >>>> index dfa450e8..268ce8a 100644 >>>> --- a/share/man/man9/Makefile >>>> +++ b/share/man/man9/Makefile >>>> @@ -1,5 +1,8 @@ >>>> # $FreeBSD$ >>>>=20 >>>> +META_CATEGORY=3D kernel >>>=20 >>> I can see some loging in this, but it seems like a somewhat odd = choice. >>=20 >> Odd choice how? >=20 > While section 9 manpages document the kernel, I don't see them as part = of > it. I actually was wondering if it should actually be part of "dev", or if I = should go further than I had and have it end up as "kernel:dev:doc". >=20 >>>> diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk >>>> index cd11e3a..ea50d33 100644 >>>> --- a/sys/conf/kmod.mk >>>> +++ b/sys/conf/kmod.mk >>>> @@ -68,6 +68,10 @@ KMODLOAD?=3D /sbin/kldload >>>> KMODUNLOAD?=3D /sbin/kldunload >>>> OBJCOPY?=3D objcopy >>>>=20 >>>> +.if defined(META_CATEGORY) >>>> +META_LOG_SYMBOLS=3D -P ${META_CATEGORY}:dev >>>=20 >>> There seem to be more spellings of META_LOG_SYMBOLS than necessicary >>> (_META_INFO). >>=20 >> I'm not sure what you mean? >=20 > You use a variety of variables used to hold "" or "-P > ${META_CATEGORY}..." in different Makefiles. It seems like they = should > be the same where possible. Ah! Cleanup work: done at different stages, that's all. In some cases, I = also had to worry about multiple inclusions of the same .mk file, but for the = most part, it's just stuff that I forgot to clean up. And that's why I wanted comments and feedback! Sean.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?132F1812-310F-4941-A08B-90D5DB83A7C8>