Hello community, here is the log from the commit of package apulse for openSUSE:Leap:15.2 checked in at 2020-02-21 10:52:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/apulse (Old) and /work/SRC/openSUSE:Leap:15.2/.apulse.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apulse" Fri Feb 21 10:52:44 2020 rev:14 rq:777452 version:0.1.12 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/apulse/apulse.changes 2020-01-15 14:47:15.233289711 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.apulse.new.26092/apulse.changes 2020-02-21 10:53:08.755392906 +0100 @@ -1,0 +2,40 @@ +Fri Nov 8 08:05:35 UTC 2019 - Stefan Seyfried <[email protected]> + +- add apulse-fix-pulse-13.patch to fix build against PA 13 + +------------------------------------------------------------------- +Thu Oct 17 13:30:17 UTC 2019 - Richard Brown <[email protected]> + +- Remove obsolete Groups tag (fate#326485) + +------------------------------------------------------------------- +Tue Mar 26 07:03:44 UTC 2019 - [email protected] + +- Use alsa API properly. Consumers are expected to use + <alsa/asoundlib.h> instead of <asoundlib.h>. + This is in preparation of an change to pkgconfig(alsa) to + not pollute CFLAGS with -I/usr/include/alsa anymore (bsc#1130333) + apulse-alsa.patch + +------------------------------------------------------------------- +Sat Jun 16 15:48:41 UTC 2018 - [email protected] + +- Update to version 0.1.12 (changes since 0.1.10): + * Implement new, free, and write functions of the pa_simple_* + family. + * Add some documentation about issues related to sandboxing. + * Drop the libpulsecommon-5.0.so binary. + * Add stub functions for the mainloop-glib interface. + * add a man- page. + * Cosmetic code changes. + * Misc compatibility fixes. +- Add apulse-fix-pulse-12.patch [email protected]: Fix + PulseAudio 12+ compatibility. +- Remove apulse-link-math.patch. +- Use %cmake_install. +- Rewrite the apulse script in Python 3 to avoid insecure config + reading from home. The apulse.conf format was changed, and the + user config also was moved from ~/.apulse.conf to + $XDG_CONFIG_HOME/apulse.conf. + +------------------------------------------------------------------- Old: ---- apulse apulse-0.1.10.tar.gz apulse-link-math.patch New: ---- apulse-0.1.12.tar.gz apulse-alsa.patch apulse-fix-pulse-12.patch apulse-fix-pulse-13.patch apulse.py ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apulse.spec ++++++ --- /var/tmp/diff_new_pack.zuvGbw/_old 2020-02-21 10:53:09.111393688 +0100 +++ /var/tmp/diff_new_pack.zuvGbw/_new 2020-02-21 10:53:09.115393696 +0100 @@ -1,7 +1,7 @@ # # spec file for package apulse # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,23 +12,31 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + +# integer of major pulse version +%define pulse_major %(sed -n '/^#define.*PA_MAJOR/{s/^.* //;p}' /usr/include/pulse/version.h) + %define __provides_exclude_from ^%{_libdir}/apulse/.*.so.*$ Name: apulse -Version: 0.1.10 +Version: 0.1.12 Release: 0 Summary: PulseAudio emulation for ALSA License: MIT -Group: System/Libraries URL: https://github.com/i-rinat/apulse Source0: https://github.com/i-rinat/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: baselibs.conf -Source2: %{name}.conf -Source3: %{name} -# PATCH-FIX-OPENSUSE apulse-link-math.patch [email protected] -- Link with -lm to fix building. -Patch0: apulse-link-math.patch +Source2: %{name}.py +Source3: %{name}.conf +# PATCH-FIX-OPENSUSE apulse-fix-pulse-12.patch [email protected] -- Fix PulseAudio 12+ compatibility. +Patch0: apulse-fix-pulse-12.patch +Patch1: apulse-alsa.patch +%if %{pulse_major} > 12 +# PATCH-FIX-OPENSUSE apulse-fix-pulse-13.patch [email protected] -- fix pulse 13+ compatibility. +Patch2: apulse-fix-pulse-13.patch +%endif BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -40,34 +48,39 @@ %endif %description -PulseAudio emulation intended to be used with Skype and Firefox +PulseAudio emulation intended to be used with Firefox and Skype. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build -%cmake -LA -DUSE_BUNDLED_PULSEAUDIO_HEADERS=OFF -DAPULSEPATH=%{_libdir}/%{name} -make %{?_smp_mflags} +%cmake \ + -DUSE_BUNDLED_PULSEAUDIO_HEADERS=OFF \ + -DAPULSEPATH=%{_libdir}/%{name} \ + -DCMAKE_SHARED_LINKER_FLAGS="" -LA +make %{?_smp_mflags} V=1 %install -mkdir -p %{buildroot}%{_libdir}/%{name} -install -m644 build/libpulse*.so.* %{buildroot}%{_libdir}/%{name} -mkdir %{buildroot}%{_sysconfdir} -install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir} -mkdir %{buildroot}%{_bindir} -install %{SOURCE3} %{buildroot}%{_bindir} +%cmake_install +rm %{buildroot}%{_libdir}/%{name}/libpulse*.so +install -Dpm 0755 %{SOURCE2} %{buildroot}%{_bindir}/%{name} +install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}.conf %post -p /sbin/ldconfig + %postun -p /sbin/ldconfig %files -%defattr(0644,root,root,-) +%if 0%{?suse_version} >= 1500 %license LICENSE.MIT +%else +%doc LICENSE.MIT +%endif %doc README.md %config(noreplace) %{_sysconfdir}/%{name}.conf -%attr(0755,root,root) %{_bindir}/%{name} +%{_bindir}/%{name} %dir %{_libdir}/%{name} %{_libdir}/%{name}/libpulse*.so.* +%{_mandir}/man1/apulse.1%{?ext_man} %changelog ++++++ apulse-0.1.10.tar.gz -> apulse-0.1.12.tar.gz ++++++ ++++ 7948 lines of diff (skipped) ++++++ apulse-alsa.patch ++++++ --- a/src/apulse.h +++ b/src/apulse.h @@ -26,7 +26,7 @@ #define _GNU_SOURCE #include "ringbuffer.h" -#include <asoundlib.h> +#include <alsa/asoundlib.h> #include <glib.h> #include <poll.h> #include <pthread.h> --- a/src/util.h +++ b/src/util.h @@ -24,7 +24,7 @@ #pragma once -#include <asoundlib.h> +#include <alsa/asoundlib.h> #include <pulse/pulseaudio.h> int ++++++ apulse-fix-pulse-12.patch ++++++ --- a/src/apulse-volume.c +++ b/src/apulse-volume.c @@ -282,8 +282,13 @@ pa_cvolume_scale(pa_cvolume *v, pa_volum APULSE_EXPORT pa_cvolume * +#if PA_CHECK_VERSION(11, 99, 0) +pa_cvolume_scale_mask(pa_cvolume *v, pa_volume_t max, const pa_channel_map *cm, + pa_channel_position_mask_t mask) +#else pa_cvolume_scale_mask(pa_cvolume *v, pa_volume_t max, pa_channel_map *cm, pa_channel_position_mask_t mask) +#endif { trace_info_z("Z %s\n", __func__); return NULL; ++++++ apulse-fix-pulse-13.patch ++++++ Index: b/src/apulse-context.c =================================================================== --- a/src/apulse-context.c +++ b/src/apulse-context.c @@ -80,7 +80,7 @@ pa_context_disconnect(pa_context *c) APULSE_EXPORT int -pa_context_errno(pa_context *c) +pa_context_errno(const pa_context *c) { trace_info_z("Z %s c=%p\n", __func__, c); @@ -89,7 +89,7 @@ pa_context_errno(pa_context *c) APULSE_EXPORT uint32_t -pa_context_get_protocol_version(pa_context *c) +pa_context_get_protocol_version(const pa_context *c) { trace_info_f("F %s c=%p\n", __func__, c); return PA_PROTOCOL_VERSION; @@ -143,7 +143,7 @@ pa_context_get_server_info(pa_context *c APULSE_EXPORT uint32_t -pa_context_get_server_protocol_version(pa_context *c) +pa_context_get_server_protocol_version(const pa_context *c) { trace_info_f("F %s c=%p\n", __func__, c); return 8; // PA headers say "8" is the protocol version used in PulseAudio @@ -514,7 +514,7 @@ pa_context_get_sink_input_info(pa_contex APULSE_EXPORT pa_context_state_t -pa_context_get_state(pa_context *c) +pa_context_get_state(const pa_context *c) { trace_info_f("F %s c=%p\n", __func__, c); @@ -536,7 +536,7 @@ pa_context_new(pa_mainloop_api *mainloop APULSE_EXPORT pa_context * pa_context_new_with_proplist(pa_mainloop_api *mainloop_api, const char *name, - pa_proplist *proplist) + const pa_proplist *proplist) { trace_info_f("F %s mainloop_api=%p, name=%s, proplist=%p\n", __func__, mainloop_api, name, proplist); @@ -569,7 +569,7 @@ pa_context_ref(pa_context *c) APULSE_EXPORT pa_time_event * -pa_context_rttime_new(pa_context *c, pa_usec_t usec, pa_time_event_cb_t cb, +pa_context_rttime_new(const pa_context *c, pa_usec_t usec, pa_time_event_cb_t cb, void *userdata) { trace_info_f("F %s c=%p, usec=%" PRIu64 " cb=%p, userdata=%p\n", __func__, @@ -1240,7 +1240,7 @@ pa_context_set_default_source(pa_context APULSE_EXPORT int -pa_context_is_local(pa_context *c) +pa_context_is_local(const pa_context *c) { trace_info_z("Z %s\n", __func__); return 0; @@ -1257,7 +1257,7 @@ pa_context_set_name(pa_context *c, const APULSE_EXPORT const char * -pa_context_get_server(pa_context *c) +pa_context_get_server(const pa_context *c) { trace_info_z("Z %s\n", __func__); return NULL; @@ -1265,7 +1265,7 @@ pa_context_get_server(pa_context *c) APULSE_EXPORT pa_operation * -pa_context_proplist_update(pa_context *c, pa_update_mode_t mode, pa_proplist *p, +pa_context_proplist_update(pa_context *c, pa_update_mode_t mode, const pa_proplist *p, pa_context_success_cb_t cb, void *userdata) { trace_info_z("Z %s\n", __func__); @@ -1283,7 +1283,7 @@ pa_context_proplist_remove(pa_context *c APULSE_EXPORT uint32_t -pa_context_get_index(pa_context *s) +pa_context_get_index(const pa_context *s) { trace_info_z("Z %s\n", __func__); return 0; @@ -1291,14 +1291,14 @@ pa_context_get_index(pa_context *s) APULSE_EXPORT void -pa_context_rttime_restart(pa_context *c, pa_time_event *e, pa_usec_t usec) +pa_context_rttime_restart(const pa_context *c, pa_time_event *e, pa_usec_t usec) { trace_info_z("Z %s\n", __func__); } APULSE_EXPORT size_t -pa_context_get_tile_size(pa_context *c, const pa_sample_spec *ss) +pa_context_get_tile_size(const pa_context *c, const pa_sample_spec *ss) { gchar *s_ss = trace_pa_sample_spec_as_string(ss); trace_info_z("Z %s c=%p, ss=%s\n", __func__, c, s_ss); @@ -1325,7 +1325,7 @@ pa_context_set_event_callback(pa_context APULSE_EXPORT int -pa_context_is_pending(pa_context *c) +pa_context_is_pending(const pa_context *c) { trace_info_z("Z %s\n", __func__); return 0; @@ -1345,7 +1345,7 @@ APULSE_EXPORT pa_operation * pa_context_play_sample_with_proplist(pa_context *c, const char *name, const char *dev, pa_volume_t volume, - pa_proplist *proplist, + const pa_proplist *proplist, pa_context_play_sample_cb_t cb, void *userdata) { Index: b/src/apulse-mainloop.c =================================================================== --- a/src/apulse-mainloop.c +++ b/src/apulse-mainloop.c @@ -386,7 +386,7 @@ pa_mainloop_get_api(pa_mainloop *m) APULSE_EXPORT int -pa_mainloop_get_retval(pa_mainloop *m) +pa_mainloop_get_retval(const pa_mainloop *m) { trace_info_f("F %s m=%p\n", __func__, m); Index: b/src/apulse-operation.c =================================================================== --- a/src/apulse-operation.c +++ b/src/apulse-operation.c @@ -67,7 +67,7 @@ pa_operation_cancel(pa_operation *o) APULSE_EXPORT pa_operation_state_t -pa_operation_get_state(pa_operation *o) +pa_operation_get_state(const pa_operation *o) { trace_info_f("F %s o=%p\n", __func__, o); if (!o) { Index: b/src/apulse-proplist.c =================================================================== --- a/src/apulse-proplist.c +++ b/src/apulse-proplist.c @@ -119,7 +119,7 @@ pa_proplist_update(pa_proplist *p, pa_up APULSE_EXPORT int -pa_proplist_contains(pa_proplist *p, const char *key) +pa_proplist_contains(const pa_proplist *p, const char *key) { trace_info_f("F %s p=%p, key=%s\n", __func__, p, key); @@ -128,7 +128,7 @@ pa_proplist_contains(pa_proplist *p, con APULSE_EXPORT const char * -pa_proplist_gets(pa_proplist *p, const char *key) +pa_proplist_gets(const pa_proplist *p, const char *key) { trace_info_f("F %s p=%p, key=%s\n", __func__, p, key); @@ -156,7 +156,7 @@ pa_proplist_copy(const pa_proplist *p) APULSE_EXPORT unsigned -pa_proplist_size(pa_proplist *p) +pa_proplist_size(const pa_proplist *p) { trace_info_z("Z %s\n", __func__); return 0; @@ -164,7 +164,7 @@ pa_proplist_size(pa_proplist *p) APULSE_EXPORT int -pa_proplist_isempty(pa_proplist *p) +pa_proplist_isempty(const pa_proplist *p) { trace_info_z("Z %s\n", __func__); return 0; @@ -172,7 +172,7 @@ pa_proplist_isempty(pa_proplist *p) APULSE_EXPORT int -pa_proplist_equal(pa_proplist *a, pa_proplist *b) +pa_proplist_equal(const pa_proplist *a, const pa_proplist *b) { trace_info_z("Z %s\n", __func__); return 0; @@ -204,7 +204,7 @@ pa_proplist_setf(pa_proplist *p, const c APULSE_EXPORT int -pa_proplist_get(pa_proplist *p, const char *key, const void **data, +pa_proplist_get(const pa_proplist *p, const char *key, const void **data, size_t *nbytes) { trace_info_z("Z %s\n", __func__); @@ -229,7 +229,7 @@ pa_proplist_unset_many(pa_proplist *p, c APULSE_EXPORT const char * -pa_proplist_iterate(pa_proplist *p, void **state) +pa_proplist_iterate(const pa_proplist *p, void **state) { trace_info_z("Z %s\n", __func__); return NULL; @@ -237,7 +237,7 @@ pa_proplist_iterate(pa_proplist *p, void APULSE_EXPORT char * -pa_proplist_to_string(pa_proplist *p) +pa_proplist_to_string(const pa_proplist *p) { trace_info_z("Z %s\n", __func__); return NULL; @@ -245,7 +245,7 @@ pa_proplist_to_string(pa_proplist *p) APULSE_EXPORT char * -pa_proplist_to_string_sep(pa_proplist *p, const char *sep) +pa_proplist_to_string_sep(const pa_proplist *p, const char *sep) { trace_info_z("Z %s\n", __func__); return NULL; Index: b/src/apulse-stream.c =================================================================== --- a/src/apulse-stream.c +++ b/src/apulse-stream.c @@ -714,7 +714,7 @@ pa_stream_flush(pa_stream *s, pa_stream_ APULSE_EXPORT uint32_t -pa_stream_get_index(pa_stream *s) +pa_stream_get_index(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); @@ -750,7 +750,7 @@ pa_stream_get_sample_spec(pa_stream *s) APULSE_EXPORT pa_stream_state_t -pa_stream_get_state(pa_stream *s) +pa_stream_get_state(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); @@ -790,7 +790,7 @@ pa_stream_get_timing_info(pa_stream *s) APULSE_EXPORT int -pa_stream_is_corked(pa_stream *s) +pa_stream_is_corked(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); return g_atomic_int_get(&s->paused); @@ -798,7 +798,7 @@ pa_stream_is_corked(pa_stream *s) APULSE_EXPORT int -pa_stream_is_suspended(pa_stream *s) +pa_stream_is_suspended(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); // ALSA sink is never suspended @@ -1058,7 +1058,7 @@ pa_stream_update_timing_info(pa_stream * APULSE_EXPORT size_t -pa_stream_writable_size(pa_stream *s) +pa_stream_writable_size(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); @@ -1081,7 +1081,7 @@ pa_stream_writable_size(pa_stream *s) APULSE_EXPORT size_t -pa_stream_readable_size(pa_stream *s) +pa_stream_readable_size(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); @@ -1162,7 +1162,7 @@ pa_stream_get_buffer_attr(pa_stream *s) APULSE_EXPORT uint32_t -pa_stream_get_device_index(pa_stream *s) +pa_stream_get_device_index(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); @@ -1172,7 +1172,7 @@ pa_stream_get_device_index(pa_stream *s) APULSE_EXPORT const char * -pa_stream_get_device_name(pa_stream *s) +pa_stream_get_device_name(const pa_stream *s) { trace_info_f("F %s s=%p\n", __func__, s); return "apulse"; @@ -1220,7 +1220,7 @@ pa_stream_set_underflow_callback(pa_stre APULSE_EXPORT pa_context * -pa_stream_get_context(pa_stream *p) +pa_stream_get_context(const pa_stream *p) { trace_info_z("Z %s\n", __func__); return NULL; @@ -1236,7 +1236,7 @@ pa_stream_set_overflow_callback(pa_strea APULSE_EXPORT int64_t -pa_stream_get_underflow_index(pa_stream *p) +pa_stream_get_underflow_index(const pa_stream *p) { trace_info_z("Z %s\n", __func__); return 0; @@ -1300,7 +1300,7 @@ pa_stream_get_channel_map(pa_stream *s) APULSE_EXPORT const pa_format_info * -pa_stream_get_format_info(pa_stream *s) +pa_stream_get_format_info(const pa_stream *s) { trace_info_z("Z %s\n", __func__); return NULL; @@ -1352,7 +1352,7 @@ pa_stream_set_monitor_stream(pa_stream * APULSE_EXPORT uint32_t -pa_stream_get_monitor_stream(pa_stream *s) +pa_stream_get_monitor_stream(const pa_stream *s) { trace_info_z("Z %s\n", __func__); return 0; Index: b/src/apulse-threaded-mainloop.c =================================================================== --- a/src/apulse-threaded-mainloop.c +++ b/src/apulse-threaded-mainloop.c @@ -179,7 +179,7 @@ pa_threaded_mainloop_accept(pa_threaded_ APULSE_EXPORT int -pa_threaded_mainloop_get_retval(pa_threaded_mainloop *m) +pa_threaded_mainloop_get_retval(const pa_threaded_mainloop *m) { trace_info_z("Z %s\n", __func__); return 0; Index: b/src/apulse-volume.c =================================================================== --- a/src/apulse-volume.c +++ b/src/apulse-volume.c @@ -311,7 +311,7 @@ pa_cvolume_set_position(pa_cvolume *cv, APULSE_EXPORT pa_volume_t -pa_cvolume_get_position(pa_cvolume *cv, const pa_channel_map *map, +pa_cvolume_get_position(const pa_cvolume *cv, const pa_channel_map *map, pa_channel_position_t t) { gchar *s_map = trace_pa_channel_map_as_string(map); ++++++ apulse.conf ++++++ --- /var/tmp/diff_new_pack.zuvGbw/_old 2020-02-21 10:53:09.207393899 +0100 +++ /var/tmp/diff_new_pack.zuvGbw/_new 2020-02-21 10:53:09.207393899 +0100 @@ -1,2 +1,6 @@ -APULSE_CAPTURE_DEVICE=${APULSE_CAPTURE_DEVICE:='plughw:0,0'}; -APULSE_PLAYBACK_DEVICE=${APULSE_PLAYBACK_DEVICE:='default'}; +# This file is part of the apulse package. +# +# User-specific configuration can go to ~/.config/apulse.conf + +; playback-device = default +capture-device = plughw:0,0 ++++++ apulse.py ++++++ #!/usr/bin/python3 import configparser import itertools import os import sys xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config")) proc_env = os.environ conf_parser = configparser.SafeConfigParser() for conf_file in ("/etc/apulse.conf", os.path.join(xdg_config_home, "apulse.conf")): if os.access(conf_file, os.R_OK): with open(conf_file, "r") as conf: conf = itertools.chain(("[0]",), conf) conf_parser.read_file(conf) playback_device = conf_parser.get("0", "playback-device", fallback="default") capture_device = conf_parser.get("0", "capture-device", fallback="default") if "APULSE_PLAYBACK_DEVICE" not in proc_env: proc_env["APULSE_PLAYBACK_DEVICE"] = playback_device if "APULSE_CAPTURE_DEVICE" not in proc_env: proc_env["APULSE_CAPTURE_DEVICE"] = capture_device ld_libpath = os.environ.get("LD_LIBRARY_PATH", "") proc_env["LD_LIBRARY_PATH"] = "/usr/$LIB/apulse" + \ (":" if ld_libpath else "") + ld_libpath os.execvpe(sys.argv[1], sys.argv[1:], proc_env)
