app-text/mpage-2.5.4 tries to use /usr/tmp, but /usr/tmp is an outdated location, that does not necessarily exist -- at least it does not exist on my system and the FHS-2.3 mentions it as legacy, which may be supported by a symlink to /var/tmp. Reproducible: Always Steps to Reproduce: 1. emerge app-text/mpage-2.5.4 2. dd if=/dev/urandom bs=1k count=1 | base64 | mpage -1 > /dev/null Actual Results: dd if=/dev/urandom bs=1k count=1 | base64 | mpage -1 > /dev/null 1+0 records in 1+0 records out 1024 bytes (1.0 kB) copied, 0.000499162 s, 2.1 MB/s mpage: cannot create temporary filempage: No such file or directory I guess, this only happens, if mpage runs in a pipe. Expected Results: A postscript version of the input text file shall be output without complaint {I supressed this in my pipe example}. file.c contains three hard-coded locations "/usr/tmp/...". One can replace them with "/tmp/...", respectively. A patch doing this, is attached {of course the mpage.ebuild file has to be modified to contain a line, bringing this patch into action}. Since FHS-2.3 proposes /var/tmp as link target for /usr/tmp, one may choose to have /var/tmp instead of /tmp. But personally, I don't think, it makes sense, that temporary build results have to survive reboots. From a higher perspective, that focuses on consistency of the gentoo build processes, /var/tmp may also be preferable[, if you do not question this location generally]. mpage-2.5.4-usrtmp.patch: --- mpage-2.5.4/file.c.orig 2004-05-30 19:34:15.000000000 +0000 +++ mpage-2.5.4/file.c 2011-06-30 09:24:37.000000000 +0000 @@ -168,7 +168,7 @@ * but the tmpfilename */ - (void) strcpy(tmpfile, "/usr/tmp/mpage-stdin-XXXXXX"); + (void) strcpy(tmpfile, "/tmp/mpage-stdin-XXXXXX"); if ( (tmpfd = mkstemp(tmpfile)) == -1) { fprintf(stderr, "%s: cannot create temporary file", MPAGE); perror(MPAGE); @@ -209,7 +209,7 @@ * a temporary file; this temporary file will then * be used as input to the do_doc routine */ - (void)strcpy(tmpfile, "/usr/tmp/mpageXXXXXX"); + (void)strcpy(tmpfile, "/tmp/mpageXXXXXX"); if ( (tmpfd = mkstemp(tmpfile)) == -1) { fprintf(stderr, "%s: cannot create temporary file", MPAGE); perror(MPAGE); @@ -280,7 +280,7 @@ /* * store the input to the temporary file to guess encoding correctly */ - (void)strcpy(tmpfile, "/usr/tmp/mpageXXXXXX"); + (void)strcpy(tmpfile, "/tmp/mpageXXXXXX"); if ( (tmpfd = mkstemp(tmpfile)) == -1) { fprintf(stderr, "%s: cannot create temporary file", MPAGE); tmpfile[0] = 0;
For reasons of cleanness, I'd rather avoid to "ln -s /var/tmp /usr/tmp". Old code shall be brought up-to-date to respect a current file system layout. If you can follow my arguments, it may make sense to forward this bug report|fix to the mpage maintainers to merge it in at the very source. If from their perspective, one needs more flexibility than my static patch to the static sources, it may be reasonable that they go over to an autoconf-based build and have this setting parametrisable.
it should be using $TMPDIR first, and then falling back to /tmp
Can you provide an updated patch against 2.5.6?
+*mpage-2.5.6-r1 (16 Apr 2012) + + 16 Apr 2012; Pacho Ramos <pacho@gentoo.org> +files/01_previous_changes.patch, + +files/10_bts354935_fix_fontdefs.patch, + +files/20_bts416573_manpage_fixes.patch, + +files/30_bts443280_libdir_manpage.patch, +mpage-2.5.6-r1.ebuild, + -mpage-2.5.5.ebuild, -mpage-2.5.6.ebuild: + Apply debian patches, drop old. +