Bug 219739 - [NEW PORT] textproc/elasticsearch5-search-guard: Elasticsearch Search Guard plugin
Summary: [NEW PORT] textproc/elasticsearch5-search-guard: Elasticsearch Search Guard p...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL: https://github.com/floragunncom/searc...
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2017-06-02 20:24 UTC by Miroslav Lachman
Modified: 2017-11-21 15:53 UTC (History)
3 users (show)

See Also:


Attachments
new port shar of Elasticsearch Search Guard plugin (8.82 KB, text/plain)
2017-06-02 20:24 UTC, Miroslav Lachman
no flags Details
shar with fixed portlint warnings (8.86 KB, patch)
2017-09-15 11:57 UTC, Miroslav Lachman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2017-06-02 20:24:10 UTC
Created attachment 183163 [details]
new port shar of Elasticsearch Search Guard plugin

This is port of Elasticsearch 5 plugin Search Guard
https://github.com/floragunncom/search-guard

It works but it is a first time I created port so it should be carefully checked by a committer.

It passed "poudriere testport"

BTW I am not sure how to use PORTVERSION / PORTREVISION if the plugin version is "5.3.0-12" so I used PORTVERSION 5.3.0 and PORTREVISION 12 but is seems wrong now.

Also I don't know how to properly %%PREFIX%% / ${PREFIX} / ${LOCALBASE} paths in installed scripts (lib/elasticsearch/plugins/search-guard-5/tools/*.sh)
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-07-18 15:45:23 UTC
Since some time has gone: can you please update it to the newest version?

Regarding your PORTVERSION questions. Its a hard one. Other ports just use DIST_VERSION. Have a look for example at www/drupal7-wysiwyg.
Comment 2 Miroslav Lachman 2017-07-18 18:22:29 UTC
(In reply to Torsten Zuehlsdorff from comment #1)
There is no newer version for Elastic 5.3.0. 
https://oss.sonatype.org/content/repositories/releases/com/floragunn/search-guard-5/
Version 14 was released for Elastic 5.3.3 and newer but FreeBSD ports tree has 5.3.0
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-19 03:50:38 UTC
DISTVERSION will derive/produce a correct PORTVERSION
Comment 4 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-07-19 09:00:15 UTC
(In reply to Miroslav Lachman from comment #2)

> There is no newer version for Elastic 5.3.0.

Ah, i see now. Thanks for the explanation. 

portlint -C shows up with some messages. Most of them will go away when using DISTVERSION.
Please also regenerate the patch with make makepatch.

FATAL: Makefile: PKGNAMEPREFIX appears out-of-order.
FATAL: Makefile: order must be PORTNAME/PORTVERSION/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX/PORTREVISION/PORTEPOCH/CATEGORIES/MASTER_SITES/MASTER_SITE_SUBDIR/PROJECTHOST/PKGNAMEPREFIX/PKGNAMESUFFIX/DISTNAME/EXTRACT_SUFX/DISTFILES/DIST_SUBDIR/EXTRACT_ONLY.
WARN: Makefile: using hyphen in PORTNAME. consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.
WARN: /usr/ports/textproc/elasticsearch5-search-guard/distinfo: [1]: TIMESTAMP is over 30 days old
WARN: /usr/ports/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.

The rest of the port looks fine. If you fix the issues i will commit it.
Comment 5 Miroslav Lachman 2017-09-15 11:57:54 UTC
Created attachment 186410 [details]
shar with fixed portlint warnings

I fixed some warnings, recreated patch with make makepatch but I still think it is better to use fixed string 
DISTNAME=       search-guard-5-5.3.0-12

instead of messing with PORTVERSION / DISTVERSIONPREFIX / DISTVERSION / DISTVERSIONSUFFIX combinations like this:

PORTVERSION=    5.3.0
DISTVERSIONPREFIX=   5-
#DISTVERSION=   5.3.0
DISTVERSIONSUFFIX=   -12

So now portlint -C complaints just for this

WARN: Makefile: using hyphen in PORTNAME. consider using PKGNAMEPREFIX and/or PKGNAMESUFFIX.

But hypen in PORTNAME is intentional
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-11-21 15:13:51 UTC
A commit references this bug:

Author: tz
Date: Tue Nov 21 15:13:32 UTC 2017
New revision: 454614
URL: https://svnweb.freebsd.org/changeset/ports/454614

Log:
  New port: textproc/elasticsearch5-search-guard

  Search Guard() is an Elasticsearch plugin that offers encryption,
  authentication, and authorization. It builds on Search Guard SSL and provides
  pluggable authentication and authorization modules in addition.
  Search Guard is fully compatible with Kibana, Logstash and Beats.

  As an alternative to other security solutions for Elasticsearch,
  Search Guard offers the following main features:

      TLS on transport- and REST-layer
      Fine-grained role- and index-based access control
      HTTP Basic Authentication
      LDAP / Active Directory
      Kerberos / SPNEGO
      JSON web token
      Document- and Field-level security
      Audit logging
      Kibana multi-tenancy
      REST management API
      Proxy support
      User impersonation

  WWW: https://github.com/floragunncom/search-guard

  PR:           219739
  Submitted by: Miroslav Lachman <000.fbsd@quip.cz>

Changes:
  head/textproc/Makefile
  head/textproc/elasticsearch5-search-guard/
  head/textproc/elasticsearch5-search-guard/Makefile
  head/textproc/elasticsearch5-search-guard/distinfo
  head/textproc/elasticsearch5-search-guard/files/
  head/textproc/elasticsearch5-search-guard/files/patch-elasticsearch-tools-install_demo_configuration.sh
  head/textproc/elasticsearch5-search-guard/pkg-descr
  head/textproc/elasticsearch5-search-guard/pkg-message
  head/textproc/elasticsearch5-search-guard/pkg-plist
Comment 7 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2017-11-21 15:14:58 UTC
Finally committed. I changed MASTER_SITE and DISTNAME a little, but the rest is taken like submitted.

Thanks!
Torsten
Comment 8 Miroslav Lachman 2017-11-21 15:53:32 UTC
Thank you!