New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OBS Arch build seems to use different defaults for $PATH than Arch #713
Comments
Why don't you call that helper during your build? |
The build script uses 'su -lc "makepkg ..."' to do the build, shouldn't that call the helper script in /etc/profile.d that adds /usr/bin/vendor_perl to the PATH? |
@hennevogel: The reason for filling this bug is not, that the build failed [a workaround in PKGBUILD is trivial], but that the Arch build environment on OBS seems to be different than the build enviroment used by the Arch people. I did further investigations. The following commands in PKGBUILD This means, that the build is started with "/usr/bin" as PATH, while /etc/profile would produce an extended path (including /usr/local/bin, /usr/local/sbin/..). obs-build spawns "su -lc cd /usr/src/packages/SOURCES && makepkg --config ../makepkg.conf -ef abuild", which spawns "-bash -c cd /usr/src/packages/SOURCES && makepkg --config ../makepkg.conf -ef" as shell. My only hint is from shell.c from the bash sources: So maybe "su -l" does not execute /etc/profile, because it spawn "-bash" https://build.opensuse.org/build/home:e9925248/Arch_Extra/i586/test/_log |
openSuSE enables NON_INTERACTIVE_LOGIN_SHELLS: Arch does not patch bash, so it does not enable NON_INTERACTIVE_LOGIN_SHELLS: So "su -l" might be not enough on Arch. |
login shells started with "su -l" behave differently on Arch (/etc/profile not executed): openSUSE/open-build-service#713
Ok, that explains it. What were the bash guys smoking? Sourcing /etc/profile for login shells is the standard unix behavior. (Seems like Debian/Fedora/SUSE all define NON_INTERACTIVE_LOGIN_SHELLS to fix this.) |
I merged your obs-build pull request, closing this issue... Thanks for investigating this! |
Arch installs some perl programs instead of /usr/bin to /usr/bin/vendor_perl (eg. see https://www.archlinux.org/packages/community/any/po4a/ )
The Arch perl packages ships a helper script in /etc/profile.d, which adds /usr/bin/vendor_perl to the path.
Other PKGBUILD files can find programs in /usr/bin/vendor_perl just via $PATH (see https://www.archlinux.org/packages/community/any/man-pages-de/ for an example).
So the build process must somehow include /etc/profile - otherwise /usr/bin/vendor_perl would have never been part of the path.
On OBS this build fails: https://build.opensuse.org/package/live_build_log/home:e9925248/test1/Arch_Extra/i586
I created a small test build, which prints the $PATH (with the perl package present)
https://build.opensuse.org/package/live_build_log/home:e9925248/test/Arch_Extra/i586
The text was updated successfully, but these errors were encountered: