Summary: | mail-mta/exim FEATURES=distcc - build system sets TMPDIR in src/EDITME | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | chris-gentoo |
Component: | [OLD] Server | Assignee: | Fabian Groffen <grobian> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, bugs, cluster, net-mail+disabled |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge info
exim-4.86-rename-TMPDIR-to-EXIM_TMPDIR.patch |
Description
chris-gentoo
2004-09-09 06:21:46 UTC
please post emerge info Created attachment 39274 [details]
emerge info
Try updating to a more recent version of distcc. 2.16 should have this fixed (which I will move in to x86 shortly) Same problem exists (again?) with a current stable distcc-3.0-r4 Also broken with distcc-3.1 This is probably a bug in exim's build system. TMPDIR should not be quoted. Just an example of what is happening here: $ TMPDIR="\"/tmp\"" mktemp mktemp: failed to create file via template '"/tmp"/tmp.XXXXXXXXXX': No such file or directory The following patch fixes the problem: --- exim-4.80.1-r2.ebuild.orig 2014-05-12 17:25:43.560403783 +0400 +++ exim-4.80.1-r2.ebuild 2014-05-12 17:25:50.691351764 +0400 @@ -137,6 +137,7 @@ -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ + -e "s:TMPDIR=.*$:TMPDIR=/tmp:" \ src/EDITME > Local/Makefile cd Local (In reply to Alexander Tsoy from comment #6) > This is probably a bug in exim's build system. TMPDIR should not be quoted. Maybe it shouldn't be set at all, or moved to a safe namespace using a prefix. > Just an example of what is happening here: > > $ TMPDIR="\"/tmp\"" mktemp > mktemp: failed to create file via template '"/tmp"/tmp.XXXXXXXXXX': No such > file or directory > > The following patch fixes the problem: > > --- exim-4.80.1-r2.ebuild.orig 2014-05-12 17:25:43.560403783 +0400 > +++ exim-4.80.1-r2.ebuild 2014-05-12 17:25:50.691351764 +0400 > @@ -137,6 +137,7 @@ > -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \ > -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ > -e > "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ > + -e "s:TMPDIR=.*$:TMPDIR=/tmp:" \ Looking at 4.84, src/EDITME has that already: TMPDIR="/tmp" Shouldn't that be TMPDIR="${T}" (and the variable name maybe replaced with GENTOO_EXIM_TMPDIR? (In reply to Jeroen Roovers from comment #7) > (In reply to Alexander Tsoy from comment #6) > > This is probably a bug in exim's build system. TMPDIR should not be quoted. > > Maybe it shouldn't be set at all, or moved to a safe namespace using a > prefix. > > > Just an example of what is happening here: > > > > $ TMPDIR="\"/tmp\"" mktemp > > mktemp: failed to create file via template '"/tmp"/tmp.XXXXXXXXXX': No such > > file or directory > > > > The following patch fixes the problem: > > > > --- exim-4.80.1-r2.ebuild.orig 2014-05-12 17:25:43.560403783 +0400 > > +++ exim-4.80.1-r2.ebuild 2014-05-12 17:25:50.691351764 +0400 > > @@ -137,6 +137,7 @@ > > -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \ > > -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ > > -e > > "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ > > + -e "s:TMPDIR=.*$:TMPDIR=/tmp:" \ > > Looking at 4.84, src/EDITME has that already: > > TMPDIR="/tmp" Yes. And my patch remove quotes. > > Shouldn't that be TMPDIR="${T}" (and the variable name maybe replaced with > GENTOO_EXIM_TMPDIR? TMPDIR in Local/Makefile sets temporary directory path used by exim at runtime if TMPDIR env variable is not defined. (In reply to Alexander Tsoy from comment #8) > > Shouldn't that be TMPDIR="${T}" (and the variable name maybe replaced with > > GENTOO_EXIM_TMPDIR? > > TMPDIR in Local/Makefile sets temporary directory path used by exim at > runtime if TMPDIR env variable is not defined. s/not defined/defined/ Still not fixed, then... not sure why distcc is doing anything with TMPDIR here in any case, it's a runtime var, not a compile-time var the use is somewhat odd though, it looks as if they want to set TMPDIR to a hard-coded path resetting whatever was in the environment if set, probably security related dropping the quotes from "/tmp" should break the build, as it is used directly in code, hence I don't understand comment #6. If someone with distcc could attach a full buildlog maybe I can see something. (In reply to Fabian Groffen from comment #11) This is a clash between standard environment variable name and a macro name. TMPDIR is exported by portage and then redefined in Makefile. Minimal reproducer: $ cat Makefile TMPDIR="/tmp" all: /usr/bin/env $ export TMPDIR=test $ make | grep ^TMPDIR TMPDIR="/tmp" This TMPDIR *with quotes* is picked by distcc which results in errors like: distcc[9034] (dcc_make_tmpnam) ERROR: can't use TMPDIR ""/tmp"": No such file or directory distcc[9034] (dcc_build_somewhere) Warning: failed to distribute, running locally instead (In reply to Fabian Groffen from comment #11) > dropping the quotes from "/tmp" should break the build, as it is used > directly in code, hence I don't understand comment #6. It doesn't break the build, but I agree that workaround from comment #6 is incorrect. I created pull request: https://github.com/Exim/exim/pull/40 I agree with that approach, it's just that the patch applies neither to 4.86 nor to 4.87_rc3. Created attachment 424528 [details, diff]
exim-4.86-rename-TMPDIR-to-EXIM_TMPDIR.patch
Yes, git repository and release tarballs has different directory layout. I tested attached patch with 4.86-r2 and 4.87_rc3.
pushed, thanks! |