From patchwork Sun Mar 1 15:17:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1247328 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.137; helo=fraxinus.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=hzsOI+/o; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Vn320Skxz9sSH for ; Mon, 2 Mar 2020 02:18:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C5FA18502B; Sun, 1 Mar 2020 15:18:03 +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 9TXUcWNED-Gy; Sun, 1 Mar 2020 15:18:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7A4D684F24; Sun, 1 Mar 2020 15:18:02 +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 42C601BF2E3 for ; Sun, 1 Mar 2020 15:18:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3AFC186061 for ; Sun, 1 Mar 2020 15:18:01 +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 vuzUOewAv2aE for ; Sun, 1 Mar 2020 15:17:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9D13B86096 for ; Sun, 1 Mar 2020 15:17:58 +0000 (UTC) Received: by mail-qt1-f169.google.com with SMTP id j34so5694430qtk.4 for ; Sun, 01 Mar 2020 07:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9GBXAxTh1475ZSHUTg3gCMMGZe0Xsfb+hmBgGw4nqm0=; b=hzsOI+/ohCiuszZkkGLnRea21gLOPhfkjwPdQ5zuwR9KEn8VYtSorcRN5aC8twd3Vk fvLQ41eWG9suICVdRoqBmdRJg2y50uFo021ic4Oeilp5qKOPL/EZ0frtWBxHBr4Ear68 7LS0reFRjTjxjOhjychRpM3lclZt9coPrF34SN9s6sypC6LyA21Vm2zznMXPDJkWfGN3 gbNQNHH8WtenNvbcDqmuq2FQzniAJASP0qOmIav0RrgXa7WXSL2ND1QUBFNBEJC942lE h3USt6TByHFEuA6UbzkVrhYerjtz6+EnoUtGkuiz471TlanwI7VK7Eu+4KSHYDB9ViDF TEiQ== 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:in-reply-to :references; bh=9GBXAxTh1475ZSHUTg3gCMMGZe0Xsfb+hmBgGw4nqm0=; b=c/I4s8W9qEXZSOa38FyTbn/OZJs9hPSpgRG7GX+PJzv7MDnm/JXHMM5xbg3/7c/C1V rPu+sUOCw66FEUj5ZKu4G6iMFJ2O8O34Dkn99DeKKIV/IEAxvobD0PnaOB/fKvOvwZMa /hthuZM7oqkQg0KwJdVqAVhJ2HWUNZ1FcKJpmZ+YtpnhgyiK7S/OucKDezgnocXpD9cm sxB1VMAPpgKEceLjw1ajxMjBIlwCl2GS3X5prWMzRk63mLDT55ftqyyaHh/k8ntmTVkY wxv6+VTxRk6/Q7zLP3IjRwL4z7jE5DMa9wsJJpdcM9jeGD3SBroL95GhIusKukmrGOU1 9Epw== X-Gm-Message-State: APjAAAVZ7zyHpNPsdm6Lp88S6Tpnq+78nUtrse9GiQSCvgk05qeRp2qF c8dZpE7BozvyCQ+0E2EBNSAmlaFr X-Google-Smtp-Source: APXvYqyg5/D8KPCg0nkG0zm/rJXNH6huOMaNuh9ubi+zk7tJfAWOYdcztvcG8HIClN7WjLJs+zzMRA== X-Received: by 2002:ac8:7101:: with SMTP id z1mr11430587qto.333.1583075877202; Sun, 01 Mar 2020 07:17:57 -0800 (PST) Received: from casantos.remote.com (200.175.82.32.dynamic.adsl.gvt.net.br. [200.175.82.32]) by smtp.gmail.com with ESMTPSA id t37sm8866302qth.0.2020.03.01.07.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 07:17:56 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 1 Mar 2020 12:17:44 -0300 Message-Id: <20200301151747.25723-2-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200301151747.25723-1-unixmania@gmail.com> References: <20200301151747.25723-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH/next v2 1/4] package/openrc: drop custom getty service 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: Carlos Santos , Adam Duskett , =?utf-8?b?TWljaGHFgiDFgXlzemN6ZWs=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos In Buildroot getty is provided by BusyBox or util-linux (agetty). Both create a /sbin/getty symlink pointing to the actual program, so make the agetty service use that path instead of /sbin/agetty. Also start agetty after all other services, to prevent mixing startup messages with the getty prompt on devices with a single serial console. This allows us to drop the custom getty service, which causes an error message from openrc 0.42.1 (in a forthcoming patch): Error: getty is the name of a real and virtual service. The patches are required because it's not possible to override the command or startup order by means of a configuration file. Anyway it's still better to patch something maintained upstream than depending on a custom piece that may easily become obsolete. Signed-off-by: Carlos Santos --- CC: Adam Duskett --- ...ty-replace-sbin-agetty-by-sbin-getty.patch | 33 +++++++++++++++++++ ...getty-start-agetty-after-all-sevices.patch | 29 ++++++++++++++++ package/openrc/getty | 24 -------------- package/openrc/openrc.mk | 8 ++--- 4 files changed, 65 insertions(+), 29 deletions(-) create mode 100644 package/openrc/0003-init.d-agetty-replace-sbin-agetty-by-sbin-getty.patch create mode 100644 package/openrc/0004-init.d-agetty-start-agetty-after-all-sevices.patch delete mode 100755 package/openrc/getty diff --git a/package/openrc/0003-init.d-agetty-replace-sbin-agetty-by-sbin-getty.patch b/package/openrc/0003-init.d-agetty-replace-sbin-agetty-by-sbin-getty.patch new file mode 100644 index 0000000000..feeff22254 --- /dev/null +++ b/package/openrc/0003-init.d-agetty-replace-sbin-agetty-by-sbin-getty.patch @@ -0,0 +1,33 @@ +From b39ab180358ed451eae9df900f49a72ef1eb7442 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sun, 1 Mar 2020 09:04:48 -0300 +Subject: [PATCH] init.d/agetty: replace /sbin/agetty by /sbin/getty + +In Buildroot getty is provided by BusyBox or util-linux (agetty). Both +create a /sbin/getty symlink pointing to the actual program, so make the +agetty service use that path instead of /sbin/agetty. + +The patch is required because it's not possible to override the command +by means of a configuration file. + +Signed-off-by: Carlos Santos +--- + init.d/agetty.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init.d/agetty.in b/init.d/agetty.in +index e4866f7a..e1864628 100644 +--- a/init.d/agetty.in ++++ b/init.d/agetty.in +@@ -14,7 +14,7 @@ supervisor=supervise-daemon + port="${RC_SVCNAME#*.}" + respawn_period="${respawn_period:-60}" + term_type="${term_type:-linux}" +-command=/sbin/agetty ++command=/sbin/getty + command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}" + pidfile="/run/${RC_SVCNAME}.pid" + +-- +2.18.2 + diff --git a/package/openrc/0004-init.d-agetty-start-agetty-after-all-sevices.patch b/package/openrc/0004-init.d-agetty-start-agetty-after-all-sevices.patch new file mode 100644 index 0000000000..f1c927a450 --- /dev/null +++ b/package/openrc/0004-init.d-agetty-start-agetty-after-all-sevices.patch @@ -0,0 +1,29 @@ +From c2dc04f6b8c6784941b896e0b17c160dd43a566f Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sun, 1 Mar 2020 11:14:37 -0300 +Subject: [PATCH] init.d/agetty: start agetty after all services + +This is required for Buildroot, to prevent mixing service initialization +messages with the getty prompt on devices with a single serial console. + +Signed-off-by: Carlos Santos +--- + init.d/agetty.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/init.d/agetty.in b/init.d/agetty.in +index e1864628..a1ad4e9f 100644 +--- a/init.d/agetty.in ++++ b/init.d/agetty.in +@@ -19,7 +19,7 @@ command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}" + pidfile="/run/${RC_SVCNAME}.pid" + + depend() { +- after local ++ after * + keyword -prefix + provide getty + } +-- +2.18.2 + diff --git a/package/openrc/getty b/package/openrc/getty deleted file mode 100755 index 8fcb071f8a..0000000000 --- a/package/openrc/getty +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# based on agetty service from OpenRC package - -description="start getty on terminal" -supervisor=supervise-daemon -port="${RC_SVCNAME#*.}" -term_type="${term_type:-linux}" -command=/sbin/getty -command_args_foreground="${getty_options} ${baud} ${port} ${term_type}" -pidfile="/run/${RC_SVCNAME}.pid" - -depend() { - # start getty at the very end of init - after * - keyword -prefix -} - -start_pre() { - export EINFO_QUIET="${quiet:-yes}" -} - -stop_pre() { - export EINFO_QUIET="${quiet:-yes}" -} diff --git a/package/openrc/openrc.mk b/package/openrc/openrc.mk index 1f8516f5ee..ce0b05e965 100644 --- a/package/openrc/openrc.mk +++ b/package/openrc/openrc.mk @@ -68,17 +68,15 @@ endef OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_REMOVE_UNNEEDED ifeq ($(BR2_TARGET_GENERIC_GETTY),y) -OPENRC_GETTY_SVCNAME = getty.$(SYSTEM_GETTY_PORT) +OPENRC_GETTY_SVCNAME = agetty.$(SYSTEM_GETTY_PORT) OPENRC_GETTY_CONF_D = $(TARGET_DIR)/etc/conf.d/$(OPENRC_GETTY_SVCNAME) define OPENRC_SET_GETTY { \ echo "baud=\"$(SYSTEM_GETTY_BAUDRATE)\""; \ echo "term_type=\"$(SYSTEM_GETTY_TERM)\"" ; \ - echo "getty_options=\"-L $(SYSTEM_GETTY_OPTIONS)\""; \ + echo "agetty_options=\"-L $(SYSTEM_GETTY_OPTIONS)\""; \ } > $(OPENRC_GETTY_CONF_D) - $(INSTALL) -D -m 0755 $(OPENRC_PKGDIR)/getty \ - $(TARGET_DIR)/etc/init.d/getty - ln -sf getty $(TARGET_DIR)/etc/init.d/$(OPENRC_GETTY_SVCNAME) + ln -sf agetty $(TARGET_DIR)/etc/init.d/$(OPENRC_GETTY_SVCNAME) ln -sf /etc/init.d/$(OPENRC_GETTY_SVCNAME) \ $(TARGET_DIR)/etc/runlevels/default/$(OPENRC_GETTY_SVCNAME) endef From patchwork Sun Mar 1 15:17:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1247329 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.133; helo=hemlock.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=GSBQrJVf; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Vn322YWwz9sSN for ; Mon, 2 Mar 2020 02:18:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1F8398782E; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u8D5f7Yoq86r; Sun, 1 Mar 2020 15:18:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5D05C87695; Sun, 1 Mar 2020 15:18: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 5FFFE1BF954 for ; Sun, 1 Mar 2020 15:18:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 25C9080657 for ; Sun, 1 Mar 2020 15:18: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 heKUXQKw9W6H for ; Sun, 1 Mar 2020 15:18:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 6140784E5F for ; Sun, 1 Mar 2020 15:18:00 +0000 (UTC) Received: by mail-qk1-f170.google.com with SMTP id p62so4983662qkb.0 for ; Sun, 01 Mar 2020 07:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xGcU1FlV8/9TcOgb0+d0w0MBrGqe4M4BWiJvLR2RSag=; b=GSBQrJVfhj+Hxd4VbZ//2oxCUfVO8GWjxwX4hsWoXdXowKjMHYfawvAAfNDYf/SQTo D5cbPQLKT21iCDraUrK1iGNoNArwWR9M1HmEE1hy1mUv6I5YUV8yvPRm+ujPiUG7YeVc vnPxP44codJoTXN7XnEvLWudca2WXD2fIFjgsiXvmp0M+xULeMSgu2aY4IV1a0NA7lAD fxNE9r4/xtz5jU8cPeTy7KEzSLC9bC5VjWXRtidVuIU2ANn0msqWofY09x7AT2thM3vo cdsTBSP5cE0yvItGDGMePaPUTXodk2k5RydbzzMqYyB7PF5538X60hgkaog11QrQm3jD rTtw== 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:in-reply-to :references; bh=xGcU1FlV8/9TcOgb0+d0w0MBrGqe4M4BWiJvLR2RSag=; b=h16PP9Wd4QV5ykWrw3JrXst3qnO3NS8TUIx2pMxZ2+IDjG8sTuDECg8KCqfLpTiOns 4OdalPaJmT1fIu/OM8tENFxP/00HKCUcL6wDcEUULKJusYc+xw9jAhq1HQVpTpTfsWcg F34Q7aiDOh4TsuL8Vbgao69VBYSqDc12iWntfzI5D3WNazSqzDi4SpMCOkpgXpgg6WaO ytlVejyD5twnbe4qbCDNTMn6zGV3wsHVduYfjv/odB0x14QQEgL+VdMexC//QWUZxTYG V4ppMSjng9p/ldoRTawuqqys02SJyLggMxvTA14f7uxJdDQpzhdgdr2rOeLlcq/i9sz3 VRAw== X-Gm-Message-State: APjAAAV2zW4Xiz7q8eHS3hNkGyxG+fPJ6CiSTDNMW6s0sIucIdXXWkFF kwpnu+b8OJncWxrpQLzjiYxGC00X X-Google-Smtp-Source: APXvYqx99leIYeyUAONl9rO7yW9G7xC4PWGkigJXluXl0oBluEEEEdrEjEDD2Id+zWW/8VjfZhKXiA== X-Received: by 2002:a37:27c2:: with SMTP id n185mr12623698qkn.423.1583075879093; Sun, 01 Mar 2020 07:17:59 -0800 (PST) Received: from casantos.remote.com (200.175.82.32.dynamic.adsl.gvt.net.br. [200.175.82.32]) by smtp.gmail.com with ESMTPSA id t37sm8866302qth.0.2020.03.01.07.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 07:17:58 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 1 Mar 2020 12:17:45 -0300 Message-Id: <20200301151747.25723-3-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200301151747.25723-1-unixmania@gmail.com> References: <20200301151747.25723-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH/next v2 2/4] package/openrc: bump to version 0.42.1 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=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Add a patch to prevent starting agetty on tty[1-6]. Buildroot starts a single getty, according to the system configuration. Also tty[1-6] may not even exist (e.g. embedded devices with serial consoles only). Signed-off-by: Adam Duskett Signed-off-by: Carlos Santos --- Changes v1->v2: - Fix agetty issue --- ...-add-agetty.tty-1-6-if-MKSYSVINIT-ye.patch | 34 +++++++++++++++++++ package/openrc/openrc.hash | 2 +- package/openrc/openrc.mk | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 package/openrc/0005-runlevels-do-not-add-agetty.tty-1-6-if-MKSYSVINIT-ye.patch diff --git a/package/openrc/0005-runlevels-do-not-add-agetty.tty-1-6-if-MKSYSVINIT-ye.patch b/package/openrc/0005-runlevels-do-not-add-agetty.tty-1-6-if-MKSYSVINIT-ye.patch new file mode 100644 index 0000000000..733506ada9 --- /dev/null +++ b/package/openrc/0005-runlevels-do-not-add-agetty.tty-1-6-if-MKSYSVINIT-ye.patch @@ -0,0 +1,34 @@ +From 014dc43447fa553e875984ac4a528e5916cc9e06 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sat, 29 Feb 2020 22:41:30 -0300 +Subject: [PATCH] runlevels: do not add agetty.tty[1-6] if MKSYSVINIT=yes + +Buildroot starts a single getty, according to the system configuration. +Also tty[1-6] may not exist (e.g. embedded devices with serial consoles +only). + +Signed-off-by: Carlos Santos +--- + runlevels/Makefile | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/runlevels/Makefile b/runlevels/Makefile +index 73843d8b..dbfb59ca 100644 +--- a/runlevels/Makefile ++++ b/runlevels/Makefile +@@ -90,12 +90,6 @@ install: + fi; \ + ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \ + fi +- if test "${MKSYSVINIT}" = yes && test "${OS}" = Linux; then \ +- for x in tty1 tty2 tty3 tty4 tty5 tty6; do \ +- ln -snf ${INITDIR}/agetty ${DESTDIR}/${INITDIR}/"agetty.$$x" || exit $$?; \ +- ln -snf ${INITDIR}/agetty.$$x ${DEFAULTDIR}/"agetty.$$x" || exit $$?; \ +- done; \ +- fi + + check test:: + +-- +2.18.2 + diff --git a/package/openrc/openrc.hash b/package/openrc/openrc.hash index 7d58e254c4..bb5880806d 100644 --- a/package/openrc/openrc.hash +++ b/package/openrc/openrc.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gz +sha256 91a01ca6d930a0688fb91338209985de57cac7aa2d37feddacb78fd3d95308e2 openrc-0.42.1.tar.gz sha256 96862463f4e77e2508e4fc2c83773fd24807cb699368b63fd93a5e2b466dd624 LICENSE diff --git a/package/openrc/openrc.mk b/package/openrc/openrc.mk index ce0b05e965..6057451bfe 100644 --- a/package/openrc/openrc.mk +++ b/package/openrc/openrc.mk @@ -4,7 +4,7 @@ # ################################################################################ -OPENRC_VERSION = 0.41.2 +OPENRC_VERSION = 0.42.1 OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION)) OPENRC_LICENSE = BSD-2-Clause OPENRC_LICENSE_FILES = LICENSE From patchwork Sun Mar 1 15:17:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1247330 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=bGg/idry; 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 48Vn336y9dz9sSG for ; Mon, 2 Mar 2020 02:18:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 47513864E0; Sun, 1 Mar 2020 15:18:06 +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 FsIBtzRYOrW4; Sun, 1 Mar 2020 15:18:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7EA7686096; Sun, 1 Mar 2020 15:18:05 +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 1C6691BF2E3 for ; Sun, 1 Mar 2020 15:18:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 12B4086061 for ; Sun, 1 Mar 2020 15:18:03 +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 URGNNss5ZUve for ; Sun, 1 Mar 2020 15:18:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3CBD986096 for ; Sun, 1 Mar 2020 15:18:02 +0000 (UTC) Received: by mail-qk1-f171.google.com with SMTP id u124so7667608qkh.13 for ; Sun, 01 Mar 2020 07:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0nBL1bqJV58gFgtUc2qgLKoWUTZJh3M49XFWKFMkCDg=; b=bGg/idry6KWCqQdSB+oElsSyacAWb/sIqeym4aLQdlJ/GmhDO6r9gZqy/gXOm6xhlC fjYZ25ZOPiTxjcPseVspWo392oMzHyDfEezkenZvJf2ObBKNzlKl3bMMwTkQulAH2u5I qBp17/Ob7Z6Gk6wYj8Tms/z1A9xpHUDh6QY/IH4D4lxQo1mTIlBYZFJXP2QZs/Y04fMb oyEq5FiF/KckMo2vrJQvI8D4Y0QQzR6sGrysPR8Hau+lokOQcudnEVRivG3AGCPd+e3N Zfe0eeqVcYiI71PZZ2W5SiU64wICLpwfVmBCJRCtQUKOqj2npRGOUDMOXOdfMSC5z54y xTpw== 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:in-reply-to :references; bh=0nBL1bqJV58gFgtUc2qgLKoWUTZJh3M49XFWKFMkCDg=; b=czdrHoZujxC7AmdGji1HIoGZKfI0U+PAZRbYFiczefVmiZGocIHmuD1CXH7LRiYqup 9wkZv3FAi2EAhG5htlwCqH3PQk2zQzWd46t93HVVEB/selqY4fz3cupMEWuq8mCJEOW3 hEGnluMvZ3zoZQYCsTzAXRBH3F3SQZfoptGgOC0c96RJAuov7M15WXNsP1+7GZid600G XXaRp75iqTzUlnNNyXGjiMocFwj9SPFpXfvsXNyBJcLppuYmAMk/zTa3yCmvn5wUEL3S SF2m1j3gxpdVzC3qfSqpIRywoV7syF6MVxEWczdbDnfAKuoFUsENCxFi0pioTrtlCvfw Dbkg== X-Gm-Message-State: APjAAAWCX6E3pfv7vL4MSASwzoFFJAJo3sger5OHfFpnG7k8x0rm0hnZ Y4+Oo3FWjkh0GFD5VvryzARgnipU X-Google-Smtp-Source: APXvYqzY6Y01/TdkEJHzGNj0f5CThANiefbw0cY10KUsoLBnpWUmbwgh/eIxt6ZbOoDsgAJ+sETh0g== X-Received: by 2002:a05:620a:66f:: with SMTP id a15mr12638319qkh.446.1583075881000; Sun, 01 Mar 2020 07:18:01 -0800 (PST) Received: from casantos.remote.com (200.175.82.32.dynamic.adsl.gvt.net.br. [200.175.82.32]) by smtp.gmail.com with ESMTPSA id t37sm8866302qth.0.2020.03.01.07.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 07:18:00 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 1 Mar 2020 12:17:46 -0300 Message-Id: <20200301151747.25723-4-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200301151747.25723-1-unixmania@gmail.com> References: <20200301151747.25723-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH/next v2 3/4] package/openrc: add libselinux support 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=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett If the libselinux package is selected, add the package to the dependency list and explicitly set OPENRC_MAKE_OPTS += MKSELINUX=yes Signed-off-by: Adam Duskett Signed-off-by: Carlos Santos --- 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 From patchwork Sun Mar 1 15:17:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1247331 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.137; helo=fraxinus.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=h8jvMs02; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Vn3652rsz9sSG for ; Mon, 2 Mar 2020 02:18:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2D39985A74; Sun, 1 Mar 2020 15:18:09 +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 q1vUczob7mQX; Sun, 1 Mar 2020 15:18:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9C5AE85A4B; Sun, 1 Mar 2020 15:18:06 +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 DF9121BF2E3 for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D162486096 for ; Sun, 1 Mar 2020 15:18:04 +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 LAcwFO82nBzR for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1163A86061 for ; Sun, 1 Mar 2020 15:18:04 +0000 (UTC) Received: by mail-qk1-f180.google.com with SMTP id u124so7667662qkh.13 for ; Sun, 01 Mar 2020 07:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/488Rrol306ZV/y7X3z96lUYRVTSw0q0PV5h1dxv9vk=; b=h8jvMs02H6CLUdCioUeP6xdJh1oD+469mhHGZP2qsTN6Su5OSqO0nkGI/2+PHdvgtZ 9H7FY6wbtSUbnh1tsJbn2WvG4CO/psUqLDLpaNJQN7SRav8dshu+ds2+tER6kLqMBJcU /mtxHUuu9UQtHNkn9J9twhvh3556Q9SwsCEee5VZOJF3mG4PpYmeGlSShfXu48BupCY2 cJK/IfFM0IisshdUOBFOn0NSNShbZXDSDQBmISKr1oXAaVTZu2Nur8QhNnngKNSkxdKC LhvF6/HMcIZN/7ElblsPLlOlmtR1LX9pwrvLO1jo8YOICKx7hozaTylU2z1A5T9JC+Oh FQEQ== 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:in-reply-to :references; bh=/488Rrol306ZV/y7X3z96lUYRVTSw0q0PV5h1dxv9vk=; b=gqzHp5r+8WlZnUjS+/OQsEP673D/9gOaWteqL+LTGaTinSlMfd+fv02p4Ic+/BMboz Wr0CpUqmmEe+0KTaNjtWfRKPJcb+3pF8q8K4canVFhsHrxBHBr/rQiHoGm8Wb9yeVoGX 6f6xX8yXkm/1p79Mk1H0Wfjz9mNMZew/czb+AT4ndgma3n5ENttG1AKyOU/eQE0ER4fl urz3jZgjXM19VkfhIKLnoFWqCcGwGND0XYz5p/izaPY+jqQYKo3tbHxO86P21ypbDifs nC3EOq9OelSQVenkIeyOu2xpjJKGKAiiyW3h+dN2SJYKgFtDBp+hJzSE1pMG0P8pLI+m Jc8g== X-Gm-Message-State: APjAAAWOr7T9SjIcMygDaFVTrQET4DOmkQDeZRVjksqrKCBEsbqp2t/D Ic7gkRwxaM9UYuAOK/5xKjW4YHBf X-Google-Smtp-Source: APXvYqzxz/jK6I4arBsWzzmzy4QoDps4kW7EWqKxM/rRWTGfSlNNPMnOBsP7NXIvlvHVyFUWfNOB1w== X-Received: by 2002:a37:4891:: with SMTP id v139mr12793035qka.172.1583075882864; Sun, 01 Mar 2020 07:18:02 -0800 (PST) Received: from casantos.remote.com (200.175.82.32.dynamic.adsl.gvt.net.br. [200.175.82.32]) by smtp.gmail.com with ESMTPSA id t37sm8866302qth.0.2020.03.01.07.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 07:18:02 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 1 Mar 2020 12:17:47 -0300 Message-Id: <20200301151747.25723-5-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20200301151747.25723-1-unixmania@gmail.com> References: <20200301151747.25723-1-unixmania@gmail.com> Subject: [Buildroot] [PATCH/next v2 4/4] support/testing: add openrc tests 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=?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Two simple tests to ensure that openrc boots without any services crashing with a read only and a read write filing system. Signed-off-by: Adam Duskett Signed-off-by: Carlos Santos --- .gitlab-ci.yml | 2 + support/testing/tests/init/test_openrc.py | 51 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 support/testing/tests/init/test_openrc.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4dad3173e..382a7c59b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -368,6 +368,8 @@ tests.init.test_busybox.TestInitSystemBusyboxRoNet: { extends: .runtime_test } tests.init.test_busybox.TestInitSystemBusyboxRw: { extends: .runtime_test } tests.init.test_busybox.TestInitSystemBusyboxRwNet: { extends: .runtime_test } tests.init.test_none.TestInitSystemNone: { extends: .runtime_test } +tests.init.test_openrc.TestInitSystemOpenrcRoFull: { extends: .runtime_test } +tests.init.test_openrc.TestInitSystemOpenrcRwFull: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoFull: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoIfupdown: { extends: .runtime_test } tests.init.test_systemd.TestInitSystemSystemdRoNetworkd: { extends: .runtime_test } diff --git a/support/testing/tests/init/test_openrc.py b/support/testing/tests/init/test_openrc.py new file mode 100644 index 0000000000..23669a9572 --- /dev/null +++ b/support/testing/tests/init/test_openrc.py @@ -0,0 +1,51 @@ +import infra.basetest +from tests.init.base import InitSystemBase as InitSystemBase + + +class InitSystemOpenrcBase(InitSystemBase): + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_INIT_OPENRC=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.5.7" + BR2_LINUX_KERNEL_DEFCONFIG="vexpress" + BR2_LINUX_KERNEL_DTS_SUPPORT=y + BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9" + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def check_init(self): + super(InitSystemOpenrcBase, self) + + # Test all services are OK + output, _ = self.emulator.run("rc-status -c") + self.assertEqual(len(output), 0) + + +class TestInitSystemOpenrcRoFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set + BR2_TARGET_ROOTFS_SQUASHFS=y + """ + + def test_run(self): + self.start_emulator("squashfs", "zImage", "vexpress-v2p-ca9") + self.check_init() + + +class TestInitSystemOpenrcRwFull(InitSystemOpenrcBase): + config = InitSystemOpenrcBase.config + \ + """ + BR2_SYSTEM_DHCP="eth0" + BR2_TARGET_ROOTFS_EXT2=y + """ + + def test_run(self): + self.start_emulator("ext2", "zImage", "vexpress-v2p-ca9") + self.check_init()