cip-dev.lists.cip-project.org archive mirror
 help / color / mirror / Atom feed
* [isar-cip-core][PATCH v2 0/1] root home dir package
@ 2023-01-04 13:40 Henning Schild
  2023-01-04 13:40 ` [isar-cip-core][PATCH v2 1/1] change-root-homedir: split root home move into own package Henning Schild
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Schild @ 2023-01-04 13:40 UTC (permalink / raw)
  To: cip-dev; +Cc: Wang Jing, Jan Kiszka, Henning Schild

changes since v1:
 - add missing copyright header
 - update copyright date
 - rename recipe to include PV 0.1

This patch is now coming stand alone as it was not merged with the rest
of v1. It is based on next

Henning Schild (1):
  change-root-homedir: split root home move into own package

 .../change-root-homedir_0.1.bb                | 15 +++++++++++++
 .../change-root-homedir/files/postinst        | 21 +++++++++++++++++++
 recipes-core/customizations/common.inc        |  5 +++--
 recipes-core/customizations/files/postinst    |  8 -------
 4 files changed, 39 insertions(+), 10 deletions(-)
 create mode 100644 recipes-core/change-root-homedir/change-root-homedir_0.1.bb
 create mode 100644 recipes-core/change-root-homedir/files/postinst

-- 
2.38.2



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

* [isar-cip-core][PATCH v2 1/1] change-root-homedir: split root home move into own package
  2023-01-04 13:40 [isar-cip-core][PATCH v2 0/1] root home dir package Henning Schild
@ 2023-01-04 13:40 ` Henning Schild
  2023-01-04 13:51   ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Schild @ 2023-01-04 13:40 UTC (permalink / raw)
  To: cip-dev; +Cc: Wang Jing, Jan Kiszka, Henning Schild

Changing the homedir of root that way is required by any layer that
takes ro rootfs pieces from here. Making it its own package allows
reuse without having to take some other customizations.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 .../change-root-homedir_0.1.bb                | 15 +++++++++++++
 .../change-root-homedir/files/postinst        | 21 +++++++++++++++++++
 recipes-core/customizations/common.inc        |  5 +++--
 recipes-core/customizations/files/postinst    |  8 -------
 4 files changed, 39 insertions(+), 10 deletions(-)
 create mode 100644 recipes-core/change-root-homedir/change-root-homedir_0.1.bb
 create mode 100644 recipes-core/change-root-homedir/files/postinst

diff --git a/recipes-core/change-root-homedir/change-root-homedir_0.1.bb b/recipes-core/change-root-homedir/change-root-homedir_0.1.bb
new file mode 100644
index 000000000000..79c7e67d0d70
--- /dev/null
+++ b/recipes-core/change-root-homedir/change-root-homedir_0.1.bb
@@ -0,0 +1,15 @@
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2021-2023
+#
+# Authors:
+#  Henning Schild <henning.schild@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+
+inherit dpkg-raw
+
+DESCRIPTION = "Move roots homedir to /home for read-only rootfs"
+
+SRC_URI = "file://postinst"
diff --git a/recipes-core/change-root-homedir/files/postinst b/recipes-core/change-root-homedir/files/postinst
new file mode 100644
index 000000000000..918c5ab79aa4
--- /dev/null
+++ b/recipes-core/change-root-homedir/files/postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2019-2023
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+set -e
+
+# needed for read-only rootfs with writable /home
+if [ ! -L /root ]; then
+	# usermod --move-home can not be used while the target user
+	# has running processes, also we keep a symlink here
+	mv /root /home/
+	ln -s /home/root /root
+fi
diff --git a/recipes-core/customizations/common.inc b/recipes-core/customizations/common.inc
index 1124ff2d3590..24c862c32e3b 100644
--- a/recipes-core/customizations/common.inc
+++ b/recipes-core/customizations/common.inc
@@ -22,10 +22,11 @@ SRC_URI = " \
 WIRELESS_FIRMWARE_PACKAGE ?= ""
 INSTALL_WIRELESS_TOOLS ??= "0"
 
