[05/10] package/systemd: cosmetic rearrange list of users
diff mbox series

Message ID 20200206093633.251413-6-nolange79@gmail.com
State New
Headers show
Series
  • Improvements to systemd
Related show

Commit Message

Norbert Lange Feb. 6, 2020, 9:36 a.m. UTC
Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
 package/systemd/systemd.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jérémy ROSEN Feb. 7, 2020, 9:13 a.m. UTC | #1
could you add a line pointing to the corresponding file in systemd's source
code (i.e the sysuser file from upstream)
that would help future reviewers

apart from that

Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>

Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a écrit :

> Signed-off-by: Norbert Lange <nolange79@gmail.com>
> ---
>  package/systemd/systemd.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index b3e83b5d3b..b6bd85f130 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>  endef
>
>  define SYSTEMD_USERS
> +       # udev user groups
>         - - input -1 * - - - Input device group
> -       - - systemd-journal -1 * - - - Journal
>         - - render -1 * - - - DRI rendering nodes
>         - - kvm -1 * - - - kvm nodes
> +       # systemd user groups
> +       - - systemd-journal -1 * - - - Journal
>         $(SYSTEMD_REMOTE_USER)
>         $(SYSTEMD_COREDUMP_USER)
>         $(SYSTEMD_NETWORKD_USER)
> --
> 2.24.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Norbert Lange Feb. 7, 2020, 12:47 p.m. UTC | #2
Not sure if you meant to reply to patch #6 instead.

The main reference is the README, and the templates in sysusers.d.
You want me to add this as comment in the .mk file if I understood
correctly?

Also I am not sure why those users/groups aren't already in the systemd
skeleton.

Should I post just an amended Patch #5 or wait a while to redo the series
once I got feedback for the rest?

Am Fr., 7. Feb. 2020 um 10:13 Uhr schrieb Jérémy ROSEN <
jeremy.rosen@smile.fr>:

> could you add a line pointing to the corresponding file in
> systemd's source code (i.e the sysuser file from upstream)
> that would help future reviewers
>
> apart from that
>
> Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
>
> Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a
> écrit :
>
>> Signed-off-by: Norbert Lange <nolange79@gmail.com>
>> ---
>>  package/systemd/systemd.mk | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
>> index b3e83b5d3b..b6bd85f130 100644
>> --- a/package/systemd/systemd.mk
>> +++ b/package/systemd/systemd.mk
>> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>>  endef
>>
>>  define SYSTEMD_USERS
>> +       # udev user groups
>>         - - input -1 * - - - Input device group
>> -       - - systemd-journal -1 * - - - Journal
>>         - - render -1 * - - - DRI rendering nodes
>>         - - kvm -1 * - - - kvm nodes
>> +       # systemd user groups
>> +       - - systemd-journal -1 * - - - Journal
>>         $(SYSTEMD_REMOTE_USER)
>>         $(SYSTEMD_COREDUMP_USER)
>>         $(SYSTEMD_NETWORKD_USER)
>> --
>> 2.24.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
>
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
>
> [image: email] jeremy.rosen@smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>
Jérémy ROSEN Feb. 7, 2020, 12:53 p.m. UTC | #3
Le ven. 7 févr. 2020 à 13:47, Norbert Lange <nolange79@gmail.com> a écrit :

> Not sure if you meant to reply to patch #6 instead.
>
> maybe :P


> The main reference is the README, and the templates in sysusers.d.
> You want me to add this as comment in the .mk file if I understood
> correctly?
>
> That's very minor... I meant pointing to the sysusers.d files so someone
that doesn't know systemd as well can check that nothing has changed


> Also I am not sure why those users/groups aren't already in the systemd
> skeleton.
>
> That's a pretty good question. Also, since they are created by
mkusers they have a UID > 1000 that confuses journald.
(they get their own journal files, as if they were normal users, instead of
being logged only in the system journals)


> Should I post just an amended Patch #5 or wait a while to redo the series
> once I got feedback for the rest?
>
> Wait for more feedback, that's too minor to have you respin just for that.

