From: Jason Ish Date: Thu, 26 Apr 2018 13:40:04 +0000 (-0600) Subject: install-rules: use suricata-update if available X-Git-Tag: suricata-4.1.0-rc1~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=732ce3f1235afc8827b21fef7815eec6978f8650;p=thirdparty%2Fsuricata.git install-rules: use suricata-update if available If Suricata update was bundled, use it for "install-rules" instead of curl or wget. --- diff --git a/Makefile.am b/Makefile.am index 322ad39998..90982cb928 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,6 +30,12 @@ install-conf: install -m 770 -d "$(DESTDIR)$(e_localstatedir)" install-rules: +if HAVE_SURICATA_UPDATE + $(DESTDIR)$(bindir)/suricata-update \ + --suricata $(DESTDIR)$(bindir)/suricata \ + --suricata-conf $(DESTDIR)$(sysconfdir)/suricata/suricata.yaml \ + --no-test --no-reload +else install -d "$(DESTDIR)$(e_sysconfrulesdir)" if HAVE_FETCH_COMMAND if HAVE_WGET_COMMAND @@ -58,3 +64,4 @@ endif @echo "While rules are installed now, it's highly recommended to use a rule manager for maintaining rules." @echo "The three most common are Suricata-Update, Oinkmaster and Pulledpork. For a guide see:" @echo "https://suricata.readthedocs.io/en/latest/rule-management/index.html" +endif diff --git a/configure.ac b/configure.ac index 12a7d179f0..0b0ff7a41b 100644 --- a/configure.ac +++ b/configure.ac @@ -1376,11 +1376,14 @@ ]) # suricata-update + have_suricata_update="no" AC_CHECK_FILE([$srcdir/suricata-update/setup.py], [ SURICATA_UPDATE_DIR="suricata-update" AC_SUBST(SURICATA_UPDATE_DIR) AC_OUTPUT(suricata-update/Makefile) + have_suricata_update="yes" ]) + AM_CONDITIONAL([HAVE_SURICATA_UPDATE], [test "x$have_suricata_update" != "xno"]) # libhtp AC_ARG_ENABLE(non-bundled-htp,