[FFe] Add Modaliases to open-vm-tools-desktop to allow automatic installation by ubuntu-drivers

Bug #1819207 reported by Jean-Baptiste Lallement on 2019-03-08
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
Status tracked in Disco
Disco
High
Jean-Baptiste Lallement
ubiquity (Ubuntu)
Status tracked in Disco
Disco
High
Jean-Baptiste Lallement
ubuntu-drivers-common (Ubuntu)
Status tracked in Disco
Disco
High
Jean-Baptiste Lallement

Bug Description

[Rationale]
On Ubuntu Desktop, we want to install automatically at installation time open-vm-tools-desktop and its dependencies to provide an improved user experience on first boot after installation of the guest. This method also provides an easy way to install the drivers after installation if they have not been installed at installation time.

It is achieved adding an XB-Modaliases field to the control file for the record 'open-vm-tools-desktop' so ubuntu-drivers can detect the packages to install when running in a VMware guest and adding open-vm-tools to the list of whitelisted packages in ubuntu-drivers

[Impact]
The change adds an additional field to the control file used by ubuntu-drivers to detect the drivers to install automatically. In the worst case scenario either the field is not added or the detection by ubuntu-drivers fails. In both cases the package o-v-t-desktop is not installed and can still be installed manually.

Note: open-vm-tools-desktop is in universe and must be in main.

[Test Case]
With the patched versions of ubuntu-drivers and open-vm-tools
1. Boot a daily ISO of Ubuntu Desktop to the live session in a VMware Guest (with VMWare Workstation for example)
2. Open a terminal, make sure the package cache is up to date with the version of o-v-t containing the Modaliases field
3. Run the command:
       $ ubuntu-drivers list
   and verify that o-v-t-desktop is in the output
4. Run the command:
       $ ubuntu-drivers devices
   And verify that the output shows the details of the sys entry for this device
5. Run the command:
       $ sudo ubuntu-drivers install
   and verify that the package o-v-t-desktop is installed

[Regression Potential]
Very Low. Package may fail to build if for some reason dh-gencontrol fails. Otherwise, given that the package is not already installed automatically, if automated installation doesn't work then we're still in the same situation than today.
On ubuntu-drivers side, the change just adds o-v-t-desktop to the whitelist using an existing mechanism so other than a typo there is no risk of regression.

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: open-vm-tools-desktop (not installed)
ProcVersionSignature: Ubuntu 4.19.0-13.14-generic 4.19.20
Uname: Linux 4.19.0-13-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.10-0ubuntu23
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 8 20:02:49 2019
InstallationDate: Installed on 2014-07-15 (1697 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140520)
SourcePackage: open-vm-tools
UpgradeStatus: Upgraded to disco on 2018-03-24 (349 days ago)

Related branches