Cheers
Jeremy


> Am Fr., 7. Feb. 2020 um 10:13 Uhr schrieb Jérémy ROSEN <
> jeremy.rosen@smile.fr>:
>
>> could you add a line pointing to the corresponding file in
>> systemd's source code (i.e the sysuser file from upstream)
>> that would help future reviewers
>>
>> apart from that
>>
>> Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
>>
>> Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a
>> écrit :
>>
>>> Signed-off-by: Norbert Lange <nolange79@gmail.com>
>>> ---
>>>  package/systemd/systemd.mk | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
>>> index b3e83b5d3b..b6bd85f130 100644
>>> --- a/package/systemd/systemd.mk
>>> +++ b/package/systemd/systemd.mk
>>> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>>>  endef
>>>
>>>  define SYSTEMD_USERS
>>> +       # udev user groups
>>>         - - input -1 * - - - Input device group
>>> -       - - systemd-journal -1 * - - - Journal
>>>         - - render -1 * - - - DRI rendering nodes
>>>         - - kvm -1 * - - - kvm nodes
>>> +       # systemd user groups
>>> +       - - systemd-journal -1 * - - - Journal
>>>         $(SYSTEMD_REMOTE_USER)
>>>         $(SYSTEMD_COREDUMP_USER)
>>>         $(SYSTEMD_NETWORKD_USER)
>>> --
>>> 2.24.1
>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot@busybox.net
>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>
>>
>>
>> --
>> [image: SMILE]  <http://www.smile.eu/>
>>
>> 20 rue des Jardins
>> 92600 Asnières-sur-Seine
>> *Jérémy ROSEN*
>> Architecte technique
>>
>> [image: email] jeremy.rosen@smile.fr
>> [image: phone]  +33 6 88 25 87 42
>> [image: url] http://www.smile.eu
>>
>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>> <https://www.linkedin.com/company/smile> [image: Github]
>> <https://github.com/Smile-SA>
>>
>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>
>
Norbert Lange Feb. 7, 2020, 12:59 p.m. UTC | #4
mkuser creating users by default if a Bug IMHO, the only non-system users
are those
that are explicitly defined.
Did not know journald acts differently based on UIDs btw.

I posted a patch to allow creating system users, but that would require
changing *every*
package adding users.
https://patchwork.ozlabs.org/patch/1222180/

Norbert

Am Fr., 7. Feb. 2020 um 13:53 Uhr schrieb Jérémy ROSEN <
jeremy.rosen@smile.fr>:

