Skip to content
This repository

rpm: alter spec and add notes for building RPM #73

Closed
wants to merge 4 commits into from

2 participants

Gabriel Burt Reed Loden
Gabriel Burt

Not beautiful, but sufficed to get me an RPM from the github tag tarball download.

rpm/barnyard2.spec
@@ -42,12 +42,12 @@
42 42
 
43 43
 
44 44
 Summary: Snort Log Backend 
45  
-Name: barnyard2
46  
-Version: 1.9
  45
+Name: barnyard2-2
1
Reed Loden
reedloden added a note March 03, 2013

Uh, not sure you meant to change the package name...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Gabriel Burt
gburt commented April 02, 2013

Fixed the package name back to barnyard2 (by using %setup -n macro to work around github's weird tarballs).

Gabriel Burt rpm: fix barnyard2 init file
works with multiple interfaces now, removes obsolete -L flag
70a2236
Eric Lauzon binf referenced this pull request from a commit in binf/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for SIGHUP

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
36e5485
Eric Lauzon binf referenced this pull request from a commit in binf/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
a7cbdca
Ian Firns firnsy closed this pull request from a commit April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.
Add: README info for google mailing lists.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
f764921
Ian Firns firnsy closed this in f764921 May 06, 2013
Eric Lauzon binf referenced this pull request from a commit in binf/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.
Add: README info for google mailing lists.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
a34029d
Eric Lauzon binf referenced this pull request from a commit in binf/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.
Add: README info for google mailing lists.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
e53a951
Eric Lauzon binf referenced this pull request from a commit in binf/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.
Add: README info for google mailing lists.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
40a692c
eugpermar eugpermar referenced this pull request from a commit in redBorder/barnyard2 April 26, 2013
Eric Lauzon Last minute commit for a long waited needed feature and some little fix.
Add: Support for proper signal handling.
Add: README info for google mailing lists.

Fixed: Compile issue when debug was enabled (missing , in some
DEBUG_WRAP code.

Fixed: Changed a few places where the snort literal was used instead of
barnyard2 and this could confuse some first time barnyard2 users.

Fixed: RPM spec file to point to good version (when needed)

Bumped: Build to 326

--github specific
Fixes #81
Fixes #73
Fixes #75

Close #82
Close #83
Close #80
Close #79
Close #78
Close #27
--github specific
5796f03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 4 unique commits by 1 author.

Feb 28, 2013
Gabriel Burt rpm: alter spec and add notes for building RPM 4ed488c
Gabriel Burt rpm: alter README to include building with postgresql 92fe8ea
Apr 02, 2013
Gabriel Burt rpm: change pkg name back to barnyard2 f27faaf
Apr 05, 2013
Gabriel Burt rpm: fix barnyard2 init file
works with multiple interfaces now, removes obsolete -L flag
70a2236
This page is out of date. Refresh to see the latest.
13  rpm/README.md
Source Rendered
... ...
@@ -0,0 +1,13 @@
  1
+* Ensure you can build barnyard2
  2
+* Install rpmbuild (sudo yum install libtool libpcap-devel postgresql-devel make rpm-build)
  3
+* Download and build:
  4
+```
  5
+# Download the tarball
  6
+mkdir -p ~/rpmbuild/SOURCES/
  7
+wget -O ~/rpmbuild/SOURCES/barnyard2-1.12.tar.gz https://github.com/firnsy/barnyard2/archive/v2-1.12.tar.gz
  8
+wget https://raw.github.com/firnsy/barnyard2/master/rpm/barnyard2.spec
  9
+
  10
+# Build the rpm:
  11
+rpmbuild -ba --with postgresql barnyard2.spec
  12
+```
  13
+* Find it in ~/rpmbuild/RPMS/
12  rpm/barnyard2
@@ -8,7 +8,7 @@
8 8
 #
9 9
 # processname: barnyard2
10 10
 # config: /etc/sysconfig/barnyard2
11  
-# config: /etc/snort/barnyard.conf
  11
+# config: /etc/snort/barnyard2.conf
12 12
 # pidfile: /var/lock/subsys/barnyard2.pid
13 13
 
14 14
 source /etc/rc.d/init.d/functions
@@ -33,10 +33,10 @@ desc="Snort Output Processor"
33 33
 start() {
34 34
 	echo -n $"Starting $desc ($prog): "
35 35
 	for INT in $INTERFACES; do
36  
-		PIDFILE="/var/lock/subsys/barnyard2-$INT.pid"
37  
-		ARCHIVEDIR="$SNORTDIR/$INT/archive"
  36
+		ARCHIVEDIR="$SNORTDIR/$INT/archive/"
  37
+		mkdir -p $ARCHIVEDIR
38 38
 		WALDO_FILE="$SNORTDIR/$INT/barnyard2.waldo"
39  
-		BARNYARD_OPTS="-D -c $CONF -d $SNORTDIR/${INT} -w $WALDO_FILE -L $SNORTDIR/${INT} -a $ARCHIVEDIR -f $LOG_FILE -X $PIDFILE $EXTRA_ARGS"
  39
+		BARNYARD_OPTS="-D -c $CONF -i $INT -d $SNORTDIR/${INT}/ -w $WALDO_FILE -a $ARCHIVEDIR -f $LOG_FILE $EXTRA_ARGS"
40 40
 		daemon $prog $BARNYARD_OPTS
41 41
 	done
42 42
 	RETVAL=$?
@@ -47,7 +47,9 @@ start() {
47 47
 
48 48
 stop() {
49 49
 	echo -n $"Shutting down $desc ($prog): "
50  
-	killproc $prog
  50
+	for INT in $INTERFACES; do
  51
+	  killproc "${prog}_${INT}"
  52
+	done
51 53
 	RETVAL=$?
52 54
 	echo
53 55
 	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
7  rpm/barnyard2.spec
@@ -43,11 +43,11 @@
43 43
 
44 44
 Summary: Snort Log Backend 
45 45
 Name: barnyard2
46  
-Version: 1.9
  46
+Version: 1.12
47 47
 Release: 1%{?dist}
48 48
 License: GPL
49 49
 Group: Applications/Internet
50  
-Source0: http://www.securixlive.com/download/barnyard2/%{name}-%{version}.tar.gz
  50
+Source0: %{name}-%{version}.tar.gz
51 51
 Url: http://www.securixlive.com/barnyard2/
52 52
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
53 53
 %if %{libpcap1}
@@ -102,11 +102,12 @@ EXPERIMENTAL!!  I don't have a way to test this, so let me know if it works!
102 102
 ORACLE_HOME=%{OracleHome}
103 103
 
104 104
 %prep
105  
-%setup -q
  105
+%setup -q -n barnyard2-2-%{version}
106 106
 
107 107
 
108 108
 %build
109 109
 
  110
+./autogen.sh
110 111
 %configure \
111 112
    %if %{libpcap1}
112 113
       --with-libpcap-includes=/usr/libpcap1/include \
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.