public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/3] minor fixes
@ 2020-03-10 16:04 Cedric Hombourger
  2020-03-10 16:04 ` [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service Cedric Hombourger
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-10 16:04 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Three minor fixes for your review. The sshd-regen-keys patch is the same change I suggested
to Henning yesterday in a private conversation. I am including it here because my ci_build
completed just now and I am not sure Henning had a chance to do that given the time lapsed
between my suggestion and his submission to the list. Let me know if you are taking Henning's
patch instead (same change) and I will remove it from here (I am really including it here
because the ci_build run was done with all three patches).

The change to linux-custom allows use of named defconfigs living in the kernel tree. I realized
this was not correctly handled while building a kernel for MPSOC (xilinx_zynqmp_defconfig)

Lastly, the dpkg-raw class was modified so it may be used together with the very convenient
templating class.

Cedric Hombourger (3):
  sshd-regen-keys: correct dependency on ssh daemon service
  linux-custom: support use of an arbitrary in-tree defconfig
  dpkg-raw: make sure templates are processed before do_install

 meta/classes/dpkg-raw.bbclass                                 | 4 ++++
 meta/recipes-kernel/linux/linux-custom.inc                    | 2 ++
 .../sshd-regen-keys/files/sshd-regen-keys.service             | 2 +-
 .../{sshd-regen-keys_0.2.bb => sshd-regen-keys_0.3.bb}        | 0
 4 files changed, 7 insertions(+), 1 deletion(-)
 rename meta/recipes-support/sshd-regen-keys/{sshd-regen-keys_0.2.bb => sshd-regen-keys_0.3.bb} (100%)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  2020-03-10 16:04 [PATCH 0/3] minor fixes Cedric Hombourger
@ 2020-03-10 16:04 ` Cedric Hombourger
  2020-03-11  8:34   ` Henning Schild
  2020-03-12 13:50   ` Gylstorff Quirin
  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
  2 siblings, 2 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-10 16:04 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

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
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 2/3] linux-custom: support use of an arbitrary in-tree defconfig
  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-10 16:04 ` Cedric Hombourger
  2020-03-10 16:04 ` [PATCH 3/3] dpkg-raw: make sure templates are processed before do_install Cedric Hombourger
  2 siblings, 0 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-10 16:04 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Try the specified KERNEL_DEFCONFIG as an in-tree defconfig if it cannot
be found in WORKDIR.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/recipes-kernel/linux/linux-custom.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 753becf..ecf15d3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -146,6 +146,8 @@ dpkg_configure_kernel() {
 		if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; then
 			cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/${KERNEL_BUILD_DIR}/.config
 			config_target="olddefconfig"
+		else
+			config_target="defconfig KBUILD_DEFCONFIG=${KERNEL_DEFCONFIG}"
 		fi
 	else
 		config_target="defconfig"
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 3/3] dpkg-raw: make sure templates are processed before do_install
  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-10 16:04 ` [PATCH 2/3] linux-custom: support use of an arbitrary in-tree defconfig Cedric Hombourger
@ 2020-03-10 16:04 ` Cedric Hombourger
  2 siblings, 0 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-10 16:04 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/classes/dpkg-raw.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index 8c01a46..7489b5d 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -24,3 +24,7 @@ do_prepare_build() {
 
 	deb_debianize
 }
+
+# make sure templates are processed before do_install
+inherit template
+addtask do_transform_template after do_unpack before do_install
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  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
  2020-03-11  9:32     ` Jan Kiszka
  2020-03-12 13:50   ` Gylstorff Quirin
  1 sibling, 2 replies; 21+ messages in thread
