From dbb5a6d85efab27d06d38e60245fe31c5230a71b Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Fri, 3 Apr 2015 10:55:00 +0100 Subject: [PATCH] Use /var/tmp by default for writing large tmp files, rhbz#1060324 - http://fedoraproject.org/wiki/Features/tmp-on-tmpfs --- .gitignore | 6 +++++- recordmydesktop-var-tmp.patch | 35 +++++++++++++++++++++++++++++++++++ recordmydesktop.spec | 16 +++++++++------- 3 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 recordmydesktop-var-tmp.patch diff --git a/.gitignore b/.gitignore index 6400c99..f3541ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -recordmydesktop-0.3.8.1.tar.gz +/recordmydesktop-0.3.8.1.tar.gz +/.project +/.build-*.log +/*.src.rpm +/x86_64 diff --git a/recordmydesktop-var-tmp.patch b/recordmydesktop-var-tmp.patch new file mode 100644 index 0000000..dce4fbc --- /dev/null +++ b/recordmydesktop-var-tmp.patch @@ -0,0 +1,35 @@ +--- src/rmd_initialize_data.c.orig 2015-04-03 10:40:24.785080213 +0100 ++++ src/rmd_initialize_data.c 2015-04-03 10:41:04.064554483 +0100 +@@ -239,8 +239,8 @@ + args->device = (char *) malloc(strlen(DEFAULT_AUDIO_DEVICE) + 1); + strcpy(args->device, DEFAULT_AUDIO_DEVICE); + +- args->workdir = (char *) malloc(5); +- strcpy(args->workdir, "/tmp"); ++ args->workdir = (char *) malloc(9); ++ strcpy(args->workdir, "/var/tmp"); + + args->pause_shortcut = (char *) malloc(15); + strcpy(args->pause_shortcut, "Control+Mod1+p"); +--- src/rmd_parseargs.c.orig 2015-04-03 10:43:47.311369535 +0100 ++++ src/rmd_parseargs.c 2015-04-03 10:44:02.364168064 +0100 +@@ -123,7 +123,7 @@ + + "\t--compress-cache\tImage data are cached with light compression.\n" + "\t--workdir DIR\t\tLocation where a temporary directory" +- " will be created to hold project files(default $HOME).\n" ++ " will be created to hold project files(default /var/tmp).\n" + + "\t--delay n[H|h|M|m]\tNumber of secs(default),minutes or hours" + " before capture starts(number can be float)\n" +--- doc/recordmydesktop.1.orig 2015-04-03 10:45:20.907116818 +0100 ++++ doc/recordmydesktop.1 2015-04-03 10:45:33.132953184 +0100 +@@ -419,7 +419,7 @@ + .TP + .B + \-\-workdir DIR +- Location where a temporary directory will be created to hold project files(default /tmp). ++ Location where a temporary directory will be created to hold project files(default /var/tmp). + .br + .TP + .B diff --git a/recordmydesktop.spec b/recordmydesktop.spec index 35cfdb1..4d0a21a 100644 --- a/recordmydesktop.spec +++ b/recordmydesktop.spec @@ -1,9 +1,8 @@ Name: recordmydesktop Version: 0.3.8.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Desktop session recorder with audio and video -Group: Applications/Multimedia License: GPLv2+ URL: http://recordmydesktop.sourceforge.net/ Source0: http://downloads.sourceforge.net/recordmydesktop/%{name}-%{version}.tar.gz @@ -23,6 +22,9 @@ Patch2: recordmydesktop-sane-theora-defaults.patch # 2010-01-15: patch submitted upstream: # https://sourceforge.net/tracker/?func=detail&aid=2894861&group_id=172357&atid=861428 Patch3: recordmydesktop-fix-configure-ac-jack-support.patch +# Use /var/tmp by default for writing large files +# See http://fedoraproject.org/wiki/Features/tmp-on-tmpfs +Patch4: recordmydesktop-var-tmp.patch BuildRequires: libXdamage-devel, libSM-devel BuildRequires: libXext-devel @@ -49,10 +51,7 @@ exposes the program functionality in a usable way. %patch1 -p1 -b .ALSA-default %patch2 -p1 -b .sane-theora-defaults %patch3 -p1 -b .fix-configure-ac-jack-support - -#chmod -x $RPM_BUILD_DIR/%{name}-%{version}/src/load_cache.c \ -# $RPM_BUILD_DIR/%{name}-%{version}/include/rmdtypes.h \ -# $RPM_BUILD_DIR/%{name}-%{version}/src/cache_frame.c +%patch4 %build # re-run autoreconf to add support for aarch64 @@ -60,7 +59,6 @@ autoreconf -i -f %configure make %{?_smp_mflags} - %install make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p" @@ -71,6 +69,10 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p" %changelog +* Fri Apr 03 2015 Mat Booth - 0.3.8.1-14 +- Use /var/tmp by default for writing large tmp files, rhbz#1060324 +- http://fedoraproject.org/wiki/Features/tmp-on-tmpfs + * Sun Aug 17 2014 Fedora Release Engineering - 0.3.8.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild