From patchwork Mon Apr 13 17:29:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1269914 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491FxY0YFtz9sSM for ; Tue, 14 Apr 2020 03:30:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 67FC32049E; Mon, 13 Apr 2020 17:30:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DDQLDXqkBPcF; Mon, 13 Apr 2020 17:30:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A743220486; Mon, 13 Apr 2020 17:30:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id BDE2D1BF319 for ; Mon, 13 Apr 2020 17:30:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BA707845DB for ; Mon, 13 Apr 2020 17:30:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83VDvLLE-Jz7 for ; Mon, 13 Apr 2020 17:30:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A7208845D4 for ; Mon, 13 Apr 2020 17:30:00 +0000 (UTC) IronPort-SDR: ldg8xIsh9Ewi4iqj2iBVLJPhh3vfDC22p8FJN2Jc8cvPL+jJ9bU61tg7QNqxnXgadf6kIOu7Ru +esbvm9TTXMDb9ti0NXYkgWpLk5ItFQBBisDZ+88XIuGsmrWwQLaGvj6xyJCJwYGTSaqbX2dLm eetpqeu1Gy3b8wMz3q0htvd3Ig+wrQeAY475wMz4qiUQUZDYJGUV3h6Hm07pcFB0UVeqhPAYnj /rwARCTSZnJ9w8KQDvkmCrO2yTyFU9KYE7AaSAxXhlWK0tJWlbVInCtFyf2rGue6OUEVwDHwHu RsY= Received: from ofwda1n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 13 Apr 2020 12:30:00 -0500 X-Received: from biscuits.rockwellcollins.lab (biscuits.rockwellcollins.lab [10.148.119.137]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id 4E8B2602C8; Mon, 13 Apr 2020 12:29:59 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 13 Apr 2020 12:29:58 -0500 Message-Id: <20200413172958.55199-1-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [[RFC]] RFC: switch selinux to use project release date instead of version X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - example shows conversion of libselinux and libsepol using version - adapts patch paths and legal-info path changes NOTE requires first applying http://patchwork.ozlabs.org/project/buildroot/patch/20200204103322.428413-1-aduskett@gmail.com/ Signed-off-by: Matthew Weber --- package/libselinux/0001-fix-musl-build.patch | 6 +++--- ...ot-use-PYCEXT-and-rely-on-the-installed-file-nam.patch | 8 ++++---- ...3-fix-building-against-musl-and-uclibc-libraries.patch | 8 ++++---- package/libselinux/libselinux.hash | 8 ++++---- package/libselinux/libselinux.mk | 8 +++++--- package/libsepol/libsepol.mk | 4 ++-- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/package/libselinux/0001-fix-musl-build.patch b/package/libselinux/0001-fix-musl-build.patch index 44189e6400..dbe88b4fc2 100644 --- a/package/libselinux/0001-fix-musl-build.patch +++ b/package/libselinux/0001-fix-musl-build.patch @@ -14,10 +14,10 @@ completely written from scratch, and non-optimal. Signed-off-by: "Yann E. MORIN" [Updated for 3.0] Signed-off-by: Adam Duskett -diff --git a/src/booleans.c b/src/booleans.c +diff --git a/libselinux/src/booleans.c b/libselinux/src/booleans.c index ffa8d26..8569002 100644 ---- a/src/booleans.c -+++ b/src/booleans.c +--- a/libselinux/src/booleans.c ++++ b/libselinux/src/booleans.c @@ -65,6 +65,14 @@ int security_get_boolean_names(char ***names, int *len) goto bad; } diff --git a/package/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch b/package/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch index d2acbc2b7d..9b021c34ed 100644 --- a/package/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch +++ b/package/libselinux/0002-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch @@ -20,13 +20,13 @@ Signed-off-by: Thomas Petazzoni [Refreshed for 3.0] Signed-off-by: Adam Duskett --- - src/Makefile | 3 +-- + libselinux/src/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/src/Makefile b/src/Makefile +diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 4b6a4d4..7b14ef1 100644 ---- a/src/Makefile -+++ b/src/Makefile +--- a/libselinux/src/Makefile ++++ b/libselinux/src/Makefile @@ -15,7 +15,6 @@ INCLUDEDIR ?= $(PREFIX)/include PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) diff --git a/package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch b/package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch index 21cac0f153..19e9ee68b1 100644 --- a/package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch +++ b/package/libselinux/0003-fix-building-against-musl-and-uclibc-libraries.patch @@ -10,13 +10,13 @@ to fail. Add the FTS_LDLIBS variable to the LDLIBS variable in utils/Makefile to fix compiling against uClibc and musl. --- - libselinux/utils/Makefile | 2 +- + libselinux/libselinux/utils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/utils/Makefile b/utils/Makefile +diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile index 36150638..a5632b7c 100644 ---- a/utils/Makefile -+++ b/utils/Makefile +--- a/libselinux/utils/Makefile ++++ b/libselinux/utils/Makefile @@ -45,7 +45,7 @@ endif override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) diff --git a/package/libselinux/libselinux.hash b/package/libselinux/libselinux.hash index d1b4210483..8ec2cbb9f1 100644 --- a/package/libselinux/libselinux.hash +++ b/package/libselinux/libselinux.hash @@ -1,5 +1,5 @@ -# From: https://github.com/SELinuxProject/selinux/wiki/Releases -sha256 2ea2b30f671dae9d6b1391cbe8fb2ce5d36a3ee4fb1cd3c32f0d933c31b82433 libselinux-3.0.tar.gz - +# Generated locally as upstream releases in artifact +# files under a overall YYYYMMDD dated selinux release +sha256 4cc134210d8cca6c410b7b8c91993e10c6d5b077102ed27e6976bb6d9e483f0d libselinux-20191204.tar.gz # Hash for license file -sha256 86657b4c0fe868d7cbd977cb04c63b6c667e08fa51595a7bc846ad4bed8fc364 LICENSE +sha256 86657b4c0fe868d7cbd977cb04c63b6c667e08fa51595a7bc846ad4bed8fc364 libselinux/LICENSE diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk index 5f87b5bc90..6b004e34be 100644 --- a/package/libselinux/libselinux.mk +++ b/package/libselinux/libselinux.mk @@ -4,15 +4,17 @@ # ################################################################################ -LIBSELINUX_VERSION = 3.0 -LIBSELINUX_SITE = https://github.com/SELinuxProject/selinux/releases/download/20191204 +LIBSELINUX_VERSION = 20191204 +LIBSELINUX_SITE = $(call github,SELinuxProject,selinux,$(LIBSELINUX_VERSION)) LIBSELINUX_LICENSE = Public Domain -LIBSELINUX_LICENSE_FILES = LICENSE +LIBSELINUX_LICENSE_FILES = libselinux/LICENSE LIBSELINUX_DEPENDENCIES = $(BR2_COREUTILS_HOST_DEPENDENCY) libsepol pcre LIBSELINUX_INSTALL_STAGING = YES +LIBSELINUX_SUBDIR = $(@D)/$(LIBSELINUX_NAME) + # Set SHLIBDIR to /usr/lib so it has the same value than LIBDIR, as a result # we won't have to use a relative path in 0002-revert-ln-relative.patch LIBSELINUX_MAKE_OPTS = \ diff --git a/package/libsepol/libsepol.mk b/package/libsepol/libsepol.mk index 62b0744aa3..d8d8bdae86 100644 --- a/package/libsepol/libsepol.mk +++ b/package/libsepol/libsepol.mk @@ -4,8 +4,8 @@ # ################################################################################ -LIBSEPOL_VERSION = 2.9 -LIBSEPOL_SITE = https://github.com/SELinuxProject/selinux/releases/download/20190315 +LIBSEPOL_VERSION = $(LIBSELINUX_VERSION) +LIBSEPOL_SITE = $(call github,SELinuxProject,selinux,$(LIBSELINUX_VERSION)) LIBSEPOL_LICENSE = LGPL-2.1+ LIBSEPOL_LICENSE_FILES = COPYING