Use systemd presets to enable user units
conditionals: simplify and support rhel8
This commit is contained in:
parent
d762a551e1
commit
8b44e5ca0a
130
0287-alsa-Use-correct-header-path.patch
Normal file
130
0287-alsa-Use-correct-header-path.patch
Normal file
@ -0,0 +1,130 @@
|
||||
From 993d3fd89e5611997f1e165bf03edefb0204b0a4 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Hering <olaf@aepfle.de>
|
||||
Date: Wed, 27 Mar 2019 09:35:05 +0100
|
||||
Subject: [PATCH 287/375] alsa: Use correct header path
|
||||
|
||||
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.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
---
|
||||
src/modules/alsa/alsa-mixer.c | 2 +-
|
||||
src/modules/alsa/alsa-mixer.h | 2 +-
|
||||
src/modules/alsa/alsa-sink.c | 2 +-
|
||||
src/modules/alsa/alsa-source.c | 2 +-
|
||||
src/modules/alsa/alsa-ucm.c | 2 +-
|
||||
src/modules/alsa/alsa-util.c | 2 +-
|
||||
src/modules/alsa/alsa-util.h | 2 +-
|
||||
src/modules/alsa/module-alsa-source.c | 2 +-
|
||||
8 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
|
||||
index 5cb99c8fd..cd99a75f8 100644
|
||||
--- a/src/modules/alsa/alsa-mixer.c
|
||||
+++ b/src/modules/alsa/alsa-mixer.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
|
||||
index 3ea4d7329..65b071165 100644
|
||||
--- a/src/modules/alsa/alsa-mixer.h
|
||||
+++ b/src/modules/alsa/alsa-mixer.h
|
||||
@@ -21,7 +21,7 @@
|
||||
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#include <pulse/sample.h>
|
||||
#include <pulse/mainloop-api.h>
|
||||
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
|
||||
index 28143402a..4b46708ce 100644
|
||||
--- a/src/modules/alsa/alsa-sink.c
|
||||
+++ b/src/modules/alsa/alsa-sink.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
|
||||
index 8129220b0..c8bf649e1 100644
|
||||
--- a/src/modules/alsa/alsa-source.c
|
||||
+++ b/src/modules/alsa/alsa-source.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#include <pulse/rtclock.h>
|
||||
#include <pulse/timeval.h>
|
||||
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
|
||||
index 341c8012e..0a40ca8fe 100644
|
||||
--- a/src/modules/alsa/alsa-ucm.c
|
||||
+++ b/src/modules/alsa/alsa-ucm.c
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <limits.h>
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
|
||||
index e8d712e72..bd0a47e50 100644
|
||||
--- a/src/modules/alsa/alsa-util.c
|
||||
+++ b/src/modules/alsa/alsa-util.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#include <pulse/sample.h>
|
||||
#include <pulse/xmalloc.h>
|
||||
diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
|
||||
index 6b27339ec..4ceaa06ee 100644
|
||||
--- a/src/modules/alsa/alsa-util.h
|
||||
+++ b/src/modules/alsa/alsa-util.h
|
||||
@@ -21,7 +21,7 @@
|
||||
along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#include <pulse/sample.h>
|
||||
#include <pulse/channelmap.h>
|
||||
diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
|
||||
index af6800dd2..747ba9342 100644
|
||||
--- a/src/modules/alsa/module-alsa-source.c
|
||||
+++ b/src/modules/alsa/module-alsa-source.c
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
-#include <asoundlib.h>
|
||||
+#include <alsa/asoundlib.h>
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@ -16,18 +16,10 @@
|
||||
|
||||
## support systemd activation
|
||||
%global systemd 1
|
||||
## enable systemd activation by default (instead of autospawn)
|
||||
%if 0%{?fedora} > 27
|
||||
%global systemd_activation 1
|
||||
## TODO: ship preset to explicitly disable .service, enable .socket
|
||||
%else
|
||||
# gdm-hooks moved to gdm packaging f28+
|
||||
%global gdm_hooks 1
|
||||
%endif
|
||||
|
||||
## tcp_wrapper support
|
||||
%if 0%{?fedora} < 28
|
||||
%global tcpwrap 1
|
||||
# gdm-hooks moved to gdm packaging f28+
|
||||
%if 0%{?fedora} < 28 && 0%{?rhel} < 8
|
||||
%global gdm_hooks 1
|
||||
%endif
|
||||
|
||||
## comment to disable tests
|
||||
@ -39,7 +31,7 @@
|
||||
Name: pulseaudio
|
||||
Summary: Improved Linux Sound Server
|
||||
Version: %{pa_major}%{?pa_minor:.%{pa_minor}}
|
||||
Release: 4%{?snap:.%{snap}git%{shortcommit}}%{?dist}
|
||||
Release: 5%{?snap:.%{snap}git%{shortcommit}}%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://www.freedesktop.org/wiki/Software/PulseAudio
|
||||
%if 0%{?gitrel}
|
||||
@ -84,10 +76,6 @@ BuildRequires: intltool
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: xmltoman
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1518777
|
||||
%if 0%{?tcpwrap}
|
||||
BuildRequires: tcp_wrappers-devel
|
||||
%endif
|
||||
BuildRequires: libsndfile-devel
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: glib2-devel
|
||||
@ -120,8 +108,6 @@ BuildRequires: libasyncns-devel
|
||||
%if 0%{?systemd}
|
||||
BuildRequires: systemd-devel >= 184
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
%if 0%{?systemd_activation}
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
BuildRequires: dbus-devel
|
||||
@ -149,10 +135,10 @@ Enlightened Sound Daemon (ESOUND).
|
||||
Summary: Pulseaudio equalizer interface
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python2-qt5
|
||||
%if 0%{?fedora} > 27
|
||||
Requires: python2-dbus
|
||||
%else
|
||||
%if 0%{?fedora} < 28 && 0%{?rhel} < 8
|
||||
Requires: dbus-python
|
||||
%else
|
||||
Requires: python2-dbus
|
||||
%endif
|
||||
%description qpaeq
|
||||
qpaeq is a equalizer interface for pulseaudio's equalizer sinks.
|
||||
@ -279,7 +265,7 @@ This package contains GDM integration hooks for the PulseAudio sound server.
|
||||
%patch201 -p1 -b .autostart
|
||||
%patch202 -p1 -b .disable_flat_volumes
|
||||
%patch203 -p1 -b .qpaeq_python2
|
||||
%if 0%{?systemd_activation}
|
||||
%if 0%{?systemd}
|
||||
%patch206 -p1 -b .autospawn_disable
|
||||
%endif
|
||||
|
||||
@ -312,7 +298,7 @@ NOCONFIGURE=1 ./bootstrap.sh
|
||||
--disable-oss-output \
|
||||
%{?enable_jack:--enable-jack}%{!?enable_jack:--disable-jack} \
|
||||
%{?enable_lirc:--enable-lirc}%{!?enable_lirc:--disable-lirc} \
|
||||
%{?tcpwrap:--enable-tcpwrap}%{!?tcpwrap:--disable-tcpwrap} \
|
||||
--disable-tcpwrap \
|
||||
--disable-bluez4 \
|
||||
--enable-bluez5 \
|
||||
--enable-gconf \
|
||||
@ -358,14 +344,6 @@ mv -fv $RPM_BUILD_ROOT/lib/udev/rules.d/90-pulseaudio.rules $RPM_BUILD_ROOT%{_pr
|
||||
install -p -m644 -D %{SOURCE5} $RPM_BUILD_ROOT%{_localstatedir}/lib/gdm/.pulse/default.pa
|
||||
%endif
|
||||
|
||||
# take cue from dbus and manually place wants symlink instead of
|
||||
# relying on scriptlets exclusively. Helps handle upgrade cases
|
||||
# that standard scriptlets miss.
|
||||
%if 0%{?systemd_activation}
|
||||
mkdir %{buildroot}%{_userunitdir}/sockets.target.wants
|
||||
ln -s ../pulseaudio.socket %{buildroot}%{_userunitdir}/sockets.target.wants/pulseaudio.socket
|
||||
%endif
|
||||
|
||||
## unpackaged files
|
||||
# extraneous libtool crud
|
||||
rm -fv $RPM_BUILD_ROOT%{_libdir}/lib*.la
|
||||
@ -418,7 +396,7 @@ exit 0
|
||||
|
||||
%post
|
||||
%{?ldconfig}
|
||||
%if 0%{?systemd_activation}
|
||||
%if 0%{?systemd}
|
||||
# unsure if we want both .socket and .service here (or only socket)
|
||||
# test socket-only on f31+ -- rex
|
||||
%if 0%{?fedora} < 31
|
||||
@ -427,7 +405,7 @@ exit 0
|
||||
%systemd_user_post pulseaudio.socket
|
||||
%endif
|
||||
|
||||
%if 0%{?systemd_activation}
|
||||
%if 0%{?systemd}
|
||||
%preun
|
||||
%if 0%{?fedora} < 31
|
||||
%systemd_user_preun pulseaudio.service
|
||||
@ -437,6 +415,14 @@ exit 0
|
||||
|
||||
%ldconfig_postun
|
||||
|
||||
%if 0%{?systemd}
|
||||
%triggerun -- pulseaudio < 12.2-4
|
||||
# This is for upgrades from previous versions which had a static symlink.
|
||||
# The %%post scriptlet above only does anything on initial package installation.
|
||||
# Remove before F33.
|
||||
systemctl --no-reload preset --global pulseaudio.socket >/dev/null 2>&1 || :
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license LICENSE GPL LGPL
|
||||
@ -448,9 +434,6 @@ exit 0
|
||||
%if 0%{?systemd}
|
||||
%{_userunitdir}/pulseaudio.service
|
||||
%{_userunitdir}/pulseaudio.socket
|
||||
%if 0%{?systemd_activation}
|
||||
%{_userunitdir}/sockets.target.wants/pulseaudio.socket
|
||||
%endif
|
||||
%endif
|
||||
%{_bindir}/pulseaudio
|
||||
%{_libdir}/pulseaudio/libpulsecore-%{pa_major}.so
|
||||
@ -675,6 +658,10 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 09 2019 Rex Dieter <rdieter@fedoraproject.org> - 12.2-5
|
||||
- Use systemd presets to enable user units
|
||||
- conditionals: simplify and support rhel8
|
||||
|
||||
* Wed Apr 10 2019 Rex Dieter <rdieter@fedoraproject.org> - 12.2-4
|
||||
- test using only socket activation (f31+ only for now)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user