SHA256
1
0
forked from pool/mariadb
Michal Hrusecky (old before rename to _miska_) 2013-07-30 20:06:56 +00:00 committed by Git OBS Bridge
parent 467c7e4163
commit 65a3f5a790
6 changed files with 34 additions and 24 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:03f98286d7ddf181361a0c4a2d4d8dc91a82ef76e292b72bcf2f14436344718b oid sha256:fd2bf9befa5e326fb66e33381e8fdb9b9b3e91976c6d6d15181619f50ea81867
size 309 size 310

View File

@ -100,8 +100,6 @@ for i in "${DOCS[@]}"; do
done done
install -m 755 %_sourcedir/rc.mysql-multi %buildroot/etc/init.d/mysql install -m 755 %_sourcedir/rc.mysql-multi %buildroot/etc/init.d/mysql
ln -sf ../../etc/init.d/mysql %buildroot/usr/sbin/rcmysql ln -sf ../../etc/init.d/mysql %buildroot/usr/sbin/rcmysql
# this is used by the init script
install -m 755 -d %buildroot/var/run/mysql
# SuSEfirewall service description # SuSEfirewall service description
install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \ install -D -m 644 %_sourcedir/mysql.SuSEfirewall2 \
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql %buildroot/etc/sysconfig/SuSEfirewall2.d/services/mysql
@ -131,18 +129,33 @@ cat mysql-ndb-storage.files mysql-ndb-management.files \
rm -f .$tmp rm -f .$tmp
done done
%endif %endif
pushd '%buildroot'/%_libdir
for i in *.so.*.*.*; do
if [ -L "$i" ]; then
trg="`readlink "$i"`"
rm "$i"
mv "$trg" "$i"
ln -s "$i" "$trg"
fi
done
for i in *.so.*; do
if [ -L "$i" ] && [ -L "`readlink "$i"`" ]; then
trg="`readlink "$i"`"
rm "$i"
ln -s "`readlink "$trg"`" "$i"
fi
done
popd
%if ! 0%{prefered} > 0 %if ! 0%{prefered} > 0
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
cd '%buildroot' cd '%buildroot'
rm -f ."$tmp" rm -f ."$tmp"
done done
rm -rf '%buildroot'/%_libdir/libmysqld.* rm -rf '%buildroot'/%_libdir/libmysqld.*
rm -rf '%buildroot'/%_libdir/*.la rm -rf '%buildroot'/%_libdir/{*.la,*.so,*.a}
rm -rf '%buildroot'/%_libdir/*.so
rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1* rm -rf '%buildroot'/%_datadir/man/*/mysql_config.1*
rm -rf '%buildroot'/%_includedir rm -rf '%buildroot'/%_includedir
rm -rf '%buildroot'/%_datadir/aclocal rm -rf '%buildroot'/%_datadir/aclocal
rm -rf '%buildroot'/%_libdir/*.a
%endif %endif
sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql sed -i 's|doc/packages/mysql|doc/packages/%{name}|g' '%buildroot'/etc/init.d/mysql
ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair ln -s mysqlcheck '%buildroot'%_bindir/mysqlrepair
@ -158,15 +171,11 @@ fi
mkdir -p '%buildroot'/etc/my.cnf.d mkdir -p '%buildroot'/etc/my.cnf.d
rm -rf '%buildroot'/etc/my.cnf.d/* rm -rf '%buildroot'/etc/my.cnf.d/*
bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf - bzip2 -cd '%_sourcedir'/configuration-tweaks.tar.bz2 | tar -C '%buildroot'/etc/my.cnf.d -xvf -
if [ -z "`ls '%buildroot'/usr/share/info/mysql.info*`" ]; then [ -z "`ls '%buildroot'/usr/share/info/mysql.info* 2> /dev/null`" ] || rm -f '%buildroot'/usr/share/info/mysql.info*
install -D -m 0644 Docs/mysql.info "%buildroot/usr/share/info/mysql.info"
gzip -9 "%buildroot/usr/share/info/mysql.info"
fi
if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then if [ "`ls '%buildroot'%_libdir/mysql/plugin/dialog*.so`" ]; then
echo '%%dir %%_libdir/mysql' >> mysql-client.files echo '%%dir %%_libdir/mysql' >> mysql-client.files
echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files echo '%%dir %%_libdir/mysql/plugin' >> mysql-client.files
echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files echo '%%_libdir/mysql/plugin/dialog*.so' >> mysql-client.files
fi fi
rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}* rm -rf '%buildroot'/usr/share/doc/{mysql,mariadb}*
rm -rf '%buildroot'/usr/share/mysql/solaris rm -rf '%buildroot'/usr/share/mysql/{solaris,SELinux}
rm -rf '%buildroot'/usr/share/mysql/SELinux

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 30 21:51:25 CEST 2013 - mhrusecky@suse.cz
- get rid of info which is not info (bnc#747811)
- minor polishing of spec/installation
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 26 10:07:33 CEST 2013 - mhrusecky@suse.cz Fri Jul 26 10:07:33 CEST 2013 - mhrusecky@suse.cz

View File

@ -55,10 +55,10 @@ Source14: my.ini
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} %if 0%{?suse_version}
PreReq: pwdutils PreReq: pwdutils
PreReq: %install_info_prereq %insserv_prereq
%endif %endif
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libaio-devel BuildRequires: libaio-devel
@ -68,7 +68,6 @@ BuildRequires: ncurses-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: pam-devel BuildRequires: pam-devel
BuildRequires: procps BuildRequires: procps
BuildRequires: readline-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: pwdutils BuildRequires: pwdutils
@ -383,7 +382,7 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || : /usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ /usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || : -s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
/usr/sbin/usermod -g mysql -s /bin/false mysql || : /usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
# systemd requirment # systemd requirment
%if 0%{?suse_version} >= 1210 %if 0%{?suse_version} >= 1210
%service_add_pre mysql.service %service_add_pre mysql.service
@ -393,7 +392,7 @@ rm -f mysql-test/t/file_contents.test mysql-test/r/file_contents.result
/usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || : /usr/sbin/groupadd -r mysql >/dev/null 2>/dev/null || :
/usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \ /usr/sbin/useradd -r -o -g mysql -u 60 -c "MySQL database admin" \
-s /bin/false -d /var/lib/mysql mysql 2> /dev/null || : -s /bin/false -d /var/lib/mysql mysql 2> /dev/null || :
/usr/sbin/usermod -g mysql -s /bin/false mysql || : /usr/sbin/usermod -g mysql -s /bin/false mysql 2> /dev/null || :
%post %post
# systemd requirment # systemd requirment
@ -418,8 +417,6 @@ if posix.access("/usr/sbin/rcmysql", "x") then
end end
%posttrans %posttrans
[ -z "`ls %{_infodir}/mysql.info.* 2> /dev/null`" ] || \
%install_info --info-dir=%{_infodir} %{_infodir}/mysql.info.*
if [ -d /var/lib/mysql ]; then if [ -d /var/lib/mysql ]; then
touch /var/lib/mysql/.run-mysql_upgrade touch /var/lib/mysql/.run-mysql_upgrade
chown -R mysql:mysql /var/lib/mysql chown -R mysql:mysql /var/lib/mysql
@ -459,7 +456,6 @@ fi
%postun %postun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%install_info_delete --info-dir=%{_infodir} %{_infodir}/mysql.info.*
%{insserv_cleanup} %{insserv_cleanup}
rm -f "/var/lib/systemd/migrated/mysql.service" rm -f "/var/lib/systemd/migrated/mysql.service"
if [ -x /usr/bin/systemctl ]; then if [ -x /usr/bin/systemctl ]; then
@ -478,7 +474,6 @@ fi
%config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/* %config(noreplace) %attr(0640, root, mysql) /etc/my.cnf.d/*
%config /etc/logrotate.d/mysql %config /etc/logrotate.d/mysql
%doc %{_defaultdocdir}/%{name} %doc %{_defaultdocdir}/%{name}
%doc %{_infodir}/mysql.info.*
/etc/init.d/mysql /etc/init.d/mysql
/usr/sbin/rcmysql /usr/sbin/rcmysql
%dir /usr/share/%{name} %dir /usr/share/%{name}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:48a241b4af682cfa423dc45e333ff80ffe9b6c2236c511ae54f7d3e53277e729 oid sha256:6cd896d7385a3e80c7e50c25cf1728ebd23d99235920ff273782da86aa48fbf8
size 11654 size 11665

View File

@ -331,7 +331,7 @@ else
mkdir -p "$log_dir" mkdir -p "$log_dir"
fi fi
chmod 770 "$log_dir" chmod 770 "$log_dir"
chown -R mysq;:mysql "$log_dir" chown -R mysql:mysql "$log_dir"
done done
# We assume a fresh install if the directory $datadir/mysql # We assume a fresh install if the directory $datadir/mysql