Package: emacs-common
Version: 1:30.2+1-2
Severity: normal
User: [email protected]
Usertags: dh-usrlocal

Prompted by recent changes in fontconfig's handling of 
/usr/local/share/fonts, I noticed that emacs-common's postinst has some 
open-coded script to create directories below /usr/local/share/, with 
non-Policy-compliant permissions (unconditionally root:staff, instead of 
preferring root:root).

This is mitigated by the fact that it doesn't actually seem to work as 
intended: on a first installation, /usr/local/share/emacs doesn't yet 
exist, and therefore /usr/local/share/emacs/30.2 isn't created below it 
with the wrong permissions. There is probably some sequence of events 
that would result in /usr/local/share/emacs/30.2 being created as 
root:staff, but I couldn't work out what it is!

Please consider using dh_usrlocal(1) for this, as is already done for 
/usr/local/share/emacs/site-lisp: that way, any implementation bugs can 
be fixed centrally in debhelper, and they will take effect in all 
packages that use dh_usrlocal at the next rebuild.

The procedure to do that would be something like:

1. create debian/emacs-common/usr/local/share/emacs/VERSION/site-lisp,
   for example with some `install -d` in d/rules
2. remove open-coded logic in maintainer scripts to create and remove
   the various /usr/local directories, relying on dh_usrlocal to do it

Or if /usr/local/share/emacs/VERSION/site-lisp isn't necessary in 
practice, perhaps emacs-common could just not create it?

Thanks,
    smcv

Reply via email to