From owner-freebsd-hackers@freebsd.org Wed Dec 19 14:57:30 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 250681337C0B for ; Wed, 19 Dec 2018 14:57:30 +0000 (UTC) (envelope-from miwi.fbsd@gmail.com) Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 0242D83F0D; Wed, 19 Dec 2018 14:57:29 +0000 (UTC) (envelope-from miwi.fbsd@gmail.com) Received: by mail-pf1-x429.google.com with SMTP id c123so9954662pfb.0; Wed, 19 Dec 2018 06:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=xlUyFZEIAnuy3D7EMD3szzOCL7TKZPoPGZCSDMlKNYM=; b=jZi8AAfblBJKTV+1TYs+ururhnl6kksE1XeTMAmmnotcCcQ2LleZmOCl77D2HCquE7 fzd6Wr7SB0Qd/8SvtTWL4CZy0boeejzEkOy8DaYVAGdSP9ni5a958RGaudxu/bw37Fhk 61Hu2IHj4oZ/SgaGkMkpF6gu22O1cCDqe/BzCzJMeE0ZgF0bXcH+XKfbAW4524LmC7H+ +bCRLAHvq0K2Un+6X+d5cVIfQzbwP4aG8UZ8NSRCCNCG571PDyjH0mY9193IVpkF52JR sOZ3pnTy/pvgNi2X/frFInTxYq5vt79Av9rmJKW/qvRvlHvkekCUqCWUCtE7P2YnLXT/ lWvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=xlUyFZEIAnuy3D7EMD3szzOCL7TKZPoPGZCSDMlKNYM=; b=SalKw9bBioge+tyeCmQ/Y59SauJbRZ3CRTo0n/AUsbfyVrkCIV9cOTMf0dRef1SUet Enxc4+Q+x4BCbw4ra8iEzL7PELkFD0inNdb+bfjzKl/nOI8+mj0x2tu5fAahS6R8Bu1a T2WWrj4zhGJFDoq+FmB6yNnP38pD5+WVcBOcNtrRGGxqQbXWzeicWekpMIH10+6owRri JtA/0UwgobzGrzOLyWfFjZ/ZL4mqaEjWB+4qaTxennfvLuq1ZqAP50bNyU7Thftnxabl lvZ/BXHmRi+UyZ6C2eoX1mK+00hnnUAflrvSV8uZWrBQicFl8DPBAValnY2rg4zCsoEJ nAxw== X-Gm-Message-State: AA+aEWYQzeR90bjcyYLEY/+XUuiOoLJRrZe0OrX7n7J2ZTdBtB+KMCL4 0YtIU3jckrMkuC2Bz4SbPls= X-Google-Smtp-Source: AFSGD/WyJPPCxcjfzjL340bOoJx5IIzZSdb8R/5AgoM/WgwO0QB4H7IZDojFQPpHUAv3maK05oByvA== X-Received: by 2002:a63:1a4b:: with SMTP id a11mr19695688pgm.254.1545231447828; Wed, 19 Dec 2018 06:57:27 -0800 (PST) Received: from [192.168.0.123] ([61.6.151.101]) by smtp.gmail.com with ESMTPSA id 125sm22958102pfg.39.2018.12.19.06.57.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 06:57:26 -0800 (PST) Sender: Martin Wilke From: Martin Wilke Message-Id: <7BBA9943-7CA1-4349-9B48-1641BA11FCA3@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: OpenRC on FreeBSD Date: Wed, 19 Dec 2018 22:57:23 +0800 In-Reply-To: Cc: "freebsd-hackers@freebsd.org" , Joe Maloney , Marcelo Araujo , ken@ixsystems.com, Kris Moore , Warren Block To: Warner Losh References: <397FBAFF-2575-4AE4-B2BC-2DFDA769040A@FreeBSD.org> X-Mailer: Apple Mail (2.3445.101.1) X-Rspamd-Queue-Id: 0242D83F0D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=jZi8AAfb; spf=pass (mx1.freebsd.org: domain of miwifbsd@gmail.com designates 2607:f8b0:4864:20::429 as permitted sender) smtp.mailfrom=miwifbsd@gmail.com X-Spamd-Result: default: False [-1.55 / 15.00]; TO_DN_EQ_ADDR_SOME(0.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)[15]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_SHORT(-0.20)[-0.204,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(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,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)[9.2.4.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:57:30 -0000 Hi, The missing bit was actually the flag for switching the rc=E2=80=99s = which have been resolved.=20 - Martin > On 19 Dec 2018, at 10:51 PM, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Dec 19, 2018 at 7:39 AM Martin Wilke > wrote: > Hi >=20 > I'd like to reopen the discussion for OpenRC on FreeBSD. Basically = this is the second attempt to get it into FreeBSD. >=20 > I've opened a review here with a working patch for CURRENT, > https://reviews.freebsd.org/D18578 = >=20 >=20 > 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 = >=20 > Here some key points: >=20 > 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. >=20 > 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. >=20 > OpenRC and RC: > Both can coexist and be chosen with a setting in /boot/loader.conf. >=20 > OpenRC Features: >=20 > 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. >=20 > 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. >=20 > 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. >=20 > Interactive mode: > The boot process can be run interactively for more effective = debugging. >=20 > 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). >=20 > OpenRC, by default, provides a =E2=80=9Ccolorized=E2=80=9D text boot, = using ANSI color sequences. This can be disabled. >=20 > 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. >=20 > 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. >=20 > Tested: OpenRC has been used as the init system for TrueOS since = October 2016. >=20 > 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. >=20 > This is cool technology. >=20 > However, what was missing last time was a written plan that could be = critiqued for fit with the project's needs. The result of the working = group was that this was to be produced, and we'd iterate through it to = ease the landing of openrc in the tree. I think there's wide agreement = this is cool, and that we'd like tot have both it and rc.d in the tree = for a transition period. Absent a plan, though, it's not really possible = to say 'go do it' or 'that's insane'. >=20 > So maybe start there? >=20 > Warner