diff --git a/mariadb.changes b/mariadb.changes index a3b666f..cdcca8c 100644 --- a/mariadb.changes +++ b/mariadb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 3 07:49:32 UTC 2020 - Dominique Leuenberger + +- Fix installed .service files to follow the /usr/lib -> + /usr/libexec move (boo#1174811). + ------------------------------------------------------------------- Tue Jun 9 14:38:20 UTC 2020 - Guillaume GARDET diff --git a/mariadb.service b/mariadb.service.in similarity index 91% rename from mariadb.service rename to mariadb.service.in index 6bd64d6..afa44bc 100644 --- a/mariadb.service +++ b/mariadb.service.in @@ -32,9 +32,9 @@ WantedBy=multi-user.target Alias=mysql.service [Service] -ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install -ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade -ExecStart=/usr/lib/mysql/mysql-systemd-helper start +ExecStartPre=@LIBEXECDIR@/mysql/mysql-systemd-helper install +ExecStartPre=@LIBEXECDIR@/mysql/mysql-systemd-helper upgrade +ExecStart=@LIBEXECDIR@/mysql/mysql-systemd-helper start Type=notify User=mysql diff --git a/mariadb.spec b/mariadb.spec index 1158050..d3b0006 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -65,10 +65,10 @@ Source5: suse-test-run Source7: README.install Source12: mysql-user.conf Source14: my.ini -Source15: mariadb.service +Source15: mariadb.service.in Source16: mariadb.target Source17: mysql-systemd-helper -Source18: mariadb@.service +Source18: mariadb@.service.in Source19: macros.mariadb-test Source50: suse_skipped_tests.list Source51: mariadb-rpmlintrc @@ -627,8 +627,8 @@ sed -i 's|@MYSQLVER@|%{version}|' '%{buildroot}'%{_libexecdir}/mysql/mysql-syste ln -sf service '%{buildroot}'%{_sbindir}/rcmysql ln -sf service '%{buildroot}'%{_sbindir}/rcmariadb rm -rf '%{buildroot}'%{_sysconfdir}/init.d -install -D -m 644 %{_sourcedir}/mariadb.service '%{buildroot}'%{_unitdir}/mariadb.service -install -D -m 644 %{_sourcedir}/mariadb@.service '%{buildroot}'%{_unitdir}/mariadb@.service +sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{_sourcedir}/mariadb.service.in > '%{buildroot}'%{_unitdir}/mariadb.service +sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{_sourcedir}/mariadb@.service.in > '%{buildroot}'%{_unitdir}/mariadb@.service install -D -m 644 %{_sourcedir}/mariadb.target '%{buildroot}'%{_unitdir}/mariadb.target # Aliases for the backward compatibility. Create symlinks from the alias to the existing one # We can't use 'Alias=' option only because it's effective only when the unit is enabled diff --git a/mariadb@.service b/mariadb@.service.in similarity index 90% rename from mariadb@.service rename to mariadb@.service.in index 0a94129..1210a99 100644 --- a/mariadb@.service +++ b/mariadb@.service.in @@ -32,9 +32,9 @@ WantedBy=multi-user.target Alias=mysql.service [Service] -ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install %i -ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade %i -ExecStart=/usr/lib/mysql/mysql-systemd-helper start %i +ExecStartPre=@LIBEXECDIR@/mysql/mysql-systemd-helper install %i +ExecStartPre=@LIBEXECDIR@/mysql/mysql-systemd-helper upgrade %i +ExecStart=@LIBEXECDIR@/mysql/mysql-systemd-helper start %i Type=notify User=mysql