All of lore.kernel.org
 help / color / mirror / Atom feed
* thud systemd root home wrong
@ 2019-01-11 14:44 Jean-Francois Dagenais
  2019-01-11 15:24 ` Jérôme Carretero
  2019-01-11 15:37 ` Burton, Ross
  0 siblings, 2 replies; 10+ messages in thread
From: Jean-Francois Dagenais @ 2019-01-11 14:44 UTC (permalink / raw)
  To: poky

Hi all,

Although there is 0005-Make-root-s-home-directory-configurable.patch and EXTRA_OEMESON += "-Droothomedir=${ROOT_HOME}".

Here's the test setup and result:
root@host-01:~# cat /lib/systemd/system/testroothome.service 
[Unit]
Description=Test root home

[Service]
User=root
ExecStart=/bin/bash -c "echo HOME:$HOME"

[Install]
WantedBy=multi-user.target
root@host-01:~# systemctl status testroothome
● testroothome.service - Test root home
   Loaded: loaded (/lib/systemd/system/testroothome.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Jan 11 14:32:10 host-01 systemd[1]: Started Test root home.
Jan 11 14:32:10 host-01 bash[1971]: HOME:/root
root@host-01:~# echo $HOME
/home/root


/root is incorrect as shown last. ROOT_HOME is set in my untouched bitbake.conf from poky.

Very preliminary inspection of v239 of systemd's source in it's workdir suggests that although the meson build config is changed to accept roothomedir as an option, the source code doesn't mention it.

Looking at the history of xxxx-Make-root-s-home-directory-configurable.patch, it seems to have suffered quite a lot through the systemd upgrades to the point it has become useless?

Before I dig deeper, I wanted to check with the community.

Thanks for any pointers!

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

* Re: thud systemd root home wrong
  2019-01-11 14:44 thud systemd root home wrong Jean-Francois Dagenais
@ 2019-01-11 15:24 ` Jérôme Carretero
  2019-01-11 15:37 ` Burton, Ross
  1 sibling, 0 replies; 10+ messages in thread
From: Jérôme Carretero @ 2019-01-11 15:24 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: poky

On Fri, 11 Jan 2019 09:44:04 -0500
Jean-Francois Dagenais <jeff.dagenais@gmail.com> wrote:

> ExecStart=/bin/bash -c "echo HOME:$HOME"

Hi Jeff,


Sounds like you like tackling root causes ;)
I remember something like that and instead cowardly did:

 Environment=HOME=/home/root


Regards,

-- 
Jérôme


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

* Re: thud systemd root home wrong
  2019-01-11 14:44 thud systemd root home wrong Jean-Francois Dagenais
  2019-01-11 15:24 ` Jérôme Carretero
@ 2019-01-11 15:37 ` Burton, Ross
  2019-01-11 15:53   ` Jean-Francois Dagenais
  1 sibling, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2019-01-11 15:37 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Fri, 11 Jan 2019 at 14:44, Jean-Francois Dagenais <
jeff.dagenais@gmail.com> wrote:

> Looking at the history of
> xxxx-Make-root-s-home-directory-configurable.patch, it seems to have
> suffered quite a lot through the systemd upgrades to the point it has
> become useless?
>
> Before I dig deeper, I wanted to check with the community.


Sounds feasibly, patches like that maintained long-term do suffer from
bitrot.  Would you be able to dig and fix this?

Ross

[-- Attachment #2: Type: text/html, Size: 814 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-11 15:37 ` Burton, Ross
@ 2019-01-11 15:53   ` Jean-Francois Dagenais
  2019-01-11 15:55     ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Francois Dagenais @ 2019-01-11 15:53 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]


> On Jan 11, 2019, at 10:37 AM, Burton, Ross <ross.burton@intel.com> wrote:
> 
> Sounds feasibly, patches like that maintained long-term do suffer from bitrot.  Would you be able to dig and fix this?

I will give it a shot yes, stay tuned. Not at all familiar with the code base, any hints? Or maybe all the hints I need are in previous (pre rot) versions of the patch?

[-- Attachment #2: Type: text/html, Size: 1194 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-11 15:53   ` Jean-Francois Dagenais
@ 2019-01-11 15:55     ` Burton, Ross
  2019-01-14 18:18       ` Jean-Francois Dagenais
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2019-01-11 15:55 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

I'd just grep the systemd source for "/root" and replace the relevant ones
with ROOTHOMEDIR.  There's probably not that many...

On Fri, 11 Jan 2019 at 15:53, Jean-Francois Dagenais <
jeff.dagenais@gmail.com> wrote:

>
> On Jan 11, 2019, at 10:37 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> Sounds feasibly, patches like that maintained long-term do suffer from
> bitrot.  Would you be able to dig and fix this?
>
>
> I will give it a shot yes, stay tuned. Not at all familiar with the code
> base, any hints? Or maybe all the hints I need are in previous (pre rot)
> versions of the patch?
>

[-- Attachment #2: Type: text/html, Size: 1468 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-11 15:55     ` Burton, Ross
@ 2019-01-14 18:18       ` Jean-Francois Dagenais
  2019-01-14 18:35         ` Jean-Francois Dagenais
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Francois Dagenais @ 2019-01-14 18:18 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]


