From patchwork Wed Oct 11 08:53:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Lautrbach X-Patchwork-Id: 9999073 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 C6B9A602BF for ; Wed, 11 Oct 2017 08:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B50D62843B for ; Wed, 11 Oct 2017 08:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6D5128409; Wed, 11 Oct 2017 08:54:28 +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 ucol19pa09.eemsg.mail.mil (ucol19pa09.eemsg.mail.mil [214.24.24.82]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE0A28409 for ; Wed, 11 Oct 2017 08:54:27 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.43,360,1503360000"; d="scan'208";a="545496716" Received: from emsm-gh1-uea10.ncsc.mil ([214.29.60.2]) by ucol19pa09.eemsg.mail.mil with ESMTP/TLS/AES256-SHA; 11 Oct 2017 08:54:26 +0000 Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by EMSM-GH1-UEA10.NCSC.MIL with ESMTP; 11 Oct 2017 08:54:26 +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 v9B8rxhD020732; Wed, 11 Oct 2017 04:54:05 -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 v9B8rtb6069558 for ; Wed, 11 Oct 2017 04:53:55 -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 v9B8rtUo020730 for ; Wed, 11 Oct 2017 04:53:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A1CrAQDy2t1ZfykbGNZeHAEBBAEBCgEBg?= =?us-ascii?q?zAoZ24njhl0jjSEawGSU2aCEgoTEIUYhFk/GAECAQEBAQEBARMBAQsWhnqBUYh?= =?us-ascii?q?UgUMNAw2rJotngy2CAoFRhF6DZ4IehSgFkUGPe4dejH4NgnCIYIc/lWOBOR+BR?= =?us-ascii?q?lMlFYUTgQWBUHQBiVMBAQE?= X-IPAS-Result: =?us-ascii?q?A1CrAQDy2t1ZfykbGNZeHAEBBAEBCgEBgzAoZ24njhl0jjS?= =?us-ascii?q?EawGSU2aCEgoTEIUYhFk/GAECAQEBAQEBARMBAQsWhnqBUYhUgUMNAw2rJotng?= =?us-ascii?q?y2CAoFRhF6DZ4IehSgFkUGPe4dejH4NgnCIYIc/lWOBOR+BRlMlFYUTgQWBUHQ?= =?us-ascii?q?BiVMBAQE?= X-IronPort-AV: E=Sophos;i="5.43,360,1503374400"; d="scan'208";a="79089" Received: from emsm-gh1-uea11.ncsc.mil ([214.29.60.35]) by goalie.tycho.ncsc.mil with ESMTP; 11 Oct 2017 04:53:55 -0400 Received: from updc3cpa02.eemsg.mail.mil ([214.24.27.41]) by emsm-gh1-uea11.NCSC.MIL with ESMTP; 11 Oct 2017 08:53:54 +0000 X-EEMSG-check-005: 0 X-EEMSG-check-006: 000-001;77954b92-e564-44cd-8218-30392b174533 Authentication-Results: upbd19pa05.eemsg.mail.mil; dkim=neutral (message not signed) header.i=none X-EEMSG-check-008: 253362761|UPBD19PA05_EEMSG_MP5.csd.disa.mil X-EEMSG-check-001: false X-EEMSG-SBRS: 3.5 X-EEMSG-ORIG-IP: 209.132.183.28 X-EEMSG-check-002: true X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CzAADL2N1Zhxy3hNFdHAEBBAEBCgEBgzAoAWZuJ44ZdI40hGuSVGaCEgoTEIUYhFk/GAECAQEBAQEBARMBAQEKCwkIKC+GHYFRiFSBQw0Qqw6LZ4MtggKBUYReg2eCHoUoBZFBj3uHXox+DYJwiGCHPQKVY4E5H4FGUyUVhRNggXU+NgGJUwEBAQ X-IPAS-Result: A0CzAADL2N1Zhxy3hNFdHAEBBAEBCgEBgzAoAWZuJ44ZdI40hGuSVGaCEgoTEIUYhFk/GAECAQEBAQEBARMBAQEKCwkIKC+GHYFRiFSBQw0Qqw6LZ4MtggKBUYReg2eCHoUoBZFBj3uHXox+DYJwiGCHPQKVY4E5H4FGUyUVhRNggXU+NgGJUwEBAQ Received: from mx1.redhat.com ([209.132.183.28]) by upbd19pa05.eemsg.mail.mil with ESMTP; 11 Oct 2017 08:53:52 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF2274A702 for ; Wed, 11 Oct 2017 08:53:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EF2274A702 Received: from workstation.brq.redhat.com (unknown [10.43.12.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BEAE68B28; Wed, 11 Oct 2017 08:53:50 +0000 (UTC) From: Petr Lautrbach To: selinux@tycho.nsa.gov Date: Wed, 11 Oct 2017 10:53:45 +0200 Message-Id: <20171011085345.31496-1-plautrba@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 11 Oct 2017 08:53:51 +0000 (UTC) Subject: [PATCH] libselinux: Add support for pcre2 to pkgconfig definition X-BeenThere: selinux@tycho.nsa.gov X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: Errors-To: selinux-bounces@tycho.nsa.gov Sender: "Selinux" X-Virus-Scanned: ClamAV using ClamSMTP When libselinux is built using USE_PCRE2 libselinux.pc needs to require libpcre2-8 instead of libpcre. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1487521 Signed-off-by: Petr Lautrbach --- libselinux/Makefile | 11 ++++++----- libselinux/src/Makefile | 2 +- libselinux/src/libselinux.pc.in | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libselinux/Makefile b/libselinux/Makefile index 1ecab178..16531fe9 100644 --- a/libselinux/Makefile +++ b/libselinux/Makefile @@ -21,13 +21,14 @@ export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST USE_PCRE2 ?= n ifeq ($(USE_PCRE2),y) - PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 $(shell $(PKG_CONFIG) --cflags libpcre2-8) - PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre2-8) + PCRE_MODULE := libpcre2-8 + PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 else - PCRE_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcre) - PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs libpcre) + PCRE_MODULE := libpcre endif -export PCRE_CFLAGS PCRE_LDLIBS +PCRE_CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PCRE_MODULE)) +PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs $(PCRE_MODULE)) +export PCRE_MODULE PCRE_CFLAGS PCRE_LDLIBS OS := $(shell uname) export OS diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 2408faea..18df75c8 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -148,7 +148,7 @@ $(LIBSO): $(LOBJS) ln -sf $@ $(TARGET) $(LIBPC): $(LIBPC).in ../VERSION - sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ + sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):; s:@PCRE_MODULE@:$(PCRE_MODULE):' < $< > $@ selinuxswig_python_exception.i: ../include/selinux/selinux.h bash -e exception.sh > $@ || (rm -f $@ ; false) diff --git a/libselinux/src/libselinux.pc.in b/libselinux/src/libselinux.pc.in index 2cd04d38..2e90a844 100644 --- a/libselinux/src/libselinux.pc.in +++ b/libselinux/src/libselinux.pc.in @@ -7,6 +7,6 @@ Name: libselinux Description: SELinux utility library Version: @VERSION@ URL: http://userspace.selinuxproject.org/ -Requires.private: libsepol libpcre +Requires.private: libsepol @PCRE_MODULE@ Libs: -L${libdir} -lselinux Cflags: -I${includedir}