]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
install: better warning on install-full and don't fail
authorJason Ish <jason.ish@oisf.net>
Wed, 10 Mar 2021 04:54:43 +0000 (22:54 -0600)
committerVictor Julien <victor@inliniac.net>
Fri, 12 Mar 2021 12:32:34 +0000 (13:32 +0100)
If suricata-update is not available on "make install-full", don't
exit 1, instead give the reason why its not installed, but still
succeed the install.

Makefile.am
configure.ac

index 24b8810d6e9b427cb7c3fa9e5efe719ce8de984a..cb101f708b17da2461324d4cb8c0903b0a2cb82c 100644 (file)
@@ -38,8 +38,9 @@ if INSTALL_SURICATA_UPDATE
                --suricata-conf $(DESTDIR)$(sysconfdir)/suricata/suricata.yaml \
                --no-test --no-reload
 else
-       @echo "error: rules not installed as suricata-update not available"
-       @exit 1
+       @echo ""
+       @echo "Warning: No rules will be downloaded as suricata-update"
+       @echo "   is not available: ${install_suricata_update_reason}"
 endif
        @echo ""
        @echo "You can now start suricata by running as root something like:"
index 12a90a3ebf9c67251447df6c6e4a309de84eeec5..bee6c09786629240a03d158b08b3eaea05393ec1 100644 (file)
 
     # Test to see if suricata-update can be installed.
     if test "x$have_suricata_update" != "xyes"; then
-        install_suricata_update="not bundled"
+        install_suricata_update="no, "
+        install_suricata_update_reason="not bundled"
     elif test "x$enable_python" != "xyes"; then
-        install_suricata_update="no, requires python"
+        install_suricata_update="no, "
+        install_suricata_update_reason="requires python"
     elif test "x$have_python_distutils" != "xyes"; then
-        install_suricata_update="no, requires distutils"
+        install_suricata_update="no, "
+        install_suricata_update_reason="requires distutils"
     elif test "x$have_python_yaml" != "xyes"; then
-        install_suricata_update="no, requires pyyaml"
+        install_suricata_update="no, "
+        install_suricata_update_reason="requires pyyaml"
     else
         install_suricata_update="yes"
     fi
 
     AM_CONDITIONAL([INSTALL_SURICATA_UPDATE],
         [test "x$install_suricata_update" = "xyes"])
+    AC_SUBST([install_suricata_update_reason])
 
   # libhtp
     AC_ARG_ENABLE(non-bundled-htp,
@@ -2740,7 +2745,7 @@ SURICATA_BUILD_CONF="Suricata Configuration:
   Python yaml                              ${have_python_yaml}
   Install suricatactl:                     ${install_suricatactl}
   Install suricatasc:                      ${install_suricatactl}
-  Install suricata-update:                 ${install_suricata_update}
+  Install suricata-update:                 ${install_suricata_update}${install_suricata_update_reason}
 
   Profiling enabled:                       ${enable_profiling}
   Profiling locks enabled:                 ${enable_profiling_locks}