Bug 259527 - net/seaweedfs: update to 2.75 and port refactoring
Summary: net/seaweedfs: update to 2.75 and port refactoring
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dave Cottlehuber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-29 12:42 UTC by Boris Korzun
Modified: 2021-12-22 10:42 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (dch)
drtr0jan: maintainer-feedback? (dch)


Attachments
seaweedfs.patch (53.32 KB, patch)
2021-10-29 12:42 UTC, Boris Korzun
no flags Details | Diff
seaweedfs.patch (52.43 KB, patch)
2021-11-12 13:16 UTC, Boris Korzun
no flags Details | Diff
seaweedfs.diff (54.92 KB, patch)
2021-12-07 08:04 UTC, Boris Korzun
no flags Details | Diff
seaweedfs.diff (13.42 KB, patch)
2021-12-22 05:04 UTC, Boris Korzun
drtr0jan: maintainer-approval? (dch)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Korzun 2021-10-29 12:42:48 UTC
Created attachment 229120 [details]
seaweedfs.patch

Updated to 2.75.

And also changes:
- removed auto-creation /var/db/${PORTNAME} and /var/log/${PORTNAME} from Makefile;
- weed executable moved from sbin/weed to bin/weed (weed is running under nonprivilged user usually).
- rc.conf variables seaweedfs_syslog_* renamed to seaweedfs_syslog_output_* making them consistent with the rest of the ports tree;
- added rc.conf variable seaweedfs_syslog_output_tag for defining a syslog tag;
- default value of rc.conf variable seaweedfs_options changed to "server -dir=${seaweedfs_dir}";
- dropped daemon(8) syslog support verification;
- dropped extra rc commands reload and monitor as inoperative;
- dropped auto-creation ${seaweedfs_dir}/data and ${seaweedfs_dir}/metadata from rc-script as unnecessary.
- added auto-creation ${seaweedfs_dir} to rc-script.

Verified by portfmt/portclippy and poudriere testport. Also updated pkg-message.in and UPDATING.

What do you think about moving weed from sbin to bin? And about dropping auto-creation data and metadata dirs?
Comment 1 Boris Korzun 2021-11-12 13:16:28 UTC
Created attachment 229447 [details]
seaweedfs.patch

Update to 2.77
Comment 2 Boris Korzun 2021-12-07 08:04:41 UTC
Created attachment 229953 [details]
seaweedfs.diff

Update to 2.81
Comment 3 Dave Cottlehuber freebsd_committer 2021-12-21 07:58:34 UTC
thanks for the patch & updates! I've been afk due to work for a spot.

I'll commit the distinfo & version changes immediately, and give the
rest some time to review.

The directory creation was definitely required in the past, how
does /var/{db,log}/* data and metadata get added for a new install
if not by us? if weed now auto-creates the *data dirs then that's
good news.

making settings consistent is good;
Comment 4 Dave Cottlehuber freebsd_committer 2021-12-21 08:25:33 UTC
making rc* settings consistent is good; but I'm not sure yet about moving the
directories around. Can you elaborate a bit on why this helps your setup?

I'd originally wanted the port to make getting started with seaweedfs a lot
simpler, it's very confusing for newcomers.
Comment 5 Boris Korzun 2021-12-21 08:35:51 UTC
(In reply to Dave Cottlehuber from comment #4)

Current versions of seaweedfs don't use data and metadata directories. There's no a mention in the sources too.

These directories are always empty.

The changes aren't confusing for newcomers and don't depend from it.
Comment 6 commit-hook freebsd_committer 2021-12-21 23:18:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5baa6d516f41b5d4243eee1f02a21dea23790db6

commit 5baa6d516f41b5d4243eee1f02a21dea23790db6
Author:     Boris Korzun <drtr0jan@yandex.ru>
AuthorDate: 2021-12-21 07:34:11 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2021-12-21 23:02:31 +0000

    net/seaweedfs: update to 2.81

    PR:             259527
    Sponsored by:   SkunkWerks, GmbH

 net/seaweedfs/Makefile      |  40 +++++----
 net/seaweedfs/Makefile.deps | 104 +++++++++++-----------
 net/seaweedfs/distinfo      | 206 +++++++++++++++++++++-----------------------
 3 files changed, 173 insertions(+), 177 deletions(-)
Comment 7 Boris Korzun 2021-12-22 05:04:05 UTC
Created attachment 230297 [details]
seaweedfs.diff

(In reply to commit-hook from comment #6)

Thx fo commit, but there is no need to create /var/log/seaweedfs dir. Seaweedfs doesn't use this directory. The directory is always empty.

Upgrade to 2.82.

And also changes:
- removed auto-creation /var/db/${PORTNAME} and /var/log/${PORTNAME} from Makefile;
- rc.conf variables seaweedfs_syslog_* renamed to seaweedfs_syslog_output_* making them consistent with the rest of the ports tree;
- added rc.conf variable seaweedfs_syslog_output_tag for defining a syslog tag;
- default value of rc.conf variable seaweedfs_options changed to "server -dir=${seaweedfs_dir}";
- dropped daemon(8) syslog support verification;
- dropped extra rc commands reload and monitor as inoperative;
- dropped auto-creation ${seaweedfs_dir}/data and ${seaweedfs_dir}/metadata from rc-script as unnecessary.
- added auto-creation ${seaweedfs_dir} to rc-script.
Comment 8 Dave Cottlehuber freebsd_committer 2021-12-22 09:34:35 UTC
awesome! yes clearly there's been significant changes in code in the last few months. The directory structure depends on what backend DB is chosen, and I think we can just add that as comment to pkg-message.

I did notice that there is not a clean upgrade from 2.76 to 2.81, at least with leveldb backend, but I will follow that up with chrisf directly, I don't think we can do anything about it here.
Comment 9 Boris Korzun 2021-12-22 10:42:39 UTC
(In reply to Dave Cottlehuber from comment #8)

I've checked the sources of v2.19 (the first version seaweedfs in FreeBSD Ports) and haven't found mentions for /var/log/seaweedfs and metadata dirs.

What backend do you mean?

And what problem with upgrade from 2.76 to 2.81 do you have?