From owner-freebsd-arch Fri Jul 12 0:35:52 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3804037B400; Fri, 12 Jul 2002 00:35:46 -0700 (PDT) Received: from softweyr.com (softweyr.com [65.88.244.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9337843E4A; Fri, 12 Jul 2002 00:35:42 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from nextgig-6.customer.nethere.net ([209.132.102.166] helo=softweyr.com) by softweyr.com with esmtp (Exim 3.35 #1) id 17SuxR-000OqZ-00; Fri, 12 Jul 2002 01:35:17 -0600 Message-ID: <3D2E87AD.76DC449D@softweyr.com> Date: Fri, 12 Jul 2002 00:39:25 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Mark Valentine Cc: Terry Lambert , Jordan K Hubbard , Dan Nelson , Archie Cobbs , Dan Moschuk , Dag-Erling Smorgrav , arch@freebsd.org Subject: Re: Package system flaws? References: <200207120055.g6C0tbpQ084565@dotar.thuvia.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mark Valentine wrote: > > > From: wes@softweyr.com (Wes Peters) > > Date: Thu 11 Jul, 2002 > > Subject: Re: Package system flaws? > > > On problem in particular comes from changing the PREFIX of a > > package. You can easily do this in the package tools, but how do you > > change the BINARIES to realize they've been installed under another > > PREFIX? > > How about providing a packaging API call (and utility) for the packages > to grab their install root from a record in /var/db/pkg? Something > like pkg_getroot(3) and pkg_config(1). I was thinking we could replace a lot of the mish-mash in /var/db/pkg with a munged up version of the metadata file that includes all the real file locations, translations for various meta directory names, etc. Providing a simply library function to translate PREFIX for "my package" or a named package would be ever so sensible. > There probably isn't much less intrusive way to make a package's root > configurable at install time. It's a good idea, if we can just get the application developers to use it. Actually you might be able to do it by forcing autoconf to code in a meta-name for each the directory prefixes and linking against an overridden version of open(2) that properly translates the meta-name. But that's icky. And the next thing you know, somebody's gonna want that function to allow the meta-name to be expanded to a path, etc. etc. Augh! > If you didn't want the package to have to look in /var/db/pkg, have > the package binaries hold a maximum-length padded string variable (marked > similarly to what(1) strings), and provide a tool to edit the binary (and > scripts) at install time. Similar to the above, substituting scary editing of binaries for scary library linking. ;^) > I think environment variables are too fragile for this purpose. > > > You could almost do this on UNIX now, by putting such settings into > > init's environment, if you could get the application developers to > > write their code (especially libraries) appropriately. > > This doesn't sound like it would be easy to allow different packages to > be installed with different roots. You're right. VMS has a system table, a per-group table, and a per-user table to allow overrides. They teeter between being neat features and be overkill. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message