Subject: Re: building a package .tgz from a backup dump?
To: David Brownlee <abs@netbsd.org>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 02/19/2004 10:26:25
In message <Pine.NEB.4.58.0402191505070.206@forsaken.i.purplei.com>, David Brow
nlee writes:
>On Wed, 18 Feb 2004, Steve Bellovin wrote:
>
>> I have some disk backups (in 'dump' format) that contain a version of an
>> installed package I'd like to recover. Is there any easy way to do
>> this?
>
> I'm probably missing an aspect of the question, but assuming you
> have a dump of the entire filesystem containing the pkg db
> directory and usr/pkg (or wherever you have installed):
>
> restore xvf <dumpfile> var/db/pkg
>
> awk '\!/[+@]/{print "usr/pkg/"$0}' var/db/pkg/<pkg>/+CONTENTS \|
> xargs restore xvf <dumpfile>
>
> should extract the pkg db directory, then everything listed in
> +CONTENTS for the given package. (Adjust <dumpfile> and <pkg>
> to taste, and run in smewhere other than '/' :)
>
The issue isn't getting the files; it's getting an installable package.
That is, I want the equivalent of pkg_tarup from dump files. To make
life more fun, this package is in /usr/X11R6 (a botch, but I didn't
know about xpkgwedge at the time I set that machine up).
--Steve Bellovin, http://www.research.att.com/~smb