From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3DD501396D0 for ; Sat, 16 Sep 2017 20:09:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42B55E0D5E; Sat, 16 Sep 2017 20:09:44 +0000 (UTC) Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E9832E0D35 for ; Sat, 16 Sep 2017 20:09:43 +0000 (UTC) Received: by mail-oi0-x241.google.com with SMTP id h9so1371446oia.4 for ; Sat, 16 Sep 2017 13:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=Y7n8NUvYpu49SPrF2NAcjr7EzlLjMdUzPsgfkT0TVh4=; b=jLhZ8ZZoE1X1aIiACW1Gs+XJoBQeelo4MxsXr4nGJyhQTGinFBoOGsA78fatJkq38F UOBQ3sY4KdB+R8I6j6XsUD6TAVDa8fbUGiToDW3ccNsBNza4YiXyv9ClmBgfZP8K5iOz Vziwy7RKZZUSIMWK55SssNX3WcsrLjN++keReHIYBSFbm5gYpW5cK6ZOsKfJIY3E7BYf YfVPLfbMj8HeRNDVsKRnBQ5Gh7vvSgDDZGeG1JCnvOSo0zqV1lnKzpYK1DWqWSc8wkXj YCWQ4cqfSauU42X5zYy+zTch3R99Qfe2GDSWALlSF0mRJypKIAw2W1JE8VGvBEcIHUct N4ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=Y7n8NUvYpu49SPrF2NAcjr7EzlLjMdUzPsgfkT0TVh4=; b=ByzsSKmYSOk3JrfUOu8wts+L3RCTmsDcmfHYcmyopjtqiIQbhLtqt7pLQa8AkMrC9s Zl2n7wvitpCmgRtoPxhaAhY1BzzxDT1YXuoMkb76QmJiOvpuaBgT5s7bUA/P/+B3SDkK vhQD8asld14Z0AseZEI0ORX9VEZqqEJCSxmHP8YFTkFhsMgBt45pDo4AqC75M7eYKuUI 5OrGVQ+jisxjbKOy6UiKI25dLRcqGBeAor0OgJWQU1PuvV7JBJygBjQ/PrvIeA5s8Xyu 6wpOuvQugLmM23p38Ni0TZDntATjxVpB0saTtJEluF80AIG0Fn9BGevp6rv7LY3/4/Fp vibQ== X-Gm-Message-State: AHPjjUiau09aqFA/MYU989xNmfGqGK12xnjBNMFj3caipXWUBhRbbNXS 6BQrqmGxpR1pWQE+RJZHKsUgvrhLMgzZRmRBsogWVg== X-Google-Smtp-Source: AOwi7QCVDddSCsTIw51sUBBI8RnVarQb9umhx6kVFrtKDIpT0e7iXGQ6i7GP+iUZAxxr+ujC3186HoHi6/eDGd0zaVU= X-Received: by 10.202.102.3 with SMTP id a3mr606999oic.309.1505592582726; Sat, 16 Sep 2017 13:09:42 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Sender: freemanrich@gmail.com Received: by 10.157.64.1 with HTTP; Sat, 16 Sep 2017 13:09:42 -0700 (PDT) In-Reply-To: <3005176.dSsCWkhPpk@note> References: <3005176.dSsCWkhPpk@note> From: Rich Freeman Date: Sat, 16 Sep 2017 16:09:42 -0400 X-Google-Sender-Auth: 3TOXAURBq-haQdXR-FKT5HrwTLQ Message-ID: Subject: Re: [gentoo-dev] [openrc] [systemd] make `service` common for both OpenRC and SystemD (like Debian/Ubuntu/whatever did) To: gentoo-dev Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 4451db93-1779-4d1d-879d-fad32fa12e01 X-Archives-Hash: ece348eaa115e81618660e7938679100 On Sat, Sep 16, 2017 at 3:56 PM, Vadim A. Misbakh-Soloviov wrote: > > I'd like to suggest to remove `service` widget from openrc and make it the > part of (which package? baselayout?)? IMO this really should go in its own package. By all means have openrc and/or systemd pull it in by default, but this gives everybody a bit more control. This was the approach with functions.sh as well. > > P.S. actually, it also would be nice to add "generators" thing to it too, to > make it possible to manage services that have no systemd's units under SystemD > and services that have only units under OpenRC (well, that one looks much > harder than first variant, but, again, looks like deb/ubuntu guys did that > work already and we can try to use their work as cheatsheet) > We don't really have the same situation that they do. IMO this is best done by having some kind of wrapper that needs to be manually invoked. I think most people would want to know the first time they go to start a service that wasn't really tested under their particular configuration. The service might not work the way they expect, so they'd want to pay closer attention to it, for a start. Wrapping systemd units into openrc scripts should be relatively easy, because they're descriptive. You just need a parser of some kind. The only issue I see is any code that has to run in global context - I'm not sure how well openrc behaves when dependency parsing starts running code. Going in the other direction will be harder, but probably is possible. Honestly, though, it isn't like it is that hard to write a unit or script, so I think most people are going to prefer to hand-write them. One of the really nice things about Gentoo is that whether you use openrc or systemd you get a completely native experience without a ton of duct-tape adapting one system into a completely different one, full of caveats and stuff that doesn't behave like you'd expect. IMO the only other distro that delivers a similar experience with systemd is Arch, and they don't support openrc really. But, nobody is going to complain if you create a tool that creates init.d scripts or units automatically for you. People can use it as they wish, and it might or might not make a good starting point for a new script/unit. -- Rich