> On Jan 11, 2019, at 10:55 AM, Burton, Ross <ross.burton@intel.com> wrote:
> 
> I'd just grep the systemd source for "/root" and replace the relevant ones with ROOTHOMEDIR.  There's probably not that many...

Were there any plans to submit this upstream? Seems a worthy mod. Although might not be a need for regular distros.

Should I apply this on poky/master and against v240? Or modify the existing patch on thud? Seems like, with Jérôme's workaround, this is not a crucial issue...

Thanks for the help!

[-- Attachment #2: Type: text/html, Size: 1434 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-14 18:18       ` Jean-Francois Dagenais
@ 2019-01-14 18:35         ` Jean-Francois Dagenais
  2019-01-15  0:42           ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Francois Dagenais @ 2019-01-14 18:35 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Poky Project

Answering myself here...

> On Jan 14, 2019, at 1:18 PM, Jean-Francois Dagenais <jeff.dagenais@gmail.com> wrote:
> 
> Were there any plans to submit this upstream? Seems a worthy mod. Although might not be a need for regular distros.

I looked at it closer and does seem like its not upstream-able. At least, not in such a simple form.

There are tests and units in the source tree which would need to by dynamically updated. On top of that, the man pages give some good arguments to keep root as "/root":

/root
           The home directory of the root user. The root user's home directory is located outside of /home in order to make sure the root user may log in even without /home being available and mounted.

You'd be hard pressed to get the systemd people to agree to change this I think.

So the problem is certainly becoming a bit too big for the amount of extra time I can afford right now.

For the record, since we don't actually require root's home to be in /home, I will add ROOT_HOME = "/root" in my distro file as a perfectly fine workaround for our use.

I will try to help any brave soul who tries to tackle this in the near future! ;)

Cheers!
/jfd

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

* Re: thud systemd root home wrong
  2019-01-14 18:35         ` Jean-Francois Dagenais
@ 2019-01-15  0:42           ` Burton, Ross
  2019-01-15  1:08             ` Jean-Francois Dagenais
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2019-01-15  0:42 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

On Mon, 14 Jan 2019 at 18:35, Jean-Francois Dagenais <
jeff.dagenais@gmail.com> wrote:

> > On Jan 14, 2019, at 1:18 PM, Jean-Francois Dagenais <
> jeff.dagenais@gmail.com> wrote:
> >
> > Were there any plans to submit this upstream? Seems a worthy mod.
> Although might not be a need for regular distros.
>
> I looked at it closer and does seem like its not upstream-able. At least,
> not in such a simple form.
>

Upstream have already rejected this, see the Upstream-Status header in the
(broken) patch.


> There are tests and units in the source tree which would need to by
> dynamically updated. On top of that, the man pages give some good arguments
> to keep root as "/root":
>

I'd say you can ignore the tests, but the rest shouldn't be *that* tricky.

If you're not going to fix this, could you please file a bug in
bugzilla.yoctoproject.org so this doesn't get forgotten about?

Thanks,
Ross

[-- Attachment #2: Type: text/html, Size: 1652 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-15  0:42           ` Burton, Ross
@ 2019-01-15  1:08             ` Jean-Francois Dagenais
  2019-01-15  9:34               ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Francois Dagenais @ 2019-01-15  1:08 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Poky Project

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]


> On Jan 14, 2019, at 19:42, Burton, Ross <ross.burton@intel.com> wrote:
> 
> If you're not going to fix this, could you please file a bug in bugzilla.yoctoproject.org <http://bugzilla.yoctoproject.org/> so this doesn't get forgotten about?
> 

https://bugzilla.yoctoproject.org/show_bug.cgi?id=13141

Sorry I couldn't do more.

[-- Attachment #2: Type: text/html, Size: 1386 bytes --]

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

* Re: thud systemd root home wrong
  2019-01-15  1:08             ` Jean-Francois Dagenais
@ 2019-01-15  9:34               ` Burton, Ross
  0 siblings, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2019-01-15  9:34 UTC (permalink / raw)
  To: Jean-Francois Dagenais; +Cc: Poky Project

No problem, thanks!

On Tue, 15 Jan 2019 at 01:09, Jean-Francois Dagenais
<jeff.dagenais@gmail.com> wrote:
>
>
> On Jan 14, 2019, at 19:42, Burton, Ross <ross.burton@intel.com> wrote:
>
> If you're not going to fix this, could you please file a bug in bugzilla.yoctoproject.org so this doesn't get forgotten about?
>
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13141
>
> Sorry I couldn't do more.


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

end of thread, other threads:[~2019-01-15  9:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 14:44 thud systemd root home wrong Jean-Francois Dagenais
2019-01-11 15:24 ` Jérôme Carretero
2019-01-11 15:37 ` Burton, Ross
2019-01-11 15:53   ` Jean-Francois Dagenais
2019-01-11 15:55     ` Burton, Ross
2019-01-14 18:18       ` Jean-Francois Dagenais
2019-01-14 18:35         ` Jean-Francois Dagenais
2019-01-15  0:42           ` Burton, Ross
2019-01-15  1:08             ` Jean-Francois Dagenais
2019-01-15  9:34               ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.