pkg MANIFEST documentation

Aristedes Maniatis ari at ish.com.au
Thu Mar 14 08:12:42 UTC 2013


On 14/03/13 6:50pm, Baptiste Daroussin wrote:
> On Thu, Mar 14, 2013 at 06:34:31PM +1100, Aristedes Maniatis wrote:

>> 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.


So effectively it is impossible to build a package outside of the machine on which you are targeting? (or a controlled build farm like poudriere where everything is always the most recent version). I want the package to require only "Java" but instead I have to specify exactly the version of every dependency. Which of course I cannot know.

I don't see how this relates to "pkg -o <oldorigin>:<neworigin>". In that case you only need to use -o if the dependency name changes, not the version.

If I just use the oldest compatible version of javavmwrapper, I assume pkg will happy cope with a newer version of javavmwrapper installed?




>> 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?


In this case because I am performing the build on a server which isn't FreeBSD. And I figured "How hard would it be to just write out the MANIFEST file and tar/xz up the result." The answer is "Very hard."

For what it is worth, I didn't need to do this when I assembled the old pkg_ format by hand. It worked happily with relative paths.

Is this change in requiring absolute paths a bug or a new feature?

  
>> 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

This confuses me. The FreeBSD ports system does not respect 'prefix'? I thought that was a critical feature (although I don't personally use it). If this is broken by design, why do you have "prefix" as an option in the MANIFEST? Why is pkg making the breakage mandatory?

When the binary package repository is brought back on line (I understand it is still dead after the hacking problem) will it not support prefix at all?

> regards,
> Bapt
>

Thanks
Ari

-- 
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


More information about the freebsd-ports mailing list