From: Henning Schild @ 2020-03-11  8:34 UTC (permalink / raw)
  To: Cedric Hombourger, Kiszka, Jan; +Cc: isar-users

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.

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  2020-03-11  8:34   ` Henning Schild
@ 2020-03-11  8:50     ` Henning Schild
  2020-03-11  9:32     ` Jan Kiszka
  1 sibling, 0 replies; 21+ messages in thread
From: Henning Schild @ 2020-03-11  8:50 UTC (permalink / raw)
  To: Cedric Hombourger, Kiszka, Jan; +Cc: isar-users

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  
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  2020-03-11  8:34   ` Henning Schild
  2020-03-11  8:50     ` Henning Schild
@ 2020-03-11  9:32     ` Jan Kiszka
  2020-03-11 10:04       ` Henning Schild
  1 sibling, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2020-03-11  9:32 UTC (permalink / raw)
  To: Henning Schild, Cedric Hombourger; +Cc: isar-users

On 11.03.20 09:34, Henning Schild 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.

Yeah, but without considering a package update case at all. I suppose 
some other post-inst scripts we have, e.g. in customization packages, 
are not really upgrade-friendly. Simply wasn't a priority so far, but we 
can always do better of course.

Jan

> 
> 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
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  2020-03-11  9:32     ` Jan Kiszka
@ 2020-03-11 10:04       ` Henning Schild
  0 siblings, 0 replies; 21+ messages in thread
From: Henning Schild @ 2020-03-11 10:04 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Cedric Hombourger, isar-users

On Wed, 11 Mar 2020 10:32:40 +0100
Jan Kiszka <jan.kiszka@siemens.com> wrote:

> On 11.03.20 09:34, Henning Schild 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.  
> 
> Yeah, but without considering a package update case at all. I suppose 
> some other post-inst scripts we have, e.g. in customization packages, 
> are not really upgrade-friendly. Simply wasn't a priority so far, but
> we can always do better of course.

I know the history and a lot of people will not do package updates. At
the same time i suggest to keep that issue in mind and provide a clean
solution for the Isar core.

Henning

> Jan
> 
> > 
> > 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  
> >   
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  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-12 13:50   ` Gylstorff Quirin
  2020-03-16 12:39     ` Henning Schild
  1 sibling, 1 reply; 21+ messages in thread
From: Gylstorff Quirin @ 2020-03-12 13:50 UTC (permalink / raw)
  To: Cedric Hombourger, isar-users, SCHILD HENNING Z003BPMR



On 3/10/20 5:04 PM, Cedric Hombourger 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


This should not be necessary as Debian generates a link from 
/etc/systemd/system/sshd.service to /lib/systemd/system/ssh.service. 
Therefore both sshd.service and ssh.service are equivalent.

Also I have a freeze during sshd-regen-keys but the patch has no impact 
on it.

Quirin
>   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
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH 1/3] sshd-regen-keys: correct dependency on ssh daemon service
  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
  0 siblings, 1 reply; 21+ messages in thread
From: Henning Schild @ 2020-03-16 12:39 UTC (permalink / raw)
  To: Gylstorff Quirin; +Cc: Cedric Hombourger, isar-users

I would still like to keep the rename to not rely on the symlink.
Cedric can you send it again with a fresh commit message?

Henning

On Thu, 12 Mar 2020 14:50:43 +0100
Gylstorff Quirin <quirin.gylstorff@siemens.com> wrote:

> On 3/10/20 5:04 PM, Cedric Hombourger 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  
> 
> 
> This should not be necessary as Debian generates a link from 
> /etc/systemd/system/sshd.service to /lib/systemd/system/ssh.service. 
> Therefore both sshd.service and ssh.service are equivalent.
> 
> Also I have a freeze during sshd-regen-keys but the patch has no
> impact on it.
> 
> Quirin
> >   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 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH v2 0/3] minor fixes
  2020-03-16 12:39     ` Henning Schild
@ 2020-03-16 12:55       ` Cedric Hombourger
  2020-03-16 12:55         ` [[PATCH v2] 1/3] sshd-regen-keys: depend on ssh.service instead of sshd.service Cedric Hombourger
                           ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-16 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Three minor fixes for your review.

Have the sshd-regen-keys services depend on ssh.service instead of sshd.service (so we
rely on its official name, not its alias)

The change to linux-custom allows use of named defconfigs living in the kernel tree. I realized
this was not correctly handled while building a kernel for MPSOC (xilinx_zynqmp_defconfig)

