Overview
Request 798881 accepted
- Created by WernerFink
- In state accepted
Request History
WernerFink created request
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto accepted review
Check script succeeded
licensedigger accepted review
ok
dimstar accepted review
dimstar_suse set openSUSE:Factory:Staging:C as a staging project
Being evaluated by staging project "openSUSE:Factory:Staging:C"
dimstar_suse accepted review
Picked "openSUSE:Factory:Staging:C"
WernerFink added kukuk as a reviewer
The temporary remove of the link /bin/sh and/or /usr/bin/sh cause trouble during builf and installation
kukuk accepted review
dimstar_suse accepted review
Staging Project openSUSE:Factory:Staging:C got accepted.
dimstar_suse approved review
Staging Project openSUSE:Factory:Staging:C got accepted.
dimstar_suse accepted request
Staging Project openSUSE:Factory:Staging:C got accepted.
Nasty:
the post script uses /bin/sh to run update-alternatives that actually defines what /bin/sh is.The sanest will likely be for %post -p /usr/bin/bash here; we know /usr/bin/bash exists and is capable of running its own post script
I see in the build log
Ohmm ... from spec file
hm.. interesting.. then I rather think the build script is doing something weird here. the script does what I'd expect to be ok.
the rpm scriptlet does what I'd expect to be ok
It could be that if the root is not default root then rpm uses chroot() with default SHELL for installing or updating ... maybe there would help to export the SHELL variable with existing shell like the bash
From manual page of rpm:
/.build/build-recipe: /bin/egrep: /bin/sh: bad interpreter: No such file or directory
So the scripts inside the build directory are using /bin/sh, but if you look at the list of installed packages before, bash gets installed, but not update-alternatives. So /bin/sh cannot be available.
We need to fix the list of RPMs which needs to be pre-installed if we use /bin/sh that early.
Adrian and mls are looking into this. The usage of 'egrep' can easily be changed to grep -E (which is what egrep does anyway - so we can get away here without sh).
As in the spec file of bash we have
the update-alternatives seems to be missed in preinstalled build image
@kukuk can you please accept the review on your name here?
Obs has been fixed; it ignored the - p parameter for post scripts and assumed /bin/sh. Staging:C now looks good
I wonder about installation from DVD/CD/Blu-Ray as there is also a minimal setup ... wouldn't be a simple
ln -sf /usr/bin/bash /bin/sh
from host system into the chroot environment to get the initial/bin/sh
workingThe regular installer already used the post script with the defined interpreter (i.e. bash, as defined; and then uses update-alternatives to properly link up /bin/sh -> usr/bin/sh -> /etc/alternatives/sh -> /usr/bin/bash. For OBS this simply did not work because it ignored the -p flag to use bash and made wrong assumptions.