[Bug 1807032] Re: RELEASE_UPGRADER_ALLOW_THIRD_PARTY env variable not passed to dist-upgrader tarball

Brian Murray brian at ubuntu.com
Wed Jan 23 14:30:33 UTC 2019


I tested a release upgrade from bionic to cosmic with the versions of
update-manager and ubuntu-release-upgrader from -proposed and my third
party mirror enabled - during the upgrade I did not receive the "No
valid mirror" found error message and my sources.list was just rewritten
from bionic to cosmic. Additionally, we can see the new line in /var/log
/dist-upgrade/main.log:

bdmurray at clean-bionic-amd64:~$ apt-cache policy ubuntu-release-upgrader-core
ubuntu-release-upgrader-core:
  Installed: 1:18.04.30
  Candidate: 1:18.04.30
  Version table:
 *** 1:18.04.30 100
        100 /var/lib/dpkg/status
     1:18.04.29 500
        500 http://192.168.10.7/ubuntu bionic-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu bionic-updates/main i386 Packages
     1:18.04.17 500
        500 http://192.168.10.7/ubuntu bionic/main amd64 Packages
        500 http://192.168.10.7/ubuntu bionic/main i386 Packages
bdmurray at clean-bionic-amd64:~$ grep "overriden" /var/log/dist-upgrade/main.log 
2019-01-23 06:27:37,048 WARNING mirror check skipped, *overriden* via config

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

Title:
  RELEASE_UPGRADER_ALLOW_THIRD_PARTY env variable not passed to dist-
  upgrader tarball

Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in ubuntu-release-upgrader source package in Bionic:
  Fix Committed
Status in ubuntu-release-upgrader source package in Cosmic:
  Fix Released

Bug description:
  Impact
  ------
  It is not possible to override the dist-upgrader's third party mirror check by an environmental variable, subsequently users are asked a question when they shouldn't be.

  Test Case
  ---------
  The change is in do-release-upgrade and DistUpgradeFetcherCore.py so affects upgrades to the release after the one receiving the SRU e.g. if the SRU is for cosmic test upgrading to disco not cosmic. This needs to be tested for check-new-release-gtk and do-release-upgrade.

  1) Run RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 /usr/lib/ubuntu-release-upgrader/check-new-release-gtk (or do-release-upgrade and with -d to upgrade to disco)
  2) Choose to proceed with the upgrade

  With the version of ubuntu-release-upgrader in the archive you'll
  receive a dialog (or message for the text upgrader) saying "No valid
  mirror found" and "Do you want to rewrite 'sources.list' anyway?".
  With the version of ubuntu-release-upgrader from -proposed you'll
  receive no such dialog and you can find "WARNING mirror check skipped"
  in /var/log/dist-upgrade/main.log.

  There is no need to complete the full upgrade.

  Regression Potential
  --------------------
  With the pkexec change we are only passing the RELEASE_UPGRADER_ALLOW_THIRD_PARTY env variable on to the release upgrade process but with the do-release-upgrade (DistUpgradeFetcherCore.py / sudo) one we are passing all existing environment variables on which could cause an issue for the release upgrade process.

  [Original Description]
  ubuntu-release-upgrader indicates that RELEASE_UPGRADER_ALLOW_THIRD_PARTY can be set in the environment so that release upgrades will be attempted without commenting out third party mirrors or repositories, however in practice this is untrue. This doesn't work because pkexec is used to call do-release-upgrade, and it doesn't pass on env, and because sudo (used for DistUpgradeViewText) is called with -E. This should be sorted out so that the documentation is not lying and so upgrades with PPAs enabled can be attempted.

  Its possible to confirm the fix for this bug by looking at /var/log
  /dist-upgrade/main.log for a PPA not being commented out or the
  following line:

  2018-12-05 14:23:29,008 WARNING mirror check skipped, *overriden* via
  config

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1807032/+subscriptions



More information about the foundations-bugs mailing list