diff -Nru chrome-gnome-shell-10.1/debian/changelog chrome-gnome-shell-10.1/debian/changelog --- chrome-gnome-shell-10.1/debian/changelog 2018-12-26 00:08:16.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/changelog 2018-12-30 22:31:21.000000000 +0000 @@ -1,3 +1,12 @@ +chrome-gnome-shell (10.1-4) unstable; urgency=medium + + * Use debian/postinst and debian/postrm to handle the Chrome integration + file to work around base-files and piuparts (Closes: #888549) + * Drop lintian override file since it's now no longer needed + * Drop obsolete debian/preinst, not needed after Stretch + + -- Jeremy Bicha Sun, 30 Dec 2018 17:31:21 -0500 + chrome-gnome-shell (10.1-3) unstable; urgency=medium * Drop debian-distribution.patch again diff -Nru chrome-gnome-shell-10.1/debian/lintian-overrides chrome-gnome-shell-10.1/debian/lintian-overrides --- chrome-gnome-shell-10.1/debian/lintian-overrides 2018-12-26 00:08:16.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# This file is needed for proper integration with Google Chrome -# which installs to /opt and uses /etc/opt/ for configuration -chrome-gnome-shell: dir-or-file-in-etc-opt etc/opt/chrome/ diff -Nru chrome-gnome-shell-10.1/debian/maintscript chrome-gnome-shell-10.1/debian/maintscript --- chrome-gnome-shell-10.1/debian/maintscript 2018-12-26 00:08:16.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/maintscript 2018-12-30 22:31:21.000000000 +0000 @@ -1,2 +1,4 @@ +# Update debian/postrm when you remove these lines rm_conffile /etc/opt/chrome/policies/managed/chrome-gnome-shell.json 10-2~ rm_conffile /etc/chromium/policies/managed/chrome-gnome-shell.json 10-2~ +rm_conffile /etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json 10.1-4~ diff -Nru chrome-gnome-shell-10.1/debian/postinst chrome-gnome-shell-10.1/debian/postinst --- chrome-gnome-shell-10.1/debian/postinst 1970-01-01 00:00:00.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/postinst 2018-12-30 22:31:21.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +mkdir -p /etc/opt/chrome/native-messaging-hosts +ln -s /usr/share/chrome-gnome-shell/org.gnome.chrome_gnome_shell.json /etc/opt/chrome/native-messaging-hosts/ + +exit 0 diff -Nru chrome-gnome-shell-10.1/debian/postrm chrome-gnome-shell-10.1/debian/postrm --- chrome-gnome-shell-10.1/debian/postrm 1970-01-01 00:00:00.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/postrm 2018-12-30 22:31:21.000000000 +0000 @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +case "$1" in + purge|remove) + + # Avoid a piuparts error. See https://bugs.debian.org/888549 + rm -f /etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json + # These 2 lines are unnecessary as long as debian/maintscript + # includes an /etc/opt/chrome/ file + # rmdir /etc/opt/chrome/native-messaging-hosts || true + # rmdir /etc/opt/chrome/ || true + mkdir -p /etc/opt/ +esac + +exit 0 diff -Nru chrome-gnome-shell-10.1/debian/preinst chrome-gnome-shell-10.1/debian/preinst --- chrome-gnome-shell-10.1/debian/preinst 2018-12-26 00:08:16.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/preinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e - - -case "$1" in - remove|purge) - ;; - - install|upgrade|failed-upgrade) - if dpkg --compare-versions "$2" le "7.2-2"; then - [ -e /var/lib/dpkg/info/chrome-gnome-shell.postrm ] && rm /var/lib/dpkg/info/chrome-gnome-shell.postrm - fi - ;; - - *) - echo "Called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff -Nru chrome-gnome-shell-10.1/debian/rules chrome-gnome-shell-10.1/debian/rules --- chrome-gnome-shell-10.1/debian/rules 2018-12-26 00:08:16.000000000 +0000 +++ chrome-gnome-shell-10.1/debian/rules 2018-12-30 22:31:21.000000000 +0000 @@ -6,3 +6,14 @@ override_dh_auto_configure: dh_auto_configure -- -DBUILD_EXTENSION=OFF -DUSE_DEBIAN_LAYOUT=ON \ -DPython_ADDITIONAL_VERSIONS=3 -DCMAKE_INSTALL_LIBDIR=lib + +# Use debian/postinst to install the Chrome conffile +# and debian/postrm to remove it since dpkg's automatic +# conffile handling doesn't handle the special /etc/opt/ directory +# https://bugs.debian.org/888549 +override_dh_auto_install: + dh_auto_install + mkdir -p debian/chrome-gnome-shell/usr/share/chrome-gnome-shell + mv debian/chrome-gnome-shell/etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json \ + debian/chrome-gnome-shell/usr/share/chrome-gnome-shell/org.gnome.chrome_gnome_shell.json + rm -rf debian/chrome-gnome-shell/etc/opt