|
@@ -33,33 +33,42 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: Security
|
|
Group: Security
|
|
|
License: BSD
|
|
License: BSD
|
|
|
Version: 0.6a
|
|
Version: 0.6a
|
|
|
-Release: 20030924
|
|
|
|
|
|
|
+Release: 20030925
|
|
|
|
|
|
|
|
# package options
|
|
# package options
|
|
|
%option with_fsl yes
|
|
%option with_fsl yes
|
|
|
|
|
+%option with_gui no
|
|
|
|
|
|
|
|
# list of sources
|
|
# list of sources
|
|
|
Source0: http://niels.xtdnet.nl/honeyd/honeyd-%{version}.tar.gz
|
|
Source0: http://niels.xtdnet.nl/honeyd/honeyd-%{version}.tar.gz
|
|
|
-Source1: rc.honeyd
|
|
|
|
|
-Source2: honeyd.conf
|
|
|
|
|
-Source3: honeyd.service
|
|
|
|
|
-Source4: fsl.honeyd
|
|
|
|
|
-Source5: cdefs.h
|
|
|
|
|
-Source6: setenv.h
|
|
|
|
|
-Source7: setenv.c
|
|
|
|
|
|
|
+Source1: http://www.citi.umich.edu/u/provos/honeyd/contrib/mael/ftp.sh
|
|
|
|
|
+Source2: http://www.citi.umich.edu/u/provos/honeyd/contrib/mael/pop3.sh
|
|
|
|
|
+Source3: http://www.citi.umich.edu/u/provos/honeyd/contrib/mael/smtp.sh
|
|
|
|
|
+Source4: http://www.citi.umich.edu/u/provos/papers/honeyd-eabstract.pdf
|
|
|
|
|
+Source5: http://www.citi.umich.edu/u/provos/papers/honeyd-eabstract.ps
|
|
|
|
|
+Source6: http://www.citi.umich.edu/u/provos/honeyd/ch01-results/1/honeydGUI.tar.gz
|
|
|
|
|
+Source7: honey
|
|
|
|
|
+Source8: svcs.sh
|
|
|
|
|
+Source9: rc.honeyd
|
|
|
|
|
+Source10: fsl.honeyd
|
|
|
|
|
+Source11: honeyd.conf
|
|
|
|
|
+Source12: cdefs.h
|
|
|
|
|
+Source13: setenv.h
|
|
|
|
|
+Source14: setenv.c
|
|
|
Patch0: honeyd.patch
|
|
Patch0: honeyd.patch
|
|
|
|
|
|
|
|
# build information
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20030718
|
|
|
|
|
-PreReq: OpenPKG, openpkg >= 20030718
|
|
|
|
|
-BuildPreReq: libdnet, libpcap, libevent
|
|
|
|
|
-PreReq: libdnet, libpcap, libevent
|
|
|
|
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20030718, libdnet, libpcap, libevent
|
|
|
|
|
+PreReq: OpenPKG, openpkg >= 20030718, libdnet, libpcap, libevent
|
|
|
%if "%{with_fsl}" == "yes"
|
|
%if "%{with_fsl}" == "yes"
|
|
|
BuildPreReq: fsl >= 1.2.0
|
|
BuildPreReq: fsl >= 1.2.0
|
|
|
PreReq: fsl >= 1.2.0
|
|
PreReq: fsl >= 1.2.0
|
|
|
%endif
|
|
%endif
|
|
|
|
|
+%if "%{with_gui}" == "yes"
|
|
|
|
|
+PreReq: JRE
|
|
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
AutoReqProv: no
|
|
|
|
|
|
|
@@ -82,58 +91,67 @@ AutoReqProv: no
|
|
|
cp -f %{SOURCE setenv.c} .
|
|
cp -f %{SOURCE setenv.c} .
|
|
|
cp -f %{SOURCE setenv.h} .
|
|
cp -f %{SOURCE setenv.h} .
|
|
|
cp -f %{SOURCE cdefs.h} .
|
|
cp -f %{SOURCE cdefs.h} .
|
|
|
- %{l_shtool} subst -e \
|
|
|
|
|
- 's;AF_LOCAL;AF_UNIX;g' \
|
|
|
|
|
- command.c \
|
|
|
|
|
- honeyd_overload.c
|
|
|
|
|
-
|
|
|
|
|
-%build
|
|
|
|
|
%{l_shtool} subst \
|
|
%{l_shtool} subst \
|
|
|
-e 's;/var/run/honeyd.pid;%{l_prefix}/var/honeyd/honeyd.pid;' \
|
|
-e 's;/var/run/honeyd.pid;%{l_prefix}/var/honeyd/honeyd.pid;' \
|
|
|
honeyd.h
|
|
honeyd.h
|
|
|
|
|
+
|
|
|
|
|
+%build
|
|
|
CC="%{l_cc}" \
|
|
CC="%{l_cc}" \
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
CPPFLAGS="%{l_cppflags} -DREPLACE_GETOPT" \
|
|
CPPFLAGS="%{l_cppflags} -DREPLACE_GETOPT" \
|
|
|
|
|
+ LDFLAGS="%{l_fsl_ldflags}" \
|
|
|
|
|
+ LIBS="%{l_fsl_libs}" \
|
|
|
./configure \
|
|
./configure \
|
|
|
--prefix=%{l_prefix} \
|
|
--prefix=%{l_prefix} \
|
|
|
--with-libdnet=%{l_prefix} \
|
|
--with-libdnet=%{l_prefix} \
|
|
|
--with-libpcap=%{l_prefix} \
|
|
--with-libpcap=%{l_prefix} \
|
|
|
--with-libevent=%{l_prefix}
|
|
--with-libevent=%{l_prefix}
|
|
|
- %{l_shtool} subst \
|
|
|
|
|
- -e "s;^\\(honeyd_LDADD.*\\)$;\\1 %{l_fsl_ldflags} %{l_fsl_libs};" \
|
|
|
|
|
- Makefile
|
|
|
|
|
%{l_make} %{l_mflags}
|
|
%{l_make} %{l_mflags}
|
|
|
|
|
|
|
|
%install
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
+
|
|
|
|
|
+ # create directories
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd \
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/honeyd \
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/honeyd \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd \
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/honeyd \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/honeyd \
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/honeyd \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/var/honeyd
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd
|
|
|
|
|
|
|
|
# install files
|
|
# install files
|
|
|
- %{l_shtool} install -c -s -m 755 \
|
|
|
|
|
- honeyd $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
|
|
- libhoneyd.so $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd/
|
|
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
|
|
- honeyd.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
|
|
|
|
|
|
|
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
+ %{l_shtool} install -c -m 750 %{l_value -s -a} \
|
|
|
|
|
+ -e 's;^log=/\(.*/\)*\(.*\)-.*\.log;log=%{l_prefix}/var/honeyd/\2.log;g' \
|
|
|
|
|
+ -e 's;^\(host=\).*;\1`%{l_shtool} echo -e %h`;g' \
|
|
|
|
|
+ -e 's;^\(domain=\).*;\1`%{l_shtool} echo -e %d | cut -c2-`;g' \
|
|
|
|
|
+ -e 's; gawk ; awk ;g' \
|
|
|
|
|
+ %{SOURCE ftp.sh} \
|
|
|
|
|
+ %{SOURCE pop3.sh} \
|
|
|
|
|
+ %{SOURCE smtp.sh} \
|
|
|
|
|
+ %{SOURCE svcs.sh} \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd/
|
|
|
%{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
%{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
%{SOURCE honeyd.conf} \
|
|
%{SOURCE honeyd.conf} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
|
|
- nmap.assoc nmap.prints xprobe2.conf \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/
|
|
|
|
|
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
|
|
- %{SOURCE honeyd.service} \
|
|
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd/
|
|
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
%{SOURCE rc.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
%{SOURCE rc.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ %{SOURCE honeyd-eabstract.ps} \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/honeyd.ps
|
|
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
|
|
+ %{SOURCE honeyd-eabstract.pdf} \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/honeyd.pdf
|
|
|
|
|
+
|
|
|
|
|
+ # optionally install the Java GUI
|
|
|
|
|
+%if "%{with_gui}" == "yes"
|
|
|
|
|
+ %{l_tar} zxf %{SOURCE honeydGUI.tar.gz}
|
|
|
|
|
+ mv -f honeydGUI/exec $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd/javagui
|
|
|
|
|
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
|
|
+ %{SOURCE honey} \
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
# install OSSP fsl configuration
|
|
# install OSSP fsl configuration
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
@@ -141,12 +159,17 @@ AutoReqProv: no
|
|
|
%{SOURCE fsl.honeyd} \
|
|
%{SOURCE fsl.honeyd} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
|
|
|
|
|
|
|
+ # remove unwanted files
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/README
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/config.sample
|
|
|
|
|
+
|
|
|
|
|
+ # determine file list
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
%{l_files_std} \
|
|
%{l_files_std} \
|
|
|
'%not %dir %{l_prefix}/etc/fsl' \
|
|
'%not %dir %{l_prefix}/etc/fsl' \
|
|
|
- '%config %{l_prefix}/etc/fsl/fsl.honeyd' \
|
|
|
|
|
- '%config %{l_prefix}/etc/honeyd/honeyd.conf' \
|
|
|
|
|
- '%config %{l_prefix}/libexec/honeyd/honeyd.service'
|
|
|
|
|
|
|
+ '%config %attr(0750,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/fsl/fsl.honeyd' \
|
|
|
|
|
+ '%config %attr(0750,%{l_musr},%{l_mgrp}) %{l_prefix}/etc/honeyd/honeyd.conf'
|
|
|
|
|
|
|
|
%files -f files
|
|
%files -f files
|
|
|
|
|
|
|
@@ -172,5 +195,6 @@ AutoReqProv: no
|
|
|
# before erase, stop service and remove log files
|
|
# before erase, stop service and remove log files
|
|
|
[ $1 -eq 0 ] || exit 0
|
|
[ $1 -eq 0 ] || exit 0
|
|
|
%{l_rc} honeyd stop 2>/dev/null
|
|
%{l_rc} honeyd stop 2>/dev/null
|
|
|
|
|
+ rm -f $RPM_INSTALL_PREFIX/var/honeyd/*.log* >/dev/null 2>&1 || true
|
|
|
exit 0
|
|
exit 0
|
|
|
|
|
|