Bug 238548 - devel/dbus: non-default TMPDIR pollutes build products
Summary: devel/dbus: non-default TMPDIR pollutes build products
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2019-06-13 19:36 UTC by John Hein
Modified: 2020-10-03 17:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
[patch] fix for non-default TMPDIR leakage (485 bytes, patch)
2019-06-13 19:36 UTC, John Hein
jcfyecrayz: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2019-06-13 19:36:16 UTC
Created attachment 205039 [details]
[patch] fix for non-default TMPDIR leakage

If you have a TMPDIR in your environment that points to an existing directory other than /tmp (e.g., TMPDIR=/bigfilesystem/tmp), when you build devel/dbus, a couple files get built with that value.

The affected files are share/dbus-1/session.conf and bin/dbus-cleanup-sockets.

When the package is installed on a target system that may not have the non-default TMPDIR used at build time, then you will get run-time errors.  Such as:

% dbus-launch sh
Failed to start message bus: Failed to bind socket "/bigfilesystem/tmp/dbus-1nT4MYueXb": No such file or directory
EOF in dbus-launch reading address from bus daemon

Attached is a patch to insulate the build from non-default TMPDIR in the build environment.

This should not change the package at all if the build host did not have a non-default TMPDIR, so there's no great need to bump PORTREVISION, but you could.
Comment 1 Mateusz Piotrowski freebsd_committer 2020-10-03 16:50:13 UTC
Thanks for the patch!
Comment 2 commit-hook freebsd_committer 2020-10-03 17:02:32 UTC
A commit references this bug:

Author: 0mp
Date: Sat Oct  3 17:02:18 UTC 2020
New revision: 551331
URL: https://svnweb.freebsd.org/changeset/ports/551331

Log:
  devel/dbus: Do not pollute build products when TMPDIR is not /tmp

  If you have a TMPDIR in your environment that points to an existing
  directory other than /tmp (e.g., TMPDIR=/bigfilesystem/tmp), when you build
  devel/dbus, a couple files get built with that value.

  When the package is installed on a target system that may not have the
  non-default TMPDIR used at build time, then you will get run-time errors.
  Such as:

    % dbus-launch sh
    Failed to start message bus: Failed to bind socket "/bigfilesystem/tmp/dbus-1nT4MYueXb": No such file or directory
    EOF in dbus-launch reading address from bus daemon

  PR:		238548
  Submitted by:	John Hein <jcfyecrayz@liamekaens.com>

Changes:
  head/devel/dbus/Makefile
Comment 3 Mateusz Piotrowski freebsd_committer 2020-10-03 17:03:18 UTC
The issue has been fixed. Thanks!