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

seanc created this revision.Mar 3 2018, 12:33 AM
mat added inline comments.Mar 5 2018, 2:58 PM
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)
seanc updated this revision to Diff 41676.Apr 20 2018, 6:25 AM

Address @mat 's comments.

seanc added a comment.Apr 20 2018, 6:26 AM

@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 updated this revision to Diff 41745.Apr 23 2018, 7:24 AM
seanc added a reviewer: mat.

Additional tweak found via portlint -A

seanc marked 2 inline comments as done.Apr 23 2018, 7:26 AM
swills added inline comments.Apr 26 2018, 3:09 PM
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 updated this revision to Diff 41899.Apr 26 2018, 5:53 PM
seanc marked 6 inline comments as done.
seanc edited the summary of this revision. (Show Details)

Updated to use a date for DISTVERSION.

seanc planned changes to this revision.Apr 26 2018, 7:22 PM
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 updated this revision to Diff 42176.May 6 2018, 12:07 AM
seanc edited the test plan for this revision. (Show Details)

Staged diff via svn diff

mat added inline comments.May 9 2018, 10:12 AM
18 ↗(On Diff #42176)

Replace by

seanc updated this revision to Diff 42417.May 11 2018, 6:46 PM

Updated and addresses all known feedback from @mat .

seanc marked an inline comment as done.May 11 2018, 6:46 PM
seanc added inline comments.
18 ↗(On Diff #42176)


seanc planned changes to this revision.May 11 2018, 6:47 PM
seanc requested review of this revision.
seanc marked an inline comment as done.
swills accepted this revision.May 11 2018, 8:00 PM


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.