On Thu, Mar 14, 2013 at 06:34:31PM +1100, Aristedes Maniatis wrote:
> I am trying to create a package without first having a port, but I'm finding 
> it really hard.
> 
> Firstly, the pkg MANIFEST format isn't well documented. For example:

That's on my TODO list to bring the documentation for MANIFEST into a complete
one

> 
> 1. What is the syntax of "deps" when I want to depend on Java, but not 
> specify the version? I've tried this:
> 
> deps:
>    javavmwrapper: {origin: java/javavmwrapper}

Here name and version are mandatory, this is to allow pkg add (used by the ports
tree, tinderbox and pointyhat) to be able to look at a package around the
package you want to install when doing pkg add ./yourpkg.txz it will try to get
./javawrapper-version.txz if exists.

Compatibility needed.

> 
> but this is ignored with a warning.
> 
> 
> 2. Everything under "files:" and "directories:" appears to have full paths 
> from root. If that is the case, how does the system adjust to a user's own 
> choice of prefix? And what is the point of the "prefix:" option earlier in 
> the MANIFEST?
> 
> 3. I see packages with this syntax:
> 
> directories:
>    /var/db/something: y
> 
> What does the "y" mean?
> 

y == try to delete while n == to no try.

meaning when pkg delete is called when it tries to remove the /var/db/something
if it fails and 'y' was given then it will not output a warning. But if 'n' was
given then it will warn about it.
> 
> 
> Secondly, I am confused by the tar packaging itself. It appears that my 
> package only works if I build it using
> 
>    tar Pf packge.tar /


Why are you trying to pack using tar and not pkg create directly? 
>   
> Is the correct way to chroot to a folder, assemble all the files relative to 
> root and then tar in this way? Again, why doesn't pkg cope with relative tar 
> pathing? Isn't that the whole point of 'prefix'?

Not at all package without prefix is broken by design because 90% of the
binaries will have hardcoded prefix. To install respecting chroot just pkg -c
/mychroot/ install mypkg

regards,
Bapt

Attachment: pgpyC7hHLpVg6.pgp
Description: PGP signature

Reply via email to