Skip to content

Commit 1e7a68f

Browse files
drrtuysanja-byelkin
authored andcommitted
Both RPM and DEB now restart MDB uninstalling the plugin.
Both RPM and DEB now conflicts on previous versions of MCS. Trim .deb packaging. MCS now depends on python. Python version varies in distributions.
1 parent 070413f commit 1e7a68f

File tree

7 files changed

+92
-56
lines changed

7 files changed

+92
-56
lines changed

debian/control

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,13 @@ Depends: mariadb-server-10.5 (= ${binary:Version}),
657657
net-tools,
658658
libsnappy1 | libsnappy1v5,
659659
libjemalloc1 | libjemalloc2,
660+
python | python2 | python3,
660661
${misc:Depends},
661662
${shlibs:Depends}
662-
Recommends: python-mysqldb
663+
Breaks: mariadb-columnstore-libs,
664+
mariadb-columnstore-platform
665+
Replaces: mariadb-columnstore-libs,
666+
mariadb-columnstore-platform
663667
Description: MariaDB ColumnStore storage engine
664668
The MariaDB ColumnStore storage engine is a high-performance columnar
665669
analytical engine, aimed at rapid processing of analytical queries on very

debian/mariadb-plugin-columnstore.install

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -86,43 +86,43 @@ usr/bin/mcs-start-storagemanager.py
8686
usr/bin/mcs-loadbrm.py
8787
usr/bin/mariadb-columnstore-start.sh
8888
usr/bin/mariadb-columnstore-stop.sh
89-
usr/lib/*-linux-gnu/libalarmmanager.so
90-
usr/lib/*-linux-gnu/libbatchloader.so
91-
usr/lib/*-linux-gnu/libbrm.so
92-
usr/lib/*-linux-gnu/libcacheutils.so
93-
usr/lib/*-linux-gnu/libcloudio.so
94-
usr/lib/*-linux-gnu/libcommon.so
95-
usr/lib/*-linux-gnu/libcompress.so
96-
usr/lib/*-linux-gnu/libconfigcpp.so
97-
usr/lib/*-linux-gnu/libdataconvert.so
98-
usr/lib/*-linux-gnu/libddlcleanuputil.so
99-
usr/lib/*-linux-gnu/libddlpackage.so
100-
usr/lib/*-linux-gnu/libddlpackageproc.so
101-
usr/lib/*-linux-gnu/libdmlpackage.so
102-
usr/lib/*-linux-gnu/libdmlpackageproc.so
103-
usr/lib/*-linux-gnu/libexecplan.so
104-
usr/lib/*-linux-gnu/libfuncexp.so
105-
usr/lib/*-linux-gnu/libidbdatafile.so
106-
usr/lib/*-linux-gnu/libjoblist.so
107-
usr/lib/*-linux-gnu/libjoiner.so
108-
usr/lib/*-linux-gnu/liblibmysql_client.so
109-
usr/lib/*-linux-gnu/libloggingcpp.so
110-
usr/lib/*-linux-gnu/libmarias3.so
111-
usr/lib/*-linux-gnu/libmessageqcpp.so
112-
usr/lib/*-linux-gnu/liboamcpp.so
113-
usr/lib/*-linux-gnu/libquerystats.so
114-
usr/lib/*-linux-gnu/libquerytele.so
115-
usr/lib/*-linux-gnu/libregr.so
116-
usr/lib/*-linux-gnu/librowgroup.so
117-
usr/lib/*-linux-gnu/librwlock.so
118-
usr/lib/*-linux-gnu/libstoragemanager.so
119-
usr/lib/*-linux-gnu/libthreadpool.so
120-
usr/lib/*-linux-gnu/libthrift.so
121-
usr/lib/*-linux-gnu/libudfsdk.so
122-
usr/lib/*-linux-gnu/libwindowfunction.so
123-
usr/lib/*-linux-gnu/libwriteengine.so
124-
usr/lib/*-linux-gnu/libwriteengineclient.so
125-
usr/lib/*-linux-gnu/libwriteengineredistribute.so
89+
usr/lib/*/libalarmmanager.so
90+
usr/lib/*/libbatchloader.so
91+
usr/lib/*/libbrm.so
92+
usr/lib/*/libcacheutils.so
93+
usr/lib/*/libcloudio.so
94+
usr/lib/*/libcommon.so
95+
usr/lib/*/libcompress.so
96+
usr/lib/*/libconfigcpp.so
97+
usr/lib/*/libdataconvert.so
98+
usr/lib/*/libddlcleanuputil.so
99+
usr/lib/*/libddlpackage.so
100+
usr/lib/*/libddlpackageproc.so
101+
usr/lib/*/libdmlpackage.so
102+
usr/lib/*/libdmlpackageproc.so
103+
usr/lib/*/libexecplan.so
104+
usr/lib/*/libfuncexp.so
105+
usr/lib/*/libidbdatafile.so
106+
usr/lib/*/libjoblist.so
107+
usr/lib/*/libjoiner.so
108+
usr/lib/*/liblibmysql_client.so
109+
usr/lib/*/libloggingcpp.so
110+
usr/lib/*/libmarias3.so
111+
usr/lib/*/libmessageqcpp.so
112+
usr/lib/*/liboamcpp.so
113+
usr/lib/*/libquerystats.so
114+
usr/lib/*/libquerytele.so
115+
usr/lib/*/libregr.so
116+
usr/lib/*/librowgroup.so
117+
usr/lib/*/librwlock.so
118+
usr/lib/*/libstoragemanager.so
119+
usr/lib/*/libthreadpool.so
120+
usr/lib/*/libthrift.so
121+
usr/lib/*/libudfsdk.so
122+
usr/lib/*/libwindowfunction.so
123+
usr/lib/*/libwriteengine.so
124+
usr/lib/*/libwriteengineclient.so
125+
usr/lib/*/libwriteengineredistribute.so
126126
usr/lib/mysql/plugin/ha_columnstore.so
127127
usr/lib/mysql/plugin/libregr_mysql.so
128128
usr/lib/mysql/plugin/libudf_mysql.so
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#!/bin/bash -e
1+
#!/bin/bash
22

