[Bug 966867] Re: debsign --debs-dir is broken due to incorrectly added quotes

Benjamin Drung bdrung at debian.org
Wed Mar 28 09:35:00 UTC 2012


Note that devscripts is seeded on some CDs.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to devscripts in Ubuntu.
https://bugs.launchpad.net/bugs/966867

Title:
  debsign --debs-dir is broken due to incorrectly added quotes

Status in “devscripts” package in Ubuntu:
  New
Status in “devscripts” package in Debian:
  Unknown

Bug description:
  debsign from devscripts in precise has broken the --debs-dir option:

    $ ls -ld ../source
    drwxrwxr-x 2 steve steve 4096 Mar 27 23:12 ../source
    $ debsign --debs-dir ../source
   debsign: could not find directory "../source"!

  strace'ing debsign shows it trying to do:

    15372 stat("\"../source\"", 0x7fffbbc3bba0) = -1 ENOENT (No such
  file or directory)

  (notice the extra \" in there.)

  Looking at the source, when handling the option, it does the
  following:

          --debs-dir)
              shift
              opt_debsdir="$(echo \"${1%/}\" | sed -e 's%/\+%/%g')"

  note that this is slightly different than how the default directory is
  generated

    DEBRELEASE_DEBS_DIR="`echo \"$DEBRELEASE_DEBS_DIR\" | sed -e
  's%/\+%/%g; s%\(.\)/$%\1%;'`"

  in that the latter uses shell backticks rather than $() to run
  subcommands. This will behave differently, at least under dash:

  $ cat dash.sh
  #!/bin/sh

  FOO="$(echo \"foo bar\")"
  BAR="`echo \"foo bar\"`"

  $ sh -xe dash.sh
  + echo "foo bar"
  + FOO="foo bar"
  + echo foo bar
  + BAR=foo bar

  Bash behaves similarly. Changing the opt_debsdir definition line to
  the following:

    opt_debsdir="$(echo "${1%/}" | sed -e 's%/\+%/%g')"

  (i.e. removing the backslash escaping of ") causes things to work as
  expected.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: devscripts 2.11.4ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
  Uname: Linux 3.2.0-17-generic x86_64
  ApportVersion: 1.95-0ubuntu1
  Architecture: amd64
  CheckboxSubmission: 9c15077a0ca11678d04e060687c26674
  CheckboxSystem: 5dc75472945f57d094b84e90feb97396
  Date: Tue Mar 27 23:05:42 2012
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
  ProcEnviron:
   TERM=screen
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: devscripts
  UpgradeStatus: Upgraded to precise on 2012-01-30 (57 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/devscripts/+bug/966867/+subscriptions




More information about the foundations-bugs mailing list