Hello community, here is the log from the commit of package libdiscid for openSUSE:Factory checked in at 2012-07-31 13:34:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdiscid (Old) and /work/SRC/openSUSE:Factory/.libdiscid.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libdiscid", Maintainer is "VDziewiecki@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/libdiscid/libdiscid.changes 2012-01-30 12:26:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libdiscid.new/libdiscid.changes 2012-07-31 13:58:41.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Jul 31 01:34:06 UTC 2012 - crrodriguez@opensuse.org + +- autotools fixes, all C files must include config.h +- Use openSSL for crypto, we have waay too many internal + implementations of common digest algos. +- Run make check + +------------------------------------------------------------------- New: ---- libdiscid-no-cryptoplz.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdiscid.spec ++++++ --- /var/tmp/diff_new_pack.bm6ZWi/_old 2012-07-31 13:58:44.000000000 +0200 +++ /var/tmp/diff_new_pack.bm6ZWi/_new 2012-07-31 13:58:44.000000000 +0200 @@ -25,7 +25,9 @@ Url: http://musicbrainz.org/doc/libdiscid Source: http://users.musicbrainz.org/~matt/%{name}-%{version}.tar.gz Patch0: libdiscid-0.2.1-visibility.patch +Patch1: libdiscid-no-cryptoplz.patch BuildRequires: libtool +BuildRequires: openssl-devel BuildRequires: pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -81,6 +83,7 @@ %prep %setup -q %patch0 +%patch1 -p1 %build autoreconf -fiv @@ -94,6 +97,9 @@ %clean rm -rf %{buildroot} +%check +make check + %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig ++++++ libdiscid-0.2.1-visibility.patch ++++++ --- /var/tmp/diff_new_pack.bm6ZWi/_old 2012-07-31 13:58:44.000000000 +0200 +++ /var/tmp/diff_new_pack.bm6ZWi/_new 2012-07-31 13:58:44.000000000 +0200 @@ -1,7 +1,7 @@ Index: include/discid/discid.h =================================================================== ---- include/discid/discid.h.orig 2008-03-13 07:17:20.000000000 +0100 -+++ include/discid/discid.h 2009-10-07 17:28:46.797921000 +0200 +--- include/discid/discid.h.orig ++++ include/discid/discid.h @@ -24,13 +24,7 @@ #ifndef MUSICBRAINZ_DISC_ID_H #define MUSICBRAINZ_DISC_ID_H @@ -19,12 +19,28 @@ Index: configure.ac =================================================================== ---- configure.ac.orig 2008-03-13 07:17:22.000000000 +0100 -+++ configure.ac 2009-10-07 17:30:29.284843000 +0200 -@@ -53,6 +53,45 @@ if test "$GCC" = yes; then - CFLAGS="$CFLAGS -Wall -O2" - fi +--- configure.ac.orig ++++ configure.ac +@@ -38,8 +38,10 @@ AC_MSG_NOTICE([using discid implementati + + dnl Checks for programs. +-AC_PROG_CC +-AM_PROG_LIBTOOL ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE ++LT_INIT([disable-static pic-only]) + AC_SUBST(LIBTOOL_DEPS) + AC_PROG_INSTALL + +@@ -49,9 +51,44 @@ AC_C_BIGENDIAN + AC_CHECK_SIZEOF(long) + + +-if test "$GCC" = yes; then +- CFLAGS="$CFLAGS -Wall -O2" +-fi +dnl ************************************************************ +dnl Enable hiding of internal symbols in library to reduce its size and +dnl speed dynamic linking of applications. This currently is only supported @@ -63,7 +79,19 @@ + esac ], + AC_MSG_RESULT(no) +) -+ + AC_OUTPUT([ - Makefile src/Makefile include/Makefile include/discid/Makefile +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig ++++ src/Makefile.am +@@ -25,7 +25,7 @@ libdiscid_la_SOURCES = base64.c sha1.c d + EXTRA_libdiscid_la_SOURCES = \ + disc_linux.c disc_win32.c disc_win32_new.c disc_darwin.c disc_freebsd.c + +-AM_CPPFLAGS = -I$(top_srcdir)/include ++AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include + libdiscid_la_LIBADD = @DISC_OS_OBJ@ + libdiscid_la_DEPENDENCIES = @DISC_OS_OBJ@ + ++++++ libdiscid-no-cryptoplz.patch ++++++ Index: libdiscid-0.2.2/src/disc.c =================================================================== --- libdiscid-0.2.2.orig/src/disc.c +++ libdiscid-0.2.2/src/disc.c @@ -25,8 +25,8 @@ --------------------------------------------------------------------------- */ #include <string.h> #include <assert.h> +#include <openssl/evp.h> -#include "sha1.h" #include "base64.h" #include "discid/discid.h" @@ -240,35 +240,38 @@ int discid_get_track_length(DiscId *d, i * The DiscID is placed in the provided string buffer. */ static void create_disc_id(mb_disc_private *d, char buf[]) { - SHA_INFO sha; - unsigned char digest[20], *base64; - unsigned long size; + unsigned char *base64; + unsigned long size; + unsigned char digest[EVP_MAX_MD_SIZE]; char tmp[17]; /* for 8 hex digits (16 to avoid trouble) */ int i; + EVP_MD_CTX *sha; + unsigned int sha_len; assert( d != NULL ); - sha_init(&sha); + sha = EVP_MD_CTX_create(); + EVP_DigestInit_ex(sha, EVP_sha1(), NULL); sprintf(tmp, "%02X", d->first_track_num); - sha_update(&sha, (unsigned char *) tmp, strlen(tmp)); + EVP_DigestUpdate(sha, (unsigned char *) tmp, strlen(tmp)); sprintf(tmp, "%02X", d->last_track_num); - sha_update(&sha, (unsigned char *) tmp, strlen(tmp)); + EVP_DigestUpdate(sha, (unsigned char *) tmp, strlen(tmp)); for (i = 0; i < 100; i++) { sprintf(tmp, "%08X", d->track_offsets[i]); - sha_update(&sha, (unsigned char *) tmp, strlen(tmp)); + EVP_DigestUpdate(sha, (unsigned char *) tmp, strlen(tmp)); } + + EVP_DigestFinal_ex(sha, digest, &sha_len); + EVP_MD_CTX_destroy(sha); - sha_final(digest, &sha); - - base64 = rfc822_binary(digest, sizeof(digest), &size); - + base64 = rfc822_binary(digest, sha_len , &size); memcpy(buf, base64, size); buf[size] = '\0'; - free(base64); + } Index: libdiscid-0.2.2/src/Makefile.am =================================================================== --- libdiscid-0.2.2.orig/src/Makefile.am +++ libdiscid-0.2.2/src/Makefile.am @@ -21,12 +21,12 @@ # lib_LTLIBRARIES = libdiscid.la -libdiscid_la_SOURCES = base64.c sha1.c disc.c +libdiscid_la_SOURCES = base64.c disc.c EXTRA_libdiscid_la_SOURCES = \ disc_linux.c disc_win32.c disc_win32_new.c disc_darwin.c disc_freebsd.c AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include -libdiscid_la_LIBADD = @DISC_OS_OBJ@ +libdiscid_la_LIBADD = @DISC_OS_OBJ@ -lcrypto libdiscid_la_DEPENDENCIES = @DISC_OS_OBJ@ # Here are a set of rules to help you update your library version information: -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org