Control: tags -1 + patch On 2018-04-07 22:36 +0200, Sven Joachim wrote:
> Package: zsh-common > Version: 5.4.2-4 > Severity: normal > > Your package declares compliance with Debian Policy 4.1.4, claiming that > "no other changes were required", but this is not actually true. > The upgrading-checklist states > > ,---- > | 9.1.2 > | If "/etc/staff-group-for-usr-local" does not exist, "/usr/local" > | and all subdirectories created by packages should have permissions > | 0755 and be owned by "root:root". If the file exists, the old > | permissions of 2775 and ownership of root:staff should remain. > `---- > > The zsh-common postinst script does not respect this policy though, > using root:staff unconditionally. > > ,---- > | mkdir -m2775 -p /usr/local/share/zsh/site-functions && chown root:staff \ > | /usr/local/share/zsh/site-functions || true > `---- The attached patch should do the trick, provided zsh gets rebuilt with debhelper 11.2 (not tested yet). I left the postrm alone, although I don't really see why #708106 happened in the first place - the prerm ought to be enough to remove the directories under /usr/local. Cheers, Sven
>From c82cfa09011bf9d48222f02893dcb1aec403744b Mon Sep 17 00:00:00 2001 From: Sven Joachim <svenj...@gmx.de> Date: Sat, 7 Apr 2018 23:05:21 +0200 Subject: [PATCH] Handle /usr/local/share/zsh with dh_usrlocal (Closes: #895153) The upstream Makefile installs the /usr/local/share/zsh/site-functions directory, so all that is needed is not to delete it later in debian/rules, after which dh_usrlocal magically handles the rest. --- debian/rules | 1 - debian/zsh-common.postinst | 10 ---------- debian/zsh-common.prerm | 24 ------------------------ 3 files changed, 35 deletions(-) delete mode 100644 debian/zsh-common.postinst delete mode 100644 debian/zsh-common.prerm diff --git a/debian/rules b/debian/rules index 021d78014..ba228eed2 100755 --- a/debian/rules +++ b/debian/rules @@ -92,7 +92,6 @@ override_dh_auto_install-indep: build-dynamic perl $(CURDIR)/Util/helpfiles Doc/zshbuiltins.1 debian/zsh-common/usr/share/zsh/help cd obj && $(MAKE) install.fns DESTDIR=$(CURDIR)/debian/zsh-common - rm -r debian/zsh-common/usr/local awk '/^#define FPATH_DIR/ { head=$$3; gsub(/"/,"",head); }; \ /^#define FPATH_SUBDIRS/ { $$1=""; $$2=""; gsub(/[" ]/,""); tail=$$0; } \ diff --git a/debian/zsh-common.postinst b/debian/zsh-common.postinst deleted file mode 100644 index 601994b03..000000000 --- a/debian/zsh-common.postinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -mkdir -m2775 -p /usr/local/share/zsh/site-functions && chown root:staff \ - /usr/local/share/zsh/site-functions || true - -#DEBHELPER# - -exit 0 diff --git a/debian/zsh-common.prerm b/debian/zsh-common.prerm deleted file mode 100644 index ffb0622e1..000000000 --- a/debian/zsh-common.prerm +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - (remove|deconfigure) - rmdir /usr/local/share/zsh/site-functions || true - rmdir /usr/local/share/zsh || true - ;; - (upgrade) - ;; - - (failed-upgrade) - ;; - - (*) - echo "prerm called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -#DEBHELPER# - -exit 0 -- 2.17.0