Skip to contentSkip to conversation

oe-selftest: Add static postgres user/group for reproducible build test

PATCH In review Zhang Xiao 3 participants 5 messages Apr 21 – May 11

lore
Share & tools
lore

Zhang Xiao

author
#0 lore raw

PATCH v2 1/1 oe-selftest: Add static postgres user/group for reproducible build test

This adds the static postgres UID/GID entries to static-passwd and static-group, fixing the "Nothing PROVIDES 'postgresql'" error when running reproducible test.

The selftest environment requires static system user IDs to ensure build reproducibility, which was missing for the postgres user/group before this change.

---
 meta-selftest/files/static-group  | 1 +
 meta-selftest/files/static-passwd | 1 +
 2 files changed, 2 insertions(+)
meta-selftest/files/static-group +1 -0
index 6a9ece20a8..a08795c4ea 100644
@@ -31,4 +31,5 @@ audio:x:532:
 empower:x:533:
 cmake-example:x:534:
 meson-example:x:535:
+postgres:x:536
 nogroup:x:65534:
meta-selftest/files/static-passwd +1 -0
index 98017c8153..ba1dcd54d8 100644
@@ -21,3 +21,4 @@ ptest:x:529:529::/:/bin/nologin
 xuser:x:530:530::/:/bin/nologin
 cmake-example:x:534:534::/var/lib/cmake-example:/bin/false
 meson-example:x:535:535::/var/lib/meson-example:/bin/false
+postgres:x:536:536::/:/bin/nologin
Signature · 1 line
2.53.0
#1 lore raw
Quoted 9 lines · ZhangXiao via lists.openembedded.org

This adds the static postgres UID/GID entries to static-passwd and static-group, fixing the "Nothing PROVIDES 'postgresql'" error when running reproducible test.

The selftest environment requires static system user IDs to ensure build reproducibility, which was missing for the postgres user/group before this change.

Since this is a meta-oe recipe, shouldn't those static IDs be defined in
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-passwd-meta-oe
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-group-meta-oe
instead?

Regards,

Quoted 24 lines
---
 meta-selftest/files/static-group  | 1 +
 meta-selftest/files/static-passwd | 1 +
 2 files changed, 2 insertions(+)
meta-selftest/files/static-group +1 -0
index 6a9ece20a8..a08795c4ea 100644
@@ -31,4 +31,5 @@ audio:x:532:
 empower:x:533:
 cmake-example:x:534:
 meson-example:x:535:
+postgres:x:536
 nogroup:x:65534:
meta-selftest/files/static-passwd +1 -0
index 98017c8153..ba1dcd54d8 100644
@@ -21,3 +21,4 @@ ptest:x:529:529::/:/bin/nologin
 xuser:x:530:530::/:/bin/nologin
 cmake-example:x:534:534::/var/lib/cmake-example:/bin/false
 meson-example:x:535:535::/var/lib/meson-example:/bin/false
+postgres:x:536:536::/:/bin/nologin
Signature · 2 lines
Yoann Congal
Smile ECS
#2 lore raw

Hi Yoann,

Given only static-group and static-passwd are added at meta/lib/oeqa/selftest/cases/reproducible.py in oe-core

as the commit https://git.openembedded.org/openembedded-core/commit/meta/lib/oeqa/selftest/cases/reproducible.py?id=77397bace64dfd03e704400fea918d93f00d0bf7,

the static-{group,passwd} in meta-openembedded/meta-* layers are not included(eg: static-group-meta-oe/static-passwd-meta-oe).

I encounter the same issue during reproducible testing

So how to expand the USERADD_GID_TABLES and USERADD_UID_TABLES to add the static files in meta-openembedded to avoid the static id not defined issue.

Generally I run "oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds", export the env variable USERADD_GID_TABLES and USERADD_UID_TABLES or the other method we already have defined in yocto?

Thanks.

Quoted 58 lines · Yoann Congal via lists.openembedded.org

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 9 lines · ZhangXiao via lists.openembedded.org

This adds the static postgres UID/GID entries to static-passwd and static-group, fixing the "Nothing PROVIDES 'postgresql'" error when running reproducible test.

The selftest environment requires static system user IDs to ensure build reproducibility, which was missing for the postgres user/group before this change.

Since this is a meta-oe recipe, shouldn't those static IDs be defined in
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-passwd-meta-oe
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-group-meta-oe
instead?

Regards,

Quoted 20 lines
---
  meta-selftest/files/static-group  | 1 +
  meta-selftest/files/static-passwd | 1 +
  2 files changed, 2 insertions(+)
meta-selftest/files/static-group +1 -0
index 6a9ece20a8..a08795c4ea 100644
@@ -31,4 +31,5 @@ audio:x:532:
  empower:x:533:
  cmake-example:x:534:
  meson-example:x:535:
+postgres:x:536
  nogroup:x:65534:
meta-selftest/files/static-passwd +0 -0
index 98017c8153..ba1dcd54d8 100644

meta-selftest/files/static-passwd ptest:x:529:529::/:/bin/nologin · line 24

Quoted 4 lines
meta-selftest/files/static-passwd +1 -0
@@ -21,3 +21,4 @@ ptest:x:529:529::/:/bin/nologin
  xuser:x:530:530::/:/bin/nologin
  cmake-example:x:534:534::/var/lib/cmake-example:/bin/false
  meson-example:x:535:535::/var/lib/meson-example:/bin/false
+postgres:x:536:536::/:/bin/nologin

--
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#235603):https://lists.openembedded.org/g/openembedded-core/message/235603 Mute This Topic:https://lists.openembedded.org/mt/118934221/3618679
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Le lun. 11 mai 2026 à 05:11, Chi, Zhixiong <[email protected]> a écrit :

Quoted 14 lines

Hi Yoann,

Given only static-group and static-passwd are added at meta/lib/oeqa/selftest/cases/reproducible.py in oe-core

as the commit
https://git.openembedded.org/openembedded-core/commit/meta/lib/oeqa/selftest/cases/reproducible.py?id=77397bace64dfd03e704400fea918d93f00d0bf7
,

the static-{group,passwd} in meta-openembedded/meta-* layers are not included(eg: static-group-meta-oe/static-passwd-meta-oe).

I encounter the same issue during reproducible testing

Quoted 8 lines

So how to expand the USERADD_GID_TABLES and USERADD_UID_TABLES to add the static files in meta-openembedded to avoid the static id not defined issue.

Generally I run "oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds", export the env variable USERADD_GID_TABLES and USERADD_UID_TABLES or the other method we already have defined in yocto?

See my answer in another thread:
https://lore.kernel.org/openembedded-devel/[email protected]/T/#m79d4e29f5b1b2651cd9382b85e9b5d09f5465b0c

But, basically, you can write (in your local.conf or equivalent):
USERADD_UID_TABLES:append = ' files/static-passwd-meta-gnome' USERADD_GID_TABLES:append = ' files/static-group-meta-networking' USERADD_UID_TABLES:append = ' files/static-passwd-meta-networking' USERADD_GID_TABLES:append = ' files/static-group-meta-oe' USERADD_UID_TABLES:append = ' files/static-passwd-meta-oe'

Regards,

Thanks.

Quoted 64 lines · Yoann Congal via lists.openembedded.org

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Tue Apr 21, 2026 at 9:06 AM CEST, ZhangXiao via lists.openembedded.org wrote:

This adds the static postgres UID/GID entries to static-passwd and static-group, fixing the "Nothing PROVIDES 'postgresql'" error when running reproducible test.

The selftest environment requires static system user IDs to ensure build reproducibility, which was missing for the postgres user/group before this change.

Since this is a meta-oe recipe, shouldn't those static IDs be defined inhttps://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-passwd-meta-oehttps://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-group-meta-oe instead?

Regards,

---
 meta-selftest/files/static-group  | 1 +
 meta-selftest/files/static-passwd | 1 +
 2 files changed, 2 insertions(+)
meta-selftest/files/static-group +1 -0
index 6a9ece20a8..a08795c4ea 100644
@@ -31,4 +31,5 @@ audio:x:532:
 empower:x:533:
 cmake-example:x:534:
 meson-example:x:535:
+postgres:x:536
 nogroup:x:65534:
meta-selftest/files/static-passwd +1 -1
index 98017c8153..ba1dcd54d8 100644
@@ -21,3 +21,4 @@ ptest:x:529:529::/:/bin/nologin
 xuser:x:530:530::/:/bin/nologin
 cmake-example:x:534:534::/var/lib/cmake-example:/bin/false
 meson-example:x:535:535::/var/lib/meson-example:/bin/false
+postgres:x:536:536::/:/bin/nologin
 
--

Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#235603): https://lists.openembedded.org/g/openembedded-core/message/235603
Mute This Topic: https://lists.openembedded.org/mt/118934221/3618679
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
Yoann Congal
Smile ECS
#4 lore raw

Thanks for your detailed explanation in the two threads.

________________________________
From: Yoann Congal <[email protected]>
Sent: Monday, May 11, 2026 20:31
To: Chi, Zhixiong <[email protected]>
Cc: Zhang, Xiao <[email protected]>; [email protected] <[email protected]>
Subject: Re: [OE-core] [PATCH v2] oe-selftest: Add static postgres user/group for reproducible build test

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe. Le lun. 11 mai 2026 à 05:11, Chi, Zhixiong <[email protected]<mailto:[email protected]>> a écrit :

