pkg MANIFEST documentation

Chris Rees utisoft at gmail.com
Thu Mar 14 08:31:48 UTC 2013


On 14 Mar 2013 08:12, "Aristedes Maniatis" <ari at ish.com.au> wrote:
>
> 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?

Packages never supported PREFIX.  You can change PREFIX in ports, at
compile time, but once the compilation is done, changing PREFIX will break
many compiled binaries.

Chris


More information about the freebsd-ports mailing list