Skip to contentSkip to conversation

nativesdk-postgresql - causing chown: invalid user: 'postgres:postgres'

meta-oe [email protected] 2 participants 4 messages Feb 9, 2023 – Feb 10, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

i am trying to install the PostgreSQL and the development package (postgresql-server-dev) as part of the SDK.

I added via bbappend BBCLASSEXTED_append = "nativesdk" to the postgresql_12.9.bb.

I can build an image for a raspberry 4 pi.
However when i try to populate the sdk it stops with an error during the do_install() for PostgreSQL:

| chown: invalid user: ‘postgres:postgres’
| WARNING: exit code 1 from a shell command.

This happens when the owner for pgsql libs is changed to the user postgres. I did create a the user manually on the host system but this didn't help with the problem.

If i build the image itself it works flawlessly.

Any ideas what I'm doing wrong?

Best Regards

Alexander

#1 lore raw
Quoted 14 lines · On Thu, 2023-02-09 at 00:05 -0800, [email protected] wrote:

Hello,

i am trying to install the PostgreSQL and the development package (postgresql-server-dev) as part of the SDK.

I added via bbappend BBCLASSEXTED_append = "nativesdk" to the postgresql_12.9.bb.

I can build an image for a raspberry 4 pi.
However when i try to populate the sdk it stops with an error during the do_install() for PostgreSQL:
| chown: invalid user: ‘postgres:postgres’
| WARNING: exit code 1 from a shell command.

Quoted 8 lines

This happens when the owner for pgsql libs is changed to the user postgres.
I did create a the user manually on the host system but this didn't help with the problem.

If i build the image itself it works flawlessly.

Any ideas what I'm doing wrong?

I suspect this was solved with

https://git.yoctoproject.org/poky/commit/?id=8dd0a45c858290288e1a1fef046b5cfcf7ff6257

Cheers,

Richard

#2 lore raw

Hi, i did send my answer to Richard only, i re post it for context:

Quoted 79 lines · On Thu, 2023-02-09 at 06:44 -0800, [email protected] wrote:
Quoted 43 lines

Hello Richard,

will this commit be integrated into the dunfell branche or can i

integrate it by my self?

At least i don't see the changes of the commit in the latest version

of the dunfell branch.

Is there a best practice to integrate this patches when they are not

available on the branch?

Quoted 1 line

Thanks for pointing me to the commit.

I did cc: the stable release maintainer on the commit. I think the

might be persuaded to backport that change if it doesn't show problems

in testing.

Cheers,

Quoted 3 lines

Richard

I integrated the changes of the commit you posted, however i still have the same error message coming up. Do i need to make changes in the recipe to make the  intercept work?

Best Regards

Alexander

#3 lore raw
Quoted 3 lines · On Thu, 2023-02-09 at 23:16 -0800, [email protected] wrote:

I integrated the changes of the commit you posted, however i still have the same error message coming up. Do i need to make changes in the recipe to make the  intercept work?

No, it should have changed PATH in the recipe and used these intercept scripts. The intercept scripts should have changed the user/group to "root", which would work under pseudo in the SDK context.

You'll probably have to debug it a little bit, I'd check to see if the intercept scripts are being called, if so, then check the substitutions. If not, work out what PATH looks like and why they're not being called.

That patch is how we fixed the issue on master though so it should be close, I'm surprised it doesn't work.

Cheers,

Richard