public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Cedric Hombourger <Cedric_Hombourger@mentor.com>,
	"Kiszka, Jan" <jan.kiszka@siemens.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
Date: Wed, 11 Mar 2020 09:50:50 +0100	[thread overview]
Message-ID: <20200311095050.4a3bdd64@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20200311093443.541c8c61@md1za8fc.ad001.siemens.net>

On Wed, 11 Mar 2020 09:34:43 +0100
"[ext] Henning Schild" <henning.schild@siemens.com> wrote:

> One fun fact on the version bump here. All our "on first boot" recipes
> use a trick where the postinst enables them, and their run disables
> them again.
> 
> That pattern is broken in the face of package updates, where the
> service will be enabled again and we do a second round. Meaning all
> packages using that pattern need code that can be run multiple times.
> 
> In fact the pattern should probably be improved, where the "enable" in
> postinst becomes conditional if the packages was installed before and
> the service is already disabled.
> 
> Taking Jan in as well, since he established that pattern.

Did some digging, i think the solution will/should involve
deb-systemd-helper

Henning

> Henning
> 
> On Tue, 10 Mar 2020 17:04:32 +0100
> Cedric Hombourger <Cedric_Hombourger@mentor.com> wrote:
> 
> > The name of the SSH daemon service is ssh.service, not sshd.service
> > This fixes some (sporadic) failures to generate host-specific ssh
> > keys on first boot.
> > 
> > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > ---
> >  .../sshd-regen-keys/files/sshd-regen-keys.service               | 2
> > +- .../{sshd-regen-keys_0.2.bb => sshd-regen-keys_0.3.bb}
> > | 0 2 files changed, 1 insertion(+), 1 deletion(-)
> >  rename
> > meta/recipes-support/sshd-regen-keys/{sshd-regen-keys_0.2.bb =>
> > sshd-regen-keys_0.3.bb} (100%)  
> > 
> > diff --git
> > a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > index a05e1a9..f50d34c 100644 ---
> > a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > +++
> > b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > @@ -3,7 +3,7 @@ Description=Regenerate sshd host keys
> > DefaultDependencies=no Conflicts=shutdown.target
> > After=systemd-remount-fs.service -Before=shutdown.target
> > sshd.service +Before=shutdown.target ssh.service
> > ConditionPathIsReadWrite=/etc 
> >  [Service]
> > diff --git
> > a/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.2.bb
> > b/meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.3.bb
> > similarity index 100% rename from
> > meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.2.bb rename
> > to meta/recipes-support/sshd-regen-keys/sshd-regen-keys_0.3.bb  
> 


  reply	other threads:[~2020-03-11  8:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 16:04 [PATCH 0/3] minor fixes Cedric Hombourger
2020-03-10 16:04 ` [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service Cedric Hombourger
2020-03-11  8:34   ` Henning Schild
2020-03-11  8:50     ` Henning Schild [this message]
2020-03-11  9:32     ` Jan Kiszka
2020-03-11 10:04       ` Henning Schild
2020-03-12 13:50   ` Gylstorff Quirin
2020-03-16 12:39     ` Henning Schild
2020-03-16 12:55       ` [PATCH v2 0/3] minor fixes Cedric Hombourger
2020-03-16 12:55         ` [[PATCH v2] 1/3] sshd-regen-keys: depend on ssh.service instead of sshd.service Cedric Hombourger
2020-03-16 12:55         ` [[PATCH v2] 2/3] linux-custom: support use of an arbitrary in-tree defconfig Cedric Hombourger
2020-03-16 12:55         ` [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install Cedric Hombourger
2020-04-10 12:11           ` Baurzhan Ismagulov
2020-04-14  6:02             ` Jan Kiszka
2020-04-17 15:30               ` Baurzhan Ismagulov
2020-04-17 15:46                 ` Jan Kiszka
2020-07-28 16:27         ` [PATCH v2 0/3] minor fixes Baurzhan Ismagulov
2020-07-28 20:46           ` Henning Schild
2020-07-30 16:08             ` Baurzhan Ismagulov
2020-03-10 16:04 ` [PATCH 2/3] linux-custom: support use of an arbitrary in-tree defconfig Cedric Hombourger
2020-03-10 16:04 ` [PATCH 3/3] dpkg-raw: make sure templates are processed before do_install Cedric Hombourger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200311095050.4a3bdd64@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=Cedric_Hombourger@mentor.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox