Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1280958

Bug#1127102: emacs-common: odd behaviour around /usr/local in postinst

From Simon McVittie <smcv@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#1127102: emacs-common: odd behaviour around /usr/local in postinst
Date 2026-02-06 11:20 +0100
Message-ID <Mlr6p-g8b8-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Package: emacs-common
Version: 1:30.2+1-2
Severity: normal
User: smcv@debian.org
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

Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Bug#1127102: emacs-common: odd behaviour around /usr/local in postinst Simon McVittie <smcv@debian.org> - 2026-02-06 11:20 +0100
  Bug#1127102: Add patch Arto Jantunen <viiru@debian.org> - 2026-04-05 09:40 +0200
  Bug#1127102: Add patch Rob Browning <rlb@defaultvalue.org> - 2026-04-05 18:30 +0200
  Bug#1127102: Add patch Xiyue Deng <manphiz@gmail.com> - 2026-04-08 17:10 +0200
    Bug#1127102: Add patch Rob Browning <rlb@defaultvalue.org> - 2026-04-14 04:30 +0200
      Bug#1127102: Add patch Rob Browning <rlb@defaultvalue.org> - 2026-04-17 03:00 +0200

csiph-web