0

I have three Ubuntu 16.04 installation.

After running a dpkg -V I see, the /etc/default/chromium-browser is missing on all of them, and /etc/init.d/keyboard-setup missing from two of them, but both contains a keyboard-setup.dpkg-bak.

Why are these files missing?

The /etc/default/chromium-browser is missing even if I remove & purge chromium-browser, chromium-browser-i18n, then reinstall these packages. There is nothing about it in the dpkg.log.

Later editing: this question differs from the given possible duplicate, because I don't want to repair it, I'm looking for the cause, why are these files missing. They weren't deleted accidentally. (But already I got a - possibly - good answer by muru)

  • 3
  • 2
    @muru: false positive... ;) I don't want to restore these files, I'd like to know, why are they missing. The /etc/default/chromium-browser is on the .deb, but mssing after installing the package. It looks like if apt/dpkg doesn't copy that file to /etc/default –  Nov 22 '18 at 05:33
  • That.. is near impossible to tell. Could be some script you run. Could be how you do your upgrades. – muru Nov 22 '18 at 05:35
  • @muru... read my comment again, please! I've edited it. –  Nov 22 '18 at 05:38
  • /etc/default/chromium-broswer is in /etc, so it's a config file. conffiles are treated specially by dpkg; once deleted by an admin, they don't automatically get restored when the package is re-installed or upgraded (because dpkg assumes the admin has a reason for removing or modifying conffiles). See dupe. – muru Nov 22 '18 at 05:40
  • Dear muru, I don't try to repair it: while I tried to find, why that file is missing, I installed a new ubuntu in a virtual machine, then installed chromium-browser from the repository (universe or multiverse, possibly) and that file was missing from there. (But the /etc/init.dinit.d/keyboard-setup is still there) –  Nov 22 '18 at 05:53

1 Answers1

1

Turns out, both these files are special cases.


/etc/init.d/keyboard-setup was long obsolete - when Ubuntu used Upstart, there was an Upstart job for this, so the init.d script was never properly used. When Ubuntu moved to systemd, this should have been changed, but was overlooked. A post-release update added a systemd keyboard-setup.service, properly obsoleting /etc/init.d/keyboard-setup. If you install 16.04 from the original ISO and upgrade keyboard-setup, you'll see something like this in apt's output:

Obsolete conffile /etc/init.d/keyboard-setup has been modified by you, renaming to .dpkg-bak

(Not that you modified it, but ...) That's why there's a dpkg-bak file for /etc/init.d/keyboard-setup. You can ignore it. See LP#1579267 for details.


/etc/default/chromium-browser is weirder, because chromium-browser's postinst script actually deletes it out of hand:

$ dpkg-deb --ctrl-tarfile chromium-browser_70.0.3538.77-0ubuntu0.16.04.1_amd64.deb | tar x -O ./postinst
#!/bin/sh

set -e

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
    update-alternatives --install /usr/bin/x-www-browser \
        x-www-browser /usr/bin/chromium-browser 40
    update-alternatives --install /usr/bin/gnome-www-browser \
        gnome-www-browser /usr/bin/chromium-browser 40
fi

rm -f /etc/default/chromium-browser

It has been this way since 2009. Some time in the dark ages /usr/bin/chromium-browser used to source /etc/default/chromium-browser, but now it sources /etc/chromium-browser/default (likely so that all chromium-browser config files can be kept in the same directory).

This missing file can also be ignored.

muru
  • 197,895
  • 55
  • 485
  • 740
  • OMG... thanks, I've thought, thes are signs that my home network is cracked. (There were many weird things on my net in a very short time) –  Nov 22 '18 at 08:57