From b9f454dd9249150d1fbd400975ced0aea2d7950f Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Wed, 24 Apr 2013 14:31:48 +0200 Subject: [PATCH] - resolves: #956003 updated to 1.2.3 --- .gitignore | 2 +- libpipeline-1.2.2-peek-offset.patch | 19 -------- libpipeline-1.2.2-valgrind.patch | 76 ----------------------------- libpipeline.spec | 15 +++--- sources | 2 +- 5 files changed, 8 insertions(+), 106 deletions(-) delete mode 100644 libpipeline-1.2.2-peek-offset.patch delete mode 100644 libpipeline-1.2.2-valgrind.patch diff --git a/.gitignore b/.gitignore index 0165cb9..9a64fbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/libpipeline-1.2.2.tar.gz +/libpipeline-1.2.3.tar.gz diff --git a/libpipeline-1.2.2-peek-offset.patch b/libpipeline-1.2.2-peek-offset.patch deleted file mode 100644 index 9cfcfb6..0000000 --- a/libpipeline-1.2.2-peek-offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -upr libpipeline-1.2.2.orig/lib/pipeline.c libpipeline-1.2.2/lib/pipeline.c ---- libpipeline-1.2.2.orig/lib/pipeline.c 2012-03-04 18:43:07.000000000 +0100 -+++ libpipeline-1.2.2/lib/pipeline.c 2012-11-30 14:46:14.395724863 +0100 -@@ -2168,8 +2168,13 @@ const char *pipeline_readline (pipeline - { - size_t buflen; - const char *buffer = get_line (p, &buflen); -- if (buffer) -- p->peek_offset -= buflen; -+ if (buffer) { -+ if (p->peek_offset > buflen) { -+ p->peek_offset -= buflen; -+ } else { -+ p->peek_offset = 0; -+ } -+ } - return buffer; - } - diff --git a/libpipeline-1.2.2-valgrind.patch b/libpipeline-1.2.2-valgrind.patch deleted file mode 100644 index 493ec1d..0000000 --- a/libpipeline-1.2.2-valgrind.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff -upr libpipeline-1.2.2.orig/lib/pipeline.c libpipeline-1.2.2/lib/pipeline.c ---- libpipeline-1.2.2.orig/lib/pipeline.c 2013-03-13 10:23:09.000000000 +0100 -+++ libpipeline-1.2.2/lib/pipeline.c 2013-03-13 14:04:12.112208797 +0100 -@@ -255,6 +255,7 @@ pipecmd *pipecmd_new_argstr (const char - * work when being executed directly. To work around this, - * we just drop "exec" if it appears at the start of argstr. - */ -+ free (arg); - arg = argstr_get_word (&argstr); - if (!arg) - error (FATAL, 0, -diff -upr libpipeline-1.2.2.orig/tests/argstr.c libpipeline-1.2.2/tests/argstr.c ---- libpipeline-1.2.2.orig/tests/argstr.c 2010-10-29 04:08:04.000000000 +0200 -+++ libpipeline-1.2.2/tests/argstr.c 2013-03-13 12:00:58.310964032 +0100 -@@ -62,6 +62,7 @@ START_TEST (test_argstr_exec) - fail_unless (cmd->u.process.argc == 2); - fail_unless (!strcmp (cmd->u.process.argv[0], "foo")); - fail_unless (!strcmp (cmd->u.process.argv[1], "bar")); -+ pipecmd_free (cmd); - } - END_TEST - -diff -upr libpipeline-1.2.2.orig/tests/basic.c libpipeline-1.2.2/tests/basic.c ---- libpipeline-1.2.2.orig/tests/basic.c 2011-09-26 12:04:34.000000000 +0200 -+++ libpipeline-1.2.2/tests/basic.c 2013-03-13 14:11:52.891928581 +0100 -@@ -101,6 +101,7 @@ START_TEST (test_basic_wait_all) - fail_unless (statuses[1] == 3 * 256); - fail_unless (statuses[2] == 0); - pipeline_free (p); -+ free (statuses); - } - END_TEST - -@@ -200,6 +201,8 @@ START_TEST (test_basic_clearenv) - "clearenv+setenv+dup returned second line '%s', expected 'bar\n'", - line2); - pipeline_wait (p2); -+ pipeline_free (p2); -+ pipeline_free (p); - } - END_TEST - -diff -upr libpipeline-1.2.2.orig/tests/exec.c libpipeline-1.2.2/tests/exec.c ---- libpipeline-1.2.2.orig/tests/exec.c 2012-02-27 23:00:53.000000000 +0100 -+++ libpipeline-1.2.2/tests/exec.c 2013-03-13 12:11:15.498591343 +0100 -@@ -71,6 +71,8 @@ START_TEST (test_exec_process) - fail_unless (WEXITSTATUS (status) == i); - else - fail_if (WEXITSTATUS (status) == 0); -+ -+ pipecmd_free (cmd); - } - } - END_TEST -@@ -109,6 +111,8 @@ START_TEST (test_exec_function) - - fail_unless (WIFEXITED (status)); - fail_unless (WEXITSTATUS (status) == i); -+ -+ pipecmd_free (cmd); - } - } - END_TEST -diff -upr libpipeline-1.2.2.orig/tests/redirect.c libpipeline-1.2.2/tests/redirect.c ---- libpipeline-1.2.2.orig/tests/redirect.c 2012-02-29 19:23:59.000000000 +0100 -+++ libpipeline-1.2.2/tests/redirect.c 2013-03-13 14:10:05.601323557 +0100 -@@ -56,6 +56,9 @@ START_TEST (test_redirect_files) - - fclose (fh); - unlink (template); -+ -+ pipeline_free(p); -+ free (template); - } - END_TEST - diff --git a/libpipeline.spec b/libpipeline.spec index 59f417f..73adb42 100644 --- a/libpipeline.spec +++ b/libpipeline.spec @@ -2,18 +2,13 @@ Summary: A pipeline manipulation library Name: libpipeline -Version: 1.2.2 -Release: 4%{?dist} +Version: 1.2.3 +Release: 1%{?dist} License: GPLv3+ Group: Development/Libraries URL: http://libpipeline.nongnu.org/ Source: http://download.savannah.gnu.org/releases/libpipeline/libpipeline-%{version}.tar.gz -# resolves: #876108 -Patch0: libpipeline-1.2.2-peek-offset.patch -# fixed memory leaks detected by valgrind -Patch1: libpipeline-1.2.2-valgrind.patch - BuildRequires: libtool, check-devel # FPC exception for gnulib - copylib - https://fedorahosted.org/fpc/ticket/174 @@ -38,8 +33,6 @@ to develop programs that use libpipeline library. %prep %setup -q -%patch0 -p1 -b .peek-offset -%patch1 -p1 -b .valgrind-mem %build %{configure} @@ -67,6 +60,10 @@ rm $RPM_BUILD_ROOT/%{_libdir}/libpipeline.la %{_mandir}/man3/* %changelog +* Wed Apr 24 2013 Peter Schiffer - 1.2.3-1 +- resolves: #956003 + updated to 1.2.3 + * Tue Mar 19 2013 Peter Schiffer - 1.2.2-4 - fixed memory leaks detected by valgrind diff --git a/sources b/sources index d8c9486..3b19bda 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4367a3f598d171fd43dfa8620ed16d55 libpipeline-1.2.2.tar.gz +f4866aa3a84f2852c78f87ff619dfc60 libpipeline-1.2.3.tar.gz