[packages/tmpwatch] - rel 2; don't fail if kernel doesn't support CLOCK_BOOTTIME
arekm
arekm at pld-linux.org
Wed Aug 8 15:08:37 CEST 2012
commit c9a6a97108c87a270e65cfb85cca046a12a55b80
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 8 15:08:33 2012 +0200
- rel 2; don't fail if kernel doesn't support CLOCK_BOOTTIME
tmpwatch-boottime.patch | 24 ++++++++++++++++++++++++
tmpwatch.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/tmpwatch-boottime.patch b/tmpwatch-boottime.patch
new file mode 100644
index 0000000..f550320
--- /dev/null
+++ b/tmpwatch-boottime.patch
@@ -0,0 +1,24 @@
+--- tmpwatch-2.11/tmpwatch.c~ 2012-05-26 01:11:57.000000000 +0200
++++ tmpwatch-2.11/tmpwatch.c 2012-08-08 15:07:14.630996260 +0200
+@@ -666,9 +666,11 @@
+ time_t boot_time;
+
+ if (clock_gettime(CLOCK_REALTIME, &real_clock) != 0
+- || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0)
+- message(LOG_FATAL, "Error determining boot time: %s\n",
++ || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0) {
++ message(LOG_DEBUG, "Error determining boot time: %s\n",
+ strerror(errno));
++ socket_kill_time = 0; /* Never remove sockets */
++ } else {
+ boot_time = real_clock.tv_sec - boot_clock.tv_sec;
+ if (real_clock.tv_nsec < boot_clock.tv_nsec)
+ boot_time--;
+@@ -677,6 +679,7 @@
+ boot_time -= 2;
+
+ socket_kill_time = boot_time - grace_seconds;
++ }
+ #else
+ socket_kill_time = 0; /* Never remove sockets */
+ #endif
diff --git a/tmpwatch.spec b/tmpwatch.spec
index 62f28cf..cd93cde 100644
--- a/tmpwatch.spec
+++ b/tmpwatch.spec
@@ -11,7 +11,7 @@ Summary(ru.UTF-8): Утилита удаления файлов по крите
Summary(uk.UTF-8): Утиліта видалення файлів за критерієм давності останнього доступу
Name: tmpwatch
Version: 2.11
-Release: 1
+Release: 2
License: GPL v2
Group: Applications/System
Source0: https://fedorahosted.org/releases/t/m/tmpwatch/%{name}-%{version}.tar.bz2
@@ -19,6 +19,7 @@ Source0: https://fedorahosted.org/releases/t/m/tmpwatch/%{name}-%{version}.tar.b
Source1: %{name}.sysconfig
Source2: %{name}.cron
Source3: %{name}.conf
+Patch0: %{name}-boottime.patch
URL: https://fedorahosted.org/tmpwatch/
BuildRequires: autoconf >= 2.64
BuildRequires: automake
@@ -87,6 +88,7 @@ gözönüne almadan dizinleri rekürsif olarak arar ve kullanıcının
%prep
%setup -q
+%patch0 -p1
%build
%{__aclocal} -I m4
More information about the pld-cvs-commit
mailing list