[Groonga-mysql-commit] mroonga/mroonga [master] [rpm][centos] add mysql-server-mroonga-compatible.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 1月 29日 (日) 19:29:38 JST


Kouhei Sutou	2012-01-29 19:29:38 +0900 (Sun, 29 Jan 2012)

  New Revision: e1090bd0e56588ada5985f9bad33f240bf0178fc

  Log:
    [rpm][centos] add mysql-server-mroonga-compatible.

  Modified files:
    packages/rpm/centos/mysql-mroonga.spec.in

  Modified: packages/rpm/centos/mysql-mroonga.spec.in (+55 -2)
===================================================================
--- packages/rpm/centos/mysql-mroonga.spec.in    2012-01-29 19:26:25 +0900 (868c8ac)
+++ packages/rpm/centos/mysql-mroonga.spec.in    2012-01-29 19:29:38 +0900 (2b28153)
@@ -36,16 +36,36 @@ Requires:	MySQL-server = %{mysql_version}-%{mysql_release}
 Requires:	MySQL-client = %{mysql_version}-%{mysql_release}
 %endif
 Obsoletes:      mysql-groonga < 1.10-0
+Conflicts:      mysql-mroonga-compatible
 
 %description
 Mroonga is a fast fulltext searchable storage plugin for MySQL.
 It is based on groonga that is a fast fulltext search engine and
 column store. Groonga is good at real-time update.
 
+%package compatible
+Summary:	A fast fulltext searchable storage engine for MySQL.
+Group:		Applications/Databases
+License:	LGPLv2.1
+Conflicts:      mysql-mroonga
+
+%description compatible
+This package is just provided for backward compatibility.
+
+Mroonga uses "groonga" as storage engine name before 1.20.
+But mroonga 1.20 or later uses "mroonga" as storage engine
+name. It means that 1.20 breaks backward compatibility.
+
+This package provide mroonga as "groonga" storage engine.
+You can use this package to avoid
+
+Note that this package will be remov****@1*****. So you need
+to upgrade to use "mroonga" storage engine sooner or later.
+
 %package doc
 Summary:	Documentation for mroonga
 Group:		Documentation
-License:	LGPLv2
+License:	LGPLv2.1
 
 %description doc
 Documentation for mroonga
@@ -123,6 +143,19 @@ CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_mroonga.so';
 	 echo "  $command")
 fi
 
+%post compatible
+if [ $1 -eq 1 ]; then
+    sql="
+INSTALL PLUGIN groonga SONAME 'ha_groonga.so';
+CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_groonga.so';
+"
+    command="/usr/bin/mysql -u root -e \"$sql\""
+    echo $command
+    eval $command || \
+	(echo "run the following command to register mroonga:"; \
+	 echo "  $command")
+fi
+
 %postun
 if [ $1 -eq 0 ]; then
   sql="
@@ -136,9 +169,28 @@ UNINSTALL PLUGIN mroonga;
        echo "  $command")
 fi
 
+%postun compatible
+if [ $1 -eq 0 ]; then
+  sql="
+DROP FUNCTION last_insert_grn_id;
+UNINSTALL PLUGIN groonga;
+"
+  command="/usr/bin/mysql -u root -e \"$sql\""
+  echo $command
+  eval $command || \
+      (echo "run the following command to unregister mroonga:"; \
+       echo "  $command")
+fi
+
 %files
 %defattr(-,root,root,-)
-%{_libdir}/mysql/plugin/
+%{_libdir}/mysql/plugin/ha_mroonga.*
+%{_datadir}/man/man1/*
+%{_datadir}/man/*/man1/*
+
+%files compatible
+%defattr(-,root,root,-)
+%{_libdir}/mysql/plugin/ha_groonga.*
 %{_datadir}/man/man1/*
 %{_datadir}/man/*/man1/*
 
@@ -153,6 +205,7 @@ fi
 - require groonga 1.3.0.
 - groonga -> mroonga.
 - use MySQL 5.5.20.
+- add mysql-server-mroonga-compatible.
 
 * Thu Dec 29 2011 Kouhei Sutou <kou****@clear*****> - 1.11-0
 - new upstream release.




Groonga-mysql-commit メーリングリストの案内
Back to archive index