Porting the Hiawatha server to Haiku (2)

Continued from Porting …. page 1

My .PackageInfo file was about as stripped down as I could make it.  Certain information, if lacking, prompts an insufficient info error message from the package utility.  Other items are optional.  Here is the outline of my .PackageInfo file, having the names, but not the associated values that I needed to insert into the file before I could build a package that would drag ‘n drop install into the /system/packages folder on my Haiku desktop.

name
version
architecture
summary
description
packager
vendor
licenses {

}
provides {

}
copyrights {

}
requires {

}
urls {

}
source-urls {

}
post-install-scripts {

}

The following link has some of the info needed, when deciding what to insert into the .PackageInfo manifest file (I think that’s what they call it). I’m not the Haiku packager expert.  In fact, this is the first package I’ve ever built on Haiku.  So, there could be some things missing.  There seems not to be a good all-in-one online location for this information.  My package *seems* to install correctly, by my definition, with this .PackageInfo manifest.  However; time will tell if there are un-obvious issues remaining.

https://dev.haiku-os.org/wiki/PackageManagement/BuildingPackages

  • For “name” – I used the value hiawatha (with no quotes).
  • For “version” – I used the value 10.6-1 (again, no quotes).
  • For “licenses” – I used the value “GPL v2” (with quotes).
  • For “architecture” – I used the value any (no quotes).

The architecture value can be x86_gcc2, any, or x86 (no quotes).  The any value, as far as I can figure, is the best fit for the gcc2/hybrid architecture that I’m using.  I compiled the hiawatha server using the so-called x86 architecture, on a hybrid installation. On a Haiku hybrid system that means I’ve used the “setarch x86” command to switch to the use of gcc5 and the requisite library directories. A hybrid system can compile and run both gcc2 and gcc5 applications.

I tried the x86 value for the architecture name, but the resulting package wouldn’t install.  I guess that makes sense, because there is a non-hybrid Haiku system that uses gcc5 for everything (with no gcc2) – but the hybrid system is not that system.  I guess it’s saying that the package was “built for” the indicated architecture.  Even that doesn’t exactly make sense yet to me.  So – take with a grain of salt.

For the “provides” section of the file, I supplied the value:

  •      hiawatha = 10.6-1  (no quotes)

Only a little typo in these definitions makes for a no-build package, or a “doesn’t install package” – and neither the packager nor the OS will tell you this.

For the “requires” part of the file, I used this for now (but, as described in the text (paragraph below) – it needs to be increased to a later version):

  • haiku >= r1~alpha4_pm_hrev46213-1 (no quotes)

I just took the example minimum Haiku revision from the example file in the link mentioned (above).  In fact, my just built package likely won’t install on anything that old, but I didn’t want to take the time to try running it on all the possible Haiku nightlies.  Do you know HOW MANY that is?   So, someone else, needing the package to actually install on older versions, would have to slowly backtrack through the revision history until it broke.  Could take days.  I suppose I could put the value of the hrev revision I actually used in that spot (hrev 50941) – but I have multiple machines with different (older) versions of Haiku.   Many of those revisions have somewhat trivial change-sets, so the oldest version that *will still work* is gonna be variable.

What makes this more of a problem on Haiku, is that the last non-nightly distribution was six years ago.  So, NO-BODY is using anything but nightlies …

Read More …

FWIW: the author does not make any claims as to the accuracy of statements in this document. Much of it has been taken from memory.

Note: Hiawatha is hosted at https://www.hiawatha-webserver.org, and this site and author has no affiliation with them. Also, Haiku-OS is an operating system at http://www.haiku-os.org, and this site and author has no affiliation with them.

Advertisements