Bug 226512 - security/suricata: update to 4.0.4
Summary: security/suricata: update to 4.0.4
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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-11 09:31 UTC by Franco Fichtner
Modified: 2018-04-02 00:01 UTC (History)
2 users (show)

See Also:
franco: maintainer-feedback+


Attachments
patch against head (1.14 KB, patch)
2018-03-11 09:31 UTC, Franco Fichtner
franco: maintainer-approval+
Details | Diff
Updated patch (1.84 KB, patch)
2018-03-11 21:57 UTC, Yuri Victorovich
no flags Details | Diff
Updated patch (8.60 KB, patch)
2018-03-26 13:57 UTC, Renato Botelho
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Fichtner 2018-03-11 09:31:15 UTC
Created attachment 191389 [details]
patch against head

Hi,

This updates Suricata to 4.0.4.  While here, disable libhtp port usage by default as the latest version is always shipped with Suricata.

Changelog: https://suricata-ids.org/2018/02/14/suricata-4-0-4-available/


Cheers,
Franco
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-11 21:57:14 UTC
This package is broken. It still links with libnss when it is disabled.

Error: /usr/local/bin/suricata is linked to /usr/local/lib/libnspr4.so from devel/nspr but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libnspr4.so:devel/nspr
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-11 21:57:47 UTC
Created attachment 191432 [details]
Updated patch
Comment 3 Franco Fichtner 2018-03-12 06:22:30 UTC
Hi Yuri,

No that's not quite right as it only links to libnspr if nss is installed locally, which is not the case with poudriere.


Cheers,
Franco
Comment 4 Renato Botelho freebsd_committer freebsd_triage 2018-03-20 22:55:17 UTC
(In reply to Franco Fichtner from comment #3)
If user chose to disable NSS option, it must be respected. There are users that still build their own packages locally.

Yuri's fix seems a good way to go while upstream is not fixed.
Comment 5 Franco Fichtner 2018-03-23 17:23:10 UTC
Fine, preparing a new patch. I just want to remind everyone what trivial cleanups did last time and avoid more iterations for the sake of shipping a perfectly good update. ;)

Also waiting for Victor to verify the distfile checksum shift on the new mirror...
Comment 6 Franco Fichtner 2018-03-23 17:46:28 UTC
https://twitter.com/inliniac/status/977238626357694464

4.0.4 briefly extracted as 4.0.0.... back to the proper distfile now.

@yuri approving changes now... thanks for the additions!
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-23 17:50:03 UTC
(In reply to Franco Fichtner from comment #6)

> @yuri approving changes now... thanks for the additions!

Thank you!
Comment 8 Renato Botelho freebsd_committer freebsd_triage 2018-03-23 18:29:20 UTC
For the record, I've submitted a fix upstream adding --disable-nss and --disable-nspr to configure options.

https://github.com/OISF/suricata/pull/3309
Comment 9 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-23 19:16:51 UTC
When all options are "off", 'stage-qa' fails:
Warning: you need LIB_DEPENDS+=libplds4.so:devel/nspr
Error: /usr/local/bin/suricata is linked to /usr/local/lib/libplc4.so from devel/nspr but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libplc4.so:devel/nspr
Error: /usr/local/bin/suricata is linked to /usr/local/lib/libnspr4.so from devel/nspr but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libnspr4.so:devel/nspr


You need to build and do 'make stage-qa' run with all options "off", with all options "on", and only individual options "on", and make sure there are no stage-qa failures in any cases.
Comment 10 Renato Botelho freebsd_committer freebsd_triage 2018-03-26 13:57:02 UTC
Created attachment 191841 [details]
Updated patch

This new patch adds the new configure options I've submitted upstream at https://github.com/OISF/suricata/pull/3309

I passess stage-qa with all or none options selected
Comment 11 Franco Fichtner 2018-03-28 08:17:35 UTC
Renato, bugzilla won't let me ACK your patch but it looks good, thank you!

Yuri, please commit Renato's version of the patch.


Cheers,
Franco
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-04-02 00:01:17 UTC
A commit references this bug:

Author: yuri
Date: Mon Apr  2 00:01:14 UTC 2018
New revision: 466193
URL: https://svnweb.freebsd.org/changeset/ports/466193

Log:
  security/suricata: Update 4.0.3 -> 4.0.4

  Port changes:
  * Change to DISTVERSION
  * Removed HTP_PORT from defaultoptions
  * Add NSS_CONFIGURE_OFF
  * Add command silencing

  I also noticed that it still links to libjansson when JSON=off.
  This is because it auto-finds it.
  Requested the upstream to add --disable-{option} flags:
  https://redmine.openinfosecfoundation.org/issues/2473

  PR:		226512
  Submitted by:	Franco Fichtner <franco@opnsense.org> (maintainer, original version)
  Submitted by:	Renato Botelho <garga@FreeBSD.org> (final version)
  Approved by:	Franco Fichtner <franco@opnsense.org> (maintainer)

Changes:
  head/security/suricata/Makefile
  head/security/suricata/distinfo
  head/security/suricata/files/patch-disable_nss_nspr
Comment 13 Yuri Victorovich freebsd_committer freebsd_triage 2018-04-02 00:01:25 UTC
Committed.
Thank you for the update!