Bug 257747 - security/snort: Fixes for aarch64 and armv6/7
Summary: security/snort: Fixes for aarch64 and armv6/7
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: Dan Langille
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-10 18:02 UTC by Brad Davis
Modified: 2021-08-11 16:27 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (dvl)


Attachments
patch (2.82 KB, patch)
2021-08-10 18:02 UTC, Brad Davis
no flags Details | Diff
patch (2.54 KB, patch)
2021-08-10 18:31 UTC, Brad Davis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Davis freebsd_committer freebsd_triage 2021-08-10 18:02:30 UTC
Created attachment 227090 [details]
patch

This patch does a few things:

1. Update depends to a newer version of net/daq, in the ports tree for a long time already, but explicitly depend on it.
2. Split out corefiles separate from debug options
3. Switch from luajit to luajit-openresty so that snort can build on aarch64
4. Fix crashing on armv7 due to misaligned memory access (from mjg@)
Comment 1 Dan Langille freebsd_committer freebsd_triage 2021-08-10 18:14:20 UTC
BRAD! I can work on this now.
Comment 2 Brad Davis freebsd_committer freebsd_triage 2021-08-10 18:31:05 UTC
Created attachment 227091 [details]
patch
Comment 3 Brad Davis freebsd_committer freebsd_triage 2021-08-10 18:31:58 UTC
DAN! :) Great, I just simplified the patch thanks to a suggestion from Renato
Comment 4 Dan Langille freebsd_committer freebsd_triage 2021-08-10 18:58:29 UTC
One issue I just hit: the 'unexec rmdir' line in pkg-plist. unexec is deprecated and postunexec should be used.  However, why remove /var/log/snort when removing the port?
Comment 5 Brad Davis freebsd_committer freebsd_triage 2021-08-10 19:19:09 UTC
Seems like just general tidying up, since rmdir(1) will not remove directories that are not empty.  I wish @dirrmtry listed why it is deprecated and what to use now. I think @preunexec is best so that the dir is gone when the plist checks run.

https://docs.freebsd.org/en/books/porters-handbook/book/#plist-keywords-base-exec
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-08-10 19:54:59 UTC
A commit in branch main references this bug:

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

commit c2a4ab17ef5e44424f2b2e97e30a2fde437dcd8a
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2021-08-10 19:49:49 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2021-08-10 19:52:05 +0000

    security/snort: Fixes for aarch64 and armv6/7

    This patch does a few things:

    1. Update depends to a newer version of net/daq, in the ports tree for a
       long time already, but explicitly depend on it.
    2. Split out corefiles separate from debug options
    3. Switch from luajit to luajit-openresty so that snort can build on
       aarch64
    4. Fix crashing on armv7 due to misaligned memory access (from mjg@)

    While here, in pkg-plist change deprecated @unexec to @postunexec

    PR:             257747
    Reported by:    brd

 security/snort/Makefile  | 25 ++++++++++++++++++-------
 security/snort/pkg-plist |  2 +-
 2 files changed, 19 insertions(+), 8 deletions(-)
Comment 7 Dan Langille freebsd_committer freebsd_triage 2021-08-10 19:57:36 UTC
Thank you.
Comment 8 Brad Davis freebsd_committer freebsd_triage 2021-08-11 16:27:51 UTC
Thanks Dan!