From patchwork Thu Sep 20 19:19:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Xu X-Patchwork-Id: 972679 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="J4rgZzUw"; 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 42GRPZ3w3Jz9sMx for ; Fri, 21 Sep 2018 05:19:45 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B7EEA1061; Thu, 20 Sep 2018 19:19:42 +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 5BC42F68 for ; Thu, 20 Sep 2018 19:19:39 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9A31842D for ; Thu, 20 Sep 2018 19:19:38 +0000 (UTC) Received: by mail-pg1-f172.google.com with SMTP id r1-v6so4870219pgp.11 for ; Thu, 20 Sep 2018 12:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=M2GagjiezG/Ao2VMfjrPpw9USB8dzzdKSMWEbvYzxsA=; b=J4rgZzUwzPVOBtl7ZQuJmPByQ2ec6q4yXcdsXOxixixvOlhKByWXl5rRgAqhuYexeE nSypOU0j+6wfHXmZZ78YtscbltR3wNKq6UBa6yaysl5QjoPs0K/Lby/zNjtznZW7K788 tPjbQW+TMG1v9tU5uQMqCpNdZJzNd+TqpCQYPyB3dYN4ZM8UH5HKAtikQs8CG0Thv9is 8opJNrOdmY11qTMUGQ2AEPTkwLOFLlp10uE3fvf6r5h2Gf/rWF5Y3jy7WrwUC9YpXj9A a/zaKgJHTzR6y+xLh/Q/C0ynyGIP0XgiaxnXC4as/ROJZMxY4qv//GOAC4prLTXxfCwA C1wg== 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=M2GagjiezG/Ao2VMfjrPpw9USB8dzzdKSMWEbvYzxsA=; b=IlrXqsf1QNTOf7v20vfkcY6bfUiuUHgWXW9Xnll/09bWDKYVTYKzPKW6YENG0G+ELq SsPv/hHdHPwbfXkvdTF0gu+48IIPmdj5XlHM9So289QnCZwfS1cXkEwQiBzhnOYZXGC3 p7tu1TtGqoUCOdxtmMHPCw4V4ZIS4+G8JNw8pa8PKdOpdOw9UjDtzeiJ19dE5bw0dE8k JM6nTByrQBgStVijTxxV8k4L7EGIvCPefkDGkbAOo7YQy5n3tBMiRF6tVxbfEu0paKW7 fMh0482f9qigId/bXCtCAzRCEOT5wZI5jzQu5K8UTNBTo9eLbACu4/PKw+BU995fLNMG pDIg== X-Gm-Message-State: APzg51AfVwFTawQ8olPcYDk6OTcn1Oet6tNDW5GZfa8MhDJkeFwwDN6n uJSzm2IKHQWf+vegtZnrClWw/VkR X-Google-Smtp-Source: ANB0VdaYSQqSYgK1SPAfmNjVq9ffMYu/HnWlslSJw4vOvcRGhGv0K0GsSFG0rZzVhvQJ7XSTyxjRcw== X-Received: by 2002:a63:c245:: with SMTP id l5-v6mr38290807pgg.255.1537471177869; Thu, 20 Sep 2018 12:19:37 -0700 (PDT) Received: from rhel72-vm1-local.eng.vmware.com. ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id 142-v6sm185459pgg.54.2018.09.20.12.19.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 12:19:37 -0700 (PDT) From: Martin Xu To: dev@openvswitch.org Date: Thu, 20 Sep 2018 12:19:29 -0700 Message-Id: <1537471170-35289-1-git-send-email-martinxu9.ovs@gmail.com> X-Mailer: git-send-email 1.8.3.1 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 Cc: Flavio Leitner Subject: [ovs-dev] [PATCH v1 1/2] rhel: use _datadir as path prefix for ovs-kmod-manage.sh, fedora 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 This patch fixes the path for ovs-kmod-manage.sh script in the openvswitch-kmod RPM in fedora spec file. Currently the path prefix is hard coded to /usr/share. Use %{_datadir} instead. Fixes 22c33c303932 (rhel: support kmod build against mulitple kernel versions, fedora) Signed-off-by: Martin Xu CC: Greg Rose CC: Flavio Leitner --- rhel/openvswitch-kmod-fedora.spec.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 521c11a..464d537 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -74,7 +74,7 @@ for kv in %{kversion}; do done install -d -m 0755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts install -p -m 0755 rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh \ - $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-kmod-manage.sh + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh %clean rm -rf $RPM_BUILD_ROOT @@ -88,15 +88,15 @@ IFS='.\|-' read mainline_major mainline_minor mainline_patch major_rev \ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then if [ "$installed_major" = "327" ] || [ "$installed_major" = "693" ]; then # For RHEL 7.2 and 7.4 - if [ -x "/usr/share/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - /usr/share/openvswitch/scripts/ovs-kmod-manage.sh + if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi fi elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ] && \ [ "$mainline_patch" -ge "73" ]; then # For SLES 12 SP3 - if [ -x "/usr/share/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - /usr/share/openvswitch/scripts/ovs-kmod-manage.sh + 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. @@ -125,7 +125,7 @@ fi /lib/modules/*/extra/openvswitch/*.ko /etc/depmod.d/kmod-openvswitch.conf %exclude /lib/modules/*/modules.* -%attr(755,root,root) /usr/share/openvswitch/scripts/ovs-kmod-manage.sh +%attr(755,root,root) %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh %changelog * Wed Sep 21 2011 Kyle Mestery