Jean-Baptiste Lallement (jibel) wrote :
description: updated
Changed in open-vm-tools (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
importance: Undecided → High
status: New → In Progress
milestone: none → ubuntu-19.04
tags: added: rls-dd-incoming
Jean-Baptiste Lallement (jibel) wrote :

proposed change.

The attachment "open-vm-tools_10.3.5-7_10.3.5-7ubuntu1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Jean-Baptiste Lallement (jibel) wrote :

The updated package is available from my ppa: ppa:jibel/ppa

Here is the result with this ppa enabled:
root@ubuntu:~# apt policy open-vm-tools-desktop
open-vm-tools-desktop:
  Installed: (none)
  Candidate: 2:10.3.5-7ubuntu1
  Version table:
     2:10.3.5-7ubuntu1 500
        500 http://ppa.launchpad.net/jibel/ppa/ubuntu disco/main amd64 Packages

root@ubuntu:~# apt show open-vm-tools-desktop
Package: open-vm-tools-desktop
[...]
Modaliases: vmwgfx(pci:v000015ADd00000405sv*sd*bc*sc*i*)
[...]

root@ubuntu:~# ubuntu-drivers list
open-vm-tools-desktop

root@ubuntu:~# ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:0f.0 ==
modalias : pci:v000015ADd00000405sv000015ADsd00000405bc03sc00i00
vendor : VMware
model : SVGA II Adapter
manual_install: True
driver : open-vm-tools-desktop - third-party free

Changed in open-vm-tools (Ubuntu):
status: In Progress → Triaged
Changed in ubuntu-drivers-common (Ubuntu):
status: New → In Progress
assignee: nobody → Jean-Baptiste Lallement (jibel)
importance: Undecided → High

Hi Jean-Baptiste,
I like the change and the automatism it will bring, but we have had some efforts to get Debian and us in Sync and this seems a non resolvable Delta for now.
The Debian Maintainer is smart and fast and therefore it was always great for us to have this package being a sync.

In this particular case dh_modalias [1] and co are a Ubuntu only thing for now - so we can't bring it there as-is. I wonder if you could also build a version using [2] for the d/rules changes.
Unfortunately I have no great suggestion for the d/control change as dh_moalias doesn#t exist in Debian at all. [3] as a similar discussion didn't lead to a "this is hwo you do it" and while [4] is working it confused enough people that I'd appreciate a smoother solution for anything implemented new (unless there is no other way).

I'd appreciate if you'd at least try to find a way to make this Debian compatible to drop the Delta in the long run (maybe you know there is a post-buster dh_modalias activity in Debian or anything like it - or you know of other such cases and how they were resolved?)

That said, I don't want to too be negative here. I reviewed the change/builds/ppa and I'm +1 on the suggested change for Ubuntu for the time being. You'll have to make this an FFE [5] bug to be allowed to upload it thou.
Will you do that Jean-Baptiste or do you need me to take over here?

[1]: http://manpages.ubuntu.com/manpages/bionic/man1/dh_modaliases.1.html
[2]: https://wiki.debian.org/DebVendorVariable
[3]: https://lists.debian.org/debian-mentors/2012/02/msg00710.html
[4]: https://salsa.debian.org/qemu-team/qemu/blob/debian-unstable/debian/rules#L290
[5]: https://wiki.ubuntu.com/FreezeExceptionProcess

Jean-Baptiste Lallement (jibel) wrote :

Patch to whitelist ubuntu-drivers-common

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Triaged
Jean-Baptiste Lallement (jibel) wrote :

debdiff for open-vm-tools against the package in Ubuntu. It overrides dh-gencontrol instead of using dh-modaliases which is Ubuntu specific so it can be integrated into upstream packaging.

The PR has been proposed upstream: https://github.com/bzed/pkg-open-vm-tools/pull/20

summary: - Add Modaliases to open-vm-tools-desktop to allow automatic installation
- by ubuntu-drivers
+ [FFe] Add Modaliases to open-vm-tools-desktop to allow automatic
+ installation by ubuntu-drivers
description: updated
description: updated
description: updated
Changed in ubiquity (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
Changed in ubuntu-drivers-common (Ubuntu):
status: Triaged → In Progress
Changed in ubiquity (Ubuntu):
status: New → Triaged
Iain Lane (laney) wrote :

OK for the FFe - please could you work with Christian to get this uploaded / upstream / etc in the best way?

Thanks :>

[08:14] <cpaelzer> jibel: we got the FFe on 1819207 and the change into Debian
[08:14] <cpaelzer> jibel: the only other change in Debian we want as well (an evolved version of a fix I already had tested and followed the upstream resolution)
[08:15] <cpaelzer> jibel: that means we now want to do a syncpackage - should I or do you want to?
[08:17] <jibel> hi cpaelzer , can you do it please?

I kicked the syncpackage and we can later on the day check if it all built and migrated as expected.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-vm-tools - 2:10.3.5-8

---------------
open-vm-tools (2:10.3.5-8) unstable; urgency=medium

  [ Jean-Baptiste Lallement ]
  * [0f35aee] Add modaliases to open-vm-tools-desktop.
    Added Modaliases to open-vm-tools-desktop to auto-discover and
    auto-install the driver on Ubuntu via ubuntu-drivers. The driver is then
    installed at installation time and available on first boot for an
    improved user experience (LP: #1819207)

  [ Bernd Zeimetz ]
  * [dc4e1ce] Load vmwgfx module before vmtoolsd starts.
    As discussed on github in vmware/open-vm-tools#214
    we need to load the vmwgfx module before starting vmtoolsd
    for desktop users. Otherwise it is not able to retrieve the KMS
    resolutions and resizing the VM desktop fails.
    Thanks to @thomashvmw @rhertzog (Closes: #924518)

 -- Bernd Zeimetz <email address hidden> Wed, 13 Mar 2019 22:15:22 +0100

Changed in open-vm-tools (Ubuntu Disco):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.6.3

---------------
ubuntu-drivers-common (1:0.6.3) disco; urgency=medium

  [ Jean-Baptiste Lallement ]
  * ubuntu-drivers,
    UbuntuDrivers/detect.py,
    tests/ubuntu_drivers.py:
    - Add a --free-only parameter, so as to allow installing only the
     available free drivers (LP: #1819207).
    - Add support for testing against a fake archive with free and
      non-free components.

 -- Alberto Milone <email address hidden> Mon, 18 Mar 2019 16:20:49 +0100

Changed in ubuntu-drivers-common (Ubuntu Disco):
status: In Progress → Fix Released
Changed in ubiquity (Ubuntu Disco):
status: Triaged → In Progress
importance: Undecided → High
milestone: none → ubuntu-19.04
Changed in ubuntu-drivers-common (Ubuntu Disco):
milestone: none → ubuntu-19.04
Changed in ubiquity (Ubuntu Disco):
status: In Progress → Fix Committed
tags: removed: rls-dd-incoming
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers