From patchwork Fri Jun 7 22:39:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashish Varma X-Patchwork-Id: 1112338 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; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F+vmeTCt"; 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 45LHfj72cfz9s9y for ; Sat, 8 Jun 2019 08:45:16 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id D939C1ADD; Fri, 7 Jun 2019 22:45:13 +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 4B06E1998 for ; Fri, 7 Jun 2019 22:44:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E86A6711 for ; Fri, 7 Jun 2019 22:44:10 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id g21so1357334plq.0 for ; Fri, 07 Jun 2019 15:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=WcdWJqYgE0SbA8gogdFZD8Ll35bdCuLwrz1O38T/qY0=; b=F+vmeTCtGE+GTAwsakTAuaKEvVkMypWfvoVDHmQM8plZxVIfFc7a+KFPIYtGDbYlv6 lIaaMCNyLLoJimTm1y69d+GyeFF9SpgiaAq8u7YjMqxlCk6U/l0YfV1rdy0kZS3EpxO4 ySeBfuG9nO/shnbHNJyfl9WlkCD9vjVbOXFXi8qsL3Fd+ukmpPUhdT6EgYy4SyVsiYHb o2Ql4XSVWOpCCFFy07pZiSg1zThvh/lrTYje6kPXBD6RrGirUd1/D9ehMCEA6G1M1WYP B+JGXIE5L0ATIJeSdeG6JW8BiW6CzC0SuSB2zSBKiJHjzmO3/9pIezEPmI/oPu5aP3MU yChg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=WcdWJqYgE0SbA8gogdFZD8Ll35bdCuLwrz1O38T/qY0=; b=JpMPgBSP+7+bfNaHUzmOG+k3eF1dw/FD//0nWs2EQazSMWBGWJ1tr3oYAHPiZ+epk0 J/pp5y7WuyRNLhyFuY2WQQqykmuavJNCeEmXpWaJBczX+2obSRobB588pm9O8MemBINN GRUKtGTTysyveDWVI+S8NhtKYKajBialEJaxqO+znnyFwc560dLbhY2B9qiYU0EFFeTH S2yteN4z8LCyT9I+m3axSZgz6erq4W4IPMU2u/DcZpdqmhrqDfYNv6Hzx5FXGHng7aW9 wNBI8yrl2cuvNZKTXs3DHml25KwBsrB4tSq4kwcc3Y1kXDx/BJjs6gWE6kXbQpKSh26/ OS5Q== X-Gm-Message-State: APjAAAU31FQM7iKjxijW3GSVf39H/r5U/V1oqd9QjmYo4e0EzRW3JBwY 4Y9hVPixjBvo3QVSGev129r6XvkX X-Google-Smtp-Source: APXvYqyGc6t8hEDKfcnTl3cTDpidD3MdvAdKogv024zEM9jk+DTrk3JnPiBgmUwamW+eo/9AsBACvw== X-Received: by 2002:a17:902:b695:: with SMTP id c21mr6888376pls.160.1559947450387; Fri, 07 Jun 2019 15:44:10 -0700 (PDT) Received: from ashish-ubuntu-Desktop.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id z11sm2737519pjq.13.2019.06.07.15.44.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Jun 2019 15:44:09 -0700 (PDT) From: Ashish Varma To: dev@openvswitch.org Date: Fri, 7 Jun 2019 15:39:49 -0700 Message-Id: <1559947189-29278-1-git-send-email-ashishvarma.ovs@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] rhel: Fixed a bug for checking the correct major version and revision. 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 Fixed a bug where checking for major version 3.10 and major revision not equal to 327 or 693 or 957 should have gone to the default else at the end. In the current code, the default else condition will not get executed for kernel with major version 3.10 and major revision not equal to 327/693/957 resulting in failure to load the kernel module. Signed-off-by: Ashish Varma Reviewed-by: Yifeng Sun --- rhel/openvswitch-kmod-fedora.spec.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 92d763f..27f443a 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -90,13 +90,12 @@ if grep -qs "suse" /etc/os-release; then if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi -elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then - if [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \ - [ "$major_rev" = "957" ]; then - # For RHEL 7.2, 7.4 and 7.6 - if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh - fi +elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] && + { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \ + [ "$major_rev" = "957" ]; }; then + # For RHEL 7.2, 7.4 and 7.6 + if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi else # Ensure that modprobe will find our modules.