3-
rpmmode=install
3+
set -e
44

5-
columnstore-post-install --rpmmode=$rpmmode
5+
# Install ColumnStore
6+
columnstore-post-install --rpmmode=install
67

78
echo "MariaDB ColumnStore install completed"
89

9-
exit 0
10+
#DEBHELPER#
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1-
#!/bin/bash -e
1+
#!/bin/bash
2+
3+
set -e
24

35
if [ "$1" = "purge" ]; then
46
rm -rf /var/lib/columnstore
57
rm -rf /etc/columnstore
68
rm -f /etc/mysql/mariadb.conf.d/columnstore.cnf.rpmsave
79
fi
810

11+
running_systemd() {
12+
if [ "$(ps --no-headers -o comm 1)" = "systemd" ]; then
13+
echo 0
14+
else
15+
echo 1
16+
fi
17+
}
18+
19+
if [ ! -z "$(pgrep -x mysqld)" ];then
20+
systemctl cat mariadb.service > /dev/null 2>&1
21+
if [ $? -eq 0 ] && [ $(running_systemd) -eq 0 ]; then
22+
systemctl restart mariadb.service > /dev/null 2>&1
23+
else
24+
pkill mysqld > /dev/null 2>&1
25+
/usr/bin/mysqld_safe &
26+
fi
27+
fi
28+
29+
#DEBHELPER#
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
#!/bin/bash -e
1+
#!/bin/bash
2+
3+
set -e
24

35
columnstore-pre-uninstall
46

57
exit 0
68

9+
#DEBHELPER#

storage/columnstore/CMakeLists.txt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "i686")
1212
add_subdirectory(columnstore)
1313

1414
IF(TARGET columnstore)
15-
# Needed to bump the component changes up to the main scope
16-
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)
17-
IF (RPM)
18-
SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE)
19-
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4" PARENT_SCOPE)
20-
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
21-
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
22-
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE)
23-
SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS thrift PARENT_SCOPE)
24-
ENDIF()
25-
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
15+
# Needed to bump the component changes up to the main scope
16+
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE)
17+
IF (RPM)
18+
SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${CPACK_RPM_columnstore-engine_USER_FILELIST} PARENT_SCOPE)
19+
# To untie the python mess across distributions MCS supports.
20+
IF(RPM MATCHES "(rhel|centos)8|(sles|suse)15|fedora")
21+
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python3" PARENT_SCOPE)
22+
ELSEIF(RPM MATCHES "(centos|rhel)7")
23+
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python" PARENT_SCOPE)
24+
ELSE()
25+
SET(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "${CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES}, MariaDB-server >= 10.5.4, python or python2 or python3" PARENT_SCOPE)
26+
ENDIF()
27+
SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
28+
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE} PARENT_SCOPE)
29+
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE} PARENT_SCOPE)
30+
SET(CPACK_RPM_columnstore-engine_PACKAGE_CONFLICTS "thrift, MariaDB-columnstore-engine, MariaDB-columnstore-platform, MariaDB-columnstore-libs" PARENT_SCOPE)
31+
ENDIF()
32+
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
2633
ENDIF()
2734
ENDIF()

0 commit comments

Comments
 (0)