Hi Yoann,

Given only static-group and static-passwd are added at meta/lib/oeqa/selftest/cases/reproducible.py<https://urldefense.com/v3/__http://reproducible.py__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrF6kx4OxA$> in oe-core

as the commit https://git.openembedded.org/openembedded-core/commit/meta/lib/oeqa/selftest/cases/reproducible.py?id=77397bace64dfd03e704400fea918d93f00d0bf7<https://urldefense.com/v3/__https://git.openembedded.org/openembedded-core/commit/meta/lib/oeqa/selftest/cases/reproducible.py?id=77397bace64dfd03e704400fea918d93f00d0bf7__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrGSocaO2A$>,

the static-{group,passwd} in meta-openembedded/meta-* layers are not included(eg: static-group-meta-oe/static-passwd-meta-oe).

I encounter the same issue during reproducible testing

So how to expand the USERADD_GID_TABLES and USERADD_UID_TABLES to add the static files in meta-openembedded to avoid the static id not defined issue.

Generally I run "oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds", export the env variable USERADD_GID_TABLES and USERADD_UID_TABLES or the other method we already have defined in yocto?

See my answer in another thread: https://lore.kernel.org/openembedded-devel/[email protected]/T/#m79d4e29f5b1b2651cd9382b85e9b5d09f5465b0c<https://urldefense.com/v3/__https://lore.kernel.org/openembedded-devel/[email protected]/T/*m79d4e29f5b1b2651cd9382b85e9b5d09f5465b0c__;Iw!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrF79dSvig$>

But, basically, you can write (in your local.conf or equivalent):
USERADD_UID_TABLES:append = ' files/static-passwd-meta-gnome' USERADD_GID_TABLES:append = ' files/static-group-meta-networking' USERADD_UID_TABLES:append = ' files/static-passwd-meta-networking' USERADD_GID_TABLES:append = ' files/static-group-meta-oe' USERADD_UID_TABLES:append = ' files/static-passwd-meta-oe'

Regards,

Thanks.

On 4/21/26 15:52, Yoann Congal via lists.openembedded.org<https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrERzLKMeg$> wrote:

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Tue Apr 21, 2026 at 9:06 AM CEST, ZhangXiao via lists.openembedded.org<https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrERzLKMeg$> wrote:

This adds the static postgres UID/GID entries to static-passwd and static-group, fixing the "Nothing PROVIDES 'postgresql'" error when running reproducible test.

The selftest environment requires static system user IDs to ensure build reproducibility, which was missing for the postgres user/group before this change.

Since this is a meta-oe recipe, shouldn't those static IDs be defined in
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-passwd-meta-oe<https://urldefense.com/v3/__https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-passwd-meta-oe__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrGeam4qWg$>
https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-group-meta-oe<https://urldefense.com/v3/__https://git.openembedded.org/meta-openembedded/tree/meta-oe/files/static-group-meta-oe__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrE0kNLQtQ$>
instead?

Regards,

---
 meta-selftest/files/static-group  | 1 +
 meta-selftest/files/static-passwd | 1 +
 2 files changed, 2 insertions(+)
meta-selftest/files/static-group +1 -0
index 6a9ece20a8..a08795c4ea 100644
@@ -31,4 +31,5 @@ audio:x:532:
 empower:x:533:
 cmake-example:x:534:
 meson-example:x:535:
+postgres:x:536
 nogroup:x:65534:
meta-selftest/files/static-passwd +1 -0
index 98017c8153..ba1dcd54d8 100644
@@ -21,3 +21,4 @@ ptest:x:529:529::/:/bin/nologin
 xuser:x:530:530::/:/bin/nologin
 cmake-example:x:534:534::/var/lib/cmake-example:/bin/false
 meson-example:x:535:535::/var/lib/meson-example:/bin/false
+postgres:x:536:536::/:/bin/nologin

--
Yoann Congal
Smile ECS

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#235603): https://lists.openembedded.org/g/openembedded-core/message/235603<https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/235603__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrG4F2EVrA$>
Mute This Topic: https://lists.openembedded.org/mt/118934221/3618679<https://urldefense.com/v3/__https://lists.openembedded.org/mt/118934221/3618679__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrEOSD1-Vg$>
Group Owner: [email protected]<mailto:[email protected]>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub<https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!Yt21GdLk9VztwQ8MtvSv8JVtmJIzN-WRvKtyQ1YyeSFO0k8VdjT96q8UoUUOicvYNdf-bPoUrmi76Q8IhRWyHrHoYGqrKg$> [[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

--
Yoann Congal
Smile ECS