Skip to content

Commit f8cdcb8

Browse files
Put fluidsynth.lock in its own directory (#1528)
In some distributions (e.g. Fedora), /run/lock is only writable by root. Create /run/lock/fluidsynth with appropriate permissions. Fixes #1527.
1 parent dc939b8 commit f8cdcb8

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,9 @@ if ( UNIX )
917917
configure_file ( fluidsynth.service.in
918918
${FluidSynth_BINARY_DIR}/fluidsynth.service @ONLY )
919919

920+
configure_file ( fluidsynth.tmpfiles.in
921+
${FluidSynth_BINARY_DIR}/fluidsynth.tmpfiles @ONLY )
922+
920923
configure_file ( fluidsynth.conf.in
921924
${FluidSynth_BINARY_DIR}/fluidsynth.conf @ONLY )
922925

contrib/fluidsynth.spec

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ This package contains the shared library for Fluidsynth.
9595

9696
%if 0%{?suse_version}
9797

98-
# manually install systemd service files
98+
# manually install systemd files
9999
install -Dm 644 build/fluidsynth.conf %{buildroot}%{_fillupdir}/sysconfig.%{name}
100100
install -Dm 644 build/fluidsynth.service %{buildroot}%{_unitdir}/%{name}.service
101+
install -Dm 644 build/fluidsynth.tmpfiles %{buildroot}%{_tmpfilesdir}/%{name}.conf
101102
install -d %{buildroot}%{_sbindir}
102103
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
103104

fluidsynth.service.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ After=sound.target
55
After=pipewire.service pulseaudio.service
66
Wants=pipewire.service pulseaudio.service
77
# If you need more than one instance, use `systemctl edit` to override this:
8-
ConditionPathExists=!/run/lock/fluidsynth.lock
8+
ConditionPathExists=!/run/lock/fluidsynth/fluidsynth.lock
99
ConditionUser=!@system
1010

1111
[Service]
@@ -27,8 +27,8 @@ Environment=OTHER_OPTS= SOUND_FONT=
2727
EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
2828
EnvironmentFile=-%h/.config/fluidsynth
2929
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/fluidsynth -is $OTHER_OPTS $SOUND_FONT
30-
ExecStartPre=touch /run/lock/fluidsynth.lock
31-
ExecStopPost=rm -f /run/lock/fluidsynth.lock
30+
ExecStartPre=touch /run/lock/fluidsynth/fluidsynth.lock
31+
ExecStopPost=rm -f /run/lock/fluidsynth/fluidsynth.lock
3232

3333
[Install]
3434
WantedBy=default.target

fluidsynth.tmpfiles.in

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d /run/lock/fluidsynth 0777 root root

0 commit comments

Comments
 (0)