From patchwork Fri Jan 12 16:37:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 860040 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bd50J2X9"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zJ7hj0qPrz9s7M for ; Sat, 13 Jan 2018 03:37:56 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6199610FF; Fri, 12 Jan 2018 16:37:52 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 37AD210FD for ; Fri, 12 Jan 2018 16:37:51 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EA328477 for ; Fri, 12 Jan 2018 16:37:49 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j3so4769402pfh.8 for ; Fri, 12 Jan 2018 08:37:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=a/+xwSEXPPr4xDNTIN0WBaO5b5YDYia1StUNXnAIhTU=; b=bd50J2X9M2dR/P+7ZIfY+2pDx2l6ylCCDzpjLfdv40e1ck4fJWf6bN68mufbrT5ZGs 73UA/gLXpC2K11prB3uR8g/VZB0byMRBKGKq1mY+7SG71n3N4/JLhXBJeZDXcnIEImju 56JG3XVbtNYD2o0sfFrA2q3IegH8pAeO7XU0bui0epZRVA7r2gA5lc0nVG0Fvk/kxQes qA0s7mVogqrILkRwCxc61qFY403r0R4ohm48zlny9bopaTUFSeM1B9ujIuATTuDefh5p 9KZn6WjBeX907WIzbJ1EESnU51TttV2SUZEC2BzIG7oWjdkeDF4+aYRAcBRIopLJIetm 6AyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=a/+xwSEXPPr4xDNTIN0WBaO5b5YDYia1StUNXnAIhTU=; b=SqEdMiN/I41+7qiziPZbGHlvWxNnppoesqKiVamAeeJL4LouNpTjHrmiVA4+1g4akf uTeK/blz5a4bfV3XYN6R8fMfAcNBlm6k1TBZju1KI80qSXdsayZfOk+RfXCcHL5e8YhY rGr4dLCPLiHypgGKQOzGq5x96v7Y/AMSYae+wsn5MzaZBNhXl3YRYm9jGmkjKnXBwn3X Jt3VZhtTxMilgw03UJt3t/gaPU2e2e/4KTJHaJ4cpqt/g+pNI4i9ETY5pLUwxZYTovfS Eg108aMXsMcEoT3uNoXPY0T/yCQ6tVFpyz+a8QvPx3l8IXXQXn0joiZagUW0fl/snA2A Cp9w== X-Gm-Message-State: AKGB3mLfKLs+dEyZ4S5/uyck90kGqv3LD4f/yZCql7lu50t5CKo2Jzo6 8SeLsPQLplXnsYMxmveg1/+/qw== X-Google-Smtp-Source: ACJfBou/EskQ5dRY1z5sr/wI+i0c1Bx8UPsXks1YinJuBh/PhN2nhDOm3CVFcOVsdkgNKAK8Q7I/QQ== X-Received: by 10.84.128.106 with SMTP id 97mr22700396pla.73.1515775068934; Fri, 12 Jan 2018 08:37:48 -0800 (PST) Received: from gizo.domain (184-100-156-182.ptld.qwest.net. [184.100.156.182]) by smtp.gmail.com with ESMTPSA id x84sm19330684pfe.81.2018.01.12.08.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 08:37:48 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Fri, 12 Jan 2018 08:37:43 -0800 Message-Id: <1515775064-18494-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Gurucharan Shetty Subject: [ovs-dev] [PATCH V2 1/2] rhel: Add depmod file for openvswitch module search X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Gurucharan Shetty There are occasions when an openvswitch kernel module rpm which does not match the exact build number of the running kernel. In that case the openvswitch kernel modules will be installed to the "weak-updates" directory under the /lib/modules/$(uname -r) directory. But the new kernel modules will not be found because the default /etc/depmod.d/dist.conf search path lists weak-updates last. This patch creates a file in /etc/depmod.d/ named 01openvswitch.conf. This file specifies weak-updates first in the search path and since it is named with a preceeding "01" it will be found first by depmod. This resolves issues with customers who have installed openvswitch kernel modules previously and a kernel upgrade has occurred since and when the kernel minor build numbers do not exactly match the running kernel. Signed-off-by: Greg Rose Signed-off-by: Gurucharan Shetty Signed-off-by: Gurucharan Shetty --- V2 - Fix typo in commit title --- rhel/openvswitch-kmod-rhel6.spec.in | 10 ++++++---- rhel/openvswitch-kmod.files | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rhel/openvswitch-kmod-rhel6.spec.in b/rhel/openvswitch-kmod-rhel6.spec.in index 8413b25..a7f4832 100644 --- a/rhel/openvswitch-kmod-rhel6.spec.in +++ b/rhel/openvswitch-kmod-rhel6.spec.in @@ -62,17 +62,19 @@ for flavor in %flavors_to_build ; do find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \; done install -d %{buildroot}%{_sysconfdir}/depmod.d/ + +echo "search extra/openvswitch weak-updates/openvswitch updates extra built-in weak-updates" >> 01%{oname}.conf 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 + echo "override ${modname%.ko} * extra/%{oname}" >> 01%{oname}.conf + echo "override ${modname%.ko} * weak-updates/%{oname}" >> 01%{oname}.conf done -install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/ +install -m 644 01%{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/ %files %defattr(644,root,root) -/etc/depmod.d/%{oname}.conf +/etc/depmod.d/01%{oname}.conf %clean rm -rf $RPM_BUILD_ROOT diff --git a/rhel/openvswitch-kmod.files b/rhel/openvswitch-kmod.files index 357c2e8..49262f3 100644 --- a/rhel/openvswitch-kmod.files +++ b/rhel/openvswitch-kmod.files @@ -1,3 +1,3 @@ %defattr(644,root,root,755) /lib/modules/%2-%1 -/etc/depmod.d/openvswitch.conf +/etc/depmod.d/01openvswitch.conf