[Snort-users] problems with barnyard2 and rpm

MLP SCADA MLPSCADA at ...15411...
Thu Oct 11 20:21:37 EDT 2012


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?




More information about the Snort-users mailing list