From owner-freebsd-hackers@freebsd.org Wed Dec 19 14:36:11 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A98691336F19 for ; Wed, 19 Dec 2018 14:36:11 +0000 (UTC) (envelope-from miwi.fbsd@gmail.com) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2A24830A5; Wed, 19 Dec 2018 14:36:10 +0000 (UTC) (envelope-from miwi.fbsd@gmail.com) Received: by mail-pl1-x62e.google.com with SMTP id y1so9541081plp.9; Wed, 19 Dec 2018 06:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:mime-version:subject:message-id:date:cc:to; bh=XHLRInXOZ5cInFtA1Dc+TYd7RBKCF41Sh7vQq9HXrdo=; b=rvO75Bi9WeskIY5uTUaJbpIRyoJMzsQgigvYAPK3mN1HARkmnVpPR2PQl1qdStRzbw rTPj+Gz9xCz2zh0g4tcC1mbGuJjt9RGRlx/4Fj9zMwoempJXIrx/v+QDim8auY4g8MR9 PLSWEPpY0muXr4jJJSdP1X6x1HB/AR8e2zOa5gkBUv/CiFL/F4zO6J+gBcY7fNJGK7HQ pI9B8yVd8apIrm+0BwFvwjMkfmk2/0XAxfZuyRthoykAPI+2P1guL1+7vQIWajnjrX67 Nz0Rm3V0M3BOsqh+iO5T89IUL3o2N++OJf+m9EnqXQQGGuswm8itpyJGQBBQJZ4jkp8d 7j5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:mime-version:subject:message-id:date :cc:to; bh=XHLRInXOZ5cInFtA1Dc+TYd7RBKCF41Sh7vQq9HXrdo=; b=m4BCjtqTOqmq8w0rRTPQY8UrAdzCi35dXkls3m1sD995Ti+TCH38Dz5eIBJUnJvD4Z hs60rNUfOOi0x589fiIG0cLH4n624j0nXMrdL1aZu7HSX/XRPFQmsZxSW/8vPjnZq4/Q X/lGtDI1CyoU064V5dQv3dG2GUNV5av/UXNL/SriT4Vf9HAMio7+j8HAh8qEsG8aLsGz lNo9xAg2kbfWDPgIFOaiDY7kr9f1EwKH0+D/BJPdS03SZ3yx3h3r8NAGNHfovsJSQ/5t o9FBdt9a4AwGiqPIrrIiZ5VZjPVPCmD90XzPNkgh5uOCipW0IRLpaVnNf6W8faB4057y STAA== X-Gm-Message-State: AA+aEWae2g3Rf9kxhmflpFOSSowcRUP7QYQXt1KN5tjixHcrAhMNFUMT y0EWCTrE2NsZaBJcB8Pba205cAbt X-Google-Smtp-Source: AFSGD/U+N8hhfkX5+JHwUSw7+6CnTLxhiMrN8Y/vFOedYu8QzjSNY7x2Dkg06s90JTd8hjJb+tvaKw== X-Received: by 2002:a17:902:8a8a:: with SMTP id p10mr20790107plo.50.1545230168859; Wed, 19 Dec 2018 06:36:08 -0800 (PST) Received: from [192.168.0.123] ([61.6.151.101]) by smtp.gmail.com with ESMTPSA id k14sm26614709pgs.52.2018.12.19.06.36.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 06:36:07 -0800 (PST) Sender: Martin Wilke From: Martin Wilke Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: OpenRC on FreeBSD Message-Id: <397FBAFF-2575-4AE4-B2BC-2DFDA769040A@FreeBSD.org> Date: Wed, 19 Dec 2018 22:36:04 +0800 Cc: Joe Maloney , ken@ixsystems.com, wblock@FreeBSD.org, kmoore@FreeBSD.org, Marcelo Araujo To: freebsd-hackers@FreeBSD.org X-Mailer: Apple Mail (2.3445.101.1) X-Rspamd-Queue-Id: A2A24830A5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rvO75Bi9; spf=pass (mx1.freebsd.org: domain of miwifbsd@gmail.com designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=miwifbsd@gmail.com X-Spamd-Result: default: False [-2.04 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MV_CASE(0.50)[]; URI_COUNT_ODD(1.00)[9]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.70)[-0.704,0]; FORGED_SENDER(0.30)[miwi@FreeBSD.org,miwifbsd@gmail.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[miwi@FreeBSD.org,miwifbsd@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.995,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[e.2.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.64)[ipnet: 2607:f8b0::/32(-1.74), asn: 15169(-1.39), country: US(-0.08)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2018 14:36:12 -0000 Hi I'd like to reopen the discussion for OpenRC on FreeBSD. Basically this = is the second attempt to get it into FreeBSD. I've opened a review here with a working patch for CURRENT, https://reviews.freebsd.org/D18578 To recap the discussion * First attempt of RFC in March of 2018: = https://lists.freebsd.org/pipermail/freebsd-hackers/2018-March/052358.html= * Working group at BSDCan: = https://wiki.freebsd.org/DevSummit/201806/OpenRC Here some key points: OpenRC provides additional features for service management without = requiring kernel changes or replacing pid 1, unlike launchd and other = solutions. All rc.d scripts have been converted with a few changes, = typically changing the shebang and making sure the start function is = named start(). Most service scripts are simplified, usually needing only = name, command, and, if required, depends statements. History: OpenRC started out as an init system by Roy Marples, developed for the = Gentoo Alt (FreeBSD) kernel branch. It was more widely adopted into = Gentoo as baselayout v2, and was then split off as a separate = BSD-licensed project. It is under active development, portable, and = remains BSD licensed today. OpenRC and RC: Both can coexist and be chosen with a setting in /boot/loader.conf. OpenRC Features: Service supervision and service monitoring: any service can be = supervised. Supervised services that crash are automatically restarted. = The rc-status command shows how many times a service has restarted. Device hotplug support and event-driven service management: the hotplug = feature allows devd to take actions when devices are connected. For = example, a USB wifi adapter can create additional network services when = attached. The net-online service can, for example, detect when a network = connection is restored, and restart ntp. Network profiles: using stacked runlevels, different profiles can be = established for different networking settings. For instance, different = profiles can be used for wired or wireless networking, or for differing = wireless networks, as well as dependency caching and parallel startup = speed up booting. Interactive mode: The boot process can be run interactively for more effective debugging. OpenRC uses the term =E2=80=9Crunlevels=E2=80=9D to refer to the context = in which a script is running. There are only three at present: sysinit (the OpenRC system is starting), boot (start base services when = the computer is booting), and default (normal execution). OpenRC, by default, provides a =E2=80=9Ccolorized=E2=80=9D text boot, = using ANSI color sequences. This can be disabled. Ports: As of July 2017, iXsystems has created OpenRC versions of port service = scripts for the entire ports tree. These scripts coexist with the rc.d = versions. License: OpenRC is a BSD licensed RC init system written in C. =46rom a user = perspective, it is very similar to the FreeBSD rc.d init system, making = it easy to use and learn. Tested: OpenRC has been used as the init system for TrueOS since October = 2016. Ken Moore has an OpenRC vs RC.d comparison which can be found here: http://www.wonkity.com/~wblock/openrc/OpenRC_rc.d.pdf = I look forward to discuss the features and capabilities of OpenRC. Regards, Martin