Page MenuHomeFreeBSD

add sysutils/zrepl port
Needs ReviewPublic

Authored by lifanov on Sep 22 2017, 1:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 4:16 AM
Unknown Object (File)
Fri, Mar 15, 3:13 AM
Unknown Object (File)
Tue, Mar 12, 11:35 PM
Unknown Object (File)
Sun, Mar 10, 11:33 PM
Unknown Object (File)
Feb 11 2024, 5:15 PM
Unknown Object (File)
Jan 17 2024, 10:04 PM
Unknown Object (File)
Jan 15 2024, 3:57 PM
Unknown Object (File)
Jan 7 2024, 12:40 PM

Details

Summary

zrepl is a tool for replicating ZFS filesystems

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 11684
Build 12030: arc lint + arc unit

Event Timeline

sysutils/zrepl/Makefile
13–14

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.

sysutils/zrepl/Makefile
4

These first 3 blocks are probably indented one tab too many

16

This is indented one tab too many

45

This is indented one tab too many

sysutils/zrepl/pkg-descr
3

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.
Cheers,
Ben

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?

Thanks,
Ben

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

sysutils/zrepl/pkg-descr
2

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 https://codeload.github.com/zrepl/zrepl/tar.gz/0.01?dummy=/zrepl-zrepl-0.01_GH0.tar.gz
fetch: https://codeload.github.com/zrepl/zrepl/tar.gz/0.01?dummy=/zrepl-zrepl-0.01_GH0.tar.gz: Not Found

Are you sure you tagged the release in the normal way? Instructions are here: https://help.github.com/articles/creating-releases/

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 (https://github.com/zrepl/zrepl/blob/0.0.1/Gopkg.lock).

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

[[projects]]
  branch = "master"
  name = "golang.org/x/sys"
  packages = ["unix"]
  revision = "429f518978ab01db8bb6f44b66785088e7fba58b"

[[projects]]
  branch = "master"
  name = "golang.org/x/text"
  packages = ["internal/gen","internal/triegen","internal/ucd","transform","unicode/cldr","unicode/norm"]
  revision = "1cbadb444a806fd9430d14ad08967ed91da4fa0a"

[[projects]]
  branch = "v2"
  name = "gopkg.in/yaml.v2"
  packages = ["."]
  revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f"

[solve-meta]
  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.
head/sysutils/zrepl/pkg-plist
2–3 ↗(On Diff #33602)

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

head/sysutils/zrepl/pkg-plist
2–3 ↗(On Diff #33602)

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.

head/sysutils/zrepl/pkg-plist
2–3 ↗(On Diff #33602)
$ ag newsyslog sysutils/munin-node/
sysutils/munin-node/pkg-plist
8:@dir etc/newsyslog.conf.d
9:@sample %%ETCDIR%%/munin-node.newsyslog etc/newsyslog.conf.d/munin-node

sysutils/munin-node/Makefile
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. :)