4

May I ask what's the practical option to build .pkg file on ubuntu? I was trying xar, but the resulted .pkg file could not be installed on mac, got 'com.apple.installer.pagecontroller error -1' And I was trying to use munkipkg, but it depends on pkgbuild on OS X. Is that possible to have pkgbuild on linux? or could anyone suggest a best way to do this ?

Thanks!

lucky_start_izumi
  • 2,511
  • 13
  • 41
  • 61

1 Answers1

5

It's a bit difficult to do. http://hogliux.github.io/bomutils/tutorial.html can do it though.

You essentially need to use xar, but you also need a BOM (bill of materials), which the tool will create for you.

Eugene K
  • 3,381
  • 2
  • 23
  • 36
  • Thanks a lot Eugene, but after I tried it and pack the package, when I was trying to install the package on a mac OS X, I got "The operation couldn’t be completed. (com.apple.installer.pagecontroller error -1.)" Could you please suggest on that? – lucky_start_izumi Oct 12 '15 at 15:19
  • I think this approach will work, that error was my fault giving wrong Distribution file. Still have some other errors:P – lucky_start_izumi Oct 12 '15 at 17:54
  • when I try to install the package, I got "Domain=PKInstallErrorDomain Code=112 'An error occurred while running scripts from the package ...'", do you have any idea how could I solve that? thanks a lot! – lucky_start_izumi Oct 12 '15 at 18:57
  • Probably one of two things. 1) You need to make sure the user:group permissions of the BOM, XAR, and output pkg are the same. 2) Maybe add file permission +x to the .pkg – Eugene K Oct 12 '15 at 19:16
  • hey Eugene, I tried to set permission +x to every file, and the owner from cpio set to 0:80, but still get the error :( – lucky_start_izumi Oct 12 '15 at 20:22
  • @lucky_start_izumi I don't know then, I'd advise creating a new post about that where you can post the full log. – Eugene K Oct 12 '15 at 20:38
  • It's working, the error was because of my structure :P The bounty could only be given in 16hours, will do that tomorrow thanks so much! – lucky_start_izumi Oct 12 '15 at 22:36
  • @lucky_start_izumi glad to know it worked. Can maybe edit your post to say what the structure issues were for future people. – Eugene K Oct 13 '15 at 18:39
  • I guess my useless isn't really typical, because the content is copied here, we didn't have correct Distribution file & PackageInfo file. After changed on those it worked – lucky_start_izumi Oct 13 '15 at 23:46
  • But what about the XML files? like the one that contain the paths, file sizes, permissions, etc? – MarcusJ Oct 01 '16 at 18:55
  • I was able to create my installations using the guide. But recently I've moved to new Ubuntu 22 and there is a problem with XAR because it uses libssl1.0-dev which was removed from ubuntu. – Zur13 Aug 02 '23 at 13:04