Sunday, July 31, 2022

Re: Makefile for a custom port

[moved the CC from misc@ to ports@]

> > > Thank you for your answer.What am I supposed to do if the software has no Makefile
> > > If I want it to be installed manually, I need to type something like rake30 build:agent
> > > Am I supposed to deconstruct the initial installer that is provided in the sources and
> > > arrange it so it's Openbsd compatible ?
> >
> > Whatever software you're trying to build, from the information about it
> > that you've given so far, I think it's likely to be a challenge even for
> > an experienced porter.
> >
> > rake is not *normally* used for software written in Go, and something
> > written in Go and using rake is not likely to fit very well with
> > existing build scaffolding in ports.
> >
> > If you say what the software is, we might be able to give some more clues.
> Hello Stuart,
>
> Thank you for your answer. Indeed I feel that I'm very far in terms of skills to be able to do
> this.
>
> The software is Stork, it's a graphical front end for ISC Kea and Bind.
> https://gitlab.isc.org/isc-projects/stork
> https://gitlab.isc.org/isc-projects/stork/-/issues/193#note_304497
>
> They adapted their code so it can be used with Openbsd.
> I'm trying to install it, I have an Openbsd machine 7.1 that is supposed to host a DNS and a
> stork agent and another one in 7.2 that is supposed to host the stork server (a kind of manager
> /collector).

Yes this is going to be difficult to handle in ports. Personally
I would not tackle trying to port of this. If you can build it with
upstream's standard build method I suggest you do that instead and
forget about ports for this.

The agent will likely be tricky (the support script used by "portgen"
doesn't cope with this, repo is "gitlab.isc.org/isc-projects/stork").
Somewhere in the realms of possibility but likely to need a bunch of
work.

It may be easier to download the source code, fetch dependencies
with "go mod vendor" and create a vendored distfile. Then figure out
the minimal parts to do the actual build (probably direct from the
port Makefile rather than using rake).

Maybe similar for the backend service part of stork-server.

The frontend part will need to be done outside of ports (port builds
can't use the network, the npm fetching won't work). Normally in
other ports with a JS frontend we borrow it from a binary tar.gz from
upstream, but I don't think stork provides one. The alternative is to
build this separately and host a tar.gz somewhere and use files from
there in the port instead of building the frontend.

No comments:

Post a Comment