From b9e083a70395596bf45db8288a1d8112bafe79e5 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 26 Apr 2018 07:27:07 -0600 Subject: [PATCH] python: put some defaults on suricata.config.defaults This is a module that can contain installation default. For now it includes the sysconfdir, and rules data directory for use by suricata-update. --- configure.ac | 2 +- python/.gitignore | 2 ++ python/setup.py | 1 + python/suricata/config/__init__.py | 0 python/suricata/config/defaults.py.in | 2 ++ 5 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 python/suricata/config/__init__.py create mode 100644 python/suricata/config/defaults.py.in diff --git a/configure.ac b/configure.ac index 66b09a9f2a..12a7d179f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2266,7 +2266,7 @@ AC_SUBST(CONFIGURE_SYSCONDIR) AC_SUBST(CONFIGURE_LOCALSTATEDIR) AC_SUBST(PACKAGE_VERSION) -AC_OUTPUT(Makefile src/Makefile rust/Makefile rust/Cargo.toml rust/.cargo/config qa/Makefile qa/coccinelle/Makefile rules/Makefile doc/Makefile doc/userguide/Makefile contrib/Makefile contrib/file_processor/Makefile contrib/file_processor/Action/Makefile contrib/file_processor/Processor/Makefile contrib/tile_pcie_logd/Makefile suricata.yaml etc/Makefile etc/suricata.logrotate etc/suricata.service python/Makefile python/bin/suricatasc ebpf/Makefile) +AC_OUTPUT(Makefile src/Makefile rust/Makefile rust/Cargo.toml rust/.cargo/config qa/Makefile qa/coccinelle/Makefile rules/Makefile doc/Makefile doc/userguide/Makefile contrib/Makefile contrib/file_processor/Makefile contrib/file_processor/Action/Makefile contrib/file_processor/Processor/Makefile contrib/tile_pcie_logd/Makefile suricata.yaml etc/Makefile etc/suricata.logrotate etc/suricata.service python/Makefile python/suricata/config/defaults.py python/bin/suricatasc ebpf/Makefile) SURICATA_BUILD_CONF="Suricata Configuration: AF_PACKET support: ${enable_af_packet} diff --git a/python/.gitignore b/python/.gitignore index 6dead4f6ab..21cc772571 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -5,3 +5,5 @@ lib/ scripts-*/ bin/suricatasc !bin/suricatasc.in +suricata/config/defaults.py +!suricata/config/defaults.py.in diff --git a/python/setup.py b/python/setup.py index 6a6d2a03f3..08f43bf6ee 100644 --- a/python/setup.py +++ b/python/setup.py @@ -28,6 +28,7 @@ setup( url='https://www.suricata-ids.org/', packages=[ "suricata", + "suricata.config", "suricata.ctl", "suricata.sc", "suricatasc", diff --git a/python/suricata/config/__init__.py b/python/suricata/config/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/python/suricata/config/defaults.py.in b/python/suricata/config/defaults.py.in new file mode 100644 index 0000000000..3156e81689 --- /dev/null +++ b/python/suricata/config/defaults.py.in @@ -0,0 +1,2 @@ +sysconfdir = "@e_sysconfdir@" +datarulesdir = "@e_datarulesdir@"