diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2019-04-29 20:58:59 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2019-04-30 08:59:45 +0200 |
commit | d20b8960352742059551ee7c8b5bc041616d9349 (patch) | |
tree | eadebec1c823dee657b831ca5f8742cc0e5a0a5a /source/xap | |
parent | 0aa4ddfcc4e2610b1ba115e34626bbc52d384990 (diff) | |
download | current-d20b8960352742059551ee7c8b5bc041616d9349.tar.gz |
Mon Apr 29 20:58:59 UTC 201920190429205859
ap/vim-8.1.1239-x86_64-1.txz: Upgraded.
l/python-urllib3-1.25.2-x86_64-1.txz: Upgraded.
xap/easytag-2.4.3-x86_64-2.txz: Rebuilt.
Upgraded (again) to easytag-2.4.3.
Reverted the upstream commit that was corrupting ogg and opus files.
In a new configuration, don't add freedb.musicbrainz.org as an automatic
CDDB server. Musicbrainz shut down this service permanently on March 18
and easytag breaks/hangs if it attempts to contact it. If your account
has already run easytag previously, you should go to Edit -> Preferences ->
CDDB and blank out the hostname field containing "freedb.musicbrainz.org".
xap/vim-gvim-8.1.1239-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/xap')
-rwxr-xr-x | source/xap/easytag/easytag.SlackBuild | 9 | ||||
-rw-r--r-- | source/xap/easytag/easytag.no.freedb.musicbrainz.org.diff | 11 | ||||
-rw-r--r-- | source/xap/easytag/easytag.revert.ogg.handle.patch | 249 |
3 files changed, 268 insertions, 1 deletions
diff --git a/source/xap/easytag/easytag.SlackBuild b/source/xap/easytag/easytag.SlackBuild index b45927c9..40c9b3da 100755 --- a/source/xap/easytag/easytag.SlackBuild +++ b/source/xap/easytag/easytag.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -78,6 +78,13 @@ rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 cd $PKGNAM-$VERSION || exit 1 +# Revert an upstream commit that corrupts .ogg and .opus files: +zcat $CWD/easytag.revert.ogg.handle.patch.gz | patch -p1 -R --verbose || exit 1 + +# freedb.musicbrainz.org has been shut down, so blank out the backup host +# name to avoid hangs that occur when trying to connect to the defunct service: +zcat $CWD/easytag.no.freedb.musicbrainz.org.diff.gz | patch -p1 --verbose || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ diff --git a/source/xap/easytag/easytag.no.freedb.musicbrainz.org.diff b/source/xap/easytag/easytag.no.freedb.musicbrainz.org.diff new file mode 100644 index 00000000..cbbb169e --- /dev/null +++ b/source/xap/easytag/easytag.no.freedb.musicbrainz.org.diff @@ -0,0 +1,11 @@ +--- ./data/org.gnome.EasyTAG.gschema.xml.orig 2016-08-30 10:31:39.000000000 -0500 ++++ ./data/org.gnome.EasyTAG.gschema.xml 2019-04-29 14:52:53.473575761 -0500 +@@ -54,7 +54,7 @@ + <key name="cddb-automatic-search-hostname2" type="s"> + <summary>CDDB server hostname for automatic search</summary> + <description>The CDDB server to use for the automatic search</description> +- <default>'freedb.musicbrainz.org'</default> ++ <default>''</default> + </key> + + <key name="cddb-automatic-search-port2" type="u"> diff --git a/source/xap/easytag/easytag.revert.ogg.handle.patch b/source/xap/easytag/easytag.revert.ogg.handle.patch new file mode 100644 index 00000000..4b4f3daa --- /dev/null +++ b/source/xap/easytag/easytag.revert.ogg.handle.patch @@ -0,0 +1,249 @@ +From e5c640ca3f259f1b74e716723345521987a7bd68 Mon Sep 17 00:00:00 2001 +From: David King <amigadave@amigadave.com> +Date: Wed, 9 Nov 2016 17:29:34 +0000 +Subject: [PATCH] Do not maintain an open handle on Ogg files + +Only keep a file open for reading long enough to read the necessary +items from the file. Remove the file input stream from EtOggState, as +it is no longer preserved across function calls. +--- + src/tags/vcedit.c | 92 +++++++++++++++++++---------------------------- + 1 file changed, 36 insertions(+), 56 deletions(-) + +diff --git a/src/tags/vcedit.c b/src/tags/vcedit.c +index cf43428..a40762d 100644 +--- a/src/tags/vcedit.c ++++ b/src/tags/vcedit.c +@@ -35,7 +35,6 @@ + struct _EtOggState + { + /*< private >*/ +- GFileInputStream *in; + #ifdef ENABLE_SPEEX + SpeexHeader *si; + #endif +@@ -126,11 +125,6 @@ vcedit_clear_internals (EtOggState *state) + } + #endif /* ENABLE_OPUS */ + +- if (state->in) +- { +- g_object_unref (state->in); +- } +- + memset (state, 0, sizeof (*state)); + } + +@@ -245,6 +239,7 @@ _blocksize (EtOggState *s, + + static gboolean + _fetch_next_packet (EtOggState *s, ++ GInputStream *istream, + ogg_packet *p, + ogg_page *page, + GError **error) +@@ -274,8 +269,8 @@ _fetch_next_packet (EtOggState *s, + while (ogg_sync_pageout (s->oy, page) <= 0) + { + buffer = ogg_sync_buffer (s->oy, CHUNKSIZE); +- bytes = g_input_stream_read (G_INPUT_STREAM (s->in), buffer, +- CHUNKSIZE, NULL, error); ++ bytes = g_input_stream_read (istream, buffer, CHUNKSIZE, NULL, ++ error); + ogg_sync_wrote (s->oy, bytes); + + if(bytes == 0) +@@ -308,7 +303,7 @@ _fetch_next_packet (EtOggState *s, + + g_assert (error == NULL || *error == NULL); + ogg_stream_pagein (s->os, page); +- return _fetch_next_packet (s, p, page, error); ++ return _fetch_next_packet (s, istream, p, page, error); + } + } + +@@ -407,14 +402,13 @@ vcedit_open (EtOggState *state, + return FALSE; + } + +- state->in = istream; + state->oy = g_slice_new (ogg_sync_state); + ogg_sync_init (state->oy); + + while(1) + { + buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); +- bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, ++ bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + CHUNKSIZE, NULL, error); + if (bytes == -1) + { +@@ -654,7 +648,7 @@ vcedit_open (EtOggState *state, + } + + buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); +- bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, ++ bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + CHUNKSIZE, NULL, error); + + if (bytes == -1) +@@ -676,11 +670,14 @@ vcedit_open (EtOggState *state, + + /* Headers are done! */ + g_assert (error == NULL || *error == NULL); ++ /* TODO: Handle error during stream close. */ ++ g_object_unref (istream); + + return TRUE; + + err: + g_assert (error == NULL || *error != NULL); ++ g_object_unref (istream); + vcedit_clear_internals (state); + return FALSE; + } +@@ -702,6 +699,7 @@ vcedit_write (EtOggState *state, + char *buffer; + int bytes; + int needflush = 0, needout = 0; ++ GFileInputStream *istream; + GOutputStream *ostream; + gchar *buf; + gsize size; +@@ -709,11 +707,22 @@ vcedit_write (EtOggState *state, + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + +- fileinfo = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, +- G_FILE_QUERY_INFO_NONE, NULL, error); ++ istream = g_file_read (file, NULL, error); ++ ++ if (!istream) ++ { ++ g_assert (error == NULL || *error != NULL); ++ return FALSE; ++ } ++ ++ fileinfo = g_file_input_stream_query_info (istream, ++ G_FILE_ATTRIBUTE_STANDARD_SIZE, ++ NULL, error); ++ + if (!fileinfo) + { + g_assert (error == NULL || *error != NULL); ++ g_object_unref (istream); + return FALSE; + } + +@@ -774,7 +783,8 @@ vcedit_write (EtOggState *state, + } + } + +- while (_fetch_next_packet (state, &op, &ogin, error)) ++ while (_fetch_next_packet (state, G_INPUT_STREAM (istream), &op, &ogin, ++ error)) + { + if (needflush) + { +@@ -950,7 +960,7 @@ vcedit_write (EtOggState *state, + { + /* We copy the rest of the stream (other logical streams) + * through, a page at a time. */ +- while(1) ++ while (1) + { + result = ogg_sync_pageout (state->oy, &ogout); + +@@ -989,7 +999,7 @@ vcedit_write (EtOggState *state, + + buffer = ogg_sync_buffer (state->oy, CHUNKSIZE); + +- bytes = g_input_stream_read (G_INPUT_STREAM (state->in), buffer, ++ bytes = g_input_stream_read (G_INPUT_STREAM (istream), buffer, + CHUNKSIZE, NULL, error); + + if (bytes == -1) +@@ -1007,11 +1017,19 @@ vcedit_write (EtOggState *state, + } + } + +- + cleanup: + ogg_stream_clear (&streamout); + ogg_packet_clear (&header_comments); + ++ if (!g_input_stream_close (G_INPUT_STREAM (istream), NULL, error)) ++ { ++ /* Ignore the _close() failure, and try the write anyway. */ ++ g_warning ("Error closing Ogg file for reading: %s", ++ (*error)->message); ++ g_clear_error (error); ++ } ++ ++ g_object_unref (istream); + g_free (state->mainbuf); + g_free (state->bookbuf); + state->mainbuf = state->bookbuf = NULL; +@@ -1045,41 +1063,13 @@ cleanup: + buf = g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (ostream)); + size = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (ostream)); + +- /* At least on Windows, writing to a file with an open-for-reading stream +- * fails, so close the input stream before writing to the file. */ +- if (!g_input_stream_close (G_INPUT_STREAM (state->in), NULL, error)) +- { +- /* Ignore the _close() failure, and try the write anyway. */ +- g_warning ("Error closing Ogg file for reading: %s", +- (*error)->message); +- g_clear_error (error); +- } +- +- g_object_unref (state->in); +- state->in = NULL; +- + /* Write the in-memory data back out to the original file. */ + if (!g_file_replace_contents (file, buf, size, NULL, FALSE, + G_FILE_CREATE_NONE, NULL, NULL, error)) + { +- GError *tmp_error = NULL; +- + g_object_unref (ostream); + g_free (buf); + +- /* Re-open the file for reading, to keep the internal state +- * consistent. */ +- state->in = g_file_read (file, NULL, &tmp_error); +- +- if (!state->in) +- { +- g_warning ("Error opening Ogg file for reading after write failure: %s", +- tmp_error->message); +- g_clear_error (&tmp_error); +- g_assert (error == NULL || *error != NULL); +- return FALSE; +- } +- + g_assert (error == NULL || *error != NULL); + return FALSE; + } +@@ -1087,16 +1077,6 @@ cleanup: + g_free (buf); + g_object_unref (ostream); + +- /* Re-open the file, now that the write has completed. */ +- state->in = g_file_read (file, NULL, error); +- +- if (!state->in) +- { +- g_assert (error == NULL || *error != NULL); +- return FALSE; +- } +- +- + return TRUE; + } + +-- +2.18.1 + + |