From a30372b280acf14f2c9621e77c754b125af30994 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 29 Oct 2004 18:20:29 +0000 Subject: [PATCH] Handle ldconfig more cleanly, per Joe Orton. --- mysql.spec | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/mysql.spec b/mysql.spec index 2c82c46..cd371bc 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 4.1.7 -Release: 2 +Release: 3 Source0: http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-%{version}.tar.gz Source1: mysql.init Source2: mysql.logrotate @@ -176,6 +176,9 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/mysql/postinstall # compress manual bzip2 Docs/manual.txt +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %clean rm -rf $RPM_BUILD_ROOT @@ -185,11 +188,7 @@ rm -rf $RPM_BUILD_ROOT %post /sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir -if ! grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1 -then - echo "%{_libdir}/mysql" >> /etc/ld.so.conf -fi -/sbin/ldconfig %{_libdir}/mysql +/sbin/ldconfig %post server if [ $1 = 1 ]; then @@ -210,13 +209,7 @@ fi %postun if [ $1 = 0 ] ; then - if grep '^%{_libdir}/mysql$' /etc/ld.so.conf > /dev/null 2>&1 - then - grep -v '^%{_libdir}/mysql$' /etc/ld.so.conf \ - > /etc/ld.so.conf.$$ 2> /dev/null - mv /etc/ld.so.conf.$$ /etc/ld.so.conf - fi - /sbin/ldconfig %{_libdir}/mysql + /sbin/ldconfig fi @@ -261,6 +254,7 @@ fi %{_libdir}/mysql/libmysqlclient*.so.* %{_libdir}/mysql/mysqlbug %{_libdir}/mysql/mysql_config +/etc/ld.so.conf.d/* %dir %{_datadir}/mysql %{_datadir}/mysql/english @@ -357,6 +351,9 @@ fi %{_datadir}/sql-bench %changelog +* Fri Oct 29 2004 Tom Lane 4.1.7-3 +- Handle ldconfig more cleanly (put a file in /etc/ld.so.conf.d/). + * Thu Oct 28 2004 Tom Lane 4.1.7-2 - rebuild in devel branch