Lastly, the dpkg-raw class was modified so it may be used together with the very convenient
templating class.

Changes in v2:
  sshd-regen-keys: amend commit message as suggested by Henning

Cedric Hombourger (3):
  sshd-regen-keys: sshd-regen-keys: depend on ssh.service instead of sshd.service
  linux-custom: support use of an arbitrary in-tree defconfig
  dpkg-raw: make sure templates are processed before do_install

-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [[PATCH v2] 1/3] sshd-regen-keys: depend on ssh.service instead of sshd.service
  2020-03-16 12:55       ` [PATCH v2 0/3] minor fixes Cedric Hombourger
@ 2020-03-16 12:55         ` Cedric Hombourger
  2020-03-16 12:55         ` [[PATCH v2] 2/3] linux-custom: support use of an arbitrary in-tree defconfig Cedric Hombourger
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-16 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

While we can depend on sshd.service because it is *currently* declared
as an alias to ssh.service, rely/depend on its official name instead
(i.e. ssh.service) to avoid any surprises later on.

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
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [[PATCH v2] 2/3] linux-custom: support use of an arbitrary in-tree defconfig
  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         ` Cedric Hombourger
  2020-03-16 12:55         ` [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install Cedric Hombourger
  2020-07-28 16:27         ` [PATCH v2 0/3] minor fixes Baurzhan Ismagulov
  3 siblings, 0 replies; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-16 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Try the specified KERNEL_DEFCONFIG as an in-tree defconfig if it cannot
