Package: pbuilder
Version: 0.200
Severity: normal
Tags: patch

When issuing DIST=... pdebuild [1] from within a package source directory
to start building it, /usr/lib/pbuilder/pbuilder-buildpackage outputs 
the above error and build fails.

After searching it, it appears that the following line (#62) in file
/usr/bin/pdebuild:

    ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build 
${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" 
--debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" "$@"  
../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc

leads to the error. Specifically, it passes an empty argument through
"$@", which then makes the conditional code (while [ -n "$1" ]; do...
loop) in /usr/lib/pbuilder/pbuilder-checkparams [2] to break early,
thus supplying an empty dsc filename to
/usr/lib/pbuilder/pbuilder-buildpackage.

A patch is attached that resolved this issue with my configuration.
The configuration in use is also attached, for your reference.

NOTES:

[1] pdebuild is allowed to run without pwd; relevant lines of /etc/sudoers are: 

    Cmnd_Alias PDEBUILD = /usr/bin/pdebuild,/usr/bin/debuild-pbuilder
    DEVS HOST=(ALL) NOPASSWD: PDEBUILD

    with DEVS being a User_Alias and HOST a Host_Alias.

[2] The debsums error below is due to the attached patch been applied to the 
    file in question.

regards
George Zarkadas

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable'), (450, 'testing-proposed-updates'), (450, 'testing'), (400, 
'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=el_GR.utf8, LC_CTYPE=el_GR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pbuilder depends on:
ii  coreutils                8.5-1           GNU core utilities
ii  debconf [debconf-2.0]    1.5.36.1        Debian configuration management sy
ii  debianutils              3.4             Miscellaneous utilities specific t
ii  debootstrap              1.0.26+squeeze1 Bootstrap a basic Debian system
ii  wget                     1.12-2.1        retrieves files from the web

Versions of packages pbuilder recommends:
ii  devscripts           2.10.69+squeeze1    scripts to make the life of a Debi
ii  fakeroot             1.14.4-1            Gives a fake root environment
ii  sudo                 1.7.4p4-2.squeeze.2 Provide limited super user privile

Versions of packages pbuilder suggests:
ii  cowdancer                     0.62+nmu2  Copy-on-write directory tree utili
ii  gdebi-core                    0.6.4      Simple tool to install deb files
pn  pbuilder-uml                  <none>     (no description available)

-- debconf information:
  pbuilder/mirrorsite: http://ftp.gr.debian.org/debian/
  pbuilder/nomirror:
  pbuilder/rewrite: false

-- debsums errors found:
debsums: changed file /usr/lib/pbuilder/pbuilder-checkparams (from pbuilder 
package)
--- /usr/lib/pbuilder/pbuilder-checkparams.orig	2011-07-27 00:39:13.744900089 +0300
+++ /usr/lib/pbuilder/pbuilder-checkparams	2011-07-27 00:46:34.139646901 +0300
@@ -41,7 +41,12 @@
 #option for user-mode-linux only.
 IGNORE_UMOUNT=""
 
-while [ -n "$1" ]; do 
+while [ $# -gt 0 ]; do
+    #ignore empty arguments (for the case "$@" is empty)
+    if [ -z "$1" ]; then
+	shift
+	continue
+    fi
     case "$1" in 
 	--basetgz) 
 	    case "${PBCURRENTCOMMANDLINEOPERATION}" in

Attachment: pbuilder-config.tar.gz
Description: application/compressed-tar

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to