>
>
> Le ven. 7 févr. 2020 à 13:47, Norbert Lange <nolange79@gmail.com> a
> écrit :
>
>> Not sure if you meant to reply to patch #6 instead.
>>
>> maybe :P
>
>
>> The main reference is the README, and the templates in sysusers.d.
>> You want me to add this as comment in the .mk file if I understood
>> correctly?
>>
>> That's very minor... I meant pointing to the sysusers.d files so someone
> that doesn't know systemd as well can check that nothing has changed
>
>
>> Also I am not sure why those users/groups aren't already in the systemd
>> skeleton.
>>
>> That's a pretty good question. Also, since they are created by
> mkusers they have a UID > 1000 that confuses journald.
> (they get their own journal files, as if they were normal users, instead
> of being logged only in the system journals)
>
>
>> Should I post just an amended Patch #5 or wait a while to redo the series
>> once I got feedback for the rest?
>>
>> Wait for more feedback, that's too minor to have you respin just for that.
>
> Cheers
> Jeremy
>
>
>> Am Fr., 7. Feb. 2020 um 10:13 Uhr schrieb Jérémy ROSEN <
>> jeremy.rosen@smile.fr>:
>>
>>> could you add a line pointing to the corresponding file in
>>> systemd's source code (i.e the sysuser file from upstream)
>>> that would help future reviewers
>>>
>>> apart from that
>>>
>>> Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
>>>
>>> Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a
>>> écrit :
>>>
>>>> Signed-off-by: Norbert Lange <nolange79@gmail.com>
>>>> ---
>>>>  package/systemd/systemd.mk | 4 +++-
>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
>>>> index b3e83b5d3b..b6bd85f130 100644
>>>> --- a/package/systemd/systemd.mk
>>>> +++ b/package/systemd/systemd.mk
>>>> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>>>>  endef
>>>>
>>>>  define SYSTEMD_USERS
>>>> +       # udev user groups
>>>>         - - input -1 * - - - Input device group
>>>> -       - - systemd-journal -1 * - - - Journal
>>>>         - - render -1 * - - - DRI rendering nodes
>>>>         - - kvm -1 * - - - kvm nodes
>>>> +       # systemd user groups
>>>> +       - - systemd-journal -1 * - - - Journal
>>>>         $(SYSTEMD_REMOTE_USER)
>>>>         $(SYSTEMD_COREDUMP_USER)
>>>>         $(SYSTEMD_NETWORKD_USER)
>>>> --
>>>> 2.24.1
>>>>
>>>> _______________________________________________
>>>> buildroot mailing list
>>>> buildroot@busybox.net
>>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>>
>>>
>>>
>>> --
>>> [image: SMILE]  <http://www.smile.eu/>
>>>
>>> 20 rue des Jardins
>>> 92600 Asnières-sur-Seine
>>> *Jérémy ROSEN*
>>> Architecte technique
>>>
>>> [image: email] jeremy.rosen@smile.fr
>>> [image: phone]  +33 6 88 25 87 42
>>> [image: url] http://www.smile.eu
>>>
>>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>>> <https://www.linkedin.com/company/smile> [image: Github]
>>> <https://github.com/Smile-SA>
>>>
>>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>>
>>
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
>
> [image: email] jeremy.rosen@smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>
Jérémy ROSEN Feb. 7, 2020, 1:07 p.m. UTC | #5
Le ven. 7 févr. 2020 à 13:59, Norbert Lange <nolange79@gmail.com> a écrit :

> mkuser creating users by default if a Bug IMHO, the only non-system users
> are those
>
that are explicitly defined.
>

Agreed. I'm already working on that. Patch to follow soon


> Did not know journald acts differently based on UIDs btw.
>
>
It's linked to the "per-user journal" feature. That feature is only active
for UID > 1000 (or wherever the system/human UID split is configured
but 1000 is the recommanded default and what buildroot uses)

 I posted a patch to allow creating system users, but that would require
changing *every*

