aaronhurt/zfs-replicate

Update FreeBSD port and/or takeover ownership

Closed this issue · 14 comments

This issue is to track the status of updating the FreeBSD port for this script. The official port is located here: https://www.freshports.org/sysutils/zfs-replicate/

This issue was spawned from discussions in #18.

I’ll do some reading and studying. This would be my first port if I were to decided to be the maintainer, but i wouldn't mind.

I have taken over as maintainer of the port.
I included your repo here as the source, but the port builds from my fork, where it was necessary to create a tag for it.

The FreeBSD port will install and have the log file stored at the script path. This is fine for things like XigmaNAS, but standard FreeBSD would require it to be in /var/log/zfs-replicate/*.log

I have modified my own repo to set it as such, and if you are willing I can create a PR, or just leave it as the port pulls from my fork.

This project should have releases and some branch protections as well if it's being published. I never did when I created it as it was "only" a script for my own use.

Good point, and thanks for the invite. Ive pushed some minor changes if you could review them, then I can update the FreeBSD ports tree to just point to this repo. Then I can delete my own fork in favor of the main one here.

I did my best to re-create some historic release points and was sure not to grab v1.0 yet. Let's make sure it's a good stable release with a solid commit message. Not the typical script commit messages I've made here over the last 10+ years ;p

https://github.com/aaronhurt/zfs-replicate/releases

Port built successfully using v0.9 on FreeBSD.
I will push this to the ports tree and we can let it sit for a while before releasing 1.0

Id like to get the current PRs reviewed and accepted so we can push a 0.9.1 release for the ports tree. Just to be sure we have every update included for now.

@aaronhurt Are you working on releasing 1.0? Once that is complete i can update the ports tree.

Yes, the last thing on my list was getting some form of unit tests aded to the code. That's there now in the test.sh script.

@tschettervictor To your comment in the other PR ... you can call the script whatever you want in your port packaging. If you want to rename it to just zfs-replicate that's fine. It will still execute and there aren't any hard-coded references to zfs-replicate.sh in the script itself. The script only ever uses ${BASH_SOURCE[0]} which will be whatever the executable was called.

[ahurt@charlie ~/Projects/zfs-replicate]$ cp -f zfs-replicate.sh cactus
[ahurt@charlie ~/Projects/zfs-replicate]$ ./cactus --help
Usage: ./cactus [options] [config]

Bash script to automate ZFS Replication

Options:
  -c, --config <configFile>    bash configuration file
  -s, --status                 print most recent log messages to stdout
  -h, --help                   show this message
[ahurt@charlie ~/Projects/zfs-replicate]$
[ahurt@charlie ~/Projects/zfs-replicate]$ ./cactus
Aug 28 14:13:27 cactus[61220]: loading configuration from defaults and environmental settings.
Aug 28 14:13:27 cactus[61220]: ERROR: missing required setting REPLICATE_SETS

Got it, thanks.
Port now updated. Closing...