OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src openpkg-web          Date:   21-Feb-2003 12:48:08
  Branch: HEAD                             Handle: 2003022111480502

  Added files:
    openpkg-src/honeyd      fsl.honeyd honeyd.service
  Modified files:
    openpkg-src/honeyd      honeyd.conf honeyd.spec rc.honeyd
    openpkg-web             news.txt

  Log:
    - add OSSP fsl support to get rid of syslog'ing
    - replace silly shipped scripts/* with another silly honeyd.service
      but at least this way do not package crap code
    - fix PID file writing
    - cleanup installation procedure
    - install libhoneyd.so

  Summary:
    Revision    Changes     Path
    1.1         +16 -0      openpkg-src/honeyd/fsl.honeyd
    1.3         +11 -5      openpkg-src/honeyd/honeyd.conf
    1.1         +38 -0      openpkg-src/honeyd/honeyd.service
    1.6         +29 -34     openpkg-src/honeyd/honeyd.spec
    1.3         +7  -3      openpkg-src/honeyd/rc.honeyd
    1.3390      +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/honeyd/fsl.honeyd
  ============================================================================
  $ cvs diff -u -r0 -r1.1 fsl.honeyd
  --- /dev/null 2003-02-21 12:48:07.000000000 +0100
  +++ fsl.honeyd        2003-02-21 12:48:07.000000000 +0100
  @@ -0,0 +1,16 @@
  +##
  +##  fsl.honeyd -- OSSP fsl configuration for honeyd
  +##
  +
  +ident honeyd q{
  +    prefix(
  +        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
  +    ) 
  +    -> {
  +        debug: file(
  +            path="@l_prefix@/var/honeyd/honeyd.log",
  +            append=1, perm=0644
  +        )
  +    }
  +};
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/honeyd/honeyd.conf
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 honeyd.conf
  --- openpkg-src/honeyd/honeyd.conf    21 Feb 2003 10:44:42 -0000      1.2
  +++ openpkg-src/honeyd/honeyd.conf    21 Feb 2003 11:48:07 -0000      1.3
  @@ -1,10 +1,16 @@
  -# Example of a simple host template and its binding
  +##
  +##  honeyd.conf
  +##
  +
  +#   test host definition
   create testbox
   set testbox personality "FreeBSD 3.2-4.0"
  -add testbox tcp port 80 "sh @l_prefix@/share/honeyd/scripts/web.sh"
  -add testbox tcp port 22 "sh @l_prefix@/share/honeyd/scripts/test.sh $ipsrc $dport"
  +add testbox tcp port 80 "@l_prefix@/libexec/honeyd/honeyd.service http"
  +add testbox tcp port 22 "@l_prefix@/libexec/honeyd/honeyd.service ssh"
   add testbox tcp port 23 proxy $ipsrc:23
   set testbox default tcp action reset
   
  -bind 10.21.19.102 testbox
  -set 10.21.19.102 uptime 1327650
  +#   bind the test host to localhost
  +bind 127.0.0.1 testbox
  +set  127.0.0.1 uptime 1327650
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/honeyd/honeyd.service
  ============================================================================
  $ cvs diff -u -r0 -r1.1 honeyd.service
  --- /dev/null 2003-02-21 12:48:07.000000000 +0100
  +++ honeyd.service    2003-02-21 12:48:08.000000000 +0100
  @@ -0,0 +1,38 @@
  +#!/bin/sh
  +##
  +##  honeyd.service -- small honeyd(8) service faking script
  +##  Copyright (c) 2003 The OpenPKG Project <http://www.openpkg.org/>
  +##
  +
  +#   honeyd(8) provides:
  +#   $HONEYD_PERSONALITY
  +#   $HONEYD_IP_SRC, $HONEYD_SRC_PORT
  +#   $HONEYD_IP_DST, $HONEYD_DST_PORT
  +
  +service="$1"
  +shift
  +
  +case $service in
  +    http )
  +        while read line; do
  +             if [ ".$line" = . ]; then
  +                     break
  +             fi
  +        done
  +        echo "HTTP/1.1 404 Not Found"
  +        echo "Date: `date`"
  +        echo "Server: Apache"
  +        echo "Connection: close"
  +        echo "Content-Type: text/plain; charset=iso-8859-1"
  +        echo ""
  +        echo "Error: 404 Not Found"
  +        exit 0
  +        ;;
  +    ssh )
  +        echo "SSH-1.5-2.40"
  +        read line
  +        echo "Protocol mismatch."
  +        exit 0
  +        ;;
  +esac
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/honeyd/honeyd.spec
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 honeyd.spec
  --- openpkg-src/honeyd/honeyd.spec    21 Feb 2003 10:44:42 -0000      1.5
  +++ openpkg-src/honeyd/honeyd.spec    21 Feb 2003 11:48:07 -0000      1.6
  @@ -23,8 +23,6 @@
   ##  SUCH DAMAGE.
   ##
   
  -# FIXME: honeyd do not write a pid file
  -
   #   package information
   Name:         honeyd
   Summary:      Creates a Virtual Host on Network
  @@ -46,8 +44,8 @@
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
  -BuildPreReq:  OpenPKG, openpkg >= 20030211, libdnet, libpcap, libevent
  -PreReq:       OpenPKG, openpkg >= 20030211
  +BuildPreReq:  OpenPKG, openpkg >= 20030211, fsl, libdnet, libpcap, libevent
  +PreReq:       OpenPKG, openpkg >= 20030211, fsl
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -67,62 +65,59 @@
       %patch -p0
   
   %build
  +    %{l_shtool} subst \
  +        -e 's;/var/run/honeyd.pid;%{l_prefix}/var/honeyd/honeyd.pid;' \
  +        honeyd.h
       CC="%{l_cc}" \
  -    CFLAGS="%{l_cflags -O}" \
  +    CFLAGS="%{l_cflags -O}"
       ./configure \
           --prefix=%{l_prefix} \
           --with-libdnet=%{l_prefix} \
           --with-libpcap=%{l_prefix} \
  -        --with-libevent=%{l_prefix} \
  -        --includedir=%{l_prefix}
  -    %{l_make} %{l_mflags -O}
  +        --with-libevent=%{l_prefix}
  +    %{l_shtool} subst \
  +        -e "s;^\\(honeyd_LDADD.*\\)$;\\1 `%{l_prefix}/bin/fsl-config --all 
--ldflags --libs`;" \
  +        Makefile
  +    %{l_make} %{l_mflags} \
   
   %install
       rm -rf $RPM_BUILD_ROOT
  -
  -    #   create filesystem hierachy
       %{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/fsl \
           $RPM_BUILD_ROOT%{l_prefix}/sbin \
           $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  -        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts \
  -        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/base \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/honeyd \
  +        $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd \
  +        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd \
           $RPM_BUILD_ROOT%{l_prefix}/var/honeyd
   
       #   install files
       %{l_shtool} install -c -s -m 755 \
  -        honeyd $RPM_BUILD_ROOT%{l_prefix}/sbin
  +        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_shtool} install -c -m 644 \
  -        nmap.assoc $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  -
  -    %{l_shtool} install -c -m 644 \
  -        nmap.prints $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  -
  -    %{l_shtool} install -c -m 644 \
  -       xprobe2.conf $RPM_BUILD_ROOT%{l_prefix}/share/honeyd
  -
       %{l_shtool} install -c -m 644 \
  -        scripts/router-telnet.pl $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  -
  -    %{l_shtool} install -c -m 644 \
  -        scripts/test.sh $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  -
  +        -e 's;@l_prefix@;%{l_prefix};g' \
  +        %{SOURCE honeyd.conf} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
       %{l_shtool} install -c -m 644 \
  -        scripts/web.sh $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/scripts
  -
  +        nmap.assoc nmap.prints xprobe2.conf \
  +        $RPM_BUILD_ROOT%{l_prefix}/share/honeyd/
       %{l_shtool} install -c -m 755 \
           -e 's;@l_prefix@;%{l_prefix};g' \
  -       %{SOURCE honeyd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/honeyd/
  -
  +        %{SOURCE honeyd.service} \
  +        $RPM_BUILD_ROOT%{l_prefix}/libexec/honeyd/
       %{l_shtool} install -c -m 755 \
           -e 's;@l_prefix@;%{l_prefix};g' \
           -e 's;@l_susr@;%{l_susr};g' \
  -       %{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 \
  +        -e 's;@l_prefix@;%{l_prefix};g' \
  +        %{SOURCE fsl.honeyd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/honeyd/rc.honeyd
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 rc.honeyd
  --- openpkg-src/honeyd/rc.honeyd      21 Feb 2003 10:44:42 -0000      1.2
  +++ openpkg-src/honeyd/rc.honeyd      21 Feb 2003 11:48:07 -0000      1.3
  @@ -8,8 +8,10 @@
   
   %start -p 200 -u @l_susr@
       opServiceEnabled honeyd || exit 0
  -    cd @l_prefix@/share/honeyd/base/
  -    @l_prefix@/sbin/honeyd -f @l_prefix@/etc/honeyd/honeyd.conf -p 
@l_prefix@/share/honeyd/nmap.prints -x  @l_prefix@/share/honeyd/xprobe2.conf -a 
@l_prefix@/share/honeyd/nmap.assoc >/dev/null 2>&1
  +    cd @l_prefix@/share/honeyd
  +    @l_prefix@/sbin/honeyd \
  +        -f @l_prefix@/etc/honeyd/honeyd.conf \
  +        >/dev/null 2>&1
   
   %stop -p 200 -u @l_susr@
       opServiceEnabled honeyd || exit 0
  @@ -23,7 +25,9 @@
           kill -TERM `cat @l_prefix@/var/honeyd/honeyd.pid`
           sleep 2
       fi
  -    @l_prefix@/sbin/honeyd -F @l_prefix@/etc/honeyd/honeyd.conf >/dev/null 2>&1
  +    @l_prefix@/sbin/honeyd \
  +        -f @l_prefix@/etc/honeyd/honeyd.conf \
  +        >/dev/null 2>&1
   
   %reload -u @l_susr@
       opServiceEnabled honeyd || exit 0
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-web/news.txt
  ============================================================================
  $ cvs diff -u -r1.3389 -r1.3390 news.txt
  --- openpkg-web/news.txt      21 Feb 2003 11:36:30 -0000      1.3389
  +++ openpkg-web/news.txt      21 Feb 2003 11:48:05 -0000      1.3390
  @@ -1,3 +1,4 @@
  +21-Feb-2003: Upgraded package: P<honeyd-0.5-20030221>
   21-Feb-2003: Upgraded package: P<rt-2.0.15-20030221>
   21-Feb-2003: Upgraded package: P<mgv-3.1.5-20030221>
   21-Feb-2003: Upgraded package: P<vim-6.1.350-20030221>
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to