From 337360b9c2972e59a5e46242b04a7ab8909d5509 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 5 Jun 2012 01:20:11 +0200 Subject: [PATCH] rebuild for libudev1 --- pulseaudio-new-udev.patch | 75 +++++++++++++++++++++++++++++++++++++++ pulseaudio.spec | 31 ++++++++++------ 2 files changed, 95 insertions(+), 11 deletions(-) create mode 100644 pulseaudio-new-udev.patch diff --git a/pulseaudio-new-udev.patch b/pulseaudio-new-udev.patch new file mode 100644 index 0000000..f263fa8 --- /dev/null +++ b/pulseaudio-new-udev.patch @@ -0,0 +1,75 @@ +From 54718450dfd1e7fc9b5946f62765f7451a854385 Mon Sep 17 00:00:00 2001 +From: Marc-Antoine Perennou +Date: Thu, 17 May 2012 20:50:22 +0000 +Subject: udev: Don't use deprecated udev_get_*_path() functions + +[These symbols were removed in libudev.so.1.0.0. Replace them with +hardcoded strings. -- heftig] + +Signed-off-by: Marc-Antoine Perennou +--- +diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c +index 1192194..31416bd 100644 +--- a/src/modules/module-udev-detect.c ++++ b/src/modules/module-udev-detect.c +@@ -123,7 +123,7 @@ static char *card_get_sysattr(const char *card_idx, const char *name) { + goto finish; + } + +- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); ++ t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx); + card = udev_device_new_from_syspath(udev, t); + pa_xfree(t); + +@@ -282,7 +282,7 @@ static void verify_access(struct userdata *u, struct device *d) { + pa_assert(u); + pa_assert(d); + +- cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u->udev), path_get_card_id(d->path)); ++ cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d->path)); + accessible = access(cd, R_OK|W_OK) >= 0; + pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible)); + +@@ -621,7 +621,6 @@ fail: + } + + static int setup_inotify(struct userdata *u) { +- char *dev_snd; + int r; + + if (u->inotify_fd >= 0) +@@ -632,9 +631,7 @@ static int setup_inotify(struct userdata *u) { + return -1; + } + +- dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u->udev)); +- r = inotify_add_watch(u->inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); +- pa_xfree(dev_snd); ++ r = inotify_add_watch(u->inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF); + + if (r < 0) { + int saved_errno = errno; +diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c +index 2f18bc4..b0bb17d 100644 +--- a/src/modules/udev-util.c ++++ b/src/modules/udev-util.c +@@ -180,7 +180,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) { + goto finish; + } + +- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); ++ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); + card = udev_device_new_from_syspath(udev, t); + pa_xfree(t); + +@@ -277,7 +277,7 @@ char* pa_udev_get_property(int card_idx, const char *name) { + goto finish; + } + +- t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx); ++ t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx); + card = udev_device_new_from_syspath(udev, t); + pa_xfree(t); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/pulseaudio.spec b/pulseaudio.spec index e96c770..31788fc 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -1,7 +1,7 @@ Name: pulseaudio Summary: Improved Linux Sound Server Version: 2.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Daemons URL: http://www.freedesktop.org/wiki/Software/PulseAudio @@ -10,6 +10,7 @@ Source1: default.pa-for-gdm # activate pulseaudio early at login Patch0: pulseaudio-activation.patch +Patch1: pulseaudio-new-udev.patch BuildRequires: m4 BuildRequires: libtool-ltdl-devel @@ -47,15 +48,15 @@ BuildRequires: libtdb-devel BuildRequires: speex-devel >= 1.2 BuildRequires: systemd-devel BuildRequires: libasyncns-devel -BuildRequires: libudev-devel >= 143 +BuildRequires: systemd-devel >= 184 BuildRequires: json-c-devel BuildRequires: dbus-devel # retired along with -libs-zeroconf, add Obsoletes here for lack of anything better Obsoletes: padevchooser < 1.0 Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: udev >= 145-3 +Requires: systemd >= 184 Requires: rtkit -Requires: kernel >= 2.6.30 +Requires: kernel >= 2.6.30 %description PulseAudio is a sound server for Linux and other Unix like operating @@ -157,10 +158,10 @@ License: LGPLv2+ Group: Development/Libraries Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs-glib2%{?_isa} = %{version}-%{release} -Requires: pkgconfig -Requires: glib2-devel +Requires: pkgconfig +Requires: glib2-devel %if 0%{?rhel} == 0 -Requires: vala +Requires: vala %endif %description libs-devel @@ -177,10 +178,10 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} This package contains command line utilities for the PulseAudio sound server. %package gdm-hooks -Summary: PulseAudio GDM integration -License: LGPLv2+ +Summary: PulseAudio GDM integration +License: LGPLv2+ Group: Applications/Multimedia -Requires: gdm >= 1:2.22.0 +Requires: gdm >= 1:2.22.0 # for the gdm user Requires(pre): gdm @@ -190,6 +191,7 @@ This package contains GDM integration hooks for the PulseAudio sound server. %prep %setup -q -T -b0 %patch0 -p1 -b .activation +%patch1 -p1 -b .udev ## kill rpaths %if "%{_libdir}" != "/usr/lib" @@ -216,6 +218,10 @@ make doxygen %install make install DESTDIR=$RPM_BUILD_ROOT +# upstream should use udev.pc +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d +mv -f $RPM_BUILD_ROOT/lib/udev/rules.d/90-pulseaudio.rules $RPM_BUILD_ROOT%{_prefix}/lib/udev/rules.d + rm -fv $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/pulse-%{version}/modules/*.la rm -fv $RPM_BUILD_ROOT%{_libdir}/pulse-%{version}/modules/liboss-util.so rm -fv $RPM_BUILD_ROOT%{_libdir}/pulse-%{version}/modules/module-oss.so @@ -344,7 +350,7 @@ exit 0 %{_mandir}/man5/pulse-cli-syntax.5* %{_mandir}/man5/pulse-client.conf.5* %{_mandir}/man5/pulse-daemon.conf.5* -/lib/udev/rules.d/90-pulseaudio.rules +%{_prefix}/lib/udev/rules.d/90-pulseaudio.rules %dir %{_libexecdir}/pulse %attr(0700, pulse, pulse) %dir %{_localstatedir}/lib/pulse @@ -460,6 +466,9 @@ exit 0 %attr(0600, gdm, gdm) %{_localstatedir}/lib/gdm/.pulse/default.pa %changelog +* Mon Jun 04 2012 Kay Sievers - 2.0-2 +- rebuild for libudev1 + * Sat May 12 2012 Rex Dieter 2.0-1 - pulseaudio-2.0