Re: Expanding on NO_ROOT: Categorizing installed files

看板FB_hackers作者時間11年前 (2014/07/11 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/16 (看更多)
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. >> >> 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. >> >> Does that make sense? > > 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. > > 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). >>> >>> 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. >> >> 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.) > > I think I wasn't clear here. Given that META_CATEGORY=base 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. :) > >>>> 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$ >>>> >>>> +META_CATEGORY= kernel >>> >>> I can see some loging in this, but it seems like a somewhat odd choice. >> >> Odd choice how? > > 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". > >>>> 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?= /sbin/kldload >>>> KMODUNLOAD?= /sbin/kldunload >>>> OBJCOPY?= objcopy >>>> >>>> +.if defined(META_CATEGORY) >>>> +META_LOG_SYMBOLS= -P ${META_CATEGORY}:dev >>> >>> There seem to be more spellings of META_LOG_SYMBOLS than necessicary >>> (_META_INFO). >> >> I'm not sure what you mean? > > 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. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1JljJVll (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #1JljJVll (FB_hackers)