> package adding users.
> https://patchwork.ozlabs.org/patch/1222180/
>
> Ok, I missed that patch (and reimplemented it :( my bad)
I'm in the process of changing every package, it's just a tedious grep
work, but it needs to be done.


> Norbert
>
> Am Fr., 7. Feb. 2020 um 13:53 Uhr schrieb Jérémy ROSEN <
> jeremy.rosen@smile.fr>:
>
>>
>>
>> Le ven. 7 févr. 2020 à 13:47, Norbert Lange <nolange79@gmail.com> a
>> écrit :
>>
>>> Not sure if you meant to reply to patch #6 instead.
>>>
>>> maybe :P
>>
>>
>>> The main reference is the README, and the templates in sysusers.d.
>>> You want me to add this as comment in the .mk file if I understood
>>> correctly?
>>>
>>> That's very minor... I meant pointing to the sysusers.d files so someone
>> that doesn't know systemd as well can check that nothing has changed
>>
>>
>>> Also I am not sure why those users/groups aren't already in the systemd
>>> skeleton.
>>>
>>> That's a pretty good question. Also, since they are created by
>> mkusers they have a UID > 1000 that confuses journald.
>> (they get their own journal files, as if they were normal users, instead
>> of being logged only in the system journals)
>>
>>
>>> Should I post just an amended Patch #5 or wait a while to redo the
>>> series once I got feedback for the rest?
>>>
>>> Wait for more feedback, that's too minor to have you respin just for
>> that.
>>
>> Cheers
>> Jeremy
>>
>>
>>> Am Fr., 7. Feb. 2020 um 10:13 Uhr schrieb Jérémy ROSEN <
>>> jeremy.rosen@smile.fr>:
>>>
>>>> could you add a line pointing to the corresponding file in
>>>> systemd's source code (i.e the sysuser file from upstream)
>>>> that would help future reviewers
>>>>
>>>> apart from that
>>>>
>>>> Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
>>>>
>>>> Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a
>>>> écrit :
>>>>
>>>>> Signed-off-by: Norbert Lange <nolange79@gmail.com>
>>>>> ---
>>>>>  package/systemd/systemd.mk | 4 +++-
>>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
>>>>> index b3e83b5d3b..b6bd85f130 100644
>>>>> --- a/package/systemd/systemd.mk
>>>>> +++ b/package/systemd/systemd.mk
>>>>> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>>>>>  endef
>>>>>
>>>>>  define SYSTEMD_USERS
>>>>> +       # udev user groups
>>>>>         - - input -1 * - - - Input device group
>>>>> -       - - systemd-journal -1 * - - - Journal
>>>>>         - - render -1 * - - - DRI rendering nodes
>>>>>         - - kvm -1 * - - - kvm nodes
>>>>> +       # systemd user groups
>>>>> +       - - systemd-journal -1 * - - - Journal
>>>>>         $(SYSTEMD_REMOTE_USER)
>>>>>         $(SYSTEMD_COREDUMP_USER)
>>>>>         $(SYSTEMD_NETWORKD_USER)
>>>>> --
>>>>> 2.24.1
>>>>>
>>>>> _______________________________________________
>>>>> buildroot mailing list
>>>>> buildroot@busybox.net
>>>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: SMILE]  <http://www.smile.eu/>
>>>>
>>>> 20 rue des Jardins
>>>> 92600 Asnières-sur-Seine
>>>> *Jérémy ROSEN*
>>>> Architecte technique
>>>>
>>>> [image: email] jeremy.rosen@smile.fr
>>>> [image: phone]  +33 6 88 25 87 42
>>>> [image: url] http://www.smile.eu
>>>>
>>>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>>>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>>>> <https://www.linkedin.com/company/smile> [image: Github]
>>>> <https://github.com/Smile-SA>
>>>>
>>>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>>>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>>>
>>>
>>
>> --
>> [image: SMILE]  <http://www.smile.eu/>
>>
>> 20 rue des Jardins
>> 92600 Asnières-sur-Seine
>> *Jérémy ROSEN*
>> Architecte technique
>>
>> [image: email] jeremy.rosen@smile.fr
>> [image: phone]  +33 6 88 25 87 42
>> [image: url] http://www.smile.eu
>>
>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>> <https://www.linkedin.com/company/smile> [image: Github]
>> <https://github.com/Smile-SA>
>>
>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>
>
Norbert Lange Feb. 7, 2020, 1:11 p.m. UTC | #6
Am Fr., 7. Feb. 2020 um 14:07 Uhr schrieb Jérémy ROSEN <
jeremy.rosen@smile.fr>:

