debsign --debs-dir is broken due to incorrectly added quotes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devscripts (Debian) |
Fix Released
|
Unknown
|
|||
devscripts (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
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("\
(notice the extra \" in there.)
Looking at the source, when handling the option, it does the following:
--debs-dir)
shift
note that this is slightly different than how the default directory is generated
DEBRELEASE_
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=
(i.e. removing the backslash escaping of ") causes things to work as expected.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: devscripts 2.11.4ubuntu1
ProcVersionSign
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
CheckboxSubmission: 9c15077a0ca1167
CheckboxSystem: 5dc75472945f57d
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)
Related branches
Changed in devscripts (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in devscripts (Debian): | |
status: | Unknown → Fix Committed |
Changed in devscripts (Debian): | |
status: | Fix Committed → Fix Released |
Note that this same problematic code exists in debian's devscripts 2.11.5 version.