-DEPENDS += "sshd-regen-keys"
+DEPENDS += "sshd-regen-keys change-root-homedir"
 
 DEBIAN_DEPENDS = " \
-    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys \
+    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys, \
+    change-root-homedir \
     ${@(', iw, wireless-regdb, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \
 	if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}"
 
diff --git a/recipes-core/customizations/files/postinst b/recipes-core/customizations/files/postinst
index 7a0b00d98680..7e7ea3692325 100644
--- a/recipes-core/customizations/files/postinst
+++ b/recipes-core/customizations/files/postinst
@@ -21,11 +21,3 @@ fi
 HOSTNAME=demo
 echo "$HOSTNAME" > /etc/hostname
 echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
-
-# needed for read-only rootfs with writable /home
-if [ ! -L /root ]; then
-	# usermod --move-home can not be used while the target user
-	# has running processes, also we keep a symlink here
-	mv /root /home/
-	ln -s /home/root /root
-fi
-- 
2.38.2



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

* Re: [isar-cip-core][PATCH v2 1/1] change-root-homedir: split root home move into own package
  2023-01-04 13:40 ` [isar-cip-core][PATCH v2 1/1] change-root-homedir: split root home move into own package Henning Schild
@ 2023-01-04 13:51   ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2023-01-04 13:51 UTC (permalink / raw)
  To: Henning Schild, cip-dev; +Cc: Wang Jing

Now it worked!

On 04.01.23 14:40, Henning Schild wrote:
> Changing the homedir of root that way is required by any layer that
> takes ro rootfs pieces from here. Making it its own package allows
> reuse without having to take some other customizations.
> 
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>  .../change-root-homedir_0.1.bb                | 15 +++++++++++++
>  .../change-root-homedir/files/postinst        | 21 +++++++++++++++++++
>  recipes-core/customizations/common.inc        |  5 +++--
>  recipes-core/customizations/files/postinst    |  8 -------
>  4 files changed, 39 insertions(+), 10 deletions(-)
>  create mode 100644 recipes-core/change-root-homedir/change-root-homedir_0.1.bb
>  create mode 100644 recipes-core/change-root-homedir/files/postinst
> 
> diff --git a/recipes-core/change-root-homedir/change-root-homedir_0.1.bb b/recipes-core/change-root-homedir/change-root-homedir_0.1.bb
> new file mode 100644
> index 000000000000..79c7e67d0d70
> --- /dev/null
> +++ b/recipes-core/change-root-homedir/change-root-homedir_0.1.bb
> @@ -0,0 +1,15 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2021-2023
> +#
> +# Authors:
> +#  Henning Schild <henning.schild@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +
> +inherit dpkg-raw
> +
> +DESCRIPTION = "Move roots homedir to /home for read-only rootfs"
> +
> +SRC_URI = "file://postinst"
> diff --git a/recipes-core/change-root-homedir/files/postinst b/recipes-core/change-root-homedir/files/postinst
> new file mode 100644
> index 000000000000..918c5ab79aa4
> --- /dev/null
> +++ b/recipes-core/change-root-homedir/files/postinst
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2019-2023
> +#
> +# Authors:
> +#  Jan Kiszka <jan.kiszka@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +set -e
> +
> +# needed for read-only rootfs with writable /home
> +if [ ! -L /root ]; then
> +	# usermod --move-home can not be used while the target user
> +	# has running processes, also we keep a symlink here
> +	mv /root /home/
> +	ln -s /home/root /root
> +fi
> diff --git a/recipes-core/customizations/common.inc b/recipes-core/customizations/common.inc
> index 1124ff2d3590..24c862c32e3b 100644
> --- a/recipes-core/customizations/common.inc
> +++ b/recipes-core/customizations/common.inc
> @@ -22,10 +22,11 @@ SRC_URI = " \
>  WIRELESS_FIRMWARE_PACKAGE ?= ""
>  INSTALL_WIRELESS_TOOLS ??= "0"
>  
> -DEPENDS += "sshd-regen-keys"
> +DEPENDS += "sshd-regen-keys change-root-homedir"
>  
>  DEBIAN_DEPENDS = " \
> -    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys \
> +    ifupdown, isc-dhcp-client, net-tools, iputils-ping, ssh, sshd-regen-keys, \
> +    change-root-homedir \
>      ${@(', iw, wireless-regdb, ' + d.getVar('WIRELESS_FIRMWARE_PACKAGE')) \
>  	if d.getVar('INSTALL_WIRELESS_TOOLS') == '1' else ''}"
>  
> diff --git a/recipes-core/customizations/files/postinst b/recipes-core/customizations/files/postinst
> index 7a0b00d98680..7e7ea3692325 100644
> --- a/recipes-core/customizations/files/postinst
> +++ b/recipes-core/customizations/files/postinst
> @@ -21,11 +21,3 @@ fi
>  HOSTNAME=demo
>  echo "$HOSTNAME" > /etc/hostname
>  echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
> -
> -# needed for read-only rootfs with writable /home
> -if [ ! -L /root ]; then
> -	# usermod --move-home can not be used while the target user
> -	# has running processes, also we keep a symlink here
> -	mv /root /home/
> -	ln -s /home/root /root
> -fi

Thanks, applied.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux



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

* Re: [isar-cip-core][PATCH v2 0/1] root home dir package
  2023-01-04 13:35   ` Jan Kiszka
