From patchwork Sun Oct 2 04:15:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Zaman X-Patchwork-Id: 9359555 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 7B1B86075E for ; Sun, 2 Oct 2016 04:16:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 630AC28C44 for ; Sun, 2 Oct 2016 04:16:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55FC028C59; Sun, 2 Oct 2016 04:16:36 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 3AA7428C44 for ; Sun, 2 Oct 2016 04:16:33 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.31,282,1473120000"; d="scan'208";a="19727783" IronPort-PHdr: =?us-ascii?q?9a23=3Al0Rvfx8WLbuRZv9uRHKM819IXTAuvvDOBiVQ1KB9?= =?us-ascii?q?1+McTK2v8tzYMVDF4r011RmSDN+dsagP0bGL+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwu?= =?us-ascii?q?d76zQNSZ1Z/qn8mJuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM8?= =?us-ascii?q?5fxGdvOE7B102kvpT4wYRnuxh0l7phspcYEPayQ6NtVrFcDTI7I0gp9cbrsl/F?= =?us-ascii?q?VgLJ6XwCAUsMlR8dIQHe6xeybJ70uy2y4uh0wy6cFdX7V741XzWl6eFgTxq+23?= =?us-ascii?q?RPDCIw7GyC0p84t6lcuh/04kUnzg=3D=3D?= X-IPAS-Result: =?us-ascii?q?A2ElBQDRifBX/wHyM5BdHgYMgygVAQEBAQEegVO6TCWBe4V?= =?us-ascii?q?kTAEBAQEBAQEBAgECWyeCMgQDEwV5Wz8BBAIPKAYBAQwgDAIDCQIXKQgIAwEtA?= =?us-ascii?q?wEFAQsfCwUYBAGIKwGhKYEyPjKKVoUwAQEFiCcIEIQYinsRAWiFEo8xikyPc2W?= =?us-ascii?q?IcyWFc48qMYERVIMRQ4FFZQGFKHiBKAEBAQ?= Received: from unknown (HELO tarius.tycho.ncsc.mil) ([144.51.242.1]) by emsm-gh1-uea11.nsa.gov with ESMTP; 02 Oct 2016 04:16:17 +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 u924FNHI011648; Sun, 2 Oct 2016 00:15:35 -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 u924FMJV098257 for ; Sun, 2 Oct 2016 00:15:22 -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 u924FLHm011646 for ; Sun, 2 Oct 2016 00:15:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A1DbBAC0iPBXesPAVdFdHgYMgygVAQEBAQGBcbZDhBWGHoFaTAECAQEBAQECEwEBCQsUGYUTARUuAQE3AYEUAQUBNSKIKwGhKIEyPjKKVoUwAQEFh34BKAgQhBiLdYIAC4MHjzGKTI9zZYhzhhiPKjGBEYNlQ4FFZQGHSAEBAQ X-IPAS-Result: A1DbBAC0iPBXesPAVdFdHgYMgygVAQEBAQGBcbZDhBWGHoFaTAECAQEBAQECEwEBCQsUGYUTARUuAQE3AYEUAQUBNSKIKwGhKIEyPjKKVoUwAQEFh34BKAgQhBiLdYIAC4MHjzGKTI9zZYhzhhiPKjGBEYNlQ4FFZQGHSAEBAQ X-IronPort-AV: E=Sophos;i="5.31,282,1473134400"; d="scan'208";a="5740540" 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; 02 Oct 2016 00:15:21 -0400 IronPort-PHdr: =?us-ascii?q?9a23=3AKZnKJBdMvWAWBEtwtbDuhMF5lGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc65YB7h7PlgxGXEQZ/co6odzbGH6ea6AydausvJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4?= =?us-ascii?q?Ov7yUtaLyZ/mjaboodaJOFgArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf?= =?us-ascii?q?9d32JiKAHbtR/94sCt4MwrqHwI6Lpyv/JHBL73e6U+UKxwECUtM2dz4tbi8xbE?= =?us-ascii?q?U1ih/HwZB0cfiR1OSzrM6Rj8FsPzuzD9sMJl1TOUPMv3SrZyUjOnufQ4ACT0gT?= =?us-ascii?q?sKYmZquFrcjdZ92fpW?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0EcBQBviPBXesPAVdFdHgYMGAEXAQwBg?= =?us-ascii?q?moVAQEBAQGBcbZDhBWCFIQKgVpMAQEBAQEBAQECAQIQAQEJCxQZL4IyGIEAWz8?= =?us-ascii?q?BFS4BATcBgRQBBQE1IogrAaEogTI+MopWhTABAQWHfgEoCBCEGIt1ggALgwePM?= =?us-ascii?q?YpMj3NliHOGGI8qMYERg2VDgUVlAYdIAQEB?= X-IPAS-Result: =?us-ascii?q?A0EcBQBviPBXesPAVdFdHgYMGAEXAQwBgmoVAQEBAQGBcbZ?= =?us-ascii?q?DhBWCFIQKgVpMAQEBAQEBAQECAQIQAQEJCxQZL4IyGIEAWz8BFS4BATcBgRQBB?= =?us-ascii?q?QE1IogrAaEogTI+MopWhTABAQWHfgEoCBCEGIt1ggALgwePMYpMj3NliHOGGI8?= =?us-ascii?q?qMYERg2VDgUVlAYdIAQEB?= X-IronPort-AV: E=Sophos;i="5.31,282,1473120000"; d="scan'208";a="19727779" Received: from mail-pf0-f195.google.com ([209.85.192.195]) by emsm-gh1-uea11.nsa.gov with ESMTP/TLS/AES128-GCM-SHA256; 02 Oct 2016 04:15:17 +0000 Received: by mail-pf0-f195.google.com with SMTP id t25so1521717pfg.2 for ; Sat, 01 Oct 2016 21:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perfinion-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ic4bmF8RTxRarnLivpmMdXS/MfkxrZBWf7m5IGVxhU8=; b=TKPTNmA134MA6Gm09qXpuSuVHI57qQQ98PIDVHGw32SYPSik94y+8vHgoG59Cly3OC 2jM19K56RY/XaGrWAwcE+59WA3i+08KsKrk7+oxy/tHusPqM57rXex7Y5micje74ZnxJ 2t0RDFRYobx8vHLYSLpXbRVT/T568Qv2iM7iF3exw7pmiDm12sb69AfqI8PV5gZN1iVk J8tAWCKQ99bPKjQ8ATBJ3XTyz4orozRkNmVON9FfPUall7L/Nr9CoGL/6uxgAGBiXwCN r+tFB6B8nbLxIoHSNA1pCKl4frbF1FNxq6yo4jKKI3e2PDA3TxppSmcogUNNKGfMaGT1 A/Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ic4bmF8RTxRarnLivpmMdXS/MfkxrZBWf7m5IGVxhU8=; b=iAEJeP3KTjaRbFirxki97RCPGRkeNQbsGT/m7cVyyvKMKOItXwqnr33pXQV2cVLXlR fBQeZwPHIyeiyg9poaU5YGFF7aLpV04nHDBMbTjktiUbGKZw2v7crak/n8eYQV1qxa20 XEZoj02xao90myIkcoeFp74Egf/YKE/S9mb2tekkwqi/gPQC34qx7KIR4QQQ30AZxiC+ Kxvb/8FfpJYd4EVv6+0qNpQIjImITMt0YlYDecxnEZRYjmj3lgHCuttk8y9mo9XTS9Vo VVN4OuHKpgANfF2Z6Z2r2OaywlSKxjsS7loG6Ck0Qu30WGyGRaBhtVKSsmOmJwZHZ/A3 UsJg== X-Gm-Message-State: AA6/9RmQjs6Fcuuqh3V/TtESr6K0f1TnWTcyTZPW2EDhnTfRehKj1eV3m/pCvScjQDH6Eg== X-Received: by 10.98.83.130 with SMTP id h124mr25269693pfb.154.1475381718933; Sat, 01 Oct 2016 21:15:18 -0700 (PDT) Received: from localhost ([2404:e800:e600:540:d867:f0:61d1:b38f]) by smtp.gmail.com with ESMTPSA id w9sm37814182pfg.34.2016.10.01.21.15.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 21:15:18 -0700 (PDT) From: Jason Zaman To: selinux@tycho.nsa.gov Subject: [PATCH 1/2] libselinux: versioned ruby pkg-config and query vendorarchdir properly Date: Sun, 2 Oct 2016 12:15:13 +0800 Message-Id: <1475381714-9906-1-git-send-email-jason@perfinion.com> X-Mailer: git-send-email 2.7.3 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 Gentoo and Arch have pkg-config entries for "ruby-$(RUBYLIBVER)" but not for "ruby". Check if that exists first then fall back to plain ruby if it does not. The ruby install paths were incorrect. Fedora 20 installed to /usr/lib64/ruby/vendor_ruby/, Arch needs it to be vendor_ruby as well, site_ruby does not work. Thanks to Nicolas Iooss for the correct way to query for the path. Signed-off-by: Jason Zaman --- libselinux/src/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 7169230..f9e3de1 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -16,9 +16,8 @@ PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_i PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') -RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') -RUBYINC ?= $(shell $(PKG_CONFIG) --cflags ruby) -RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +RUBYINC ?= $(shell $(PKG_CONFIG) --exists ruby-$(RUBYLIBVER) && $(PKG_CONFIG) --cflags ruby-$(RUBYLIBVER) || $(PKG_CONFIG) --cflags ruby) +RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') LIBBASE ?= $(shell basename $(LIBDIR)) VERSION = $(shell cat ../VERSION)