Page MenuHomeFreeBSD

New port: sysutils/sockaddr
ClosedPublic

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

Details

Summary

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
functions.

Test Plan

poudriere testport

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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
sysutils/sockaddr/Makefile
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.

sysutils/sockaddr/Makefile
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 https://codeload.github.com/hashicorp/sockaddr/tar.gz/7165ee1?dummy=/hashicorp-sockaddr-v0.1.0-7165ee1_GH0.tar.gz
fetch: https://codeload.github.com/hashicorp/sockaddr/tar.gz/7165ee1?dummy=/hashicorp-sockaddr-v0.1.0-7165ee1_GH0.tar.gz: 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 https://codeload.github.com/hashicorp/go-sockaddr/tar.gz/7165ee1?dummy=/hashicorp-go-sockaddr-v0.1.0-7165ee1_GH0.tar.gz
fetch: https://codeload.github.com/hashicorp/go-sockaddr/tar.gz/7165ee1?dummy=/hashicorp-go-sockaddr-v0.1.0-7165ee1_GH0.tar.gz: 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
sysutils/sockaddr/Makefile
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.
sysutils/sockaddr/Makefile
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
sockaddr/Makefile
18 ↗(On Diff #42176)

Replace by

GH_TAGNAME=7165ee1
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.
sockaddr/Makefile
18 ↗(On Diff #42176)

Done/fixed.

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

Approved

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.