be found in WORKDIR.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/recipes-kernel/linux/linux-custom.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 753becf..ecf15d3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -146,6 +146,8 @@ dpkg_configure_kernel() {
 		if [ -e "${WORKDIR}/${KERNEL_DEFCONFIG}" ]; then
 			cp ${WORKDIR}/${KERNEL_DEFCONFIG} ${S}/${KERNEL_BUILD_DIR}/.config
 			config_target="olddefconfig"
+		else
+			config_target="defconfig KBUILD_DEFCONFIG=${KERNEL_DEFCONFIG}"
 		fi
 	else
 		config_target="defconfig"
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install
  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         ` Cedric Hombourger
  2020-04-10 12:11           ` Baurzhan Ismagulov
  2020-07-28 16:27         ` [PATCH v2 0/3] minor fixes Baurzhan Ismagulov
  3 siblings, 1 reply; 21+ messages in thread
From: Cedric Hombourger @ 2020-03-16 12:55 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/classes/dpkg-raw.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass
index 8c01a46..7489b5d 100644
--- a/meta/classes/dpkg-raw.bbclass
+++ b/meta/classes/dpkg-raw.bbclass
@@ -24,3 +24,7 @@ do_prepare_build() {
 
 	deb_debianize
 }
+
+# make sure templates are processed before do_install
+inherit template
+addtask do_transform_template after do_unpack before do_install
-- 
2.20.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install
  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
  0 siblings, 1 reply; 21+ messages in thread
From: Baurzhan Ismagulov @ 2020-04-10 12:11 UTC (permalink / raw)
  To: isar-users

Hello Cedric,

On Mon, Mar 16, 2020 at 01:55:52PM +0100, Cedric Hombourger wrote:
> --- a/meta/classes/dpkg-raw.bbclass
> +++ b/meta/classes/dpkg-raw.bbclass
> @@ -24,3 +24,7 @@ do_prepare_build() {
>  
>  	deb_debianize
>  }
> +
> +# make sure templates are processed before do_install
> +inherit template
> +addtask do_transform_template after do_unpack before do_install

How does this relate to "addtask do_transform_template after do_unpack" in
meta/classes/template.bbclass? Is one of them superfluous? If yes, would
modifying template.bbclass be better?

P1 and p2 look fine. I could apply them if it's ok for you.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install
  2020-04-10 12:11           ` Baurzhan Ismagulov
@ 2020-04-14  6:02             ` Jan Kiszka
  2020-04-17 15:30               ` Baurzhan Ismagulov
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Kiszka @ 2020-04-14  6:02 UTC (permalink / raw)
  To: isar-users

On 10.04.20 14:11, Baurzhan Ismagulov wrote:
> Hello Cedric,
> 
> On Mon, Mar 16, 2020 at 01:55:52PM +0100, Cedric Hombourger wrote:
>> --- a/meta/classes/dpkg-raw.bbclass
>> +++ b/meta/classes/dpkg-raw.bbclass
>> @@ -24,3 +24,7 @@ do_prepare_build() {
>>   
>>   	deb_debianize
>>   }
>> +
>> +# make sure templates are processed before do_install
>> +inherit template
>> +addtask do_transform_template after do_unpack before do_install
> 
> How does this relate to "addtask do_transform_template after do_unpack" in
> meta/classes/template.bbclass? Is one of them superfluous? If yes, would
> modifying template.bbclass be better?

do_install is dpkg-raw only, so you can't do that in template.bbclass. 
But I would rather model this via the addtask of install which is under 
this class' control already.

Also, that inherit is redundant because it's already part of the base 
class, thus every other class.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install
  2020-04-14  6:02             ` Jan Kiszka
@ 2020-04-17 15:30               ` Baurzhan Ismagulov
  2020-04-17 15:46                 ` Jan Kiszka
  0 siblings, 1 reply; 21+ messages in thread
From: Baurzhan Ismagulov @ 2020-04-17 15:30 UTC (permalink / raw)
  To: isar-users

Hello Jan,

On Tue, Apr 14, 2020 at 08:02:56AM +0200, Jan Kiszka wrote:
> > > --- a/meta/classes/dpkg-raw.bbclass
...
> > > +inherit template
> > > +addtask do_transform_template after do_unpack before do_install
> > 
> > How does this relate to "addtask do_transform_template after do_unpack" in
> > meta/classes/template.bbclass? Is one of them superfluous? If yes, would
> > modifying template.bbclass be better?
> 
> do_install is dpkg-raw only, so you can't do that in template.bbclass.

Indeed.


> But I
> would rather model this via the addtask of install which is under this
> class' control already.
> 
> Also, that inherit is redundant because it's already part of the base class,
> thus every other class.

Do I understand correctly, you suggest:

1. Keep both addtasks in template.bbclass and dpkg-raw.bbclass.

2. Remove "inherit template".

Right?


With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install
  2020-04-17 15:30               ` Baurzhan Ismagulov
@ 2020-04-17 15:46                 ` Jan Kiszka
  0 siblings, 0 replies; 21+ messages in thread
From: Jan Kiszka @ 2020-04-17 15:46 UTC (permalink / raw)
  To: isar-users

On 17.04.20 17:30, Baurzhan Ismagulov wrote:
> Hello Jan,
> 
> On Tue, Apr 14, 2020 at 08:02:56AM +0200, Jan Kiszka wrote:
>>>> --- a/meta/classes/dpkg-raw.bbclass
> ...
>>>> +inherit template
>>>> +addtask do_transform_template after do_unpack before do_install
>>>
>>> How does this relate to "addtask do_transform_template after do_unpack" in
>>> meta/classes/template.bbclass? Is one of them superfluous? If yes, would
>>> modifying template.bbclass be better?
>>
>> do_install is dpkg-raw only, so you can't do that in template.bbclass.
> 
> Indeed.
> 
> 
>> But I
>> would rather model this via the addtask of install which is under this
>> class' control already.
>>
>> Also, that inherit is redundant because it's already part of the base class,
>> thus every other class.
> 
> Do I understand correctly, you suggest:
> 
> 1. Keep both addtasks in template.bbclass and dpkg-raw.bbclass.
> 

No. Change the addtask statement for do_install in dpkg-raw to express 
its new dependency on template, drop the addtask of 
do_transform_template there. And obviously do not touch template.bbclass.

> 2. Remove "inherit template".

...from dpgk-raw, yes.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 0/3] minor fixes
  2020-03-16 12:55       ` [PATCH v2 0/3] minor fixes Cedric Hombourger
                           ` (2 preceding siblings ...)
  2020-03-16 12:55         ` [[PATCH v2] 3/3] dpkg-raw: make sure templates are processed before do_install Cedric Hombourger
@ 2020-07-28 16:27         ` Baurzhan Ismagulov
  2020-07-28 20:46           ` Henning Schild
  3 siblings, 1 reply; 21+ messages in thread
From: Baurzhan Ismagulov @ 2020-07-28 16:27 UTC (permalink / raw)
  To: isar-users

On Mon, Mar 16, 2020 at 01:55:49PM +0100, Cedric Hombourger wrote:
> Three minor fixes for your review.
> 
> Have the sshd-regen-keys services depend on ssh.service instead of sshd.service (so we
> rely on its official name, not its alias)
> 
> The change to linux-custom allows use of named defconfigs living in the kernel tree. I realized
> this was not correctly handled while building a kernel for MPSOC (xilinx_zynqmp_defconfig)
> 
> Lastly, the dpkg-raw class was modified so it may be used together with the very convenient
> templating class.
> 
> Changes in v2:
>   sshd-regen-keys: amend commit message as suggested by Henning
> 
> Cedric Hombourger (3):
>   sshd-regen-keys: sshd-regen-keys: depend on ssh.service instead of sshd.service
>   linux-custom: support use of an arbitrary in-tree defconfig
>   dpkg-raw: make sure templates are processed before do_install

Thanks, applied p1 and p2 to next.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 0/3] minor fixes
  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
  0 siblings, 1 reply; 21+ messages in thread
