Control: retitle -1 bsd-mailx: allow TMPDIR env to override /tmp

On Thu, Jul 10, 2025 at 12:48:26AM +0100, Richard Lewis wrote:
> On Wed, 9 Jul 2025 at 23:02, Andrew Bower <and...@bower.uk> wrote:
> > On Sun, Jul 06, 2025 at 12:32:09PM +0000, Holger Levsen wrote:
> > > On Sun, Jul 06, 2025 at 12:47:36PM +0100, Richard Lewis wrote:
> > > > On Sun, 6 Jul 2025 at 12:01, Holger Levsen <hol...@layer-acht.org> 
> > > > wrote:
> > > > > bsd-mailx
> > > >
> > > > i'm not sure, but i think this may be the problem --- looking at
> > > > https://salsa.debian.org/debian/bsd-mailx/-/blob/master/send.c and
> > > > https://salsa.debian.org/debian/bsd-mailx/-/blob/master/debian/patches/02-Base-fixes-1.patch
> > > > it seems debian has patched bsd-mailx to hardcode /tmp (im not sure
> > > > about this, i only read the code on salsa, and couldnt spot where the
> > > > directory was set)?
> > >
> > > ic!
> >
> > I've come along and done the easy bit... the attached patch causes mailx
> > to honour the TMPDIR environment variable, if set.
> 
> Thanks - this looks a good solution to me
> 
> > Does this do enough to fix your originally-failing scenario?
> 
> I tested a bsd-mailx with your patch applied in a systemd-nspawn
> container (unstable), with exim, and it fixed the original issue
> (which i could reproduce)

Fantastic! (I know I'm a total fraud offering to help at this last
stage when you had done all the work but I couldn't resist...)

I've placed a suitable source package on mentors for convenience in case
it's not possible to reach the maintainer in a timely fashion with
corresponding git commits also available:

  https://mentors.debian.net/package/bsd-mailx/
  https://salsa.debian.org/abower/bsd-mailx/-/commits/honour-tmpdir

I suspect a pre-request will not be needed for this change?

[...]
> > (I don't see that Debian overrode anything so much as setting an
> > otherwise undefined but required build-time definition for the default.)
> 
> ah yes!

I'm retitling to reflect - hope that's ok!

Attachment: signature.asc
Description: PGP signature

Reply via email to