this used to work with suricata 5.x but now, with having FreeBSD 13.0 RELEASE installed, suricata builds fine but suricata-update fails: root@sunspot-thin:/usr/local/bin # ./suricata-update Traceback (most recent call last): File "./suricata-update", line 32, in <module> from suricata.update import main File "./../lib/python3.7/site-packages/suricata/update/main.py", line 50, in <module> from suricata.update import ( File "./../lib/python3.7/site-packages/suricata/update/commands/__init__.py", line 17, in <module> from suricata.update.commands import addsource File "./../lib/python3.7/site-packages/suricata/update/commands/addsource.py", line 22, in <module> from suricata.update import sources File "./../lib/python3.7/site-packages/suricata/update/sources.py", line 28, in <module> from suricata.update import net File "./../lib/python3.7/site-packages/suricata/update/net.py", line 38, in <module> from suricata.update import osinfo ImportError: cannot import name 'osinfo' from 'suricata.update' (./../lib/python3.7/site-packages/suricata/update/__init__.py) root@sunspot-thin:/usr/local/bin # uname -a FreeBSD sunspot-thin.south-border.com 13.0-RELEASE FreeBSD 13.0-RELEASE #1 r369322M: Sat Apr 24 07:18:54 EDT 2021 root@sunspot-thin.south-border.com:/usr/obj/usr/12.2-RELEASE/amd64.amd64/sys/NEWSOUTH2 amd64 root@sunspot-thin:/usr/local/bin # pkg info | egrep suricata suricata-6.0.2 High Performance Network IDS, IPS and Security Monitoring engine I tried installing py-pip and adding the modules but that didn't work for me. Oh, I should say that the custom kernel config really just builds pf modules into it as compiled in . Nothing more that then really. Thanks, Ian
So, I was able to finally fix this for myself by downloading the parsers.py and matchers.py from https://fossies.org/linux/suricata/suricata-update/suricata/update and placing them in /usr/local/lib/python3.8/site-packages/suricata/update/ https://fossies.org/linux/suricata/suricata-update/suricata/update/matchers.py https://fossies.org/linux/suricata/suricata-update/suricata/update/parsers.py After that suricata-update worked fine.
Created attachment 225204 [details] fix plist for suircata-update Hi, Sorry for the delay. Attached patch fixes the issue, but we need to wait for a committer to pick this up. Cheers, Franco
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b0e101ec785b9a445e5beca3a5c8351a1537e810 commit b0e101ec785b9a445e5beca3a5c8351a1537e810 Author: Franco Fichtner <franco@opnsense.org> AuthorDate: 2021-06-15 15:09:35 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-06-15 15:09:35 +0000 security/suricata: Fix plist issues suricata-update is failing to find certain python modules when trying to update rules. PR: 255397 Reported by: Ian Dickens <ian@south-border.com> Approved by: maintainer MFH: 2021Q2 security/suricata/Makefile | 2 +- security/suricata/pkg-plist | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
A commit in branch 2021Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=52617d7bda4f806b6f26e03506182411dcc8b877 commit 52617d7bda4f806b6f26e03506182411dcc8b877 Author: Franco Fichtner <franco@opnsense.org> AuthorDate: 2021-06-15 15:09:35 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-06-15 15:12:45 +0000 security/suricata: Fix plist issues suricata-update is failing to find certain python modules when trying to update rules. PR: 255397 Reported by: Ian Dickens <ian@south-border.com> Approved by: maintainer MFH: 2021Q2 (cherry picked from commit b0e101ec785b9a445e5beca3a5c8351a1537e810) security/suricata/Makefile | 1 + security/suricata/pkg-plist | 6 ++++++ 2 files changed, 7 insertions(+)
Thanks for your contributions!
Yay, thanks!