From: Henning Schild @ 2020-07-28 20:46 UTC (permalink / raw)
  To: Baurzhan Ismagulov; +Cc: isar-users, Kiszka, Jan (CT RDA IOT SES-DE)

Baurzhan,

we do have CI runners as well and they fail on "next" because of
bullseye issues. It is nice to see you are merging stuff but please
share how you actually make that build.

Henning

On Tue, 28 Jul 2020 18:27:26 +0200
Baurzhan Ismagulov <ibr@radix50.net> wrote:

> On Mon, Mar 16, 2020 at 01:55:49PM +0100, Cedric Hombourger wrote:
> > Three minor fixes for your review.
> > 
> > Have the sshd-regen-keys services depend on ssh.service instead of
> > sshd.service (so we rely on its official name, not its alias)
> > 
> > The change to linux-custom allows use of named defconfigs living in
> > the kernel tree. I realized this was not correctly handled while
> > building a kernel for MPSOC (xilinx_zynqmp_defconfig)
> > 
> > Lastly, the dpkg-raw class was modified so it may be used together
> > with the very convenient templating class.
> > 
> > Changes in v2:
> >   sshd-regen-keys: amend commit message as suggested by Henning
> > 
> > Cedric Hombourger (3):
> >   sshd-regen-keys: sshd-regen-keys: depend on ssh.service instead
> > of sshd.service linux-custom: support use of an arbitrary in-tree
> > defconfig dpkg-raw: make sure templates are processed before
> > do_install  
> 
> Thanks, applied p1 and p2 to next.
> 
> With kind regards,
> Baurzhan.
> 


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v2 0/3] minor fixes
  2020-07-28 20:46           ` Henning Schild
@ 2020-07-30 16:08             ` Baurzhan Ismagulov
  0 siblings, 0 replies; 21+ messages in thread
From: Baurzhan Ismagulov @ 2020-07-30 16:08 UTC (permalink / raw)
  To: isar-users

Hello Henning,

On Tue, Jul 28, 2020 at 10:46:01PM +0200, Henning Schild wrote:
> we do have CI runners as well and they fail on "next" because of
> bullseye issues. It is nice to see you are merging stuff but please
> share how you actually make that build.

It's all there:

https://groups.google.com/forum/#!topic/isar-users/bj9LvofQKHI

I agree that we have to unblock CI (and it affects master as well), will post
the details in the other thread.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-07-30 16:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox