From patchwork Wed Oct 26 15:55:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Viktor Mihajlovski X-Patchwork-Id: 79445 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp138639qge; Wed, 26 Oct 2016 08:59:02 -0700 (PDT) X-Received: by 10.237.55.34 with SMTP id i31mr2440679qtb.105.1477497542629; Wed, 26 Oct 2016 08:59:02 -0700 (PDT) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id n128si1798462qkf.9.2016.10.26.08.59.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 26 Oct 2016 08:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9QFtdZF012972; Wed, 26 Oct 2016 11:55:40 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9QFtdtJ015913 for ; Wed, 26 Oct 2016 11:55:39 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9QFtd9Y022395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 26 Oct 2016 11:55:39 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E8DEBC04B95C for ; Wed, 26 Oct 2016 15:55:37 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9QFsN9t051038 for ; Wed, 26 Oct 2016 11:55:37 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 26ay8xsd5t-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 26 Oct 2016 11:55:36 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Oct 2016 16:55:35 +0100 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 26 Oct 2016 16:55:33 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6D54D2190066; Wed, 26 Oct 2016 16:54:48 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9QFtWRG16581056; Wed, 26 Oct 2016 15:55:32 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9QFtWtU026984; Wed, 26 Oct 2016 09:55:32 -0600 Received: from [9.152.97.9] (dyn-9-152-97-9.boeblingen.de.ibm.com [9.152.97.9]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9QFtWMV026975; Wed, 26 Oct 2016 09:55:32 -0600 To: Andrea Bolognani , libvir-list@redhat.com References: <1477488475-657-1-git-send-email-abologna@redhat.com> From: Viktor Mihajlovski X-Enigmail-Draft-Status: N1110 Date: Wed, 26 Oct 2016 17:55:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1477488475-657-1-git-send-email-abologna@redhat.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102615-0008-0000-0000-000002E7EF0D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102615-0009-0000-0000-00001A7D388B Message-Id: <2c277d43-1db9-fc17-cfaf-e8b8c9faa501@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-10-26_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=9 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610260273 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 189 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 26 Oct 2016 15:55:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 26 Oct 2016 15:55:38 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'mihajlov@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: 0.599 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-loop: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH 0/5] wireshark: Fix $(prefix) handling X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com On 26.10.2016 15:27, Andrea Bolognani wrote: > Well, almost :) There are still some cases that are not > handled correctly, but at least this will unbreak 'make > rpm' while I work on the rest. > > Tested by running 'make rpm' successfully on Fedora 23, > Fedora 24 and Fedora rawhide. > > > Andrea Bolognani (5): > wireshark: Introduce $ws_modversion > wireshark: Hoist $ws_prefix declaration > wireshark: Strip prefix correctly > wireshark: Inject $(prefix) at the right time > wireshark: Rename plugindir to ws_plugindir > > m4/virt-wireshark.m4 | 29 ++++++++++++++++++----------- > tools/Makefile.am | 2 +- > 2 files changed, 19 insertions(+), 12 deletions(-) > Thanks for the fixes. As it happens, I have tried to fix our local builds in parallel, and thus have some minor suggestions, patch attached. -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list >From 50ce169ed1c2fa30d2b8f13d6b1dbbd126a9b496 Mon Sep 17 00:00:00 2001 From: Viktor Mihajlovski Date: Wed, 26 Oct 2016 17:16:32 +0200 Subject: [PATCH] wireshark: minor improvements for plugin directory detecion/guessing 1. If libvirt's and wiresharks' libdirs are different (they were on my system) the plugin install can fail. Fixed by evaluating the pkg-config libdir variable. 2. May seem pedantic, but the default for libdir is ${exec_prefix}/lib and - while uncommon - exec_prefix might be different from prefix. So use exec_prefix instead of prefix. 3. AC_SUBST will take care of inserting ws_plugindir = @ws_plugindir@ into Makefile.in, so that line can be removed. Signed-off-by: Viktor Mihajlovski --- m4/virt-wireshark.m4 | 20 ++++++++++---------- tools/Makefile.am | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/m4/virt-wireshark.m4 b/m4/virt-wireshark.m4 index 556272a..9660c22 100644 --- a/m4/virt-wireshark.m4 +++ b/m4/virt-wireshark.m4 @@ -29,24 +29,24 @@ AC_DEFUN([LIBVIRT_CHECK_WIRESHARK],[ if test "x$with_wireshark_dissector" != "xno" ; then if test "x$with_ws_plugindir" = "xcheck" ; then ws_plugindir="$($PKG_CONFIG --variable plugindir wireshark)" - ws_prefix="$($PKG_CONFIG --variable prefix wireshark)" + ws_libdir="$($PKG_CONFIG --variable libdir wireshark)" + ws_exec_prefix="$($PKG_CONFIG --variable exec_prefix wireshark)" ws_modversion="$($PKG_CONFIG --modversion wireshark)" if test "x$ws_plugindir" = "x" ; then dnl On some systems the plugindir variable may not be stored within pkg config. dnl Fall back to older style of constructing the plugin dir path. - ws_plugindir="$libdir/wireshark/plugins/$ws_modversion" - ws_prefix="$prefix" + ws_plugindir="$ws_libdir/wireshark/plugins/$ws_modversion" fi - if test "x$ws_prefix" = "x" ; then - dnl If the wireshark prefix cannot be retrieved from pkg-config, + if test "x$ws_exec_prefix" = "x" ; then + dnl If the wireshark exec_prefix cannot be retrieved from pkg-config, dnl /usr is our best bet - ws_prefix="/usr" + ws_exec_prefix="/usr" fi - dnl Replace the wireshark prefix with our own. - dnl Note that $(prefix) is kept verbatim at this point in time, and will + dnl Replace the wireshark exec_prefix with our own. + dnl Note that $(exec_prefix) is kept verbatim at this point in time, and will dnl only be expanded later, when make is called: this makes it possible - dnl to override the prefix at compilation or installation time - ws_plugindir='$(prefix)'"${ws_plugindir#$ws_prefix}" + dnl to override the exec_prefix at compilation or installation time + ws_plugindir='$(exec_prefix)'"${ws_plugindir#$ws_exec_prefix}" elif test "x$with_ws_plugindir" = "xno" || test "x$with_ws_plugindir" = "xyes"; then AC_MSG_ERROR([ws-plugindir must be used only with valid path]) else diff --git a/tools/Makefile.am b/tools/Makefile.am index 319abb2..100e657 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -398,7 +398,6 @@ EXTRA_DIST += \ if WITH_WIRESHARK_DISSECTOR -ws_plugindir = @ws_plugindir@ ws_plugin_LTLIBRARIES = wireshark/src/libvirt.la wireshark_src_libvirt_la_CPPFLAGS = \ -I wireshark/src $(WIRESHARK_DISSECTOR_CFLAGS) -- 1.9.1