From patchwork Sun Oct 30 19:15:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Iooss X-Patchwork-Id: 9404625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51BE160586 for ; Sun, 30 Oct 2016 19:16:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DA5828D10 for ; Sun, 30 Oct 2016 19:16:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2063728D75; Sun, 30 Oct 2016 19:16:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from emsm-gh1-uea11.nsa.gov (smtp.nsa.gov [8.44.101.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1198B28D10 for ; Sun, 30 Oct 2016 19:16:25 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.31,423,1473120000"; d="scan'208";a="336915" IronPort-PHdr: =?us-ascii?q?9a23=3AakkbKhyA48nWKl3XCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0e8VIJqq85mqBkHD//Il1AaPBtSBra0bwLOP6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMz?= =?us-ascii?q?fbWvXNGNxJ3uj6ibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKK?= =?us-ascii?q?x8zGJsIk+PzV6nvp/jtKN592xsn95pt4sZCeSpN5g/GKdVCDUgLnAd+NzgtR6F?= =?us-ascii?q?SxCGoHQbTDY4iB1NVi7E5xb+V4y5kyz9rfE1jC+bNsryRKtyWDOl9LxDTUP4zi?= =?us-ascii?q?AdOGhqoynslsVsgfcD81qarBtlztuROdmY?= X-IPAS-Result: =?us-ascii?q?A2FmFgApRhZY/wHyM5BdHAEBBAEBCgEBGAEFAQsBgn8BAQE?= =?us-ascii?q?BAR9Ycgu6cCYDiAZTAQEBAQEBAQECAQJfKIIzBAMTBQU5PAEBAQEBASMCDGcCN?= =?us-ascii?q?xQgDgMJAhcnAggIAwEtFR8LBRgEiDMEAb84IAWGPYhuEQFohHcdBZoYgWqERoM?= =?us-ascii?q?Ihm2KFIV7kRNUUoNlgTxxhSN4gTEBAQE?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 30 Oct 2016 19:16:23 +0000 Received: from prometheus.infosec.tycho.ncsc.mil (prometheus [192.168.25.40]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u9UJFMKj026696; Sun, 30 Oct 2016 15:15:32 -0400 Received: from tarius.tycho.ncsc.mil (tarius.infosec.tycho.ncsc.mil [144.51.242.1]) by prometheus.infosec.tycho.ncsc.mil (8.15.2/8.15.2) with ESMTP id u9UJFKOC217568 for ; Sun, 30 Oct 2016 15:15:20 -0400 Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id u9UJFJQM026694 for ; Sun, 30 Oct 2016 15:15:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1BaAAApRhZYhyIeaIFdHAEBBAEBCgEBgyoBAQEBAXdyC7ZjhC4IiAZTAQIBAQEBAQITAQEBCgsJCR2GYYECiFQEAaJdnHsFhj2JaIR3HQWaGIFqhEaDCIZtkA+RE4Emgl8BCwF5gTxxh0wBAQE X-IPAS-Result: A1BaAAApRhZYhyIeaIFdHAEBBAEBCgEBgyoBAQEBAXdyC7ZjhC4IiAZTAQIBAQEBAQITAQEBCgsJCR2GYYECiFQEAaJdnHsFhj2JaIR3HQWaGIFqhEaDCIZtkA+RE4Emgl8BCwF5gTxxh0wBAQE X-IronPort-AV: E=Sophos;i="5.31,423,1473134400"; d="scan'208";a="5794596" Received: from emsm-gh1-uea11.corp.nsa.gov (HELO emsm-gh1-uea11.nsa.gov) ([10.208.41.37]) by goalie.tycho.ncsc.mil with ESMTP; 30 Oct 2016 15:15:18 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3ADJbAlhN8BoI9EeizY94l6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0KP/zrarrMEGX3/hxlliBBdydsKMezbWJ+Pm5ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09?= =?us-ascii?q?fr2zQd+IyZvonLnro9X6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu?= =?us-ascii?q?5blitCLFOXmAvgtI/rpMYwu3cYh/V07MNEUKPnb4wkXLdYC3IgKGlz68r15jfZ?= =?us-ascii?q?Sg7awHoXVWEfiVJpBA/e91muWJb6tS/zrax83y6BJuXzEaByXi6tufQ4ACT0gT?= =?us-ascii?q?sKYmZquFrcjdZ92fpW?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0E1AwApRhZYhyIeaIFdHQEFAQsBFwEBB?= =?us-ascii?q?AEBCgEBgn8BAQEBAXdyC7ZjhC4IiAZTAQEBAQEBAQECAQIQAQEBCgsJCR0wgjM?= =?us-ascii?q?YDDk8AQEBAQEBIwIMgi6BAohUBAGiXZx7BYY9iWiEdx0FmhiBaoRGgwiGbZAPk?= =?us-ascii?q?ROBJoJfAQsBeYE8cYdMAQEB?= X-IPAS-Result: =?us-ascii?q?A0E1AwApRhZYhyIeaIFdHQEFAQsBFwEBBAEBCgEBgn8BAQE?= =?us-ascii?q?BAXdyC7ZjhC4IiAZTAQEBAQEBAQECAQIQAQEBCgsJCR0wgjMYDDk8AQEBAQEBI?= =?us-ascii?q?wIMgi6BAohUBAGiXZx7BYY9iWiEdx0FmhiBaoRGgwiGbZAPkROBJoJfAQsBeYE?= =?us-ascii?q?8cYdMAQEB?= X-IronPort-AV: E=Sophos;i="5.31,423,1473120000"; d="scan'208";a="336906" Received: from mx1.polytechnique.org ([129.104.30.34]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2016 19:15:18 +0000 Received: from eversmanni.numericable.fr (81-66-120-207.rev.numericable.fr [81.66.120.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id E0D025646C3 for ; Sun, 30 Oct 2016 20:15:15 +0100 (CET) From: Nicolas Iooss To: selinux@tycho.nsa.gov Subject: [PATCH 1/1] policycoreutils: restorecond: use pkg-config to find dbus-glib-1 files Date: Sun, 30 Oct 2016 20:15:08 +0100 Message-Id: <20161030191508.9155-1-nicolas.iooss@m4x.org> X-Mailer: git-send-email 2.10.1 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sun Oct 30 20:15:16 2016 +0100 (CET)) X-Org-Mail: nicolas.iooss.2010@polytechnique.org X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: MIME-Version: 1.0 Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP On Ubuntu some header files are located in /usr/lib/x86_64-linux-gnu/, not /usr/lib64/: $ pkg-config --cflags dbus-glib-1 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include Use pkg-config instead of hard-coded paths to find glib and dbus-glib headers and libraries. This is needed in order to use environments provided for example by https://travis-ci.org/. Signed-off-by: Nicolas Iooss --- policycoreutils/restorecond/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/policycoreutils/restorecond/Makefile b/policycoreutils/restorecond/Makefile index 253246d7b5ea..93050f00d230 100644 --- a/policycoreutils/restorecond/Makefile +++ b/policycoreutils/restorecond/Makefile @@ -1,3 +1,5 @@ +PKG_CONFIG ?= pkg-config + # Installation directories. PREFIX ?= $(DESTDIR)/usr SBINDIR ?= $(PREFIX)/sbin @@ -11,11 +13,11 @@ autostart_DATA = sealertauto.desktop INITDIR ?= $(DESTDIR)/etc/rc.d/init.d SELINUXDIR = $(DESTDIR)/etc/selinux -DBUSFLAGS = -DHAVE_DBUS -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/lib/dbus-1.0/include -DBUSLIB = -ldbus-glib-1 -ldbus-1 +DBUSFLAGS = -DHAVE_DBUS $(shell $(PKG_CONFIG) --cflags dbus-glib-1) +DBUSLIB = $(shell $(PKG_CONFIG) --libs dbus-glib-1) CFLAGS ?= -g -Werror -Wall -W -override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib/glib-2.0/include +override CFLAGS += -I$(PREFIX)/include $(DBUSFLAGS) USE_PCRE2 ?= n ifeq ($(USE_PCRE2),y) @@ -24,7 +26,7 @@ else PCRE_LDFLAGS := -lpcre endif -LDLIBS += -lselinux $(PCRE_LDFLAGS) $(DBUSLIB) -lglib-2.0 -L$(LIBDIR) +LDLIBS += -lselinux $(PCRE_LDFLAGS) $(DBUSLIB) -L$(LIBDIR) all: restorecond