aaronhurt / zfs-replicate

POSIX compliant shell script to manage ZFS snapshot replication locally, or between hosts.
72 stars 17 forks source link

Update FreeBSD port and/or takeover ownership #21

Closed aaronhurt closed 2 months ago

aaronhurt commented 2 months ago

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.

tschettervictor commented 2 months ago

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.

tschettervictor commented 2 months ago

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.

tschettervictor commented 2 months ago

http://bugs.freebsd.org/280986

tschettervictor commented 2 months ago

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.

aaronhurt commented 2 months ago

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.

tschettervictor commented 2 months ago

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.

aaronhurt commented 2 months ago

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

tschettervictor commented 2 months ago

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

tschettervictor commented 2 months ago

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.

tschettervictor commented 2 months ago

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

aaronhurt commented 2 months ago

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.

aaronhurt commented 2 months ago

https://github.com/aaronhurt/zfs-replicate/releases/tag/v1.0 published :)

aaronhurt commented 2 months ago

@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
tschettervictor commented 2 months ago

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