From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 10 16:55:48 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CFBCD87; Thu, 10 Jul 2014 16:55:48 +0000 (UTC) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B5812E22; Thu, 10 Jul 2014 16:55:47 +0000 (UTC) Received: from localhost (mail.ixsystems.com [10.2.55.1]) by mail.iXsystems.com (Postfix) with ESMTP id D8D55796C4; Thu, 10 Jul 2014 09:55:45 -0700 (PDT) Received: from mail.iXsystems.com ([10.2.55.1]) by localhost (mail.ixsystems.com [10.2.55.1]) (maiad, port 10024) with ESMTP id 95247-04; Thu, 10 Jul 2014 09:55:45 -0700 (PDT) Received: from [10.0.1.11] (base.kithrup.com [173.164.180.195]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id E98CA796BF; Thu, 10 Jul 2014 09:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ixsystems.com; s=newknight0; t=1405011345; bh=503Mozdm/+Dh5y5J0WbwSsXsZSPh+2c8/ZUEkoTw5yU=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=WYpT0GLva5YEeOvkHGA7HFvLsRNDsEAS/PRqXhYLOcQX+qXqJyQPWcN72jkuLH/Y0 9uZ94mvyexa7d6go/OsGuC+ev4HliE9si7zIWZhndCbS3qvAkcn3c+AmDundpiJbj3 Go0eRtYgymSlSYa0zwP4zHo6hVlOpenN9iFkJ48w= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Expanding on NO_ROOT: Categorizing installed files From: Sean Fagan In-Reply-To: <20140710164113.GA17057@lor.one-eyed-alien.net> Date: Thu, 10 Jul 2014 09:55:43 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <132F1812-310F-4941-A08B-90D5DB83A7C8@ixsystems.com> References: <048B595B-6B91-40B6-84A4-E23948423354@ixsystems.com> <20140710153530.GA16174@lor.one-eyed-alien.net> <20140710164113.GA17057@lor.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.1878.6) Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 16:55:48 -0000 On Jul 10, 2014, at 9:41 AM, Brooks Davis 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.=