@ 2023-01-04 13:40     ` Henning Schild
  0 siblings, 0 replies; 6+ messages in thread
From: Henning Schild @ 2023-01-04 13:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: cip-dev, work, Wang Jing

Am Wed, 4 Jan 2023 14:35:53 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 04.01.23 14:02, Henning Schild wrote:
> > I again had problems getting mails on the list, that is why i sent
> > this twice.
> > 
> > Once with a "Reply-to" and later without it, because i got mail back
> > telling me that the remote hung up because it classified the mail as
> > SPAM. No details why ...
> > 
> > I bet none of this is on the list ... again, but at least using that
> > other mail infra i got some feedback.  
> 
> This one made it, even through to kernel.org, but not the real series.

But this is just talking and no real content. I will send all that once
more with the SMTP setup i used the other day, where things got weirdly
stuck but eventually made it.

If it does not go i suggest you merge without patchwork and archive if
that is an option.

Henning

> Jan
> 
> > 
> > Henning
> > 
> > Am Wed,  4 Jan 2023 13:51:02 +0100
> > schrieb Henning Schild <work@hennsch.de>:
> >   
> >> From: Henning Schild <henning.schild@siemens.com>
> >>
> >> changes since v1:
> >>  - add missing copyright header
> >>  - update copyright date
> >>  - rename recipe to include PV 0.1
> >>
> >> This patch is now coming stand alone as it was not merged with the
> >> rest of v1. It is based on next
> >>
> >> Henning Schild (1):
> >>   change-root-homedir: split root home move into own package
> >>
> >>  .../change-root-homedir_0.1.bb                | 15 +++++++++++++
> >>  .../change-root-homedir/files/postinst        | 21
> >> +++++++++++++++++++ recipes-core/customizations/common.inc        |
> >> 5 +++-- recipes-core/customizations/files/postinst    |  8 -------
> >>  4 files changed, 39 insertions(+), 10 deletions(-)
> >>  create mode 100644
> >> recipes-core/change-root-homedir/change-root-homedir_0.1.bb create
> >> mode 100644 recipes-core/change-root-homedir/files/postinst
> >>  
> > 
> >   
> 



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

* Re: [isar-cip-core][PATCH v2 0/1] root home dir package
  2023-01-04 13:02 ` [isar-cip-core][PATCH v2 0/1] root home dir package Henning Schild
@ 2023-01-04 13:35   ` Jan Kiszka
  2023-01-04 13:40     ` Henning Schild
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2023-01-04 13:35 UTC (permalink / raw)
  To: Henning Schild, cip-dev; +Cc: work, Wang Jing

