null+****@clear*****
null+****@clear*****
2011年 3月 30日 (水) 00:55:03 JST
Kouhei Sutou 2011-03-29 15:55:03 +0000 (Tue, 29 Mar 2011)
New Revision: ab087f2287c58f294a15da33682ada112fd20407
Log:
fix AppArmor files.
Modified files:
debian/changelog
debian/mysql-server-groonga.install
debian/mysql-server-groonga.postinst
debian/mysql-server-groonga.postrm
Renamed files:
debian/apparmor/mysql-server-groonga
(from debian/usr.lib.mysql.plugin.ha_groonga)
Renamed: debian/apparmor/mysql-server-groonga (+0 -0) 100%
===================================================================
Modified: debian/changelog (+6 -0)
===================================================================
--- debian/changelog 2011-03-29 15:39:55 +0000 (2930727)
+++ debian/changelog 2011-03-29 15:55:03 +0000 (3855a4f)
@@ -1,3 +1,9 @@
+groonga-storage-engine (0.5-3) unstable; urgency=low
+
+ * fix AppArmor files.
+
+ -- Kouhei Sutou <kou****@clear*****> Tue, 30 Mar 2011 00:59:00 +0900
+
groonga-storage-engine (0.5-2) unstable; urgency=low
* hook script fix.
Modified: debian/mysql-server-groonga.install (+1 -1)
===================================================================
--- debian/mysql-server-groonga.install 2011-03-29 15:39:55 +0000 (023e4bf)
+++ debian/mysql-server-groonga.install 2011-03-29 15:55:03 +0000 (4df2179)
@@ -1,2 +1,2 @@
usr/lib/mysql/plugin/ha_groonga.so*
-debian/usr.lib.mysql.plugin.ha_groonga etc/apparmor.d/
+debian/apparmor/mysql-server-groonga etc/apparmor.d/abstractions/
Modified: debian/mysql-server-groonga.postinst (+2 -2)
===================================================================
--- debian/mysql-server-groonga.postinst 2011-03-29 15:39:55 +0000 (0c856a8)
+++ debian/mysql-server-groonga.postinst 2011-03-29 15:55:03 +0000 (05d530a)
@@ -28,8 +28,8 @@ mysql_apparmor_profile_name=usr.sbin.mysqld
mysql_apparmor_profile=/etc/apparmor.d/${mysql_apparmor_profile_name}
mysql_local_apparmor_profile=/etc/apparmor.d/local/${mysql_apparmor_profile_name}
if test -f "${mysql_local_apparmor_profile}"; then
- apparmor_profile_name=usr.lib.mysql.plugin.ha_groonga
- include_ha_groonga="#include <${apparmor_profile_name}>"
+ apparmor_profile_name=mysql-server-groonga
+ include_ha_groonga="#include <abstractions/${apparmor_profile_name}>"
if ! grep -q "${include_ha_groonga}" "${mysql_local_apparmor_profile}"; then
echo >> "${mysql_local_apparmor_profile}"
echo "${include_ha_groonga}" >> "${mysql_local_apparmor_profile}"
Modified: debian/mysql-server-groonga.postrm (+12 -8)
===================================================================
--- debian/mysql-server-groonga.postrm 2011-03-29 15:39:55 +0000 (762c8f9)
+++ debian/mysql-server-groonga.postrm 2011-03-29 15:55:03 +0000 (b02041c)
@@ -2,26 +2,30 @@
set -e
-cat <<EOS | mysql --defaults-file=/etc/mysql/debian.cnf
+cat <<EOS | mysql --defaults-file=/etc/mysql/debian.cnf || true
DROP FUNCTION last_insert_grn_id;
UNINSTALL PLUGIN groonga;
EOS
if [ "$1" = "purge" ]; then
- mysql_local_apparmor_profile=/etc/apparmor.d/local/usr.sbin.mysqld
- apparmor_profile_name=usr.lib.mysql.plugin.ha_groonga
+ mysql_apparmor_profile_name=usr.sbin.mysqld
+ mysql_apparmor_profile=/etc/apparmor.d/${mysql_apparmor_profile_name}
+ mysql_local_apparmor_profile=/etc/apparmor.d/local/${mysql_apparmor_profile_name}
+ apparmor_profile_name=mysql-server-groonga
if test -f "${mysql_local_apparmor_profile}"; then
- include_ha_groonga="#include <${apparmor_profile_name}>"
- if grep -q "${include_ha_groonga}" "${mysql_local_apparmor_profile}"; then
- sed -i'' -e "s/${include_ha_groonga}//" \
+ include_profile="#include <abstractions/${apparmor_profile_name}>"
+ if grep -q "${include_profile}" "${mysql_local_apparmor_profile}"; then
+ sed -i'' -e "s,${include_profile},," \
"${mysql_local_apparmor_profile}"
fi
fi
- rm -f "/etc/apparmor.d/disable/${apparmor_profile_name}" || true
- rm -f "/etc/apparmor.d/force-complain/${apparmor_profile_name}" || true
rm -f "/etc/apparmor.d/local/${apparmor_profile_name}" || true
rmdir /etc/apparmor.d/local 2>/dev/null || true
+
+ if aa-status --enabled 2>/dev/null; then
+ apparmor_parser -r -T -W "${mysql_apparmor_profile}" || true
+ fi
fi
#DEBHELPER#