dkms leaves empty temp file in /tmp

Bug #810134 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkms (Debian)
Fix Released
Unknown
dkms (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

dkms leaves a tmp file in /tmp each time it is run.

$ ls -l /tmp/dkms*
ls: cannot access /tmp/dkms*: No such file or directory
$ /usr/sbin/dkms
$ echo $?
0
$ ls -l /tmp/dkms*
-rw------- 1 smoser smoser 0 2011-07-13 16:32 /tmp/dkms.gooAoqPK
$ dpkg-query --show dkms
dkms 2.1.1.2-5ubuntu1

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: dkms 2.1.1.2-5ubuntu1
ProcVersionSignature: Ubuntu 3.0-2.3-generic 3.0.0-rc4
Uname: Linux 3.0-2-generic x86_64
Architecture: amd64
Date: Wed Jul 13 16:26:39 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: dkms
UpgradeStatus: Upgraded to oneiric on 2010-11-15 (239 days ago)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Changed in dkms (Ubuntu):
status: New → Confirmed
Revision history for this message
Mario Limonciello (superm1) wrote :

This still happens with master.

Revision history for this message
Scott Moser (smoser) wrote :

I submitted to debian, the fix is trivial:
=== modified file 'dkms'
--- dkms 2011-03-12 11:07:47 +0000
+++ dkms 2011-07-13 20:38:55 +0000
@@ -3601,6 +3601,7 @@
 install_tree="/lib/modules"
 tmp_file=`mktemp --tmpdir dkms.XXXXXXXX`
 tmp_location=`dirname $tmp_file`
+rm -f "$tmp_file"
 verbose=""
 dkms_frameworkconf="/etc/dkms/framework.conf"

Revision history for this message
Mario Limonciello (superm1) wrote :

commit beb4ea35e25ff565b27e56a104bc2d2c6de313ba
Author: Mario Limonciello <email address hidden>
Date: Wed Jul 13 16:01:31 2011 -0500

    Don't unnecessarily create temporary files that won't be used anywhere else in the application

Changed in dkms (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Mario Limonciello (superm1) wrote :

Well actually the bash optimization rewrite it's a little simpler even. That tempfile isn't needed anywhere else in the application. I've committed to master and will include in the next version.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.2.0.1-0ubuntu1

---------------
dkms (2.2.0.1-0ubuntu1) oneiric; urgency=low

  * New upstream version. Bugs fixed in Ubuntu:
  * Apport hook:
    - Only generate reports about supported kernel version (LP: #766150)
    - Include fglrx make file (LP: #792444)
    - Crashes in get_source() (LP: #532496)
    - Apport script fails (LP: #798498)
  * Openafs modules leaving empty make.log (LP: #593509)
  * '_' in module name causes mkdeb to fail (LP: #511619)
  * PRE_BUILD command invoked from wrong directory. (LP: #702638)
  * Speed up for large amounts of modules (LP: #786672)
  * Leaves temp files in /tmp (LP: #810134)
  * Generate .changes file for LP: upload (LP: #582668)
  * Don't change access rights of upstream source (LP: #582670)
  * common.postinst fails on failed build (LP: #595968)
  * Using a hyphen as part of PACKAGE_VERSION causes failures (LP: #599983)
  * dkms shouldn't source all the variables in dkms.conf (LP: #599985)
 -- Mario Limonciello <email address hidden> Thu, 14 Jul 2011 13:18:56 -0500

Changed in dkms (Ubuntu):
status: Fix Committed → Fix Released
Changed in dkms (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.