[Pkg-mpd-commits] [pkg-mpd] 01/08: New upstream version 0.20.14

Florian Schlichting fsfs at moszumanska.debian.org
Tue Jan 2 16:35:35 UTC 2018


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to branch master
in repository pkg-mpd.

commit bc07189fe8c789b749c92b5e3fa31cdc7ed1ed6e
Author: Florian Schlichting <fsfs at debian.org>
Date:   Tue Jan 2 17:04:47 2018 +0100

    New upstream version 0.20.14
---
 Makefile.in                                  |  4 ++--
 NEWS                                         |  8 ++++++++
 configure                                    | 22 +++++++++++-----------
 configure.ac                                 |  4 ++--
 doc/doxygen.conf                             |  2 +-
 doc/include/tags.xml                         | 10 +++++-----
 src/archive/plugins/Bzip2ArchivePlugin.cxx   |  5 +++--
 src/archive/plugins/Iso9660ArchivePlugin.cxx |  2 ++
 src/archive/plugins/ZzipArchivePlugin.cxx    |  4 ++++
 src/command/CommandError.cxx                 |  4 ++++
 src/db/plugins/simple/DirectorySave.cxx      |  7 ++++---
 src/input/plugins/CurlInputPlugin.cxx        |  2 ++
 src/pcm/SampleFormat.hxx                     |  2 +-
 src/storage/StorageState.cxx                 |  8 +++-----
 src/util/WStringAPI.hxx                      | 14 ++++++++++----
 15 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index ad743d3..de57cc9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15603,9 +15603,9 @@ maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
 	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- at ANDROID_FALSE@@ENABLE_DOCUMENTATION_FALSE@@ENABLE_HAIKU_FALSE at clean-local:
- at ENABLE_DOCUMENTATION_FALSE@install-data-local:
 @ENABLE_DOCUMENTATION_FALSE at uninstall-local:
+ at ENABLE_DOCUMENTATION_FALSE@install-data-local:
+ at ANDROID_FALSE@@ENABLE_DOCUMENTATION_FALSE@@ENABLE_HAIKU_FALSE at clean-local:
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic clean-local \
diff --git a/NEWS b/NEWS
index 4f73e39..00a841b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+ver 0.20.14 (2018/01/01)
+* database
+  - simple: fix file corruption in the presence of mount points
+* archive
+  - bz2: fix deadlock
+  - reduce lock contention, fixing lots of xrun problems
+* fix Solaris build failure
+
 ver 0.20.13 (2017/12/18)
 * output
   - osx: set up ring buffer to hold at least 100ms
diff --git a/configure b/configure
index 4429caa..a66d846 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mpd 0.20.13.
+# Generated by GNU Autoconf 2.69 for mpd 0.20.14.
 #
 # Report bugs to <musicpd-dev-team at lists.sourceforge.net>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='mpd'
 PACKAGE_TARNAME='mpd'
-PACKAGE_VERSION='0.20.13'
-PACKAGE_STRING='mpd 0.20.13'
+PACKAGE_VERSION='0.20.14'
+PACKAGE_STRING='mpd 0.20.14'
 PACKAGE_BUGREPORT='musicpd-dev-team at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1785,7 +1785,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mpd 0.20.13 to adapt to many kinds of systems.
