Drop libnss-myhostname recommends

Bug #1766575 reported by Jeremy Bícha
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
Low
Unassigned
Bionic
Won't Fix
Low
Jeremy Bícha

Bug Description

Impact
======
gnome-control-center added a Recommends: libnss-myhostname years ago so that it was possible to easily change the hostname in the Details panel. That dependency no longer appears to be needed since we switched to systemd-resolved.

Test Case
=========
sudo apt uninstall libnss-myhostname
Restart
Open the GNOME Settings app (gnome-control-center)
In the left sidebar, click Devices
Enter a different Device name in the block (let's say new-hostname)
Open a terminal and verify that the hostname has been changed.
Then run ping new-hostname and verify that that command works in the terminal.

Other Info
==========
There are concerns about having libnss-myhostname in the default install. See comment 5 at LP: #1741277.

See also LP: #1162475
Note that /etc/hosts isn't updated regardless of whether libnss-myhostname is installed (I guess my bug description there was wrong but there was some kind of bug there.)

Regression Potential
====================
To quote from the manpage:

https://manpages.debian.org/unstable/nss-resolve

"Note that systemd-resolved will synthesize DNS resource records in a few cases, for example for "localhost" and the current hostname, see systemd-resolved(8) for the full list. This duplicates the functionality of nss-myhostname(8), but it is still recommended (see examples below) to keep nss-myhostname configured in /etc/nsswitch.conf, to keep those names resolveable if systemd-resolved is not running."

Ubuntu uses systemd-resolved by default and it's expected that users who don't want to use that will need to configure some things manually.

Tags: bionic
Jeremy Bícha (jbicha)
description: updated
description: updated
description: updated
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu Bionic):
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Every Ubuntu system is installed with an entry in /etc/hosts pointing to 127.0.1.1 for the hostname. gnome-control-center should be integrating with this, and not just relying on either libnss-myhostname or systemd-resolved to resolve the hostname. The local hostname should be resolvable without further moving parts at runtime - the software which manages the hostname should take care of updating the one additional config file.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

The dependency wasn't added so that gnome-control-center could resolve the hostname but so that everything else could resolve the hostname when gnome-control-center is used to change the hostname.

Anyway, the dependency is already dropped in our bzr branch. This issue just didn't seem critical enough to try to get through Final Freeze since it was only identified today.

Revision history for this message
Steve Langasek (vorlon) wrote :

Yes, I understand the reason for the Recommends. By "integrating with this", I meant that gnome-control-center's backend (which I believe is hostnamectl) should be updating /etc/hosts in addition to /etc/hostname.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

gnome-control-center uses hostnamed via D-Bus to change the hostname.

The documentation says to use libnss-myhostname. Good luck convincing the systemd maintainers to change their mind on this issue.
https://www.freedesktop.org/wiki/Software/systemd/hostnamed/

Jeremy Bícha (jbicha)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.28.1-0ubuntu2

---------------
gnome-control-center (1:3.28.1-0ubuntu2) cosmic; urgency=medium

  * Rename ubuntu-gnome-version.patch to distro-logo.patch for proposed
    upstreaming to Debian. Drop the hardcoded use of the Ubuntu font.
    (LP: #1770473)
  * debian/control.in:
    - Drop now unnecessary fonts-ubuntu dependency
    - Don't recommend libnss-myhostname since systemd-resolved handles this
      functionality (LP: #1766575)
    - Demote network-manager-gnome dependency back to recommends
      (LP: #1770673)
    - Depend on system-config-printer instead of system-config-printer-common
      for the Additional Printer Settings button (LP: #1770695)
  * Add 0007-fix-open-last-page.patch:
    - Proposed patch fixes the "open last opened page" feature for Devices and
      Details pages (LP: #1770699)

 -- Jeremy Bicha <email address hidden> Fri, 11 May 2018 12:59:17 -0400

Changed in gnome-control-center (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu Bionic):
status: Fix Committed → In Progress
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu Bionic):
status: In Progress → Triaged
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu Bionic):
assignee: nobody → Jeremy Bicha (jbicha)
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Since this missed Ubuntu 18.04.1, I think we're going to just leave things as they are for 18.04.

Changed in gnome-control-center (Ubuntu Bionic):
status: Triaged → Won't Fix
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.