Skip to content

Commit

Permalink
Pull request feedback, documentation and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hafkensite committed Nov 21, 2017
1 parent 52f8aba commit c6af2b9
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Do not include build artifacts in the docker container.

# Object files
*.o
*.ko
Expand Down Expand Up @@ -28,5 +30,10 @@
*.x86_64
*.hex

# Debian build artifacts
*.deb
./debian/rtpsniff
./build

# Binary stuff
/bin/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
*.x86_64
*.hex

#debian build artifacts
# Debian build artifacts
*.deb
./debian/rtpsniff
./build

# Binary stuff
/bin/
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
FROM debian:jessie

RUN apt-get update
RUN apt-get install -y vim less build-essential dh-make
RUN apt-get install -y vim libpcap-dev dh-systemd
ADD . /rtpsniff-1.0
WORKDIR /rtpsniff-1.0
ARG version=1.0-1

RUN apt-get update && apt-get install -qy build-essential dh-make libpcap-dev dh-systemd
ADD . /rtpsniff
WORKDIR /rtpsniff
RUN dpkg-buildpackage -uc -us -b
CMD cp ../rtpsniff_1.0-1_amd64.deb .
CMD cp ../rtpsniff_${version}_amd64.deb .

ENV version=$version

CMD echo && mkdir /build/rtpsniff_${version} && \
mv /rtpsniff_${version}_amd64.deb /build/rtpsniff_${version}/ && \
chown -R ${UID}:root /build/rtpsniff_${version} && \
cd /build && find . -type f && echo && echo 'Output files created succesfully'
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ RTPSniff is a tool to sniff RTP traffic and show stats about it.
(I'm considering renaming `rtpsniff` to `rtpstat` -- like `vmstat` --
since it prints a status update every N seconds.)

Building Debian package
-----------------------

Debian packages can be build using the provided Dockerfile.

docker build . -t rtpsniff
docker run --rm --volume `pwd`/build:/build rtpsniff

TODO
----
Expand Down
4 changes: 2 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rtpsniff (1.0-1) unstable; urgency=low

* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
* Initial release

-- unknown <jasper@unknown> Wed, 01 Nov 2017 13:34:41 +0000
-- Jasper Hafkenscheid <jasper@voipgrid.nl> Wed, 01 Nov 2017 13:34:41 +0000
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Source: rtpsniff
Section: net
Priority: optional
Maintainer: OSSO B.V. <walter[email protected]>
Maintainer: OSSO B.V. <wjdoekes[email protected]>
Build-Depends: debhelper (>= 9), dh-systemd, libpcap0.8-dev
Standards-Version: 3.9.5
Homepage: https://github.com/ossobv/rtpsniff

Package: rtpsniff
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Description: Standalone RTP sniffing tool.
RTPSniff is a tool to sniff RTP traffic and show stats about it.
3 changes: 1 addition & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Upstream-Name: rtpsniff
Source: <https://github.com/ossobv/rtpsniff>

Files: *
Copyright: 2008,2009,2014 OSSO B.V. <[email protected]>
License: <special license>
Copyright: 2008,2009,2014 OSSO B.V. <[email protected]>
License: GPL-3.0
2 changes: 1 addition & 1 deletion debian/rtpsniff.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bin/rtpsniff usr/local/sbin/
bin/rtpsniff usr/sbin/
bin/libslowpoll.so usr/lib/
2 changes: 1 addition & 1 deletion debian/rtpsniff.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=network.target

[Service]
User=root
ExecStart=/usr/local/sbin/rtpsniff eth0 100 "udp and not port 53"
ExecStart=/usr/sbin/rtpsniff eth0 100 "udp and not port 53"

[Install]
WantedBy=multi-user.target
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1

# Select syslog as output module.
export MOD_OUT=out_syslog

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
Expand All @@ -22,8 +24,6 @@ include /usr/share/dpkg/default.mk
%:
dh $@ --with systemd

override_dh_usrlocal:

# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
#override_dh_auto_configure:
Expand Down

0 comments on commit c6af2b9

Please sign in to comment.