solus-project/solbuild

groupadd: command not found, build failed.

gkr09 opened this issue · 15 comments

gkr09 commented

I was trying to build an eopkg in manjaro.
Solbuild compiled fine and 'solbuild init' downloaded fine too.
But, when I try to run 'solbuild update' or 'solbuild build', it throws up an error-

/bin/sh: groupadd: command not found
ERRO[13:19:00] Failed to add build group to system error="exit status 127"
ERRO[13:19:01] Failed to build packages

It seems that 'groupadd' command (shadow ?) is not installed in the chroot environment that solbuild downloads.

It is, otherwise we wouldn't call it. This is more of a path issue me thinks. What's your system $PATH look like ? We have it in /usr/sbin/groupadd.

gkr09 commented

I tried adding /usr/sbin to $PATH and that still doesn't solve it.
$PATH
bash: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl: No such file or directory

And 'groupadd' is present in /usr/sbin. I checked.

Its not using the external groupadd. Its using the internal one. The environment is being affected by the host. I'll need to do more explicit environment filtering and ensure tools can be found within the chroot.

gkr09 commented

BTW I can't do 'solbuild chroot' also. It throws up the same error.

Yes because it can't properly init it. I need to do fixes. Puzzled why you're doing builds on Manjaro - there's no way you could possibly be testing those :P

gkr09 commented

I run Manjaro budgie because I can't run solus as my daily. My printer won't work with it !! :)

You building solbuild from git? ^ Those should do the trick

gkr09 commented

Yes, I built it from git.

Can you build again and see if its fixed pls ? :)

gkr09 commented

Okay !! 👍

gkr09 commented

Hey, That fixed the missing groupadd but now 'ip' is not found.

/bin/sh: ip: command not found
ERRO[17:07:45] Failed to configure networking error="exit status 127"
ERRO[17:07:46] Chroot failure

If it helps: On mounting the solbuild image present at '/var/lib/solbuild/images', there is no 'ip' binary at '/usr/sbin' or 'usr/bin' !

^ Tada

gkr09 commented

I am sorry to keep bugging you like this but,

mount: /var/cache/solbuild/main-x86_64/budgie-shutdowntimer-applet/union/home/build/YPKG/sources/master: mount point does not exist.

ERRO[08:56:21] Failed to bind mount source error="exit status 32" target="/var/cache/solbuild/main-x86_64/budgie-shutdowntimer-applet/union/home/build/YPKG/sources/master"

ERRO[08:56:21] Cannot continue without sources
ERRO[08:56:22] Failed to build packages

OK well thats got nothing to do with solbuild being broken - that's your ypkg being wrong :)

Note - you really should not use master as a git source, you should lock to a specific commit.
Anyway, make sure your source line starts with git| if its a git source.

gkr09 commented

My bad. :)
Thanks man that fixed everything !!
You're awesome !