cached meta-release file should not be saved if it is html

Bug #1310891 reported by uwe on 2014-04-22
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
High
Michael Vogt
Trusty
High
Unassigned

Bug Description

It is possible for ubuntu-release-upgrader to save a captive web portal's html page as if it were meta-release information from changelogs.ubuntu.com, either in ~/.cache/update-manager-core/meta-release or /var/lib/update-manager/meta-release. In either case this behavior is wrong and that should not be saved.

Perhaps a simple to check to see if the data is plain text or html would work.

Original Report
---------------
I'm unable to trigger upgrade from 13.04 to 13.10 , and there is no obvious error that i'm getting:

I made sure that Prompt is set to normal in /etc/update-manager/release-upgrades (also confirmed in the GUI)

apt-get update runs successfully and then do-release-upgrade returns:

No new release found

I've tried to use the main-servers , I've tried running apt-get upgrade , apt-get dist-upgrade, nothing is changing this behavior.

The GUI software update reports: "the software on this computer is up to date"

Ubuntu basically fails silently to inform me that there are new releases, and does not show any issue.

I'm within a fairly simple network, I'm not behind a caching server (unless there is a transparent one at the ISP or so)

Related branches

Brian Murray (brian-murray) wrote :

Please try running this in a terminal 'DEBUG_UPDATE_MANAGER=1 /usr/bin/do-release-upgrade'. Thanks in advance?

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Incomplete
uwe (maabdulhaq) wrote :

Thanks!

$ DEBUG_UPDATE_MANAGER=1 /usr/bin/do-release-upgrade
Checking for a new Ubuntu release
MetaRelease.__init__() useDevel=False useProposed=False
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release-lts
/etc/update-manager/meta-release: -development
/etc/update-manager/meta-release: -proposed
metarelease-uri: http://changelogs.ubuntu.com/meta-release
MetaRelease.download()
reading file '/home/uwe/.cache/update-manager-core/meta-release'
have self.metarelease_information
MetaRelease.parse()
current dist name: 'raring'
current dist not found in meta-release file

No new release found

I've checked the content of ~/.cache/update-manager-core/meta-release , and its the HTML content of a captive portal login page (that i'm NOT connected to).

Knowing what the cause is; is a bit relieving.

Brian Murray (brian-murray) wrote :

You can safely remove ~/.cache/update-manager-core/meta-release and it will be recreated.

uwe (maabdulhaq) wrote :

I did;

tried this :

# DEBUG_UPDATE_MANAGER=1 /usr/bin/do-release-upgrade
Checking for a new Ubuntu release
MetaRelease.__init__() useDevel=False useProposed=False
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release-lts
/etc/update-manager/meta-release: -development
/etc/update-manager/meta-release: -proposed
metarelease-uri: http://changelogs.ubuntu.com/meta-release
MetaRelease.download()
reading file '/var/lib/update-manager/meta-release'
have self.metarelease_information
MetaRelease.parse()
current dist name: 'raring'
current dist not found in meta-release file

No new release found
root@taz:~# cat /var/lib/update-manager/meta-release
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="ar" lang="ar" dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="robots" content="noindex,nofollow"/>

removed /var/lib/update-manager/meta-release ; now things seem to go fine. yet I don't know why it is not attempting to remove old/corrupted/wrong files or refresh their content ...

summary: - attempting to trigger upgrade from 13.04 (raring) to 13.10 (saucy)
- claims that No new release found
+ cached meta-release file should not be saved if it is html
Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
description: updated
Changed in ubuntu-release-upgrader (Ubuntu Trusty):
milestone: none → trusty-updates
Changed in ubuntu-release-upgrader (Ubuntu):
milestone: trusty-updates → none
uwe (maabdulhaq) wrote :

This probably should be extend to files in /var/lib/apt/lists/* ; I've just noticed machines facing upgrade issues due to html in the lists files.

Michael Vogt (mvo) on 2014-05-02
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
Michael Vogt (mvo) on 2014-05-16
Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Committed
peterstan (stasnel) on 2015-08-22
Changed in ubuntu-release-upgrader (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu):
status: Fix Released → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers