Improve command-not-found package headers

Bug #1867157 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
Undecided
Unassigned
python2.7 (Ubuntu)
Undecided
Unassigned
python3-defaults (Ubuntu)
Undecided
Unassigned
python3.8 (Ubuntu)
Undecided
Unassigned

Bug Description

Improve command-not-found package headers

command-not-found uses package metadata, and to improve the UX of the misspelled commands / proposed packages.

python2.7-minimal should gain XB-Cnf-Visible-Pkgname: python2.7

python3.8-minimal should gain XB-Cnf-Visible-Pkgname: python3.8

python2-minimal should gain XB-Cnf-Visible-Pkgname: python2

python3-minimal should gain XB-Cnf-Visible-Pkgname: python3

This will then improve these messages from:

"""
  command 'python2.7' from deb python2.7-minimal (2.7.17-1)
  command 'python3.8' from deb python3.8-minimal (3.8.0-5)
  command 'python2' from deb python2-minimal (2.7.17-2)
  command 'python3' from deb python3-minimal (3.7.5-1ubuntu1)
"""

To

"""
  command 'python2.7' from deb python2.7 (2.7.17-1)
  command 'python3.8' from deb python3.8 (3.8.0-5)
  command 'python2' from deb python2 (2.7.17-2)
  command 'python3' from deb python3 (3.7.5-1ubuntu1)
"""

python3 should drop
XB-Cnf-Extra-Commands: python
XB-Cnf-Priority-Bonus: 5

Such that it stops suggesting that somehow python is available from python3 package, which is a lie.

There is a special case for "python" command hint in command-not-found already, which simply points people to "python3".

CVE References

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.8 - 3.8.2-1ubuntu1

---------------
python3.8 (3.8.2-1ubuntu1) focal; urgency=medium

  * Add XB-Cnf-Visible-Pkgname header on the python*-minimal package to
    point command-not-found at the full one. LP: #1867157

 -- Dimitri John Ledkov <email address hidden> Fri, 13 Mar 2020 10:14:16 +0000

Changed in python3.8 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.7 - 2.7.17-1ubuntu6

---------------
python2.7 (2.7.17-1ubuntu6) focal; urgency=medium

  * Add XB-Cnf-Visible-Pkgname header on the python*-minimal package to
    point command-not-found at the full one. LP: #1867157

 -- Dimitri John Ledkov <email address hidden> Fri, 13 Mar 2020 12:42:15 +0000

Changed in python2.7 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-defaults - 2.7.17-2ubuntu4

---------------
python-defaults (2.7.17-2ubuntu4) focal; urgency=medium

  * Correct command-not-found XB-Cnf headers LP: #1867157:
    - Drop Extra-Commands headers, not needed
    - Add XB- to ensure Visible-Pkgname actually is included in the binary
      package heders

 -- Dimitri John Ledkov <email address hidden> Fri, 13 Mar 2020 12:31:23 +0000

Changed in python-defaults (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.8.2-0ubuntu2

---------------
python3-defaults (3.8.2-0ubuntu2) focal; urgency=medium

  [ Dimitri John Ledkov ]
  * Correct command-not-found XB-Cnf headers LP: #1867157:
    - Drop Extra-Commands headers not needed
    - Add XB- to ensure Visible-Pkgname actually is included in the binary
      package heders

  [ Stuart Prescott ]
  * Use unbuffered IO to pass filenames to py_compile (Closes: #953056)
    LP: #1863414

 -- Dimitri John Ledkov <email address hidden> Fri, 13 Mar 2020 12:20:20 +0000

Changed in python3-defaults (Ubuntu):
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted python3.8 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python3.8/3.8.5-1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in python3.8 (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (python3.8/3.8.5-1~20.04)

All autopkgtests for the newly accepted python3.8 (3.8.5-1~20.04) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

ros-geometry2/0.6.6-1build3 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#python3.8

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

# /usr/lib/command-not-found python3.7

Command 'python3.7' not found, did you mean:

  command 'python2.7' from deb python2.7 (2.7.18-1~20.04)
  command 'python3.8' from deb python3.8 (3.8.5-1~20.04)
  command 'python3.9' from deb python3.9 (3.9.0~rc1-1~20.04)

Try: apt install <deb name>

On focal, correctly shows that python3.8 is installable / available by installing python3.8 package (despite the /usr/bin/python3.8 shipped in python3.8-minimal package).

Thus cnf metadata of python3.8 3.8.5-1~20.04 is now correct.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.8 - 3.8.5-1~20.04

---------------
python3.8 (3.8.5-1~20.04) focal-proposed; urgency=medium

  * SRU: LP: #1889218. Backport Python 3.8.5 to 20.04 LTS.

python3.8 (3.8.5-1) unstable; urgency=medium

  * Python 3.8.5 release.
    - Fix issue 41295, regression on __setattr__ in multiinheritance with
       metaclasses. Closes: #965069.

python3.8 (3.8.4-1) unstable; urgency=medium

  * Python 3.8.4 release.
  * Update VCS attributes in the control file.

python3.8 (3.8.4~rc1-1) unstable; urgency=medium

  * Python 3.8.4 release candidate 1.

python3.8 (3.8.3-1) unstable; urgency=medium

  * Python 3.8.3 release.
  * Add XB-Cnf-Visible-Pkgname header on the python*-minimal package to
    point command-not-found at the full one. LP: #1867157

python3.8 (3.8.3~rc1-1) unstable; urgency=medium

  * Python 3.8.3 release candidate 1.
    - Issue #38576, CVE-2019-18348: Disallow control characters in hostnames
      in http.client.
    - Issue #39503, CVE-2020-8492: Denial of service in
      urllib.request.AbstractBasicAuthHandler.

 -- Matthias Klose <email address hidden> Tue, 28 Jul 2020 14:59:40 +0200

Changed in python3.8 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for python3.8 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Mathew Hodson (mhodson)
no longer affects: python3.8 (Ubuntu Focal)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers