Thank you for taking the time to report this bug and helping to make Ubuntu better.
I have reproduced this in Precise. Note that I had to install devscripts to make your reproduction steps work. But I can't reproduce this in Raring.
However, I can successfully build php5 in Precise using sbuild (with --resolve-alternatives). Presumably the buildds can build it too. So I'm not sure that this is a bug.
It does seem wrong to me that debian/rules says:
$(SHELL) debian/setup-mysql.sh $(MYSQL_PORT) $(MYSQL_DATA_DIR)
but debian/setup-mysql.sh has a shebang of #!/bin/sh. So what if the user's shell is bash? This is the case in Raring (5.4.9-4ubuntu2) too.
Setting Importance to Medium as a workaround (sbuild) is available. I'm still not sure whether this is a valid bug though, since I'm not sure what the expectations are for the buildability of packages outside of buildds.
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I have reproduced this in Precise. Note that I had to install devscripts to make your reproduction steps work. But I can't reproduce this in Raring.
However, I can successfully build php5 in Precise using sbuild (with --resolve- alternatives) . Presumably the buildds can build it too. So I'm not sure that this is a bug.
It does seem wrong to me that debian/rules says: setup-mysql. sh $(MYSQL_PORT) $(MYSQL_DATA_DIR) setup-mysql. sh has a shebang of #!/bin/sh. So what if the user's shell is bash? This is the case in Raring (5.4.9-4ubuntu2) too.
$(SHELL) debian/
but debian/
Setting Importance to Medium as a workaround (sbuild) is available. I'm still not sure whether this is a valid bug though, since I'm not sure what the expectations are for the buildability of packages outside of buildds.