Page MenuHomeFreeBSD

New port: sysutils/sockaddr

Authored by seanc on Mar 3 2018, 12:33 AM.



Add a new port: sysutils/sockaddr

Sockaddr is a command-line utility that makes it easy to query network
address information from the local server. With sockaddr it is possible
to create a list of the RFC 1918 addresses on a server, obtain the
default gateway, or public IP addresses and use this information in other
shell scripts. See the website for additional templating and IP math

Test Plan

poudriere testport

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

3 ↗(On Diff #39901)

Should be named go-sockaddr.

5 ↗(On Diff #39901)

Where is ths v0.1.0 coming from? I could not find any reference to it on the github page.

14 ↗(On Diff #39901)

Do not USES=go if you overwrite everything it does later. Simply add a dependency on go itself.

19 ↗(On Diff #39901)

Remove this line and set GH_TAGNAME= 7165ee1

35 ↗(On Diff #39901)

@mat Updated with a few residual Q's.

3 ↗(On Diff #39901)

Ignorant question: there is no runtime dependency on Go. Why does the language that the tool was written in need to be part of the port name's prefix? Go is used as the compiler to install a static binary, this isn't a library. As a library name, go-sockaddr is correct, however as a standalone binary sockaddr is correct. Because this port is installing the binary, not the Go library, I believe this is correct. ?

5 ↗(On Diff #39901)

I arbitrarily designated this 0.1.0 since the port is not tagged upstream.

19 ↗(On Diff #39901)

There is a nuance in the port build infrastructure that I don't fully understand yet. I used GH_TAGNAME to begin with, but this doesn't work as expected:

GH_TAGNAME=	7165ee1

I am unable to fetch the tarball:

% make makesum
=> hashicorp-sockaddr-v0.1.0-7165ee1_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch
fetch: Not Found

But if I use a GH_TUPLE instead, everything works as expected:

 % make makesum
=> hashicorp-go-sockaddr-v0.1.0-7165ee1_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch
fetch: size of remote file is not known
hashicorp-go-sockaddr-v0.1.0-7165ee1_GH0.tar.g         645 kB 2344 kBps 00m01s
seanc added a reviewer: mat.

Additional tweak found via portlint -A

3 ↗(On Diff #39901)

This seems correct to me, I think sockaddr is fine as a name.

5 ↗(On Diff #39901)

Might want to use a gYYYYMMDD timestamp type version instead in that case.

seanc marked 6 inline comments as done.
seanc edited the summary of this revision. (Show Details)

Updated to use a date for DISTVERSION.

seanc added inline comments.
5 ↗(On Diff #39901)

Curio: where's the g prefix come from?

seanc requested review of this revision.Apr 26 2018, 7:23 PM
seanc edited the test plan for this revision. (Show Details)

Staged diff via svn diff

18 ↗(On Diff #42176)

Replace by


Updated and addresses all known feedback from @mat .

seanc added inline comments.
18 ↗(On Diff #42176)


seanc requested review of this revision.
seanc marked an inline comment as done.
This revision is now accepted and ready to land.May 11 2018, 8:00 PM
This revision was automatically updated to reflect the committed changes.