[Bug 678080] Re: Unable to use any options with apt ssh/rsh acquire method

Michael Vogt michael.vogt at ubuntu.com
Wed Apr 25 09:54:11 UTC 2012


Hey Frederic, thanks for your mail.

This is confusing, the apt version in precise (12.04) I get via apt-get
source apt does contain your patch. Is there some other problem
somewhere maybe that is unrelated to the patch or a different kind of
regression ?

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

Title:
  Unable to use any options with apt ssh/rsh acquire method

Status in “apt” package in Ubuntu:
  Fix Released

Bug description:
  Binary package hint: apt

  Apt ssh (and rsh) acquire method fails if any Acquire::ssh::Options
  are configured: For example with the setting "Acquire::ssh::Options {
  "-F"; "/etc/apt/ssh/config"; };), apt will try to run the command '-F
  /etc/apt/ssh/config ssh ...' and fails. Of course, the correct command
  would be 'ssh -F /etc/apt/ssh/config'.

  This bug exists in current versions of apt for at least the following Ubuntu versions:
  - upcoming 11.04 (natty): apt-0.8.9ubuntu2
  - 10.04.1 (lucid): apt-0.7.25.3ubuntu9.3
  - 8.04 (hardy): apt-0.7.9ubuntu17.2
  (And in all current Debian's apt versions, too.)

  The fix a is trivial one line move in methods/rsh.cc and identical for
  all the versions listed above. See the attached file
  'fix_rshoptions_parsing.patch'.

  As a workaround I have to use a script /usr/bin/apt-ssh-workaround
  which simply strips out 'ssh' from it's arguments and passes on all
  others to /usr/bin/ssh and then add the name of the script as the
  first argument in Acquire::ssh::Options:

  $ cat /etc/apt/apt.conf.d/95workaround-ssh-options-parser-bug
  Acquire::ssh::Options { "apt-ssh-workaround"; "-F"; "/etc/apt/ssh/ssh_config" };
  $ cat /usr/bin/apt-ssh-workaround
  #!/usr/bin/perl -w
  # Wrapper to workaround Acquire::ssh::Options parser bug, 20101116VM
  use strict;
  use warnings FATAL => qw(all);

  # Copy everything but 'ssh' from @ARGV to @args.
  my(@args);
  foreach (@ARGV) {
    push @args, $_ unless ($_ eq 'ssh');
  }

  exec("ssh", @args);
  $

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




More information about the foundations-bugs mailing list