Snort mailing list archives

Re: Snort 3: Add --disable-txt-docs option to configure_cmake.sh patches


From: Russ via Snort-devel <snort-devel () lists snort org>
Date: Fri, 16 Mar 2018 10:36:15 -0400

Cool, thanks!

On 3/16/18 10:32 AM, Y M via Snort-devel wrote:

Hi,


The attached patch files will add a new option --disable-txt-docs to the configure_cmake.sh script, and wrap the generation of Snort $prefix/doc/* in doc/CMakeList.txt with logic to check if the new option is set. If the option is used, the text files and the $prefix/doc directory will not be generated. This is possible thanks to the existing logic to handle MAKE_TEXT_DOC.


This change stems from the fact that the scripts: doc/scripts/generate_help.sh, doc/scripts/generate_list.sh, and doc/scripts/generate_module.sh use bash "#!/usr/bin/env bash" for the shell. On a pristine FreeBSD image or in cases bash is not installed, the make script will fail with the below error with no obvious way on how to proceed with compiling Snort 3. This occurs in Snort builds 243 and 244.


Scanningdependencies of target codecs
[ 97%] Building CXX object src/codecs/CMakeFiles/codecs.dir/codec_api.cc.o
[ 98%] Linking CXX static library libcodecs.a
[ 98%] Built target codecs
Scanning dependencies of target snort
[ 98%] Building CXX object src/CMakeFiles/snort.dir/main.cc.o
[ 98%] Linking CXX executable snort
[ 98%] Built target snort
Scanning dependencies of target all_built_sources
[ 98%] Documents: building counts.txt with
[ 98%] Documents: building modules.txt with
[ 98%] Documents: building plugins.txt with
[ 98%] Documents: building signals.txt with
[ 98%] Documents: building builtin.txt with
[ 98%] Documents: building options.txt with
[ 98%] Documents: building config.txt with
env: bash: No such file or directory
--- doc/counts.txt ---
*** [doc/counts.txt] Error code 127

...


With the changes applied, Snort builds successfully. I am not sure if this is the best way to handle it, but it avoids missing with the shell scripts portability among the different shells.


Thanks.

YM




_______________________________________________
Snort-devel mailing list
Snort-devel () lists snort org
https://lists.snort.org/mailman/listinfo/snort-devel

Please visit http://blog.snort.org for the latest news about Snort!

_______________________________________________
Snort-devel mailing list
Snort-devel () lists snort org
https://lists.snort.org/mailman/listinfo/snort-devel

Please visit http://blog.snort.org for the latest news about Snort!

Current thread: