Further fix of ldconfig scriptlets for F27

Fix hardcoded paths, move unversioned libraries and symlinks to the devel subpackage
This commit is contained in:
Michal Schorm 2018-03-06 16:11:37 +01:00
parent baf63a182e
commit 259d0513b2

View File

@ -122,7 +122,7 @@
Name: mariadb Name: mariadb
Version: %{compatver}.%{bugfixver} Version: %{compatver}.%{bugfixver}
Release: 1%{?with_debug:.debug}%{?dist} Release: 2%{?with_debug:.debug}%{?dist}
Epoch: 3 Epoch: 3
Summary: A community developed branch of MySQL Summary: A community developed branch of MySQL
@ -883,7 +883,7 @@ rm scripts/my.cnf
mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf
# Rename sysusers and tmpfiles config files, they should be named after the software they belong to # Rename sysusers and tmpfiles config files, they should be named after the software they belong to
mv %{buildroot}/usr/lib/sysusers.d/sysusers.conf %{buildroot}/usr/lib/sysusers.d/mariadb.conf mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf
# remove SysV init script and a symlink to that, we pack our very own # remove SysV init script and a symlink to that, we pack our very own
rm %{buildroot}%{_sysconfdir}/init.d/mysql rm %{buildroot}%{_sysconfdir}/init.d/mysql
@ -892,7 +892,7 @@ rm %{buildroot}%{_libexecdir}/rcmysql
install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service
install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service
# Remove the upstream version # Remove the upstream version
rm %{buildroot}/usr/lib/tmpfiles.d/tmpfiles.conf rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf
# Install downstream version # Install downstream version
install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
%if 0%{?mysqld_pid_dir:1} %if 0%{?mysqld_pid_dir:1}
@ -1130,12 +1130,12 @@ export MTR_BUILD_THREAD=%{__isa_bits}
%if %{with clibrary} %if %{with clibrary}
# Can be dropped on F27 EOL # Can be dropped on F27 EOL
%ldconfig_post libs %ldconfig_scriptlets libs
%endif %endif
%if %{with embedded} %if %{with embedded}
# Can be dropped on F27 EOL # Can be dropped on F27 EOL
%ldconfig_post embedded %ldconfig_scriptlets embedded
%endif %endif
%if %{with galera} %if %{with galera}
@ -1154,16 +1154,6 @@ semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp >/dev/
%preun server %preun server
%systemd_preun %{daemon_name}.service %systemd_preun %{daemon_name}.service
%if %{with clibrary}
# Can be dropped on F27 EOL
%ldconfig_postun libs
%endif
%if %{with embedded}
# Can be dropped on F27 EOL
%ldconfig_postun embedded
%endif
%if %{with galera} %if %{with galera}
%postun server-galera %postun server-galera
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
@ -1210,7 +1200,6 @@ fi
%if %{with clibrary} %if %{with clibrary}
%files libs %files libs
%{_libdir}/libmariadb.so.* %{_libdir}/libmariadb.so.*
%{?with_devel:%{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so}}
%config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
%endif %endif
@ -1401,19 +1390,16 @@ fi
%{_libexecdir}/mysql-check-upgrade %{_libexecdir}/mysql-check-upgrade
%{_libexecdir}/mysql-scripts-common %{_libexecdir}/mysql-scripts-common
%{_tmpfilesdir}/%{name}.conf
%attr(0755,mysql,mysql) %dir %{pidfiledir} %attr(0755,mysql,mysql) %dir %{pidfiledir}
%attr(0755,mysql,mysql) %dir %{dbdatadir} %attr(0755,mysql,mysql) %dir %{dbdatadir}
%attr(0750,mysql,mysql) %dir %{logfiledir} %attr(0750,mysql,mysql) %dir %{logfiledir}
# This does what it should.
# RPMLint error "conffile-without-noreplace-flag /var/log/mariadb/mariadb.log" is false positive.
%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} %attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile}
%config(noreplace) %{logrotateddir}/%{daemon_name} %config(noreplace) %{logrotateddir}/%{daemon_name}
# New systemd feature - used to reconstruct damaged /etc %{_tmpfilesdir}/%{name}.conf
# https://github.com/MariaDB/server/commit/7bbc6c14d1 %{_sysusersdir}/%{name}.conf
%dir /usr/lib/sysusers.d
/usr/lib/sysusers.d/mariadb.conf
%dir /usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d/mariadb.conf
%if %{with cracklib} %if %{with cracklib}
%files cracklib-password-check %files cracklib-password-check
@ -1497,6 +1483,7 @@ fi
%{_datadir}/aclocal/mysql.m4 %{_datadir}/aclocal/mysql.m4
%{_libdir}/pkgconfig/mariadb.pc %{_libdir}/pkgconfig/mariadb.pc
%if %{with clibrary} %if %{with clibrary}
%{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so}
%{_bindir}/mysql_config* %{_bindir}/mysql_config*
%{_bindir}/mariadb_config* %{_bindir}/mariadb_config*
%{_libdir}/libmariadb.so %{_libdir}/libmariadb.so
@ -1539,6 +1526,10 @@ fi
%endif %endif
%changelog %changelog
* Tue Mar 6 2018 Michal Schorm <mschorm@redhat.com> - 3:10.2.13-2
- Further fix of ldconfig scriptlets for F27
- Fix hardcoded paths, move unversioned libraries and symlinks to the devel subpackage
* Thu Mar 1 2018 Michal Schorm <mschorm@redhat.com> - 3:10.2.13-1 * Thu Mar 1 2018 Michal Schorm <mschorm@redhat.com> - 3:10.2.13-1
- Rebase to 10.2.13 - Rebase to 10.2.13