quotes in remaining arguments to pbuilder-dist must be escaped

Bug #398989 reported by R Pavlik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ubuntu-dev-tools

In order to pass an argument to the underlying pbuilder, for example, --extramirror, any quotes must be escaped by the user. It seems that one level of quotes are stripped by pbuilder-dist for the "remaining arguments" which is less than ideal.

Example:
Problem:
ryan@gamma:~/srctrees/ubuntu$ pbuilder-dist dapper login --othermirror 'deb http://ppa.launchpad.net/abiword-stable/ppa/ubuntu dapper main'
  -> Logging to /home/ryan/pbuilder/dapper_result/last_operation.log
Building the build Environment
 -> extracting base tarball [/home/ryan/pbuilder/dapper-base.tgz]
 -> creating local configuration
 -> copying local configuration
  -> Installing apt-lines
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
 -> policy-rc.d already exists
Obtaining the cached apt archive contents
 -> entering the shell
File extracted to: /var/cache/pbuilder/build//22363

cat /etc/apt/sources.list
deb
deb http://mirror.anl.gov/pub/ubuntu/ dapper main restricted universe multiverse
#deb-src http://mirror.anl.gov/pub/ubuntu/ dapper main restricted universe multiverse

Problem worked around:
ryan@gamma:~/srctrees/ubuntu$ pbuilder-dist dapper login --othermirror \'deb http://ppa.launchpad.net/abiword-stable/ppa/ubuntu dapper main\'
  -> Logging to /home/ryan/pbuilder/dapper_result/last_operation.log
Building the build Environment
 -> extracting base tarball [/home/ryan/pbuilder/dapper-base.tgz]
 -> creating local configuration
 -> copying local configuration
  -> Installing apt-lines
 -> mounting /proc filesystem
 -> mounting /dev/pts filesystem
 -> policy-rc.d already exists
Obtaining the cached apt archive contents
 -> entering the shell
File extracted to: /var/cache/pbuilder/build//24285

cat /etc/apt/sources.list
deb http://ppa.launchpad.net/abiword-stable/ppa/ubuntu dapper main
deb http://mirror.anl.gov/pub/ubuntu/ dapper main restricted universe multiverse
#deb-src http://mirror.anl.gov/pub/ubuntu/ dapper main restricted universe multiverse

Revision history for this message
R Pavlik (abiryan) wrote :

Interestingly, even set up like this workaround, I cannot build a package that requires one of the packages in the additional mirror.

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 398989] [NEW] quotes in remaining arguments to pbuilder-dist must be escaped

> $ pbuilder-dist dapper login  --othermirror \'deb http://ppa.launchpad.net/abiword-stable/ppa/ubuntu dapper main\'

Maybe this will work:

pbuilder-dist dapper login --othermirror "\'deb http://ppa.launchpad.net/abiword-stable/ppa/ubuntu dapper main\'"

Benjamin Drung (bdrung)
Changed in ubuntu-dev-tools (Ubuntu):
status: New → Fix Committed
Revision history for this message
Siegfried Gevatter (rainct) wrote :

I've commited a fix to bzr.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.103

---------------
ubuntu-dev-tools (0.103) experimental; urgency=low

  [ Benjamin Drung ]
  * sponsor-patch:
    - Fix NameError: global name 'debdiff_filename' is not defined.
    - Add --workdir parameter to set the working directory.
  * ubuntutools/update_maintainer.py: Fix failure if debian/control.in is a
    directory.

  [ Luca Falavigna ]
  * debian/control:
    - Add Benjamin Drung to Uploaders.
    - Add DM-Upload-Allowed field, this way Benjamin can upload new
      versions on his own.
  * ubuntutools/misc.py:
    - Use output of dpkg --print-architecture command to correctly display
      platform architecture (Closes: #594424).

  [ Siegfried-Angel Gevatter Pujals ]
  * pbuilder-dist:
     - Do not show a warning when "experimental" is used; there is no
       debootstrap file for it but it should just work anyway.
     - Wrap any extra (user) arguments appended to the pbuilder command with
       quotation marks, when needed (LP: #398989).
  * bash_completion/pbuilder-dist:
     - Enable auto-completion for "pbuilder-experimental".
  * doc/pbuilder-dist.1:
     - Move the documentation for --main-only (previously "mainonly") and
       --debug-echo to a new Options section.

  [ Stefano Rivera ]
  * Add manpages for sponsor-patch and import-bug-from-debian.
  * hugdaylist, manage-credentials, massfile, merge-changelog,
    ubuntutools/requestsync/common.py: Some pyflakes-induced cleanup.
  * ubuntutools/lp/libsupport.py: Support production API URLs in
    translate_web_api.

ubuntu-dev-tools (0.102) experimental; urgency=low

  [ Dustin Kirkland ]
  * errno, doc/errno.1, debian/control, debian/copyright, setup.py:
    - add an errno utility, LP: #612267

  [ Kees Cook ]
  * mk-sbuild: update examples to include "-A".

  [ Benjamin Drung ]
  * suspicious-source: whitelist font source formats. Thanks to Nicolas
    Spalinger for the patch (LP: #365147).
  * Update the man page of suspicious-source to match the rewrite.
  * syncpackage:
    - Don't upload orig tarball if not needed.
    - Print error message if the download fails (LP: #639899).
    - Check if the specified Debian component is valid (LP: #639896).
  * update-maintainer: Don't change the Maintainer field if the email is set
    to a @lists.ubuntu.com address.
  * sponsor-patch: New script to download a patch from a Launchpad bug, patch
    the source package, build, check and uploads it (to Ubuntu or a PPA).
  * wrap-and-sort: New script to wrap long lines and sort items in packaging
    files.

  [ Stefano Rivera ]
  * update-maintainer: Correctly update the Maintainer field to the new Ubuntu
    Developers address (instead of the calling user) when the package is not
    in Debian.

  [ Iain Lane ]
  * all: Use production API rather than edge by default. Should be more
    reliable and was advised by lifeless (LP team).

  [ Michael Bienia ]
  * Add 'natty' to recognized names and make it the default.

  [ Colin Watson ]
  * Fix NAME section of lp-set-dup(1).
  * lp-list-bugs: New tool.
 -- Benjamin Drung <email address hidden> Fri, 24 Sep 2010 16:01:03 +0000

Changed in ubuntu-dev-tools (Ubuntu):
status: Fix Committed → Fix Released
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.