Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading
@ 2022-02-05 22:23 Arnout Vandecappelle (Essensium/Mind)
  2022-05-28 21:46 ` Yann E. MORIN
  2022-06-06 10:27 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Arnout Vandecappelle (Essensium/Mind) @ 2022-02-05 22:23 UTC (permalink / raw)
  To: buildroot

With the change of the range of UIDs that is generated from the
automatic ID (-1), it became apparent that there is a potential problem
with these automatic IDs when upgrading: they may have changed, which
means that persistent files that exist outside of the rootfs suddenly
have a different owner.

Add a caveat section to the manual, as well as an explanation of how to
work around the problem.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 docs/manual/makeusers-syntax.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/docs/manual/makeusers-syntax.txt b/docs/manual/makeusers-syntax.txt
index 3d1013f447..cebc6240ae 100644
--- a/docs/manual/makeusers-syntax.txt
+++ b/docs/manual/makeusers-syntax.txt
@@ -90,3 +90,17 @@ This will create this user:
 - +shell+ is: +/bin/sh+
 - +test+ is not a member of any additional +groups+
 - +comment+ is: +Test user+
+
+
+=== Caveat when updating Buildroot
+
+When updating buildroot or when packages are added or removed to/from
+the configuration, it is possible that the automatic UIDs and GIDs are
+changed. This can be a problem if persistent files were created with
+that user or group: after upgrade, they will suddenly have a different
+owner.
+
+Therefore, it is advisable to perpetuate the automatic IDs. This can be
+done either by adding a users table with the generated IDs. It is only
+needed to do this for UIDs that actually create persistent files, e.g.
+database.
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading
  2022-02-05 22:23 [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading Arnout Vandecappelle (Essensium/Mind)
@ 2022-05-28 21:46 ` Yann E. MORIN
  2022-06-06 10:27 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-05-28 21:46 UTC (permalink / raw)
  To: Arnout Vandecappelle (Essensium/Mind); +Cc: buildroot

Arnout, All,

Title:  s/manuali/manual/

On 2022-02-05 23:23 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> With the change of the range of UIDs that is generated from the
> automatic ID (-1), it became apparent that there is a potential problem
> with these automatic IDs when upgrading: they may have changed, which
> means that persistent files that exist outside of the rootfs suddenly
> have a different owner.
> 
> Add a caveat section to the manual, as well as an explanation of how to
> work around the problem.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  docs/manual/makeusers-syntax.txt | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/docs/manual/makeusers-syntax.txt b/docs/manual/makeusers-syntax.txt
> index 3d1013f447..cebc6240ae 100644
> --- a/docs/manual/makeusers-syntax.txt
> +++ b/docs/manual/makeusers-syntax.txt
> @@ -90,3 +90,17 @@ This will create this user:
>  - +shell+ is: +/bin/sh+
>  - +test+ is not a member of any additional +groups+
>  - +comment+ is: +Test user+
> +
> +
> +=== Caveat when updating Buildroot

I changed that to:  Caveat with automatic UIDs and GIDs
(because that's the real cause).

> +
> +When updating buildroot or when packages are added or removed to/from
> +the configuration, it is possible that the automatic UIDs and GIDs are
> +changed. This can be a problem if persistent files were created with
> +that user or group: after upgrade, they will suddenly have a different
> +owner.
> +
> +Therefore, it is advisable to perpetuate the automatic IDs. This can be
> +done either by adding a users table with the generated IDs. It is only

'either' is spurious here, I think, so I dropped it.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> +needed to do this for UIDs that actually create persistent files, e.g.
> +database.
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading
  2022-02-05 22:23 [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading Arnout Vandecappelle (Essensium/Mind)
  2022-05-28 21:46 ` Yann E. MORIN
@ 2022-06-06 10:27 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-06-06 10:27 UTC (permalink / raw)
  To: Arnout Vandecappelle (Essensium/Mind); +Cc: buildroot

>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:

 > With the change of the range of UIDs that is generated from the
 > automatic ID (-1), it became apparent that there is a potential problem
 > with these automatic IDs when upgrading: they may have changed, which
 > means that persistent files that exist outside of the rootfs suddenly
 > have a different owner.

 > Add a caveat section to the manual, as well as an explanation of how to
 > work around the problem.

 > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-06-06 10:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-05 22:23 [Buildroot] [PATCH] docs/manuali/makeusers-syntax.txt: add caveat for upgrading Arnout Vandecappelle (Essensium/Mind)
2022-05-28 21:46 ` Yann E. MORIN
2022-06-06 10:27 ` Peter Korsgaard

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