source build fails with USER: parameter not set

Bug #1155784 reported by Jason Noble
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
New
Medium
Unassigned

Bug Description

$lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04

$ apt-cache policy php5
php5:
  Installed: 5.3.10-1ubuntu3.6
  Candidate: 5.3.10-1ubuntu3.6
  Version table:
 *** 5.3.10-1ubuntu3.6 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status

Expected result:
debuild produces the package files defined in debain/control

Actual result:
debuild fails and exits with status 2.

Steps to reproduce:

o Fresh install of ubuntu server 12.04 amd64
o apt-get update && apt-get upgrade
o apt-get build-dep php5
o apt-get install language-pack-de
o apt-get source php5
o cd php5-5.3.10
o debuild

Building the binaries succeeds, but fails during test-results.txt with the following lines:

# start our own mysql server for the tests
/bin/sh debian/setup-mysql.sh 2656 /home/jason/php5-test/php5-5.3.10/mysql_db
debian/setup-mysql.sh: 44: debian/setup-mysql.sh: USER: parameter not set
make: *** [test-results.txt] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

The full build log is attached.

Revision history for this message
Jason Noble (jasyn) wrote :
Revision history for this message
Robie Basak (racb) wrote :

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.

Changed in php5 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Robie Basak (racb) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.