>
>
> Le ven. 7 févr. 2020 à 13:59, Norbert Lange <nolange79@gmail.com> a
> écrit :
>
>> mkuser creating users by default if a Bug IMHO, the only non-system users
>> are those
>>
> that are explicitly defined.
>>
>
> Agreed. I'm already working on that. Patch to follow soon
>
>
>> Did not know journald acts differently based on UIDs btw.
>>
>>
> It's linked to the "per-user journal" feature. That feature is only active
> for UID > 1000 (or wherever the system/human UID split is configured
> but 1000 is the recommanded default and what buildroot uses)
>
>  I posted a patch to allow creating system users, but that would require
> changing *every*
>
>> package adding users.
>> https://patchwork.ozlabs.org/patch/1222180/
>>
>> Ok, I missed that patch (and reimplemented it :( my bad)
> I'm in the process of changing every package, it's just a tedious grep
> work, but it needs to be done.
>

Well, I am glad if I dont have to do that with private patchwork one day,
no matter how we get there.

what about changing mkuser default -1 to system user, adding a new value
('-2' or 'u') for normal user?
That way you just need to patch the 1-2 spots where normal users are
generated.


>
>> Norbert
>>
>> Am Fr., 7. Feb. 2020 um 13:53 Uhr schrieb Jérémy ROSEN <
>> jeremy.rosen@smile.fr>:
>>
>>>
>>>
>>> Le ven. 7 févr. 2020 à 13:47, Norbert Lange <nolange79@gmail.com> a
>>> écrit :
>>>
>>>> Not sure if you meant to reply to patch #6 instead.
>>>>
>>>> maybe :P
>>>
>>>
>>>> The main reference is the README, and the templates in sysusers.d.
>>>> You want me to add this as comment in the .mk file if I understood
>>>> correctly?
>>>>
>>>> That's very minor... I meant pointing to the sysusers.d files so
>>> someone that doesn't know systemd as well can check that nothing has changed
>>>
>>>
>>>> Also I am not sure why those users/groups aren't already in the systemd
>>>> skeleton.
>>>>
>>>> That's a pretty good question. Also, since they are created by
>>> mkusers they have a UID > 1000 that confuses journald.
>>> (they get their own journal files, as if they were normal users, instead
>>> of being logged only in the system journals)
>>>
>>>
>>>> Should I post just an amended Patch #5 or wait a while to redo the
>>>> series once I got feedback for the rest?
>>>>
>>>> Wait for more feedback, that's too minor to have you respin just for
>>> that.
>>>
>>> Cheers
>>> Jeremy
>>>
>>>
>>>> Am Fr., 7. Feb. 2020 um 10:13 Uhr schrieb Jérémy ROSEN <
>>>> jeremy.rosen@smile.fr>:
>>>>
>>>>> could you add a line pointing to the corresponding file in
>>>>> systemd's source code (i.e the sysuser file from upstream)
>>>>> that would help future reviewers
>>>>>
>>>>> apart from that
>>>>>
>>>>> Reviewed-by: Jérémy Rosen <jeremy.rosen@smile.fr>
>>>>>
>>>>> Le jeu. 6 févr. 2020 à 10:37, Norbert Lange <nolange79@gmail.com> a
>>>>> écrit :
>>>>>
>>>>>> Signed-off-by: Norbert Lange <nolange79@gmail.com>
>>>>>> ---
>>>>>>  package/systemd/systemd.mk | 4 +++-
>>>>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
>>>>>> index b3e83b5d3b..b6bd85f130 100644
>>>>>> --- a/package/systemd/systemd.mk
>>>>>> +++ b/package/systemd/systemd.mk
>>>>>> @@ -428,10 +428,12 @@ define SYSTEMD_INSTALL_IMAGES_CMDS
>>>>>>  endef
>>>>>>
>>>>>>  define SYSTEMD_USERS
>>>>>> +       # udev user groups
>>>>>>         - - input -1 * - - - Input device group
>>>>>> -       - - systemd-journal -1 * - - - Journal
>>>>>>         - - render -1 * - - - DRI rendering nodes
>>>>>>         - - kvm -1 * - - - kvm nodes
>>>>>> +       # systemd user groups
>>>>>> +       - - systemd-journal -1 * - - - Journal
>>>>>>         $(SYSTEMD_REMOTE_USER)
>>>>>>         $(SYSTEMD_COREDUMP_USER)
>>>>>>         $(SYSTEMD_NETWORKD_USER)
>>>>>> --
>>>>>> 2.24.1
>>>>>>
>>>>>> _______________________________________________
>>>>>> buildroot mailing list
>>>>>> buildroot@busybox.net
>>>>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> [image: SMILE]  <http://www.smile.eu/>
>>>>>
>>>>> 20 rue des Jardins
>>>>> 92600 Asnières-sur-Seine
>>>>> *Jérémy ROSEN*
>>>>> Architecte technique
>>>>>
>>>>> [image: email] jeremy.rosen@smile.fr
>>>>> [image: phone]  +33 6 88 25 87 42
>>>>> [image: url] http://www.smile.eu
>>>>>
>>>>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>>>>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>>>>> <https://www.linkedin.com/company/smile> [image: Github]
>>>>> <https://github.com/Smile-SA>
>>>>>
>>>>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>>>>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>>>>
>>>>
>>>
>>> --
>>> [image: SMILE]  <http://www.smile.eu/>
>>>
>>> 20 rue des Jardins
>>> 92600 Asnières-sur-Seine
>>> *Jérémy ROSEN*
>>> Architecte technique
>>>
>>> [image: email] jeremy.rosen@smile.fr
>>> [image: phone]  +33 6 88 25 87 42
>>> [image: url] http://www.smile.eu
>>>
>>> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
>>> <https://www.facebook.com/smileopensource> [image: LinkedIn]
>>> <https://www.linkedin.com/company/smile> [image: Github]
>>> <https://github.com/Smile-SA>
>>>
>>> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
>>> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>>>
>>
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
>
> [image: email] jeremy.rosen@smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>
Jérémy ROSEN Feb. 7, 2020, 1:22 p.m. UTC | #7
Le ven. 7 févr. 2020 à 14:11, Norbert Lange <nolange79@gmail.com> a écrit :

>
>
>
> what about changing mkuser default -1 to system user, adding a new value
> ('-2' or 'u') for normal user?
> That way you just need to patch the 1-2 spots where normal users are
> generated.
>
>
There are no such spot that I could find at first glance in buildroot
itself, but that would break user packages...
so I don't think that's a good idea. It would fix more (harmless) bugs than
it would create, but the bugs
created would be more problematic than the bugs fixed....
Norbert Lange Feb. 7, 2020, 1:32 p.m. UTC | #8
Define what you mean with break - chances are, its not worse than all of
packages suddenly creating system users.

I meant that the lists from BR2_ROOTFS_USERS_TABLES are handled special and
create normal users (uid >= 0),
while all packages (buildroot or user packages) create system users with
uid=-1.

new packages could use 's' and 'u' instead, with -1 being somewhat
ambiguous then (potentially being deprecated one day).

Am Fr., 7. Feb. 2020 um 14:23 Uhr schrieb Jérémy ROSEN <
jeremy.rosen@smile.fr>:

>
>
> Le ven. 7 févr. 2020 à 14:11, Norbert Lange <nolange79@gmail.com> a
> écrit :
>
>>
>>
>>
>> what about changing mkuser default -1 to system user, adding a new value
>> ('-2' or 'u') for normal user?
>> That way you just need to patch the 1-2 spots where normal users are
>> generated.
>>
>>
> There are no such spot that I could find at first glance in buildroot
> itself, but that would break user packages...
> so I don't think that's a good idea. It would fix more (harmless) bugs
> than it would create, but the bugs
> created would be more problematic than the bugs fixed....
>
> --
> [image: SMILE]  <http://www.smile.eu/>
>
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> *Jérémy ROSEN*
> Architecte technique
>
> [image: email] jeremy.rosen@smile.fr
> [image: phone]  +33 6 88 25 87 42
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
> <https://www.facebook.com/smileopensource> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>
> [image: Découvrez l’univers Smile, rendez-vous sur smile.eu]
> <https://www.smile.eu/fr/publications/livres-blancs/yocto?utm_source=signature&utm_medium=email&utm_campaign=signature>
>

Patch
diff mbox series

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index b3e83b5d3b..b6bd85f130 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -428,10 +428,12 @@  define SYSTEMD_INSTALL_IMAGES_CMDS
 endef
 
 define SYSTEMD_USERS
+	# udev user groups
 	- - input -1 * - - - Input device group
-	- - systemd-journal -1 * - - - Journal
 	- - render -1 * - - - DRI rendering nodes
 	- - kvm -1 * - - - kvm nodes
+	# systemd user groups
+	- - systemd-journal -1 * - - - Journal
 	$(SYSTEMD_REMOTE_USER)
 	$(SYSTEMD_COREDUMP_USER)
 	$(SYSTEMD_NETWORKD_USER)