Page MenuHomeFreeBSD

add sysutils/zrepl port
Needs ReviewPublic

Authored by lifanov on Sep 22 2017, 1:45 PM.
Referenced Files
Unknown Object (File)
Mon, May 8, 6:40 PM
Unknown Object (File)
Mon, May 8, 6:22 PM
Unknown Object (File)
Apr 1 2023, 1:06 PM
Unknown Object (File)
Mar 27 2023, 10:14 AM
Unknown Object (File)
Mar 27 2023, 3:34 AM
Unknown Object (File)
Mar 3 2023, 4:12 PM
Unknown Object (File)
Feb 26 2023, 3:36 AM
Unknown Object (File)
Feb 19 2023, 12:59 PM



zrepl is a tool for replicating ZFS filesystems

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

13–14 ↗(On Diff #33319)

This appears too early.

address mat's feedback: move PLIST_FILES after USES/USE block

This looks good, and I believe is ready for commit. I have included a couple of minor comments here, which are not show-stoppers.

3 ↗(On Diff #33329)

These first 3 blocks are probably indented one tab too many

15 ↗(On Diff #33329)

This is indented one tab too many

44 ↗(On Diff #33329)

This is indented one tab too many

2 ↗(On Diff #33329)

Having discussed this port with Christian at EuroBSDcon, I think we should include a small warning after this description to explain that there has not yet been the first 0.1 release yet, and as such this probably should not be used in "production" environments just yet.

Add rc script and warning message. Fix indentation.

Hi Nikolai,
I hope you don't mind, but I updated this diff myself because I had added an rc script which makes it much easier to use.
I have completed build and run testing. It is working nicely.
Feel free to revert any changes if you don't like them.

I restructured logging during EuroBSDCon - zrepl now supports writing to syslog directly, as well as several log formats and other log sinks.

The revision I would like to see in ports is 7c86628f3b6d77c1b3833e1f75a979690aed5f30.

Compared to what we have here right now, changes required are:

  • newsyslog.conf.d entry
  • default config with syslog output enabled -> see examples / extend zrepl docs
  • daemon(8) should then interpret any stderr & stdout output as LOG_ALERT, since the only output there will be errors encountered while writing to the logging sinks
  • update dependencies if required

I'm on a train with flaky internet connection, so I cannot update the Gopkg files right, now, will do sow in a few hours, which will be another commit.

This revision now requires changes to proceed.Sep 30 2017, 12:31 PM

OK, the Gopkg.{toml,lock} from 7c86628f3b6d77c1b3833e1f75a979690aed5f30 is up-to date, so the deps listed there are the ones required to build.

Hi Christian,

To me it sounds like you could tag your first (beta) 0.1 release as commit 7c86628f3b6d77c1b3833e1f75a979690aed5f30. Can I encourage this? ;)

Also, do we still need the big scary warning I introduced in pkg-message?


I mention tagging a release, because I think it will encourage users to begin testing it in non-production environments, and because it’s important for users to be using a consistent version during this pre-release testing. It’s not a 1.0 release, so it doesn’t matter that it’s not something you consider feature complete. Far too often do I see software on GitHub that doesn’t tag releases.

So I actually released a 0.0.1, signed with my pubkey.

I guess the warning can go away...

1 ↗(On Diff #33589)

Can we write zrepl in small letters here?

So I actually released a 0.0.1, signed with my pubkey.

I guess the warning can go away...

Great news! Thanks for that :)

For some reason I can't download the release using the 0.01 release number. When I put that into the port and run "make makesum" I get the following output:

/usr/ports/sysutils/zrepl$ make makesum
=> zrepl-zrepl-0.01_GH0.tar.gz doesn't seem to exist in /usr/local/poudriere/ports/default/distfiles/.
=> Attempting to fetch
fetch: Not Found

Are you sure you tagged the release in the normal way? Instructions are here:

As per comments from Christian Schwarz (zrepl author):

  • Update to 0.0.1 release, and remove big scary warning
  • Add syslog.d and newsyslog.conf.d entries
  • Add default config with syslog output enabled
  • Update rc script to interpret redirect any stdout/stderr as LOG_ALERT
  • Update dependencies
  • Add pkg-message explaining steps required after first install

For the record, the only dependencies I haven't included in the Makefile are the last 4 entries in Gopkg.lock (

It appears to work perfectly without adding anything related to these:

  branch = "master"
  name = ""
  packages = ["unix"]
  revision = "429f518978ab01db8bb6f44b66785088e7fba58b"

  branch = "master"
  name = ""
  packages = ["internal/gen","internal/triegen","internal/ucd","transform","unicode/cldr","unicode/norm"]
  revision = "1cbadb444a806fd9430d14ad08967ed91da4fa0a"

  branch = "v2"
  name = ""
  packages = ["."]
  revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"

  analyzer-name = "dep"
  analyzer-version = 1
  inputs-digest = "7ce2ead5225e4bb72a34132538171a649b26de574596e909730658ddbc904cd5"
  solver-name = "gps-cdcl"
solver-version = 1

I believe this is ready for committing to ports. @lifanov are you happy with my updates, and do you want to commit it? Alternatively, let me know if you are happy for me to commit it.

I'll take one last look at it and commit it in a few minutes. I hereby implicitly approve you (woodsb02) to make any sort of change to the port in the future including grabbing maintainership.

p.s. Sorry, I was traveling, just got back.

pkg-descr needs to start with a capital letter.
Also, it uses "written in Go" twice in the same sentence.

This revision was automatically updated to reflect the committed changes.

If the syslog.d file can be customized, I think the newsyslog.conf.d file shoudl be customizable too. (Note the newsyslog sample file needs to be some other place.)


I wanted to do this, but unlike syslogd which only includes .conf files, newsyslog include ALL files in the /usr/local/etc/newsyslog.conf.d/ directory.

Do you know if it is possible with package to put the .sample file in a different directory from the config file? It would violate POLA... but could work.

$ ag newsyslog sysutils/munin-node/
8:@dir etc/newsyslog.conf.d
9:@sample %%ETCDIR%%/munin-node.newsyslog etc/newsyslog.conf.d/munin-node

91:     ${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-node.newsyslog

Ughh, sorry. I didn't think of that.
What do you think of adding a file in etc/newsyslog.conf.d that does something like
<include> %%LOCALBASE%%/etc/zrepl-newsyslog.conf
and install a sample for that?

Ughh, sorry. I didn't think of that.
What do you think of adding a file in etc/newsyslog.conf.d that does something like
<include> %%LOCALBASE%%/etc/zrepl-newsyslog.conf
and install a sample for that?

That seems like over-engineering. Why not simply install the sample file someplace else and use @sample to install it at the right place ?

Ping - This review can be closed now, since sysutils/zrepl has been in ports for some time. :)