When apt-cacher is used, Update-Manger fails (not #78673 duplicate)

Bug #113658 reported by Lars
50
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt-cacher (Ubuntu)
Fix Released
Medium
Michael Vogt
Nominated for Hardy by Lorenzo Mancini
Intrepid
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: update-manager

Update-Manager fails with GnuPG code 131072 but this is not a duplicate of bug #78673.

Error message:
   lars@ubuntu-pc~ $ gksu "update-manager -c -d"
   warning: could not initiate dbus
   extracting '/tmp/tmpy-qZkJ/feisty.tar.gz'
   authenticate '/tmp/tmpy-qZkJ/feisty.tar.gz' against '/tmp/tmpy-qZkJ/feisty.tar.gz.gpg'
   exception from gpg: GnuPG exited non-zero, with code 131072

I have apt-cacher running on the same machine (192.168.1.11); other security updates work with apt-cacher:
   lars@ubuntu-pc~ $ cat /etc/apt/apt.conf
   Acquire::http::Proxy "http://192.168.1.11:3142";

If I change the apt.conf content back to
   Acquire::http::Proxy "false";
the upgrade works!!!

This looks pretty clear to me that update-manager does not like apt-cacher in between...

===Background information =====

With reference to Bug #78673: ".gnupg" directory exists for current user and for root (root's directoy is empty):
   lars@ubuntu-pc~ $ ls -la ~/.gnupg
   insgesamt 20
   drwx------ 2 lars lars 4096 2006-12-14 18:26 .
   drwxr-xr-x 37 lars lars 4096 2007-05-09 18:06 ..
   -rw------- 1 lars lars 8084 2006-12-14 18:26 gpg.conf
   -rw------- 1 lars lars 0 2006-12-14 18:26 pubring.gpg
   -rw------- 1 lars lars 40 2006-12-14 18:26 trustdb.gpg

   lars@ubuntu-pc~ $ sudo ls -la /root/.gnupg/
   Password:
   insgesamt 8
   drwxr-xr-x 2 root root 4096 2007-05-09 18:31 .
   drwxr-xr-x 9 root root 4096 2007-05-09 18:31 ..

Update Manager (and update-manager-core) are installed as follows:
   lars@ubuntu-pc/var/log/dist-upgrade $ dpkg -l update-manager*
   Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Säubern/Halten
   | Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konf./Halb install.
   |/ Fehler?=(keiner)/Halten/R=Neuinst. notw/X=beides (Status, Fehler: GROß=schlecht)
   ||/ Name Version Beschreibung
   +++-==============================-==============================-============================================================================
   ii update-manager 0.45.2 GNOME application that manages apt updates
   ii update-manager-core 0.56~edgy4 manage release upgrades

Revision history for this message
Lars (lars-ehlers) wrote :

See dist-upgrade logs attached

Revision history for this message
Richard (rd1) wrote :

I had exactly this problem with Xubuntu on a Feisty to Gutsy RC upgrade on Oct 15th, i.e. before 7.10 release. I tried doing sudo dbus-launch update-manager -d and so on, but nothing worked.

In the end I did an aptitude dist-upgrade, which worked well - however update-manager should be fixed.

I was looking for the dist-upgrade log, but /var/log/dist-upgrade is empty - not obvious which logs apply to update-manager.

In fact I found it hard to find any documentation on update-manager flags - there wasn't an info or man page (I think) in Feisty, but there is now in Gutsy, which is good.

Revision history for this message
Richard (rd1) wrote :

I forgot to say that on this machine I have apt running as a client of apt-cacher on another machine - I've only just seen this bug report so I can't retry the upgrade to Gutsy. However, here's the relevant config file from /etc/apt/apt.conf.d:

Acquire::http::Proxy "http://valluga:3142";

Valluga is the apt-cacher host.

Revision history for this message
Claudio Satriano (claudiodsf) wrote :

I confirm this bug on all my machines using apt-cacher 1.5.3 on a Debian Etch server and trying to upgrade the client from Feisty to Gutsy.
As soon as I remove the line "Acquire::http::Proxy...." from /etc/apt/apt.conf , the upgrade starts.

Revision history for this message
Claudio Satriano (claudiodsf) wrote :

Can this be related to Bug #24250 ??

Revision history for this message
Claudio Satriano (claudiodsf) wrote :

Hmm, after further investigation, I do believe it is a proxy-related problem (see Bug #24250), not directly connected to apt-cacher.

In fact, if I use a syntax like the following for all the entries in /etc/apt/sources.list:

  deb http://hostname:3142/it.archive.ubuntu.com/ubuntu/ feisty main

where 'hostname' is the name of the apt-cacher server, the upgrade to gutsy starts and the channels are correctly updated to gutsy, like in the following:

  deb http://hostname:3142/it.archive.ubuntu.com/ubuntu/ gutsy main

This does not fix the issue but, at least, it is a workaround to perform the upgrade using apt-cacher.

Revision history for this message
Ivo Mans (ivomans) wrote :

Confirmed that the workaround from Claudio Satriano with modified sources.list is a workaround for this issue.

Changed in update-manager:
status: New → Confirmed
Revision history for this message
marcobra (Marco Braida) (marcobra) wrote :

Same here... upgrading 7.04 to 7.10
workaround remove the /etc/apt/apt.conf.d/proxy file

sudo mv /etc/apt/apt.conf.d/proxy /etc/apt/apt.conf.d/proxy.old

modified the /etc/apt/sources.list as explained from Claudio Satriano

HTH

Revision history for this message
David Masover (ninja-slaphack) wrote :

Still not fixed, upgrading from 7.10 to 8.04. What's weird is that using a proxy worked fine with the graphical updater -- this only affects my server.

I have bandwidth to spare, but right now, none of the mirrors do. Oh well -- looks like that's 2 gigs more bandwidth wasted because of this bug. (Yes, I could modify my sources.list, and then modify it back later -- and I remember the GUI tool not liking a particularly different sources.list.)

Revision history for this message
Scott Severance (scott.severance) wrote :

I'll try the workaround, but this really needs to be fixed. Aptitude works from the command line. Why is update-manager reinventing the wheel in the first place? Why not let aptitude do what it's good at?

Use case:
I have satellite internet with an inadequate bandwidth quota. I have two machines to upgrade from Gutsy to Hardy. If I can't use apt-cacher, I'll have to wait a month between upgrades. And Hardy fixes several Gutsy bugs that are really annoying.

Revision history for this message
Richard (rd1) wrote :

I would like to see this fixed as well... Workarounds:

- maybe apt-proxy would be a workaround here for Scott and others: https://help.ubuntu.com/community/AptProxy - it is similar to apt-cacher, includes its own cache, and doesn't require changes the the client sources.list.
- also, the very bandwidth constrained can also order an Alternate CD from a local supplier - this has all the .deb packages, so it can be used as a target for updates by adding it with apt-cdrom.

Revision history for this message
Lorenzo Mancini (lmancini) wrote :

Any hopes to have this fixed before 8.10 is released? I installed apt-cacher on my company's server hoping to ease the bandwidth pain during the upgrade of our ubuntu boxes.

Claudio's workaround is fine, but I'd rather prefer update-manager to do the right thing by itself, instead of telling people to mess with /etc/apt/sources.list .

Revision history for this message
Lorenzo Mancini (lmancini) wrote :

The problem seems to manifest in UpdateManager/Core/DistUpgradeFetcherCore.py , in method DistUpgradeFetcherCore.authenticate:

authenticate '/tmp/tmpy-qZkJ/feisty.tar.gz' against '/tmp/tmpy-qZkJ/feisty.tar.gz.gpg'

The latter does not exist on the local machine, neither in the apt-cacher cache.

Revision history for this message
FractalizeR (fractalizer) wrote :

>>it is similar to apt-cacher, includes its own cache, and doesn't require changes the the client sources.list.
Page you are referring to says, that client sources.list file NEEDS to be modified. Is that so?

Revision history for this message
Claudio Satriano (claudiodsf) wrote :

I confirm that this bug still exists in the update from Hardy to Intrepid Beta

Here are the messages from console (I translated them from Italian so probably they not fully compliant with the originals):

extracting 'intrepid.tar.gz'
authenticate 'intrepid.tar.gz' against 'intrepid.tar.gz.gpg'
exception from gpg: GnuPG exited non-zero, with code 131072
Debug information:

gpg: WARNING: permissions on home directory "/tmp/tmpJLrld7" are not safe

gpg: unable to open "/tmp/tmpJLrld7/intrepid.tar.gz.gpg"
gpg: verify signatures failed: error opening file

Changed in update-manager:
importance: Undecided → Medium
milestone: none → later
Revision history for this message
Brian Murray (brian-murray) wrote :

It looks to me like that there was an update to apt-cacher in Intrepid that may resolve this bug. If anybody could test a distribution upgrade using an apt-cacher server on Intrepid that would be quite helpful. Thanks in advance.

Changed in update-manager:
status: Confirmed → Incomplete
Revision history for this message
Scott Severance (scott.severance) wrote :

When I upgrade to Intrepid after the release, I'll test that. However, I doubt whether any fix to apt-cacher can fix this bug, since apt-cacher is behaving correctly. It's update-manager that doesn't correctly handle APT's configuration option Acquire::http::Proxy. The proof is that when sources.list is modified to force use of the proxy, update-manager works.

Revision history for this message
Brian Murray (brian-murray) wrote :

The bug report that has the apt-cacher fix is bug 156070.

Revision history for this message
Steve Beattie (sbeattie) wrote :

I can confirm that apt-cacher 1.6.4ubuntu1 in intrepid which includes the fix described in bug 156070 does indeed work properly as a proxy for update-manager when it's used via Acquire::http::proxy. Marking this bug as closed.

Changed in update-manager:
status: Incomplete → Fix Released
milestone: later → none
Revision history for this message
Claudio Satriano (claudiodsf) wrote :

I have reported shemgp's fix (see bug 156070) upstream:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502985

Revision history for this message
dougfractal (dougs-b) wrote :

here's my workaround

cp /etc/apt/sources.list /etc/apt/sources.list.backup
insert=`sed -e "s/^A.* \"//; s/\";$// ; s,/$,," /etc/apt/apt.conf`
sed -i -e "s,http://,$insert/," /etc/apt/sources.list
cat /etc/apt/sources.list
mv /etc/apt/apt.conf /etc/apt/apt.conf.proxy
update-manager -d -c
cp /etc/apt/sources.list.backup /etc/apt/sources.list
mv /etc/apt/apt.conf.proxy /etc/apt/apt.conf

inserts the proxy bit from apt.conf into the sources.list until update-manager is finished.

Revision history for this message
Michael Vogt (mvo) wrote :

I just verified that all downloads go through the proxy when using update-manager (I used a squid proxy for the verification). I strongly suspect this is a bug with apt-cacher. Please reopen if the apt-cacher logs indicate that this is not the case and attach them here.

Thanks,
 Michael

Changed in update-manager:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

I changed the code so that the error message is clearer at least.

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.