diff --git a/fix-fd-leak.diff b/fix-fd-leak.diff new file mode 100644 index 0000000..4159bb5 --- /dev/null +++ b/fix-fd-leak.diff @@ -0,0 +1,18 @@ +Summary: Do not leak file descriptors +Author: Stephan Kulow + +There is nothing closing the file, the notify callback tries to, +but gets passed a 0 pointer, so this is the easiest solution. +Michael contacts upstream to find out what the real solution is + +--- lib/rpmte.c ++++ lib/rpmte.c +@@ -717,6 +717,8 @@ static int rpmteClose(rpmte te, int rese + case TR_ADDED: + if (te->fd) { + rpmtsNotify(te->ts, te, RPMCALLBACK_INST_CLOSE_FILE, 0, 0); ++ if (te->fd) /* not yet closed */ ++ Fclose(te->fd); + te->fd = NULL; + } + break; diff --git a/rpm.changes b/rpm.changes index 8a504fe..94bd766 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 26 14:13:48 UTC 2012 - coolo@suse.com + +- fix rpm leaking file descriptors of packages: + patch fix-fd-leak.diff + ------------------------------------------------------------------- Mon Sep 24 11:43:13 UTC 2012 - coolo@suse.com diff --git a/rpm.spec b/rpm.spec index bb3ac7b..02d972c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -134,6 +134,7 @@ Patch78: headerchk2.diff Patch79: helperenv.diff Patch80: obsoletesdeptag.diff Patch81: fdopen_strncat.diff +Patch82: fix-fd-leak.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -210,7 +211,7 @@ rm -f rpmdb/db.h %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 +%patch -P 80 -P 81 -P 82 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov