Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553652 - dev-java/trove: spams into /tmp
Summary: dev-java/trove: spams into /tmp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 15:45 UTC by Toralf Förster
Modified: 2015-06-30 20:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-06-30 15:45:39 UTC
I do experience at all images of my tinderbox, that /tmp contains 660 files like :


$ cat amd64-stable_20150624-154436/tmp/trove9206401812024769417gentemp
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2001, Eric D. Friedman All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
///////////////////////////////////////////////////////////////////////////////

package gnu.trove.procedure;

//////////////////////////////////////////////////
// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! //
//////////////////////////////////////////////////


/**
 * Interface for procedures that take two parameters of type int and char.
 */
public interface TIntCharProcedure {

    /**
     * Executes this procedure. A false return value indicates that
     * the application executing this procedure should not invoke this
     * procedure again.
     *
     * @param a a <code>int</code> value
     * @param b a <code>char</code> value
     * @return true if additional invocations of the procedure are
     * allowed.
     */
    public boolean execute( int a, char b );
}



I do assume, that this comes from that package, right ?
Or is some other package the culprit ?
Comment 1 Patrice Clement (RETIRED) gentoo-dev 2015-06-30 19:30:31 UTC
Indeed. It's what I end up with after installing the package.

monsieurp@epsilon ~ $ printf '%s\n' /tmp/trove* | wc -l
660

Let's investigate.
Comment 2 Patrice Clement (RETIRED) gentoo-dev 2015-06-30 19:39:07 UTC
Found. It comes from this line:
epsilon 3.0.2 # grep -iR -n tmpdir *
generator_src/gnu/trove/generator/Generator.java:414:                new File(System.getProperty("java.io.tmpdir")));

Default location is set to "/tmp" for UNIX-like platforms. Let's pass in the -D flag to java in order to have trove write his garbage files somewhere else.
Comment 3 Patrice Clement (RETIRED) gentoo-dev 2015-06-30 20:34:38 UTC
Passing in -D to java doesn't seem to do the trick. I gave up and modified build.xml:

epsilon 3.0.2 # diff -u build.xml.orig build.xml
--- build.xml.orig      2015-06-30 21:07:56.621000000 +0000
+++ build.xml   2015-06-30 21:10:19.060000000 +0000
@@ -99,6 +99,7 @@
             <classpath>
                 <pathelement path="${output.generator_classes}"/>
             </classpath>
+            <sysproperty key="java.io.tmpdir" value="${output.tmp}" />
         </java>
     </target>

@@ -339,6 +340,7 @@
         <mkdir dir="${output.generated}/gnu"/>
         <mkdir dir="${output.generated}/gnu/trove"/>
         <mkdir dir="${output.lib}"/>
+        <mkdir dir="${output.tmp}"/>
         <mkdir dir="${dist.root}"/>
     </target>

@@ -442,4 +444,4 @@
             <format property="fullVersion" pattern="'build time' yyMMddHHmmss"/>
         </tstamp>
     </target>

epsilon 3.0.2 # ant -f build.xml generate
...
BUILD SUCCESSFUL
Total time: 2 seconds
epsilon 3.0.2 # printf '%s\n' output/tmp/* | wc -l
660
epsilon 3.0.2 # printf '%s\n' /tmp/trove* | wc -l
0

+*trove-3.0.2-r1 (30 Jun 2015)
+
+  30 Jun 2015; Patrice Clement <monsieurp@gentoo.org>
+  +files/trove-3.0.2-java.io.tmpdir.patch, +trove-3.0.2-r1.ebuild:
+  Patch build.xml and write tmp files elsewhere but NOT in /tmp. EAPI 5 bump.
+  Fix bug 553652.
+