On Thu, Jun 29, 2017 at 8:40 PM, Patrick Tobin <patrick.to...@syniverse.com> wrote: > Not sure if this will help but these are the steps I took to build a binary > installer for Solaris 10 (I did the same for 2.8.3 and it worked as well): > > > > Compile OSSEC on Solaris 10 with OPENSSL Support > > > > 1. Install opencsw pkgutil > > --> pkgadd -d http://get.opencsw.org/now > > 2. Install OPENSSL and OPENSSL Libraries > > --> pkgutil -i libssl_dev > > --> pkgutil -i openssl_utils > > 3. Download OSSEC Tar file > > --> wget http://www.ossec.net/files/ossec-hids-2.8.2.tar.gz > > 4. Unzip the tar > > --> gunzip ossec-hids-2.8.2.tar.gz > > 5. Untar the tar > > --> tar -xvf ossec-hids-2.8.2.tar.gz > > 6. Change to the src dir > > --> cd ossec-hids-2.8.2/src > > 7. Edit the Makeall file > > --> vi Makeall > > 8. Change all instances of /bin/sh to /usr/bin/bash > > --> shift+:%s/\/bin\/sh/\/usr\/bin\/bash/g > > --> shift+:wq! >
It would be interesting to know what's broken in Solaris's sh. > 9. Locate gcc and create softlink to cc > > --> which gcc > > --> cd to gcc dir > > --> ln -s <gccDir> cc > > 10. Find where the OPENSSL Header resides > > --> find / -name opensslconf.h -print > > 11. Update the OPENSSL check in the Makeall file > > --> cd /tmp/ossec-hids-2.8.2/src > > --> vi Makeall > > --> /ssl > > --> change "if [ -e /usr/sfw/include/openssl/opensslconf.h ]; then" to > the path of the header from the find command in step 10 > > --> escape shift+:wq! > > 12. Start the build process > > --> make setagent > > --> make all (make sure you see "-DUSE_OPENSSL" in the agent_auth > compile) > > --> make build > > 13. Update the preloaded-vars.conf > > --> cd /tmp/ossec-hids-2.8.2/etc > > --> vi preloaded-vars.conf > > --> update the agent variables as needed and exit > > 14. Test the new binaries > > --> cd /tmp/ossec-hids-2.8.2 > > --> ./install.sh > > --> /var/ossec/bin/agent-auth -m <ossec server> -p <port> (should be > successful with openssl support) > > 15. Create new binary tar file for deployment > > --> cd /tmp > > --> tar -cvf ossec-solaris-binary-2.8.2.tar ossec-hids-2.8.2/ > > > > > > From: <eero.t.voloti...@gmail.com> on behalf of Eero Volotinen > <eero.voloti...@iki.fi> > Reply-To: "ossec-list@googlegroups.com" <ossec-list@googlegroups.com> > Date: Thursday, June 29, 2017 at 7:10 PM > To: ossec-list <ossec-list@googlegroups.com>, "robert.mille...@gmail.com" > <robert.mille...@gmail.com> > Subject: Re: [ossec-list] Solaris 10 install issue - Fatal error in reader: > Makefile, line 4 > > > > you could also try to edit file src/makefile: > > > > find line 4: > > > > uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') > > > > and replace it with > > > > uname_S=SunOS > > > > and try again.. > > > > Eero > > > > 2017-06-30 2:04 GMT+03:00 Eero Volotinen <eero.voloti...@iki.fi>: > > what is output of: > > > > make --version > > > > as you can see from errormessage, problem is in the makefile. > > > > 2017-06-29 23:39 GMT+03:00 Robert <robert.mille...@gmail.com>: > > I am having issues installing on Solaris 10 (i.e. Solaris 10 8/11 > s10s_u10wos_17b SPARC) and am getting the error below when it tries to > finish the install. > > > > 5- Installing the system > > - Running the Makefile > > make: Fatal error in reader: Makefile, line 4: Unexpected end of line seen > > > > Error 0x5. > > Building error. Unable to finish the installation. > > > > The line in question is "uname_S := $(shell sh -c 'uname -s 2>/dev/null || > echo not') ". The output from that command is below. > > > > # sh -c 'uname -s 2>/dev/null || echo not' > > SunOS > > > > I tried changing the first line of the install.sh script to "#!/bin/bash" > and that didn't work. I checked our compilers and we have gcc installed but > not cc. Below is the gcc version. > > > > # gcc --version > > gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) > > Copyright (C) 2004 Free Software Foundation, Inc. > > > > Below is the output using the following command: /bin/sh -x ./install.sh. > > > > MAKEBIN=make > > + [ XSunOS = XOpenBSD ] > > + [ XSunOS = XFreeBSD ] > > + [ XSunOS = XNetBSD ] > > + [ XSunOS = XDragonflyBSD ] > > + [ X%NUNAME = XBitrig ] > > + echo - Running the Makefile > > - Running the Makefile > > + cd ./src > > + [ X = X ] > > + make PREFIX=/var/ossec TARGET=agent build > > make: Fatal error in reader: Makefile, line 4: Unexpected end of line seen > > + [ 1 != 0 ] > > + cd ../ > > + catError 0x5-build > > FILE=0x5-build > > FILE_PATH=./etc/templates/en/errors/0x5-build.txt > > + isFile ./etc/templates/en/errors/0x5-build.txt > > FILE=./etc/templates/en/errors/0x5-build.txt > > + ls ./etc/templates/en/errors/0x5-build.txt > > + [ 0 = 0 ] > > + echo true > > + return 0 > > + [ true = false ] > > + cat ./etc/templates/en/errors/0x5-build.txt > > > > Error 0x5. > > Building error. Unable to finish the installation. > > > > I also tried patching our install.sh script using the patch > (src_init_update_sh.diff) that was provided in another thread but that patch > doesn't work. Not to mention that thread was back in 2013. > > > > Any ideas? > > > > -- > > --- > You received this message because you are subscribed to the Google Groups > "ossec-list" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ossec-list+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > --- > You received this message because you are subscribed to the Google Groups > "ossec-list" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ossec-list+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "ossec-list" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ossec-list+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- --- You received this message because you are subscribed to the Google Groups "ossec-list" group. To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.