pkg_create broken by design?

Julian Elischer julian at elischer.org
Tue Jun 24 17:21:17 PDT 2003


I'm trying to make a package..
according to the man page for pkg_create:

    -s srcdir
             srcdir will override the value of @cwd during package
             creation.

    -p prefix
             Set prefix as the initial directory ``base'' to start
	     from in selecting files for the package.

and 
     @cwd directory
             Set the internal directory pointer to point to directory.  
             All subsequent filenames will be assumed relative to this
             directory.
             Note: @cd is also an alias for this command.
     @srcdir directory
             Set the internal directory pointer for _creation only_ to
             directory.  That is to say that it overrides @cwd for
             package creation but not extraction.


However if I try any combination of this where I set srcdir
(whether by -s or by @srcdir) to the place where my files are 
on the packing machine, and cwd to teh location where I want
to UNPACK the files on the target machine, pkg_create fails
if the directory 'cwd' doesn't exist on the packing machine.


e.g.
in the plist:

@cwd /etc/namedb/usr/libexec
@srcdir $pwd/build
named-xfer


The result?
Creating package vicor-sandbox-named-1.0
tar: /etc/namedb/usr/libexec: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now
pkg_create: make_dist: tar command failed with code 512


Well duh! Of course.. /etc/namedb/usr/libexec is the UNPACK directory..

it is not supposed to exist on this system.. this is where I'm PACKING
it..

Does anyone know how to do this? I've tried all sorts of combinations of
the above options..



More information about the freebsd-hackers mailing list