[Snort-users] problems with barnyard2 and rpm

MLP SCADA MLPSCADA at ...15411...
Fri Oct 12 12:44:44 EDT 2012


That's a really good question.  Generally I use the configure/make/etc process, but on my EL6 machines I try to use rpm for a couple of reasons:


 1.  it's what the redhat 'system' is.
 2.  I've run into (sometimes really strange) dependency problems when I don't use the yum/rpm for some package, but later on use rpm some other package.
 3.  rpm's do tend to uninstall more cleanly.

Of course, all that being said, sometimes (more often than not) I just get disgusted trying to do the rpm thing and end up compiling and installing the usual way.

________________________________
From: Jeremy Hoel [mailto:jthoel at ...11827...]
Sent: Thursday, October 11, 2012 4:42 PM
To: MLP SCADA
Cc: snort-users at lists.sourceforge.net
Subject: Re: [Snort-users] problems with barnyard2 and rpm


I have a question - why build and rpm to install?  If you are going to install from source why not get the tarball and just do the normal configure, make and make install?  Would you get more control our of it?

I run CentOS 6 64 bit and that process works fine.
On Oct 11, 2012 6:37 PM, "MLP SCADA" <MLPSCADA at ...15411...<mailto:MLPSCADA at ...15411...>> wrote:
I'm not sure whether this is a snort question, a barnyard2 question, an rpm question, or all of the above, so apologies in advance if necessary.

I'm not that familiar or comfortable with redhat or rpms, but that's what we have, so that's what I'll use.

I can't seem to get the barnyard2 rpm to compile.

----------------------------------------

$ uname -an
Linux support1.mlpems.local 2.6.32-279.9.1.el6.x86_64 #1 SMP Tue Sep 25 14:55:44 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux

$ pwd
~/rpmbuild

$ cp SOURCES/firnsy-barnyard2-v2-1.10-0-g2f5d496.tar.gz SOURCES/barnyard2-1.10.tar.gz

$ ls -la SOURCES/b*
-rwxr-xr-x. 1 lt lt 419821 Oct 11 16:05 SOURCES/barnyard2-1.10.tar.gz*
$ ls -la SPECS/b*
-rw-rw-r--. 1 lt lt 5459 Oct 11 15:47 SPECS/barnyard2.spec
$

$ ls
./  ../  BUILD/  BUILDROOT/  RPMS/  SOURCES/  SPECS/  SRPMS/
$ rpmbuild -ba SPECS/barnyard2.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.yVN2CJ
+ umask 022
+ cd /home/lt/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/lt/rpmbuild/BUILD
+ rm -rf barnyard2-1.10
+ /usr/bin/gzip -dc /home/lt/rpmbuild/SOURCES/barnyard2-1.10.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd barnyard2-1.10
/var/tmp/rpm-tmp.yVN2CJ: line 38: cd: barnyard2-1.10: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.yVN2CJ (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.yVN2CJ (%prep)

---------------------------

Where's this barnyard2-1.10 directory it's trying to cd into supposed to be?

----------------------------

$ cat /var/tmp/rpm-tmp.yVN2CJ
#!/bin/sh

  RPM_SOURCE_DIR="/home/lt/rpmbuild/SOURCES"
  RPM_BUILD_DIR="/home/lt/rpmbuild/BUILD"
  RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
  RPM_ARCH="x86_64"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="barnyard2"
  RPM_PACKAGE_VERSION="1.10"
  RPM_PACKAGE_RELEASE="1.el6"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  LANG=C
  export LANG
  unset CDPATH DISPLAY ||:
  RPM_BUILD_ROOT="/home/lt/rpmbuild/BUILDROOT/barnyard2-1.10-1.el6.x86_64"
  export RPM_BUILD_ROOT

  PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig"
  export PKG_CONFIG_PATH

  set -x
  umask 022
  cd "/home/lt/rpmbuild/BUILD"
LANG=C
export LANG
unset DISPLAY

cd '/home/lt/rpmbuild/BUILD'
rm -rf 'barnyard2-1.10'
/usr/bin/gzip -dc '/home/lt/rpmbuild/SOURCES/barnyard2-1.10.tar.gz' | /bin/tar -xf -
STATUS=$?
if [ $STATUS -ne 0 ]; then
  exit $STATUS
fi
cd 'barnyard2-1.10'
/bin/chmod -Rf a+rX,u+w,g-w,o-w .


exit 0

--------------------------------

So I'm lost.  What do I do next?

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Snort-users mailing list
Snort-users at lists.sourceforge.net<mailto:Snort-users at lists.sourceforge.net>
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20121012/39ca536b/attachment.html>


More information about the Snort-users mailing list