From patchwork Fri Jul 29 00:09:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 653907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3s0pyX1RTCz9sCy for ; Fri, 29 Jul 2016 10:10:11 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 7509C1133B; Thu, 28 Jul 2016 17:10:10 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 4A6A611337 for ; Thu, 28 Jul 2016 17:10:09 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id D21F11623C1 for ; Thu, 28 Jul 2016 18:10:08 -0600 (MDT) X-ASG-Debug-ID: 1469751007-0b3237477333d510001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar6.cudamail.com with ESMTP id Go0nbXVIEvZdxgFv (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 28 Jul 2016 18:10:07 -0600 (MDT) X-Barracuda-Envelope-From: joe@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO relay2-d.mail.gandi.net) (217.70.183.194) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 29 Jul 2016 00:10:06 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at ovn.org designates 217.70.183.194 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.194 X-Barracuda-RBL-IP: 217.70.183.194 Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id 2EA63C5A65; Fri, 29 Jul 2016 02:10:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id B1l6iIkTSk-I; Fri, 29 Jul 2016 02:10:03 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from archer.eng.vmware.com (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 38B11C5A5F; Fri, 29 Jul 2016 02:10:01 +0200 (CEST) X-CudaMail-Envelope-Sender: joe@ovn.org From: Joe Stringer To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-727081492 X-CudaMail-DTE: 072816 X-CudaMail-Originating-IP: 217.70.183.194 Date: Thu, 28 Jul 2016 17:09:37 -0700 X-ASG-Orig-Subj: [##CM-E2-727081492##][PATCH 1/2] rhel: Prioritize our vport-foo modules in depmod. Message-Id: <20160729000938.816-1-joe@ovn.org> X-Mailer: git-send-email 2.9.0 X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1469751007 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Cc: fbl@sysclose.org Subject: [ovs-dev] [PATCH 1/2] rhel: Prioritize our vport-foo modules in depmod. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" We've done the same for openvswitch.ko previously, but we really should be doing this for vport modules as well; otherwise, depmod may try to pair upstream vport modules with the out-of-tree openvswitch module (leading to depmod warnings on package install, and failure to load the module at runtime). VMware-BZ: #1700293 Signed-off-by: Joe Stringer Acked-by: Pravin B Shelar Acked-by: Flavio Leitner --- rhel/openvswitch-kmod-rhel6.spec.in | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rhel/openvswitch-kmod-rhel6.spec.in b/rhel/openvswitch-kmod-rhel6.spec.in index 5d46838a9ed5..82a3312b100f 100644 --- a/rhel/openvswitch-kmod-rhel6.spec.in +++ b/rhel/openvswitch-kmod-rhel6.spec.in @@ -43,10 +43,6 @@ Open vSwitch Linux kernel module. %prep %setup -n %{oname}-%{version} -cat > %{oname}.conf << EOF -override %{oname} * extra/%{oname} -override %{oname} * weak-updates/%{oname} -EOF %build for flavor in %flavors_to_build; do @@ -66,7 +62,17 @@ for flavor in %flavors_to_build ; do find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \; done install -d %{buildroot}%{_sysconfdir}/depmod.d/ +for module in %{buildroot}/lib/modules/%{kernel_version}/$INSTALL_MOD_DIR/*.ko; +do + modname="$(basename ${module})" + echo "override ${modname%.ko} * extra/${oname}" >> %{oname}.conf + echo "override ${modname%.ko} * weak-updates/${oname}" >> %{oname}.conf +done install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/ +%files +%defattr(644,root,root) +/etc/depmod.d/openvswitch.conf + %clean rm -rf $RPM_BUILD_ROOT