Package creation fails in the cross-compile docker container

Hello!

I trying to set up CI for my own project, and I trying to use this container: Package cross-compiler · GitHub

The project itself builds fine, however, the package create always fails with next error:

# /usr/bin/package create -C ./package/ package-1.1.1~dev-1-x86_64.hpkg
unable to find system data path: Operation not supported!

The same package builds just fine on Haiku itself, but not via cross tool in the Docker container.

1 Like

I guess there aren’t many experts in that Docker image… or they just didn’t see the thread. I guess there remains nothing but to debug it yourself… or move onto another project :wink: .

With the image itself I am fine, then I’ll try to rephrase the question: which conditions cause the package tool to produce such error messages? Can you link me the code of the tool itself to let me inspect it?

Looks like some problem with the license handling haiku/src/kits/package/hpkg/PackageWriterImpl.cpp at master · haiku/haiku · GitHub

2 Likes

First time I’ve heard of the package tool. You’d think I should have known about it by now! :sweat_smile:

Thanks @Lrrr !

By the looks of it, haiku/3rdparty/docker/cross-compiler might be it. I found the link from the older docker hub package. It definitely would be nice if that were easier to find directly from the cross-compiler package from GitHub.

I may guess the pile of standard licenses is missing at the docker image then, my package uses GPLv3 license. I am right now out of home, so I’ll try to check this later.

How did you declare the license in your packageinfo file exactly? It has to match the filename of the file providing the license, stored I think in /boot/system/data/licenses/

Okay, just now I checked the container, and it has all these license files presented.


Then I may suspect, the bug in the tool itself when it works as a cross tool.

At me is specified GNU GPL v3, and on the true Haiku it works just fine. But the package tool built as a cross tool fails to even add the path according to the code, it didn’t reached the code piece when it should check the presense of the license file.

Ping? Any news regarding this? As I can see, the current version of package util still have a bug that it can’t find the path to licenses (or it was been specified wrong path during the build?).

Do you build the package on haiku or other system?

Haiku does not have usr/bin only system/bin.

For testing you can use my HPKG Creator from our repository software.besly.de. With my little program you can create a stand alone package for your own repository or testing.

If you get problms with licences, add them to your package too and descript them on the right positon in your package script:

Haiku Package - Tips and Tricks

On Linux. On Haiku itself everything works perfectly. As I said at the begin of topic, I trying to set up the CI that builds my project to Haiku using the Linux host using cross-compilation toolchain.

1 Like

Your files are in /system/data/licenses; the tool probably checks for them in /boot/system/data/licenses. On Haiku, the root filesystem is mounted in /boot/, not in / as in Linux. Some symlinks in / are provided, but typically not used by Haiku apps.

Maybe you can workaround this by linking /boot to /?

ln -s / /boot

Let me try… I’ll try a bit sooner as now I am a bit busy.

1 Like