From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 247FF1381F3 for ; Sun, 26 May 2013 11:12:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D68BE0C84; Sun, 26 May 2013 11:12:52 +0000 (UTC) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9C5FCE0C3D for ; Sun, 26 May 2013 11:12:51 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id jz10so4405520veb.21 for ; Sun, 26 May 2013 04:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=I2Bdp3hG2zO10wmU5i9kDw/1oG2/gv4kZSNpg4mbVfY=; b=s18ZvlYRk9MclSn8kTGHdnS9ZNzaCDU1Q0+6gbnyBYjw7RP/bqFVQ+u5YfjWjnhlz7 noJyFQBkyMagGsRgl5KllQ+iNFtH96Up5/AtaikmUAWa4TN6ni0Q/DYbwK5c3YDJUZU2 JakIviDez0XjQ5KvaWTyTJbvUnc+pFQp339HsqVICtTirxQOl8EqsZm542T5alF9nFr2 7Vjaf4gMPXQ/0ajQqRQ9ZXAhuOigIFoOnSXPXV+pVuOteeyD+dceDCk1FkmGR3/8tkHl FTGT9rHVoentaBmRwXc8hUhO0kue1CksY/VH+fBEZilt0+HMEhdHKmo+76i7kbyACMJh LEiw== 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 X-Received: by 10.52.164.236 with SMTP id yt12mr10949277vdb.128.1369566770697; Sun, 26 May 2013 04:12:50 -0700 (PDT) Sender: freemanrich@gmail.com Received: by 10.52.168.233 with HTTP; Sun, 26 May 2013 04:12:50 -0700 (PDT) In-Reply-To: <20130526123125.2d0f7836@gentoo.org> References: <20130526093755.42b62259@gentoo.org> <20130526121249.49e00ce7@gmail.com> <20130526123125.2d0f7836@gentoo.org> Date: Sun, 26 May 2013 07:12:50 -0400 X-Google-Sender-Auth: D_opzEvow6kqkucDAsDc5IZ1YL0 Message-ID: Subject: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd (was: Going against co-maintainer's wishes (ref. bug 412697)) From: Rich Freeman To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-dev , robert.david.public@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 96806a9a-795c-4ae2-a4f8-91496c50ed98 X-Archives-Hash: 5f2143c50b119f5ffb4148b509d7e3fa On Sun, May 26, 2013 at 6:31 AM, Micha=C5=82 G=C3=B3rny = wrote: > On Sun, 26 May 2013 12:12:49 +0200 > Robert David wrote: > >> On Sun, 26 May 2013 05:49:48 -0400 >> Rich Freeman wrote: >> >> > Init.d scripts are just shell scripts. All somebody needs to do is >> > write a shell script that parses a unit file and does what it says, >> > and exports an openrc-oriented init.d environment. That can be >> > packaged separately, or whatever, and maybe an eclass could make it >> > easy to install (point it at the upstream/filesdir unit and tell it >> > what to call the init.d script, and you get the appropriate >> > symlink/script). >> > >> >> I would rather add shell script to parse unit and generate appropriate >> init script while building than have initscript wrapper that will call >> and parse on execution. As you said, some eclass. > > This effectively duplicates data for no real benefit. > > 2) if user modifies init.d script, systemd unit is out-of-sync. > And the init.d is rewritten (potentially with CONFIG_PROTECT) on next > upgrade. > > 3) if user modifies systemd unit, init.d script is out-of-sync. > To clarify, I was agreeing with the use of a wrapper script - likely symlinked. It would not be compiled/generated at install time, beyond creating the symlink and maybe a conf.d file that pointed to the unit. The eclass would just streamline the installation. As you point out that keeps the configs always in-sync. It also means that if the wrapper script is upgraded to add new features all packages benefit, without needing a re-install. Rich