Page MenuHomeFreeBSD

sysutils/gstat-rs: new port
ClosedPublic

Authored by asomers on Jul 30 2021, 10:24 PM.

Details

Summary

Sponsored by: Axcient

Diff Detail

Repository
R11 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

diizzy added inline comments.
sysutils/gstat-rs/Makefile
17
105

These pkg-message lines looks out of place, any reason why you can't use the framework?
https://docs.freebsd.org/en/books/porters-handbook/book/#using-sub-files

sysutils/gstat-rs/Makefile
17

No, it is needed. Notice the difference between "gstat-rs" and "gstat".

105

I probably could use SUB_FILES. I'll try next week. I'm on vacation right now.

sysutils/gstat-rs/Makefile
17

NM; you're right.

  • Respond to diizzy's comments
sysutils/gstat-rs/files/pkg-message.in
11

What no zsh?

I would also remove the perens and capitalize For and add a colon... like:

For sh:
# echo alias..
sysutils/gstat-rs/pkg-descr
3–4

I would add all the bullet points you list in README.md in git here. That way it shows up in Freshports, etc.

sysutils/gstat-rs/files/pkg-message.in
11

What would be the right line for zsh?

sysutils/gstat-rs/files/pkg-message.in
11
echo alias gstat='/usr/local/sbin/gstat-rs' >> %%PREFIX%%/etc/zshrc
  • Add comment about zsh in pkg-message

@brd is there anything else this port needs?

Otherwise, the patch seems pretty solid. I'd run portfmt -i Makefile before committing (I think that CARGO_ENV is going to be indented differently by this formatting tool).

sysutils/gstat-rs/Makefile
17

GH_TAGNAME may go away if you set DISTVERSIONPREFIX to gstat-v I think.

102

AFAIK, portmgr@ recommends using ${INSTALL_PROGRAM} in this case (as a bonus you can drop the next line with STRIP_CMD).

104

Ideally, the destination path should be ${STAGEDIR}${MAN8PREFIX}/share/man/man8/gstat-rs.8 instead of ${STAGEDIR}${MAN8PREFIX}/man/man8/gstat-rs.8.

See https://github.com/freebsd/freebsd-ports/commit/a2ac717048e967e7e5e1ba9ea468de6251fd06f5#diff-aac07aefec754086f5c344e2c233862f6a611c739b5647fd456c1b77d3577c79

sysutils/gstat-rs/files/pkg-message.in
5

I'm not sure if the leading spaces are stripped, but the Porter's Handbook has an example using a heredoc which does not use them.

11

What no zsh?

I would also remove the perens and capitalize For and add a colon... like:

For sh:
# echo alias..

+1

sysutils/gstat-rs/pkg-descr
3–4

+1

asomers marked 4 inline comments as done.
  • Changes suggested by @0mp

Apart from possibly changing post-install to do-install, the patch is ready to go in my opinion.

sysutils/gstat-rs/Makefile
102

Now that I think about it, perhaps post-install could be do-install. Then you can get rid of the RM command and the CARGO_INSTALL_PATH variable (I'm not sure about this one though).

This revision is now accepted and ready to land.Oct 6 2021, 7:32 AM
This revision was automatically updated to reflect the committed changes.