Skip to content

Commit

Permalink
Merge pull request #9 from tzafrir-mellanox/ibdump_packaging
Browse files Browse the repository at this point in the history
Ibdump packaging
  • Loading branch information
itayav17 authored Dec 19, 2019
2 parents 703476a + 6ed3413 commit 27ab6a5
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 57 deletions.
8 changes: 8 additions & 0 deletions ibdump/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
debian/.debhelper/
debian/files
debian/ibdump.debhelper.log
debian/ibdump.substvars
debian/ibdump/
ibdump
ibdump.d
ibdump.o
3 changes: 2 additions & 1 deletion ibdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ MACH = $(shell uname -m | sed -e 's/ //g')
UNAME_M = $(shell uname -m)
OS_NAME = $(shell lsb_release -si)

MSTFLINT_INCLUDE_DIR = /usr/local/include/mstflint
CFLAGS += -Wall -W # -Werror
CFLAGS += -g
CFLAGS += -MP -MD -DPACKAGE_VERSION_STR=\"$(VERSION)\"
ifeq ($(WITH_MSTFLINT),yes)
CFLAGS += -DWITH_MSTFLINT -DMST_UL -I/usr/local/include/mstflint/
CFLAGS += -DWITH_MSTFLINT -DMST_UL -I$(MSTFLINT_INCLUDE_DIR)
else
ifeq ($(WITHOUT_FW_TOOLS),yes)
CFLAGS += -DWITHOUT_FW_TOOLS
Expand Down
10 changes: 8 additions & 2 deletions ibdump/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
ibdump (6.0.0-1) UNRELEASED; urgency=medium

* New upstream release

-- Tzafrir Cohen <[email protected]> Wed, 18 Dec 2019 19:02:44 +0200

ibdump (5.0.0-1) unstable; urgency=low

* Added ConnectX-5 support

-- Adrian Chiris <adrian@unknown> Sun, 19 Mar 2017 15:20:33 +0200
-- Adrian Chiris <adrian@mellanox.co.il> Sun, 19 Mar 2017 15:20:33 +0200

ibdump (4.0.0-1) unstable; urgency=low

* Initial Debian release

-- Adham Masarwah <adham@unknown> Wed, 4 Nov 2014 15:20:33 +0200
-- Adham Masarwah <adham@unkno.wn> Wed, 4 Nov 2014 15:20:33 +0200
2 changes: 1 addition & 1 deletion ibdump/debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
9
13 changes: 8 additions & 5 deletions ibdump/debian/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Source: ibdump
Section: net
Priority: extra
Maintainer: mohammad <mohammad@unknown>
Build-Depends: debhelper (>= 8.0.0), autotools-dev
Standards-Version: 3.9.2
Homepage: http://www.mellanox.com
Priority: optional
Maintainer: Tzafrir Cohen <[email protected]>
Build-Depends: debhelper (>= 9.0.0),
mstflint,
libibverbs-dev,
Standards-Version: 4.1.4
Homepage: https://github.com/Mellanox/ibdump

Package: ibdump
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Mellanox packets sniffer tool
This package contains sniffer tool for IB packets.
ibdump is a sniffer that like tcpdump can produce pcap files.
64 changes: 31 additions & 33 deletions ibdump/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
Format: http://dep.debian.net/deps/dep5
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ibdump
Source: <url://example.com>
Source: https://github.com/Mellanox/ibdump

Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>

# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2014 Mohammad Sawalha <mohammad@unknown>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
Copyright: Jan 2019 Mellanox Technologies Ltd.
License: GPL2+BSD2
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
* OpenIB.org BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
2 changes: 0 additions & 2 deletions ibdump/debian/docs

This file was deleted.

1 change: 0 additions & 1 deletion ibdump/debian/ibdump.docs

This file was deleted.

2 changes: 0 additions & 2 deletions ibdump/debian/ibdump.substvars

This file was deleted.

18 changes: 16 additions & 2 deletions ibdump/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

BUILD_OFED = $(filter mlnx_ofed,$(DEB_BUILD_OPTIONS))
ifeq (,$(BUILD_OFED))
BUILD_OFED_ARG = UPSTREAM_KERNEL=yes
endif
make_opts = WITH_MSTFLINT=yes $(BUILD_OFED_ARG) MSTFLINT_INCLUDE_DIR=/usr/include/mstflint

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
dh $@
dh $@

override_dh_auto_clean:
dh_auto_clean -- $(make_opts)

override_dh_auto_build:
dh_auto_build -- $(make_opts)

override_dh_auto_install:
dh_auto_install -- $(make_opts)
1 change: 1 addition & 0 deletions ibdump/ibdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ int __WIN_CDECL main(int argc, char *argv[])

case 'T':
config.contiguous_pages = 1;
/* fall through */

case 'q':
config.src_qp_str = optarg;
Expand Down
28 changes: 20 additions & 8 deletions ibdump/ibdump.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
Summary: Mellanox InfiniBand sniffing application
%define rel %(echo -n "")
%bcond_with mlnx_libs
%if %{with mlnx_libs}
%define upstream_arg %{nil}
%else
%define upstream_arg UPSTREAM_KERNEL=yes
%endif

%define make_opts WITH_MSTFLINT=yes %{upstream_arg} \\\
MSTFLINT_INCLUDE_DIR=/usr/include/mstflint \\\
PREFIX=%{_prefix}

Summary: Mellanox InfiniBand sniffing application
Name: ibdump
Version: 5.0.0
Release: 5
License: Proprietary
Version: 6.0.0
Release: 1
License: BSD2+GPL2
Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Source: %{name}-%{version}-%{release}.tgz
Source: %{name}-%{version}.tgz
ExclusiveArch: i386 i486 i586 i686 x86_64 ppc64 ppc64le aarch64
Url: https://github.com/Mellanox/ibdump

%description
InfiniBand sniffer for MellanoX Technologies LTD. ConnectX HCAs
Expand All @@ -17,11 +27,11 @@ InfiniBand sniffer for MellanoX Technologies LTD. ConnectX HCAs
%setup -n %{name}-%{version}

%build
%make_build %{make_opts}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} PREFIX=%{_prefix} ibdump
make DESTDIR=${RPM_BUILD_ROOT} PREFIX=%{_prefix} install
%{make_install} %{make_opts}

%clean
rm -rf $RPM_BUILD_ROOT
Expand All @@ -32,6 +42,8 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/vpi_tcpdump

%changelog
* Wed Dec 18 2019 Itay Avraham <[email protected]> 6.0.0-1
- Move to Github
* Sun Mar 19 2017 Adrian Chiris <[email protected]> 5.0.0
ConnectX-5 Support
* Mon Nov 12 2012 Oren Kladnitsky <[email protected]> 1.0.6
Expand Down

0 comments on commit 27ab6a5

Please sign in to comment.