Bug 1530047 - k3b uses /tmp as defaultTempPath
Summary: k3b uses /tmp as defaultTempPath
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: k3b
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-01 14:20 UTC by James
Modified: 2018-02-04 19:55 UTC (History)
9 users (show)

Fixed In Version: k3b-17.12.1-1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-30 18:03:42 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 385367 0 None None None 2018-01-07 22:53:12 UTC

Description James 2018-01-01 14:20:27 UTC
Description of problem:
k3b defaults to using /tmp as its temporary store for images, etc. Being on tmpfs this is generally not big enough. k3b as packaged on Fedora should use /var/tmp instead, which is usually on a larger disc partition.

Version-Release number of selected component (if applicable):
k3b-17.08.1-1.fc27.x86_64

Comment 1 Rex Dieter 2018-01-01 14:48:03 UTC
How exactly?

We already carry a patch that fixes all known-cases so far:
https://src.fedoraproject.org/rpms/k3b/blob/f27/f/k3b-2.0.2-use_vartmp_instead_of_tmp.patch

did we miss something?

Comment 2 James 2018-01-01 15:28:23 UTC
It seems a bit odd:

1. I removed .config/k3brc to make sure it wasn't some old config leftover.
2. Start k3b. *Initially* 'Temp:' on the bottom shows about 200GB available, what I'd expect for /var/tmp.
3. *A seconds later*, it drops down to 3.9GB. Under 'Configure K3b' it's using /tmp. (Machine has 8GiB RAM.)
4. Clicking 'Restore Defaults' does not change this to /var/tmp.
5. Change it manually to /var/tmp, click Apply, OK, and quit k3b.
6. Restart k3b. This time it sticks with /var/tmp.
7. In this instance, 'Restore Defaults' does nothing either - stays as /var/tmp.

Is there possibly some other config/KDE stuff hanging around that I've missed?

Comment 3 Rex Dieter 2018-01-01 15:44:02 UTC
sure enough, even though it appears it's not referenced anywhere in code, under k3b's misc preferences, there's a "default temporary directory" entry that seems to default to /tmp

I'll try to figure out where that comes from.

Comment 4 Rex Dieter 2018-01-01 15:48:16 UTC
found the code reference:

libk3b/core/k3bglobalsettings.cpp:      m_defaultTempPath = c.readPathEntry( "Temp Dir", QStandardPaths::writableLocation( QStandardPaths::TempLocation ) );

Comment 5 James 2018-01-01 15:58:23 UTC
So this looks like a QT thing?

Comment 6 Rex Dieter 2018-01-01 16:33:51 UTC
adjusting summary, for now opting to use "CacheLocation" instead of "TempLocation" in this case (ie, so k3b ends up using ~/.cache/k3b instead by default),

https://src.fedoraproject.org/rpms/k3b/c/3f29e428ebe9aef16995a38d33792b38d4daa812?branch=master

Comment 7 James 2018-01-01 16:57:21 UTC
Seems reasonable. Let me know if you want me to test any new builds.

(This does rather invite the question of what other QT applications in Fedora are not getting the sort of temp directory they think they are.)

Comment 8 Rex Dieter 2018-01-03 20:29:55 UTC
This is only a problem for applications that expect to use TempLocation for non-trivially-sized items.

Comment 9 Rex Dieter 2018-01-07 22:53:13 UTC
Ended up opting to backport solution from upstream (in master/ branch),
https://bugs.kde.org/show_bug.cgi?id=385367

Comment 10 Fedora Update System 2018-01-19 01:29:27 UTC
dragon-17.12.1-1.fc27 juk-17.12.1-2.fc27 k3b-17.12.1-1.fc27 kf5-libkcddb-17.12.1-1.fc27 kf5-libkcompactdisc-17.12.1-1.fc27 kmix-17.12.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bfd2a19510

Comment 11 Fedora Update System 2018-01-19 16:35:27 UTC
dragon-17.12.1-1.fc27, juk-17.12.1-2.fc27, k3b-17.12.1-1.fc27, kf5-libkcddb-17.12.1-1.fc27, kf5-libkcompactdisc-17.12.1-1.fc27, kmix-17.12.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bfd2a19510

Comment 12 Fedora Update System 2018-01-30 18:03:42 UTC
dragon-17.12.1-1.fc27, juk-17.12.1-2.fc27, k3b-17.12.1-1.fc27, kf5-libkcddb-17.12.1-1.fc27, kf5-libkcompactdisc-17.12.1-1.fc27, kmix-17.12.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Gabriele Ciuti 2018-02-04 19:55:54 UTC
The problem still exists. I've a system where another partition (NTFS) is one of the largest so it can be used to create tmp files. I believe that many people have this configuration because often a 'not so large partition' is used to install a linux distribution

One of the most problem is when you try to burn a blu-ray disk (so >=25gb to write). In K3b you can change the default dir for image etc.. BUT not for external programs that k3b uses (line mkisofs of genfsiso etcc): for these programs k3b gives the default /tmp dir (/tmp/tmp-(name)-(computer)) and it can't be changed. In fact, if you try to change environment variables (such as TMP, KDETMP, etc) nothing changes. Even if you try to erase /tmp dir, by consequence k3b points to /home/.k3b/cache).

In my opinion, this is a big problem because in this situation a large DVD or bluray can't be easy burned or maybe it can bring to fire DVD, bluray etc (the disk space can be insufficient).

I suggest to:
- create a box where to specify temp dir for EXTERNAL programs that k3b uses
- read temp dir for EXTERNAL programs from environment variables.

Please, if you do this, do it also for version 2.0.4 (see: kubuntu 16.04 is LTS and can install only k3b 2.0.x)


Note You need to log in before you can comment on or make changes to this bug.