Hello community, here is the log from the commit of package libzip for openSUSE:Factory checked in at 2011-12-31 17:20:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libzip (Old) and /work/SRC/openSUSE:Factory/.libzip.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzip", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/libzip/libzip.changes 2011-11-21 15:48:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libzip.new/libzip.changes 2011-12-31 17:20:09.000000000 +0100 @@ -1,0 +2,12 @@ +Thu Dec 29 19:35:38 UTC 2011 - crrodrig...@opensuse.org + +- Use O_CLOEXEC where needed, as calling applications + may fork.. execve and we end up leaking internal fds. + +------------------------------------------------------------------- +Mon Nov 21 15:51:37 UTC 2011 - jeng...@medozas.de + +- Remove redundant/unwanted tags/section (cf. specfile guidelines) +- Use %_smp_mflags for parallel building + +------------------------------------------------------------------- New: ---- libzip-ocloexec.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libzip.spec ++++++ --- /var/tmp/diff_new_pack.KprpkO/_old 2011-12-31 17:20:10.000000000 +0100 +++ /var/tmp/diff_new_pack.KprpkO/_new 2011-12-31 17:20:10.000000000 +0100 @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild Name: libzip @@ -34,6 +33,7 @@ Patch0: libzip-0.8.hg20080403-visibility.patch #PATCH-FIX-UPSTREAM: for for failing tests by Thomas Klausner Patch1: libzip.test.diff +Patch2: libzip-ocloexec.patch %description libzip is a C library for reading, creating, and modifying zip @@ -44,7 +44,6 @@ * ziptorrent - manipulate with a restricted file format used for using bittorrent on zip files. %package -n libzip2 -License: BSD3c Summary: C library for reading, creating, and modifying zip archives Group: Development/Libraries/C and C++ @@ -58,7 +57,6 @@ pages. %package devel -License: BSD3c Summary: C library for reading, creating, and modifying zip archives Group: Development/Libraries/C and C++ Requires: libzip%{soname} = %{version} glibc-devel @@ -68,28 +66,24 @@ archives. This package contains devel files. %prep -%setup -q -n %{name}-%{version} +%setup -q %patch0 -p1 %patch1 -p1 +%patch2 %build autoreconf -fiv %configure --disable-static --with-pic -%{__make} %{?jobs:-j%jobs} +make %{?_smp_mflags} %check -export MALLOC_CHECK_=2 -%{__make} --debug=j %{?jobs:-j%jobs} check -unset MALLOC_CHECK_ +make %{?_smp_mflags} check VERBOSE=1 %install %{__make} install DESTDIR=%{buildroot} %__cp lib/zipconf.h %buildroot/%_includedir/zipconf.h rm -f %{buildroot}%{_libdir}/libzip.la -%clean -rm -rf %{buildroot} - %post -n libzip%{soname} -p /sbin/ldconfig %postun -n libzip%{soname} -p /sbin/ldconfig ++++++ libzip-ocloexec.patch ++++++ --- lib/zip_close.c.orig +++ lib/zip_close.c @@ -44,9 +44,9 @@ #endif #include <sys/types.h> #include <sys/stat.h> +#include <fcntl.h> #ifdef _WIN32 #include <io.h> -#include <fcntl.h> #endif static int add_data(struct zip *, struct zip_source *, struct zip_dirent *, @@ -328,7 +328,7 @@ zip_close(struct zip *za) free(temp); if (reopen_on_error) { /* ignore errors, since we're already in an error case */ - za->zp = fopen(za->zn, "rb"); + za->zp = fopen(za->zn, "rbe"); } return -1; } @@ -610,7 +610,7 @@ _zip_create_temp_output(struct zip *za, sprintf(temp, "%s.XXXXXX", za->zn); - if ((tfd=mkstemp(temp)) == -1) { + if ((tfd=mkostemp(temp, O_CLOEXEC)) == -1) { _zip_error_set(&za->error, ZIP_ER_TMPOPEN, errno); free(temp); return NULL; --- lib/zip_open.c.orig +++ lib/zip_open.c @@ -71,7 +71,7 @@ zip_open(const char *fn, int flags, int break; } - if ((fp=fopen(fn, "rb")) == NULL) { + if ((fp=fopen(fn, "rbe")) == NULL) { set_error(zep, NULL, ZIP_ER_OPEN); return NULL; } --- lib/zip_source_filep.c.orig +++ lib/zip_source_filep.c @@ -133,7 +133,7 @@ read_file(void *state, void *data, zip_u switch (cmd) { case ZIP_SOURCE_OPEN: if (z->fname) { - if ((z->f=fopen(z->fname, "rb")) == NULL) { + if ((z->f=fopen(z->fname, "rbe")) == NULL) { z->e[0] = ZIP_ER_OPEN; z->e[1] = errno; return -1; --- configure.ac.orig +++ configure.ac @@ -1,4 +1,4 @@ -AC_PREREQ(2.57) +AC_PREREQ([2.68]) AC_INIT([libzip],[0.10],[libzip-disc...@nih.at]) AC_CONFIG_SRCDIR([lib/zip_add.c]) AC_CONFIG_HEADERS([config.h]) @@ -7,7 +7,9 @@ AM_INIT_AUTOMAKE dnl AC_CANONICAL_HOST -AC_PROG_CC +AC_PROG_CC_STDC +AC_USE_SYSTEM_EXTENSIONS +AC_SYS_LARGEFILE AM_PROG_CC_C_O AC_ARG_WITH(zlib, @@ -69,7 +71,7 @@ EOF AC_EXEEXT -AM_PROG_LIBTOOL +LT_INIT AC_CHECK_FUNCS([_open _snprintf _strcmpi _strdup _stricmp fseeko ftello getopt open snprintf strcasecmp strdup]) AC_CHECK_FUNCS([mkstemp], [], [AC_LIBOBJ(mkstemp)]) --- lib/Makefile.am.orig +++ lib/Makefile.am @@ -1,5 +1,5 @@ libincludedir = ${libdir}/@PACKAGE@/include - +AM_CPPFLAGS = -include ${top_srcdir}/config.h lib_LTLIBRARIES = libzip.la noinst_HEADERS = zipint.h include_HEADERS = zip.h --- regress/Makefile.am.orig +++ regress/Makefile.am @@ -45,7 +45,6 @@ TESTS= \ add_from_filep.test \ add_from_zip.test \ encrypt.test \ - fread.test \ get_comment.test \ name_locate.test \ open_many_ok.test \ @@ -64,5 +63,5 @@ TESTS= \ NOTYET= \ add_from_file_duplicate.test -AM_CPPFLAGS=-I${top_srcdir}/lib +AM_CPPFLAGS=-I${top_srcdir}/lib -include ${top_srcdir}/config.h LDADD=${top_builddir}/lib/libzip.la --- lib/zipint.h.orig +++ lib/zipint.h @@ -43,7 +43,6 @@ #endif #include "zip.h" -#include "config.h" #ifndef HAVE_FSEEKO #define fseeko(s, o, w) (fseek((s), (long int)(o), (w))) --- src/Makefile.am.orig +++ src/Makefile.am @@ -1,3 +1,4 @@ +AM_CPPFLAGS = -include ${top_srcdir}/config.h bin_PROGRAMS=zipcmp zipmerge ziptorrent zipcmp_CPPFLAGS=-I${top_srcdir}/lib --- regress/tryopen.c.orig +++ regress/tryopen.c @@ -39,6 +39,7 @@ #ifndef HAVE_GETOPT #include "getopt.h" #endif +#include <unistd.h> #include "zip.h" --- regress/fread.c.orig +++ regress/fread.c @@ -95,7 +95,7 @@ main(int argc, char *argv[]) fail += do_read(z, "cryptok", 0, WHEN_OPEN, ZIP_ER_NOPASSWD, 0); zip_set_default_password(z, "crypt"); - fail += do_read(z, "cryptok", 0, WHEN_NEVER, 0, 0); + fail += do_read(z, "cryptok", 0, WHEN_OPEN, 0, 0); zip_set_default_password(z, "wrong"); fail += do_read(z, "cryptok", 0, WHEN_OPEN, ZIP_ER_WRONGPASSWD, 0); zip_set_default_password(z, NULL); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org