package-data-downloader fails if apt is configured to use an http proxy that only supports package downloading

Bug #820383 reported by marcobra (Marco Braida)
66
This bug affects 24 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Description: Ubuntu oneiric (development branch)
Release: 11.10

ttf-mscorefonts-installer:
  Installato: 3.3ubuntu3
  Candidato: 3.3ubuntu3
  Tabella versione:
 *** 3.3ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/multiverse i386 Packages
        100 /var/lib/dpkg/status

I have ONLY an apt-proxy defined here

cat /etc/apt/apt.conf.d/proxy
Acquire::http::proxy "http://192.168.100.58:3142/";

i must temporary move the /etc/apt/apt.conf.d/proxy then do a

sudo dpkg-reconfigure ttf-mscorefonts-installer

to get the font installer ignore the DEB proxy... and can get the fonts via web...

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ttf-mscorefonts-installer 3.3ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
Uname: Linux 3.0.0-7-generic i686
Architecture: i386
Date: Wed Aug 3 11:06:15 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=it_IT:en
 PATH=(custom, user)
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: msttcorefonts
UpgradeStatus: Upgraded to oneiric on 2011-06-07 (56 days ago)

Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :
Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

On another pc where ttf-mscorefonts-installer were not already installed because, in this case, is a new installation and not an upgrade from previous release, i have to force the reinstallation of package

i must temporary move the /etc/apt/apt.conf.d/proxy then do a

sudo apt-get --reinstall install ttf-mscorefonts-installer

to get the font installer ignore the DEB proxy... and can get the fonts via web...

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in msttcorefonts (Ubuntu):
status: New → Confirmed
Revision history for this message
wombat (jewett-aij) wrote :

I don't really understand the details of this bug report so this comment may not be relevant, but...

my problems with TTF fonts (in google earth) were resolved by logging out and logging back in. Have you tried that?
Cheers
Andrew

Revision history for this message
Will Rouesnel (w-rouesnel) wrote :

The problem is that if you're using an apt specific proxy (like apt-cacher-ng) then you'll have your apt configured with an http proxy (i.e. 192.168.1.1:3142), then it will reject general non-apt requests (like a request for an exe file download, as the installer does).

This means that the ttf-mscorefonts-installer fails to actually download any fonts, even though internet connectivity is fine. There doesn't seem to be a way to disable the proxy logic (a button you can check on the EULA page would help a lot).

Revision history for this message
Steve Langasek (vorlon) wrote :

The proxy handling logic has moved now to update-notifier for 12.04. Reassigning the bug.

affects: msttcorefonts (Ubuntu) → update-notifier (Ubuntu)
Changed in update-notifier (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - ttf-mscorefonts-installer must not take care of apt-proxy when download
- fonts from http
+ package-data-downloader fails if apt is configured to use an http proxy
+ that only supports package downloading
Revision history for this message
ATorre (aedelatorre) wrote :

Just to show a workaround. It's really *UGLY* but worked for me:

1.- Download manually
http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_xx.x.x.x.orig.tar.gz

2.- Make you root (sudo -i, su -, etc)

3.- Make a backup of /usr/bin/update-notifier/package-data-downloader:
cp /usr/bin/update-notifier/package-data-downloader /usr/bin/update-notifier/package-data-downloader.bak

4.- Edit /usr/bin/update-notifier/package-data-downloader and replace this line:

dest_file = urllib.urlretrieve(files[i])[0]

by this one:

dest_file = urllib.urlretrieve("/path/to/your/file/adobe-flashplugin_xx.x.x.x.orig.tar.gz")[0]

5.- Reinstall flashplugin-installer package:
apt-get install --reinstall flashplugin-installer

6.- Recover the original package-data-downloader file:
mv /usr/bin/update-notifier/package-data-downloader.bak /usr/bin/update-notifier/package-data-downloader

Revision history for this message
npullover (npullover) wrote :

The previous comment # 7, is perfect as a temporary bug but if I can download multiple file I modified as well as the following sample files [#]:

 # Download each file and verify the sum
     try:
        files[0] = "/home/user/andale32.exe"
        files[1] = "/home/user/arial32.exe"
        files[1] = "/home/user/arialb32.exe"
           for i in range(len(files)):
              print "%s: downloading %s" % (relfile, files[i])
              ...

Revision history for this message
Christer Sundgren (christer-sundgren-y) wrote :

Solved this with
sudo -s
apt-get --reinstall install ttf-mscorefonts-installer

Looks like running apt-get with sudo does not get the proxy definition, see sequence:
$ env | grep http
http_proxy=http://proxymachine:808

$ sudo env | grep http
<no output>

$ sudo -s
# env | grep http
http_proxy=http://proxymachine:808

when logging in as root the proxy is back in environment.

Revision history for this message
Josep Pujadas-Jubany (jpujades) wrote :

/usr/lib/update-notifier/package-data-downloader from update-notifier uses python urllib

It seems to be problems when using proxies. In addition, urllib doesn't supports https protocol.

https://docs.python.org/2/library/urllib.html#urllib-restrictions

Using a http proxy, adobe-flashplugin updates will work but not allways:

urllib.urlretrieve("http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.425.orig.tar.gz", "adobe-flashplugin.tar.gz")

Using a https proxy, pepflashpluguin updates will never work:

urllib.urlretrieve("https://dl-ssl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_39.0.2171.95-1_i386.deb", "google-chrome.deb")

So, scripts must be something like:

export http_proxy=http://192.168.0.1:3128
export https_proxy=https://192.168.0.1:3128
apt-get install -y flashplugin-installer
apt-get install -y pepflashplugin-installer
echo "" >> /etc/chromium-browser/default
echo ". /usr/lib/pepflashplugin-installer/pepflashplayer.sh" >> /etc/chromium-browser/default
echo "" >> /etc/chromium-browser/default
unset http_proxy
unset https_proxy
apt-get --reinstall install -y flashplugin-installer
apt-get --reinstall install -y pepflashplugin-installer

Of course, if yo do this, your corporative firewall/proxy must allow direct connections to archive.canonical.com (http) and dl-ssl.google.com (https).

In my opinion, update-notifier (and other applications using urllib) should avoid python urllib

There are many bugs related (in fact, they are duplicated):

https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/1209146
https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/1098233
https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/1037662
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1005837
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/983559
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/820383
https://bugs.launchpad.net/zc.buildout/+bug/484735

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.