From patchwork Thu Apr 16 03:21:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1271475 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dTGBEINO; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 492kzP5VBnz9sSG for ; Thu, 16 Apr 2020 13:21:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7FC5C865C1; Thu, 16 Apr 2020 03:21:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OZWaeOGla0Y5; Thu, 16 Apr 2020 03:21:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C80018666C; Thu, 16 Apr 2020 03:21:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F389F1BF97E for ; Thu, 16 Apr 2020 03:21:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EE6088666C for ; Thu, 16 Apr 2020 03:21:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NBTVkm-NXagC for ; Thu, 16 Apr 2020 03:21:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3D03B865C1 for ; Thu, 16 Apr 2020 03:21:46 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id q17so15050808qtp.4 for ; Wed, 15 Apr 2020 20:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vANFVqdx7BxG5Ptzq5wdl4bjjTBQadDLjbWwbYLtv48=; b=dTGBEINOBxWSpJKezGLNy1Qcm0feJr3S3XW054McvmPUkB3AhD75riaPVgZ9OfaMNz tiUlY/HtLVOWuKLOb0K4wXRz66fmKFjUinXegTxRtnvY1oEW9t655Kfsg2beOkzTbLiR VJkqTb+HdfKlchPoo8V/WjVn17OFJ9Swbk661JOkiflBGZWITTXzM0Laia3VaEjvdYWg kQfy1NmW8YfvEA3pU3vBwI+5Vl9IzYPx75a3ZG690ApJvKTMqJcJRQw5F8R3Wz2XS5yQ IluyFvo+bocAM5oRPs4lhdRMc6/6FKhbvsdOGpmxN6aOGaGllE4Th1+atZGpy0wfm+QW JBYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vANFVqdx7BxG5Ptzq5wdl4bjjTBQadDLjbWwbYLtv48=; b=lf26AY4vOLNcKi0Jx1en0BwEZXEvep7ycthNptsph1nIi83FZDHmVj/LhUoDKbzW3z AQk77wOkzawddFnCTV4mmO8nHyBFVAqe3jghJ7DFKoMJK+8riA/4EBC4eGhiUJqxeRea jNfFPt6ZlXbCvPcwDZdbCEem0m1xgbQd22LP6kJFqGP0Bvp6BMyLYGkiNQhy4vyDFqgE ZuuPPvfM+HNwlkC+M0wlNnXIl8Fq3pMXN6t2sWJZrQz53hE9B96hlE3aAr48K7edOh+w qLj2t82gWpoGy3Bs+u7/5dlXKp8wFfYlWP7UI1yHyLd5yCsImq77GkixvB+DSh1+fByE nLig== X-Gm-Message-State: AGi0PuY6/hXI9ds3/Ye5tWYZ49mO3NNhtkWja5dRkkbCoUX5rI+boNSY 7eLEw9866qkxGzoWHd69haIq8dlN X-Google-Smtp-Source: APiQypKyVMOIONFCjq3dKJVazjfvT6RzegpxxeA1d7bZIrts/idukxkEOAugMSFop38clWks5u6M8w== X-Received: by 2002:ac8:4b4c:: with SMTP id e12mr24216673qts.78.1587007304887; Wed, 15 Apr 2020 20:21:44 -0700 (PDT) Received: from casantos.remote.csb.com ([177.18.78.146]) by smtp.gmail.com with ESMTPSA id x65sm13962750qkd.65.2020.04.15.20.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 20:21:44 -0700 (PDT) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 16 Apr 2020 00:21:37 -0300 Message-Id: <20200416032137.721705-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 Subject: [Buildroot] [PATCH v2] package/openrc: enable support when libselinux is selected 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: Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= , "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett OpenRC suports SELinux, so there is no reason to forcibly disable it. Notice this only allows OpenRC to perform the initial policy load and set the enforcing mode. In order really use SELinux it's also necessary to select refpolicy, which provides a policy, and policycoreutils, which provides restorecon and other SELinux utilities. Signed-off-by: Adam Duskett Signed-off-by: Carlos Santos Tested-by: Carlos Santos --- Tested on QEMU, with ext4fs, selecting refpolicy and policycoreutils. Only disabled and permissive modes were used, since the enforcing mode currently does not work. See the help text in package/refpolicy/Config.in for additional details. --- CC: "Yann E. MORIN" --- Changes v1->v2: - Improve the commit message, as suggested by Yann E. MORIN - Explain which tests were performed --- package/openrc/openrc.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package/openrc/openrc.mk b/package/openrc/openrc.mk index 6057451bfe..97536dad37 100644 --- a/package/openrc/openrc.mk +++ b/package/openrc/openrc.mk @@ -18,7 +18,6 @@ OPENRC_MAKE_OPTS = \ LIBNAME=lib \ LIBEXECDIR=/usr/libexec/rc \ MKPKGCONFIG=no \ - MKSELINUX=no \ MKSYSVINIT=yes \ BRANDING="Buildroot $(BR2_VERSION_FULL)" \ CC=$(TARGET_CC) @@ -29,6 +28,13 @@ else OPENRC_MAKE_OPTS += MKSTATICLIBS=yes endif +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +OPENRC_MAKE_OPTS += MKSELINUX=yes +OPENRC_DEPENDENCIES += libselinux +else +OPENRC_MAKE_OPTS += MKSELINUX=no +endif + define OPENRC_BUILD_CMDS $(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D) endef