From patchwork Thu Nov 16 12:29:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Drung X-Patchwork-Id: 10061079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2070E601AE for ; Thu, 16 Nov 2017 12:29:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13BE32621B for ; Thu, 16 Nov 2017 12:29:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08CC12A4DC; Thu, 16 Nov 2017 12:29:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 613D82A4DD for ; Thu, 16 Nov 2017 12:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934362AbdKPM3z (ORCPT ); Thu, 16 Nov 2017 07:29:55 -0500 Received: from mx1.profitbricks.com ([46.16.72.21]:49338 "EHLO mx1.profitbricks.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934359AbdKPM3x (ORCPT ); Thu, 16 Nov 2017 07:29:53 -0500 Received: from mail.pb.local (mail.pb.local [192.168.178.100]) by mx1.profitbricks.com (Postfix) with ESMTP id 356725F68E for ; Thu, 16 Nov 2017 12:29:51 +0000 (UTC) Received: from konstrukt.pb.local (konstrukt.pb.local [192.168.88.20]) by mail.pb.local (Postfix) with SMTP id C14C33FCF9; Thu, 16 Nov 2017 13:29:47 +0100 (CET) Received: (nullmailer pid 1432 invoked by uid 1000); Thu, 16 Nov 2017 12:29:47 -0000 From: Benjamin Drung To: linux-rdma@vger.kernel.org Cc: Benjamin Drung Subject: [PATCH rdma-core 1/2] debian: Don't install disabled providers on archs that miss coherent DMA Date: Thu, 16 Nov 2017 13:29:36 +0100 Message-Id: <20171116122937.31770-2-benjamin.drung@profitbricks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171116122937.31770-1-benjamin.drung@profitbricks.com> References: <20171116122937.31770-1-benjamin.drung@profitbricks.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ibverbs providers mlx4 and mlx5 require cache coherent DMA which is not available on all architectures. Therefore do not try to install them on the affected architectures. Closes: #881731 Signed-off-by: Benjamin Drung --- debian/rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/rules b/debian/rules index 562fff51..b0fbe1d6 100755 --- a/debian/rules +++ b/debian/rules @@ -2,12 +2,17 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all +NO_COHERENT_DMA_ARCHS = armel armhf mips mips64el mipsel + %: dh $@ --with systemd --builddirectory=build-deb override_dh_auto_clean: dh_auto_clean rm -rf build-deb + for package in ibverbs-providers libibverbs-dev rdma-core; do \ + test ! -e debian/$$package.install.backup || mv debian/$$package.install.backup debian/$$package.install; \ + done # Upstream wishes to use CMAKE_BUILD_TYPE=Release, and ensures that has a # sensible basis of options (eg no -O3, including -g). Debian specific options @@ -34,6 +39,13 @@ override_dh_auto_build: override_dh_auto_test: override_dh_auto_install: +# Some providers are disabled on architectures that are not able to do coherent DMA +ifeq (,$(filter-out $(NO_COHERENT_DMA_ARCHS),$(DEB_HOST_ARCH))) + for package in ibverbs-providers libibverbs-dev rdma-core; do \ + test -e debian/$$package.install.backup || cp debian/$$package.install debian/$$package.install.backup; \ + done + sed -i '/mlx[45]/d' debian/ibverbs-providers.install debian/libibverbs-dev.install debian/rdma-core.install +endif DESTDIR=$(CURDIR)/debian/tmp ninja -C build-deb install # The following files are not used on Debian (we ship our own sysvinit script)