On 04.01.23 14:02, Henning Schild wrote:
> I again had problems getting mails on the list, that is why i sent this
> twice.
> 
> Once with a "Reply-to" and later without it, because i got mail back
> telling me that the remote hung up because it classified the mail as
> SPAM. No details why ...
> 
> I bet none of this is on the list ... again, but at least using that
> other mail infra i got some feedback.

This one made it, even through to kernel.org, but not the real series.

Jan

> 
> Henning
> 
> Am Wed,  4 Jan 2023 13:51:02 +0100
> schrieb Henning Schild <work@hennsch.de>:
> 
>> From: Henning Schild <henning.schild@siemens.com>
>>
>> changes since v1:
>>  - add missing copyright header
>>  - update copyright date
>>  - rename recipe to include PV 0.1
>>
>> This patch is now coming stand alone as it was not merged with the
>> rest of v1. It is based on next
>>
>> Henning Schild (1):
>>   change-root-homedir: split root home move into own package
>>
>>  .../change-root-homedir_0.1.bb                | 15 +++++++++++++
>>  .../change-root-homedir/files/postinst        | 21
>> +++++++++++++++++++ recipes-core/customizations/common.inc        |
>> 5 +++-- recipes-core/customizations/files/postinst    |  8 -------
>>  4 files changed, 39 insertions(+), 10 deletions(-)
>>  create mode 100644
>> recipes-core/change-root-homedir/change-root-homedir_0.1.bb create
>> mode 100644 recipes-core/change-root-homedir/files/postinst
>>
> 
> 

-- 
Siemens AG, Technology
Competence Center Embedded Linux



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

* Re: [isar-cip-core][PATCH v2 0/1] root home dir package
       [not found] <20230104125103.9089-1-work@hennsch.de>
@ 2023-01-04 13:02 ` Henning Schild
  2023-01-04 13:35   ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Henning Schild @ 2023-01-04 13:02 UTC (permalink / raw)
  To: cip-dev; +Cc: Henning Schild, work, Wang Jing, Jan Kiszka

I again had problems getting mails on the list, that is why i sent this
twice.

Once with a "Reply-to" and later without it, because i got mail back
telling me that the remote hung up because it classified the mail as
SPAM. No details why ...

I bet none of this is on the list ... again, but at least using that
other mail infra i got some feedback.

Henning

Am Wed,  4 Jan 2023 13:51:02 +0100
schrieb Henning Schild <work@hennsch.de>:

> From: Henning Schild <henning.schild@siemens.com>
> 
> changes since v1:
>  - add missing copyright header
>  - update copyright date
>  - rename recipe to include PV 0.1
> 
> This patch is now coming stand alone as it was not merged with the
> rest of v1. It is based on next
> 
> Henning Schild (1):
>   change-root-homedir: split root home move into own package
> 
>  .../change-root-homedir_0.1.bb                | 15 +++++++++++++
>  .../change-root-homedir/files/postinst        | 21
> +++++++++++++++++++ recipes-core/customizations/common.inc        |
> 5 +++-- recipes-core/customizations/files/postinst    |  8 -------
>  4 files changed, 39 insertions(+), 10 deletions(-)
>  create mode 100644
> recipes-core/change-root-homedir/change-root-homedir_0.1.bb create
> mode 100644 recipes-core/change-root-homedir/files/postinst
> 



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

end of thread, other threads:[~2023-01-04 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 13:40 [isar-cip-core][PATCH v2 0/1] root home dir package Henning Schild
2023-01-04 13:40 ` [isar-cip-core][PATCH v2 1/1] change-root-homedir: split root home move into own package Henning Schild
2023-01-04 13:51   ` Jan Kiszka
     [not found] <20230104125103.9089-1-work@hennsch.de>
2023-01-04 13:02 ` [isar-cip-core][PATCH v2 0/1] root home dir package Henning Schild
2023-01-04 13:35   ` Jan Kiszka
2023-01-04 13:40     ` Henning Schild

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).