+\`configure' configures mpd 0.20.14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1856,7 +1856,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mpd 0.20.13:";;
+     short | recursive ) echo "Configuration of mpd 0.20.14:";;
    esac
   cat <<\_ACEOF
 
@@ -2209,7 +2209,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mpd configure 0.20.13
+mpd configure 0.20.14
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2616,7 +2616,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mpd $as_me 0.20.13, which was
+It was created by mpd $as_me 0.20.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2967,7 +2967,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 VERSION_MAJOR=0
 VERSION_MINOR=20
-VERSION_REVISION=13
+VERSION_REVISION=14
 VERSION_EXTRA=0
 
 
@@ -3486,7 +3486,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='mpd'
- VERSION='0.20.13'
+ VERSION='0.20.14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21779,7 +21779,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mpd $as_me 0.20.13, which was
+This file was extended by mpd $as_me 0.20.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21845,7 +21845,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mpd config.status 0.20.13
+mpd config.status 0.20.14
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 26a5381..d9190dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
 AC_PREREQ(2.60)
 
-AC_INIT(mpd, 0.20.13, musicpd-dev-team at lists.sourceforge.net)
+AC_INIT(mpd, 0.20.14, musicpd-dev-team at lists.sourceforge.net)
 
 VERSION_MAJOR=0
 VERSION_MINOR=20
-VERSION_REVISION=13
+VERSION_REVISION=14
 VERSION_EXTRA=0
 
 AC_CONFIG_SRCDIR([src/Main.cxx])
diff --git a/doc/doxygen.conf b/doc/doxygen.conf
index c3b1655..5d3fd9a 100644
--- a/doc/doxygen.conf
+++ b/doc/doxygen.conf
@@ -38,7 +38,7 @@ PROJECT_NAME           = MPD
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 0.20.13
+PROJECT_NUMBER         = 0.20.14
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/doc/include/tags.xml b/doc/include/tags.xml
index b3554ef..951e4e6 100644
--- a/doc/include/tags.xml
+++ b/doc/include/tags.xml
@@ -113,7 +113,7 @@
     <para>
       <varname>musicbrainz_artistid</varname>: the artist id in the
       <ulink
-      url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
+      url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
       database.
     </para>
   </listitem>
@@ -122,7 +122,7 @@
     <para>
       <varname>musicbrainz_albumid</varname>: the album id in the
       <ulink
-      url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
+      url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
       database.
     </para>
   </listitem>
@@ -131,7 +131,7 @@
     <para>
       <varname>musicbrainz_albumartistid</varname>: the album artist
       id in the <ulink
-      url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
+      url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
       database.
     </para>
   </listitem>
@@ -140,7 +140,7 @@
     <para>
       <varname>musicbrainz_trackid</varname>: the track id in the
       <ulink
-      url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
+      url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
       database.
     </para>
   </listitem>
@@ -149,7 +149,7 @@
     <para>
       <varname>musicbrainz_releasetrackid</varname>: the release track
       id in the <ulink
-      url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
+      url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
       database.
     </para>
   </listitem>
diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx
index 3dc0b51..04597e2 100644
--- a/src/archive/plugins/Bzip2ArchivePlugin.cxx
+++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx
@@ -162,7 +162,7 @@ Bzip2InputStream::FillBuffer()
 	if (bzstream.avail_in > 0)
 		return true;
 
-	size_t count = archive->istream->Read(buffer, sizeof(buffer));
+	size_t count = archive->istream->LockRead(buffer, sizeof(buffer));
 	if (count == 0)
 		return false;
 
@@ -174,6 +174,8 @@ Bzip2InputStream::FillBuffer()
 size_t
 Bzip2InputStream::Read(void *ptr, size_t length)
 {
+	const ScopeUnlock unlock(mutex);
+
 	int bz_result;
 	size_t nbytes = 0;
 
@@ -224,4 +226,3 @@ const ArchivePlugin bz2_archive_plugin = {
 	bz2_open,
 	bz2_extensions,
 };
-
diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx
index 9e4c4f1..536745d 100644
--- a/src/archive/plugins/Iso9660ArchivePlugin.cxx
+++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx
@@ -182,6 +182,8 @@ Iso9660ArchiveFile::OpenStream(const char *pathname,
 size_t
 Iso9660InputStream::Read(void *ptr, size_t read_size)
 {
+	const ScopeUnlock unlock(mutex);
+
 	int readed = 0;
 	int no_blocks, cur_block;
 	size_t left_bytes = statbuf->size - offset;
diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx
index 5ba087f..fc1e50b 100644
--- a/src/archive/plugins/ZzipArchivePlugin.cxx
+++ b/src/archive/plugins/ZzipArchivePlugin.cxx
@@ -138,6 +138,8 @@ ZzipArchiveFile::OpenStream(const char *pathname,
 size_t
 ZzipInputStream::Read(void *ptr, size_t read_size)
 {
+	const ScopeUnlock unlock(mutex);
+
 	int ret = zzip_file_read(file, ptr, read_size);
 	if (ret < 0)
 		throw std::runtime_error("zzip_file_read() has failed");
@@ -155,6 +157,8 @@ ZzipInputStream::IsEOF() noexcept
 void
 ZzipInputStream::Seek(offset_type new_offset)
 {
+	const ScopeUnlock unlock(mutex);
+
 	zzip_off_t ofs = zzip_seek(file, new_offset, SEEK_SET);
 	if (ofs < 0)
 		throw std::runtime_error("zzip_seek() has failed");
diff --git a/src/command/CommandError.cxx b/src/command/CommandError.cxx
index 8f5badb..d12d4a4 100644
--- a/src/command/CommandError.cxx
+++ b/src/command/CommandError.cxx
@@ -123,6 +123,10 @@ ToAck(std::exception_ptr ep) noexcept
 		return ACK_ERROR_SYSTEM;
 	} catch (const std::invalid_argument &e) {
 		return ACK_ERROR_ARG;
+	} catch (const std::length_error &e) {
+		return ACK_ERROR_ARG;
+	} catch (const std::out_of_range &e) {
+		return ACK_ERROR_ARG;
 #ifdef GLIBCXX_49X
 	} catch (const std::exception &e) {
 #else
diff --git a/src/db/plugins/simple/DirectorySave.cxx b/src/db/plugins/simple/DirectorySave.cxx
index e1f83bf..033d90f 100644
--- a/src/db/plugins/simple/DirectorySave.cxx
+++ b/src/db/plugins/simple/DirectorySave.cxx
@@ -82,10 +82,11 @@ directory_save(BufferedOutputStream &os, const Directory &directory)
 	}
 
 	for (const auto &child : directory.children) {
-		os.Format(DIRECTORY_DIR "%s\n", child.GetName());
+		if (child.IsMount())
+			continue;
 
-		if (!child.IsMount())
-			directory_save(os, child);
+		os.Format(DIRECTORY_DIR "%s\n", child.GetName());
+		directory_save(os, child);
 	}
 
 	for (const auto &song : directory.songs)
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx
index 5cc29a5..7547b97 100644
--- a/src/input/plugins/CurlInputPlugin.cxx
+++ b/src/input/plugins/CurlInputPlugin.cxx
@@ -266,6 +266,7 @@ CurlInputStream::OnData(ConstBuffer<void> data)
 void
 CurlInputStream::OnEnd()
 {
+	const std::lock_guard<Mutex> protect(mutex);
 	cond.broadcast();
 
 	AsyncInputStream::SetClosed();
@@ -274,6 +275,7 @@ CurlInputStream::OnEnd()
 void
 CurlInputStream::OnError(std::exception_ptr e)
 {
+	const std::lock_guard<Mutex> protect(mutex);
 	postponed_exception = std::move(e);
 
 	if (IsSeekPending())
diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx
index 9d956b7..bd82ace 100644
--- a/src/pcm/SampleFormat.hxx
+++ b/src/pcm/SampleFormat.hxx
@@ -122,7 +122,7 @@ sample_format_size(SampleFormat format)
  * @param format a #SampleFormat enum value
  * @return the string
  */
-gcc_pure gcc_malloc
+gcc_pure
 const char *
 sample_format_to_string(SampleFormat format) noexcept;
 
diff --git a/src/storage/StorageState.cxx b/src/storage/StorageState.cxx
index beeb4ee..721a0ce 100644
--- a/src/storage/StorageState.cxx
+++ b/src/storage/StorageState.cxx
@@ -35,7 +35,7 @@
 #include "IOThread.hxx"
 #include "Log.hxx"
 
-#include <list>
+#include <set>
 #include <boost/crc.hpp>
 
 #define MOUNT_STATE_BEGIN        "mount_begin"
@@ -118,16 +118,14 @@ storage_state_restore(const char *line, TextFile &file, Instance &instance)
 unsigned
 storage_state_get_hash(const Instance &instance)
 {
-	std::list<std::string> mounts;
+	std::set<std::string> mounts;
 
 	const auto visitor = [&mounts](const char *mount_uri, const Storage &storage) {
-		mounts.push_back(std::string(mount_uri) + ":" + storage.MapUTF8(""));
+		mounts.emplace(std::string(mount_uri) + ":" + storage.MapUTF8(""));
 	};
 
 	((CompositeStorage*)instance.storage)->VisitMounts(visitor);
 
-	mounts.sort();
-
 	boost::crc_32_type result;
 
 	for (auto mount: mounts) {
diff --git a/src/util/WStringAPI.hxx b/src/util/WStringAPI.hxx
index a71802d..38357c3 100644
--- a/src/util/WStringAPI.hxx
+++ b/src/util/WStringAPI.hxx
@@ -103,11 +103,13 @@ UnsafeCopyStringP(wchar_t *dest, const wchar_t *src) noexcept
 {
 #if defined(_WIN32) || defined(__BIONIC__) || defined(__OpenBSD__) || \
 	defined(__NetBSD__)
-  /* emulate wcpcpy() */
-  UnsafeCopyString(dest, src);
-  return dest + StringLength(dest);
+	/* emulate wcpcpy() */
+	UnsafeCopyString(dest, src);
+	return dest + StringLength(dest);
+#elif defined(__sun) && defined (__SVR4)
+	return std::wcpcpy(dest, src);
 #else
-  return wcpcpy(dest, src);
+	return wcpcpy(dest, src);
 #endif
 }
 
@@ -140,7 +142,11 @@ gcc_malloc gcc_nonnull_all
 static inline wchar_t *
 DuplicateString(const wchar_t *p)
 {
+#if defined(__sun) && defined (__SVR4)
+	return std::wcsdup(p);
+#else
 	return wcsdup(p);
+#endif
 }
 
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/pkg-mpd.git



More information about the Pkg-mpd-commits mailing list