Page MenuHomeFreeBSD

[NEW-PORT] sysutils/data-prepper: Opensearch Data Prepper
ClosedPublic

Authored by kiwi on Feb 7 2025, 2:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 15, 7:06 PM
Unknown Object (File)
Thu, Mar 13, 8:14 AM
Unknown Object (File)
Wed, Mar 12, 3:27 PM
Unknown Object (File)
Wed, Mar 12, 1:28 PM
Unknown Object (File)
Wed, Mar 12, 1:12 PM
Unknown Object (File)
Wed, Mar 12, 12:05 PM
Unknown Object (File)
Wed, Mar 12, 11:35 AM
Unknown Object (File)
Wed, Mar 12, 9:42 AM

Details

Summary
systils/data-prepper: Opensearch Data Prepper

Data Prepper is a server-side data collector
capable of filtering, enriching, transforming, normalizing,
and aggregating data for downstream analysis and visualization.

Sponsored by:   Klara, Inc.
Approved by:    0mp (mentor)
Approved by:    kevans 
Approved by:    opensearch (Sven Ruediger <admin@hackacad.net>)
Co-authored-by: kiwi
Test Plan
  • Tested with poudriere on 14.2
  • Pet portclippy and portlint (except USE_JAVA -> USES+= java)
  • Basic install on a jail

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kiwi requested review of this revision.Feb 7 2025, 2:34 PM
kiwi created this revision.
This revision is now accepted and ready to land.Feb 7 2025, 2:43 PM
0mp requested changes to this revision.Feb 7 2025, 3:32 PM

Thanks for taking care of this patch.

I posted some comments with suggestions.

Note regarding the location of files: the port installs pretty much everything into its DATADIR. The FreeBSD convention is that we should sort and install files into proper directories, e.g., DATADIR, EXAMPLESDIR, ETCDIR, etc. What comes to my mind is that %%DATADIR%%/pipelines should probably live in ETCDIR and %%DATADIR%%/examples in EXAMPLESDIR. Sometimes, of course, the port is not easy to modify to follow this convention. I leave it up to your discretion to decide if we should install those files into the proper directories.

sysutils/data-prepper/Makefile
10

COMMENT should not be just the name of the program. See https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-comment

24

Is it necessary to set DATADIR here? Isn't the default OK?

36

Seems like a leftover debug command.

49

Please use ${RLN} instead of ${INSTALL} -lrs (defined in Mk/bsd.commands.mk).

sysutils/data-prepper/files/data-prepper.in
30

This should be %%SEARCHUSER%%

31

This should be %%SEARCHGROUP%%

34

%%JAVA_HOME%% is probably better to avoid problems in the future.

sysutils/data-prepper/pkg-messsage
4 ↗(On Diff #150670)

Please use %%PREFIX%% here. You'll need to switch to pkg-message.in. See math/scalapack for example.

This revision now requires changes to proceed.Feb 7 2025, 3:32 PM
diizzy added inline comments.
sysutils/data-prepper/Makefile
9

Is this a valid group/user?

sysutils/data-prepper/Makefile
9

Well it seem to have a opensearch group: https://wiki.freebsd.org/OpenSearch

kiwi marked 9 inline comments as done.Wed, Feb 19, 3:00 PM

All suggestion are done. See updates

Updated port with suggestions from 0mp
Fixed distfile name that have changed on master site
Updated pkg-plist as well

sysutils/data-prepper/Makefile
42

This should probably be using ${EXAMPLESDIR} instead of ${DATADIR}/examples, to follow normal FreeBSD convention. Below examples/ copy split out, and plist entries replaced with %%EXAMPLESDIR%%, etc. Mateusz had mentioned this (and a similar concern with /pipelines, but I bet that one requires patching and isn't worth it), but I didn't really see a comment explaining why we've opted not to go that route.

sysutils/data-prepper/Makefile
7

${DISTVERSION}${DISTVERSIONSUFFIX} --> ${DISTVERSIONFULL}

sysutils/data-prepper/files/pkg-messsage.in
5

If its wip it shouldn't be committed to tree

sysutils/data-prepper/files/pkg-messsage.in
5

There's nothing wrong with iterating on a port.
Obviously it's been smoke-tested and it functions, we can't predict all of the more in-depth usage that may need a little more work, and that's fine.

kiwi marked 4 inline comments as done.Thu, Feb 20, 9:30 AM

All suggestion has been updated

sysutils/data-prepper/Makefile
42

Well in this case, the original port give to us was made in this way. Will fix and update this port.

sysutils/data-prepper/files/pkg-messsage.in
5

Well you are right we can remove this comment since we took the work to make this port very less experimental.

kiwi marked 2 inline comments as done.

Suggestion for examples has been done (changed also plist, and the way to install examples into ${EXAMPLESDIR}).
Aslo updated pkg-message.in to reflect this change, and removed the "experimental" line.
Updated ${DISTNAME} as suggested.

diizzy requested changes to this revision.Thu, Feb 20, 5:56 PM

Needs proper confirmation from assigned group

sysutils/data-prepper/Makefile
9

..and did anyone agree to this assignment?

This revision now requires changes to proceed.Thu, Feb 20, 5:56 PM
sysutils/data-prepper/Makefile
9

Yes, we're doing this on behalf of one of the members.

Needs proper confirmation from assigned group

Yes, this port was initially created by me and the other members agreed to maintain this as the opensearch@ group.

sysutils/data-prepper/Makefile
9

Yes it is.

See textproc/opensearch

https://wiki.freebsd.org/OpenSearch

Thanks for confirming, this information should be in commit message

As this port has not been widely tested I'd suggest to add a pkg-message as well.

https://github.com/opensearch-freebsd/freebsd-ports/blob/main/sysutils/data-prepper/pkg-messsage

sysutils/data-prepper/files/data-prepper.in
31

It looks like the RC script is not properly resolving %%SEARCHUSER%% and %%SEARCHGROUP%%, leaving these variables in their unresolved state instead of substituting them with actual values.

kiwi edited the summary of this revision. (Show Details)

Updated commit message to include the information about opensearch (Sven Ruediger <admin@hackacad.net>) approbatiion.
Updating of %%JAVA_HOME%%, %%SEARCHUSER%% and %%SEARCHGROUP%% in rc script.

kiwi marked an inline comment as done.Tue, Mar 11, 5:18 PM
kiwi edited the summary of this revision. (Show Details)

Thanks for confirming, this information should be in commit message

Hey @diizzy, I have added the proper "Approved by" line about this point. Is it good to go for you ?

sysutils/data-prepper/files/data-prepper.in
35

BTW, if lib/data-prepper is installed by this port, then it should be PREFIX not LOCALBASE.

kiwi marked an inline comment as done.

Changed %%LOCALBASE%% to %%PREFIX%% in rc file

diizzy's concerns seem to be addressed. Approved.

sysutils/data-prepper/files/data-prepper.in
35

Nice catch, thanks :)

Adding USERS and GROUPS names to be created

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Mar 12, 3:19 PM
This revision was automatically updated to reflect the committed changes.