On 2021/04/20 14:24, Tracey Emery wrote:
> On Tue, Apr 20, 2021 at 11:09:39PM +0300, Yevhenii Kurtov wrote:
> > Hi,
> > 
> > I would love to run the LND node https://github.com/lightningnetwork/lnd, 
> > and since things are moving very fast in that field, it makes sense to have 
> > a stable solution for managing it, including version bumps. 
> > I didn’t ever write a port before, I only looked through Porter’s Handbook, 
> > and the template suggested. 
> > Probably my scenario is somewhat simpler than porting a C program. The only 
> > quirk that I can see is that the Go compiler and Git client have to be 
> > installed. Then I can clone the repo, checkout specific tag, and issue 
> > `make install` 
> > https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#installing-lnd-from-source

Their instructions result in fetching dependencies during build,
network access at build time is not allowed in ports,

> >  https://github.com/lightningnetwork/lnd/blob/v0.12.0-beta/Makefile
> > 
> > Does this sound about right?
> > 
> > If yes - maybe someone can point me in the direction of the existing port 
> > for a Go program?
> > 
> > 
> > Thanks!
> 
> Try: portgen go module-name
> 
> I think the portgen for go is pretty finalized. If not, abieber@ will
> let me have it!

i.e. "portgen go github.com/lightningnetwork/lnd", except lnd is one
of the things that "portgen go" doesn't handle.

You can try cloning the repo and running "go mod tidy && go mod vendor"
then tarring up the result (preferably without the .git directory) and
uploading it somewhere, then look at maybe net/wormhole-william to crib
from (or grafana, though that is more complex as it also fetches some
pre-generated non-compiled files bundled with the linux binaries).

C software is often simpler to port because it doesn't expect you to
be using a particular packaging/module ecosystem or build dependencies
at the same time you're building the software of interest.

Reply via email to