mariadb: small plugins fixes
authorSebastian Kemper <redacted>
Sun, 17 Nov 2019 15:12:32 +0000 (16:12 +0100)
committerSebastian Kemper <redacted>
Sun, 17 Nov 2019 16:17:04 +0000 (17:17 +0100)
This adds a few lines to the BuildPlugin routine to install some missing
files for auth_pam as well as ha_spider.

It also adds a postinstall script that updates the ownership of a
directory used by auth_pam.

Signed-off-by: Sebastian Kemper <redacted>
utils/mariadb/Makefile

index bca45dc9a141dca7704649ec2a0836a0f41e36cc..2cef4008366c3da8a60f722d2411976d3e82c51b 100644 (file)
@@ -545,10 +545,27 @@ This package provides the $(1) plugin.
   define Package/mariadb-server-plugin-$(subst _,-,$(1))/install
          $(INSTALL_DIR) $$(1)$(PLUGIN_DIR)
          $(call Package/mariadb/install/plugin,$$(1),$(1))
+ifeq ($(1),auth_pam)
+         $(CP) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/auth_pam_tool_dir \
+                 $$(1)$(PLUGIN_DIR)
+endif
+ifeq ($(1),ha_spider)
+         $(INSTALL_DIR) $$(1)$(SHARE_DIR)
+         $(INSTALL_DATA) $(PKG_INSTALL_DIR)$(SHARE_DIR)/install_spider.sql \
+                 $$(1)$(SHARE_DIR)
+endif
   endef
   $$(eval $$(call BuildPackage,mariadb-server-plugin-$(subst _,-,$(1))))
 endef
 
+define Package/mariadb-server-plugin-auth-pam/postinst
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+  chown mariadb /usr/lib/mariadb/plugin/auth_pam_tool_dir > /dev/null 2>&1
+fi
+exit 0
+endef
+
 $(eval $(call HostBuild))
 $(eval $(call BuildPackage,mariadb-client))
 $(eval $(call BuildPackage,mariadb-client-base))
@@ -580,4 +597,3 @@ $(eval $(call BuildPlugin,server_audit,))
 $(eval $(call BuildPlugin,simple_password_check,))
 $(eval $(call BuildPlugin,sql_errlog,))
 $(eval $(call BuildPlugin,wsrep_info,))
-
git clone https://git.99rst.org/PROJECT