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

Michael Altizer via Snort-devel <[email protected]> Mon, 19 Mar 2018 10:49:50 -0400
Newsgroups gmane.comp.security.ids.snort.devel
Message-ID <[email protected]>
On 03/16/2018 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
>
>

Thanks for the patch, but since you seem to have a bash-less FreeBSD 
system handy, could you try just changing them all to use #!/bin/sh and 
see if there were any actual bash-isms?  If not, we'll just swap the 
interpreter.

_______________________________________________
Snort-devel mailing list
[email protected]
https://lists.snort.org/mailman/listinfo/snort-devel

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