I tried to compile and install mariadb in alpine, because it was used in docker, so I wanted to take up less space after the compilation was successful.
I used the -dcmake_build_type =MinSizeRel option to minimize the installation. But the mysql-test directory still takes up a lot of space.
I tried using -dwith_unit_tests =OFF and -dconc_with_unit_tests =OFF to disable mysql-test installation, but they didn't work. I haven't found any other relevant options, similar to INSTALL_MYSQLTESTDIR="" in mysql.
How can I disable mysql-test installation?
mysql installation options is this:
cmake . \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DWITH_UNIT_TESTS=OFF \
-DCONC_WITH_UNIT_TESTS=OFF \
-DWITH_MARIABACKUP=OFF \
-DENABLED_LOCAL_INFILE=ON \
-DWITHOUT_TOKUDB=1; \
which means, we are basically deleting them all, if we don't want them.
So if there's some easier way, I'd like to know that too
Michal Schorm
added a comment - True that, in Fedora, we use:
-DINSTALL_MYSQLTESTDIR=share /mysql-test
-DWITH_UNIT_TESTS=%{?with_test:ON}%{!?with_test:NO}
% if %{without test }
% if %{with embedded}
rm %{buildroot}%{_bindir}/{mysqltest_embedded,mysql_client_test_embedded}
rm %{buildroot}%{_mandir} /man1/ {mysqltest_embedded,mysql_client_test_embedded}.1*
%endif # embedded
rm %{buildroot}%{_bindir}/{mysql_client_test,my_safe_process,mysqltest}
rm %{buildroot}%{_mandir} /man1/ {mysql_client_test,my_safe_process,mysqltest}.1*
rm %{buildroot}%{_mandir} /man1/ {mysql- test -run,mysql-stress- test }.pl.1*
rm -r %{buildroot}%{_datadir} /mysql-test
%endif # test
which means, we are basically deleting them all, if we don't want them.
So if there's some easier way, I'd like to know that too
@Michal Schorm
if you use mysql,you can use -DINSTALL_MYSQLTESTDIR="" to disable mysql-test installation. but mariadb don't has this option. now,I can only delete them manually.Thanks for you help.
yinfuyuan
added a comment - @Michal Schorm
if you use mysql,you can use -DINSTALL_MYSQLTESTDIR="" to disable mysql-test installation. but mariadb don't has this option. now,I can only delete them manually.Thanks for you help.
yinfuyuan We do have INSTALL_MYSQLTESTDIR option , and it does work the same as in MySQL. you do not need to pass that as -DINSTALL_MYSQLTESTDIR="" . You can pass it as -DMYSQLTESTDIR= elenst fyi
Vladislav Vaintroub
added a comment - - edited yinfuyuan We do have INSTALL_MYSQLTESTDIR option , and it does work the same as in MySQL. you do not need to pass that as -DINSTALL_MYSQLTESTDIR="" . You can pass it as -DMYSQLTESTDIR=
elenst fyi
Right, sorry for the confusion. In my comment I meant that we apparently don't have a way to avoid installing mysql-test, not that we don't have the option. I didn't know that it could work this way, happy to be wrong.
Elena Stepanova
added a comment - Right, sorry for the confusion. In my comment I meant that we apparently don't have a way to avoid installing mysql-test, not that we don't have the option. I didn't know that it could work this way, happy to be wrong.
yinfuyuan
added a comment - @Vladislav Vaintroub
I've tried -DINSTALL_MYSQLTESTDIR="" and -DMYSQLTESTDIR= , but they don't work. The following can see my compilation details.
https://github.com/yinfuyuan/docker-mariadb/blob/develop/services/mariadb/10.2/alpine/Dockerfile
Is that have a problem? .Thanks for you help.
and mysql-test is not in the package
your dockerfile das have a problem indeed, because it does not use correct option. How do I know correct option? I grep CMakeCache.txt, and I look into cmake/install_macros.cmake to see the effect of INSTALL_MYSQLTESTDIR.
Apparently, this line https://github.com/MariaDB/server/blob/10.2/cmake/install_macros.cmake#L357 does the magic
Vladislav Vaintroub
added a comment - - edited it works for me, and should for you, too
cmake . -DINSTALL_MYSQLTESTDIR=
and mysql-test is not in the package
your dockerfile das have a problem indeed, because it does not use correct option. How do I know correct option? I grep CMakeCache.txt, and I look into cmake/install_macros.cmake to see the effect of INSTALL_MYSQLTESTDIR.
Apparently, this line https://github.com/MariaDB/server/blob/10.2/cmake/install_macros.cmake#L357 does the magic
Now. I used it correctly, it works well.
Thank you very mach for you help.
yinfuyuan
added a comment - @Vladislav Vaintroub
Yes.
I know cmake ../server -LH can be display all cmake configuration options for MariaDB from
https://mariadb.com/kb/en/library/generic-build-instructions
but the -DINSTALL_MYSQLTESTDIR option is not available,so I didn't try it.
Now. I used it correctly, it works well.
Thank you very mach for you help.
"Non-advanced" is important part. INSTALL_XXX variables are marked as advanced.
but you can cat or vi CMakeCache.txt to see all variables.
Vladislav Vaintroub
added a comment - Our documentation a little simplified
https://cmake.org/cmake/help/v3.10/manual/cmake.1.html contains accurate description of what cmake -L [A] [H] does .
List non-advanced cached variables.
"Non-advanced" is important part. INSTALL_XXX variables are marked as advanced.
but you can cat or vi CMakeCache.txt to see all variables.
People
Vladislav Vaintroub
yinfuyuan
Votes:
0Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":975.5,"ttfb":273.2000002861023,"pageVisibility":"visible","entityId":65301,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ffe4cb4c-baa9-4562-b3a3-0f1f3f173fa1","navigationType":0,"readyForUser":1077.6000003814697,"redirectCount":0,"resourceLoadedEnd":1098.9000000953674,"resourceLoadedStart":279.40000009536743,"resourceTiming":[{"duration":152,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":279.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":431.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":152.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":279.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":431.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":207.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":279.90000009536743,"connectEnd":279.90000009536743,"connectStart":279.90000009536743,"domainLookupEnd":279.90000009536743,"domainLookupStart":279.90000009536743,"fetchStart":279.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":279.90000009536743,"responseEnd":487.5,"responseStart":487.5,"secureConnectionStart":279.90000009536743},{"duration":283.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":280,"connectEnd":280,"connectStart":280,"domainLookupEnd":280,"domainLookupStart":280,"fetchStart":280,"redirectEnd":0,"redirectStart":0,"requestStart":280,"responseEnd":563.2000002861023,"responseStart":563.2000002861023,"secureConnectionStart":280},{"duration":287,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":280.2000002861023,"connectEnd":280.2000002861023,"connectStart":280.2000002861023,"domainLookupEnd":280.2000002861023,"domainLookupStart":280.2000002861023,"fetchStart":280.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":280.2000002861023,"responseEnd":567.2000002861023,"responseStart":567.2000002861023,"secureConnectionStart":280.2000002861023},{"duration":287.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":280.40000009536743,"connectEnd":280.40000009536743,"connectStart":280.40000009536743,"domainLookupEnd":280.40000009536743,"domainLookupStart":280.40000009536743,"fetchStart":280.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":280.40000009536743,"responseEnd":567.7000002861023,"responseStart":567.7000002861023,"secureConnectionStart":280.40000009536743},{"duration":287.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":280.6000003814697,"connectEnd":280.6000003814697,"connectStart":280.6000003814697,"domainLookupEnd":280.6000003814697,"domainLookupStart":280.6000003814697,"fetchStart":280.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":280.6000003814697,"responseEnd":568.1000003814697,"responseStart":568.1000003814697,"secureConnectionStart":280.6000003814697},{"duration":353.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":280.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":634.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":287.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":280.90000009536743,"connectEnd":280.90000009536743,"connectStart":280.90000009536743,"domainLookupEnd":280.90000009536743,"domainLookupStart":280.90000009536743,"fetchStart":280.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":280.90000009536743,"responseEnd":568.6000003814697,"responseStart":568.6000003814697,"secureConnectionStart":280.90000009536743},{"duration":353.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":281,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":634.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":288,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":281.1000003814697,"connectEnd":281.1000003814697,"connectStart":281.1000003814697,"domainLookupEnd":281.1000003814697,"domainLookupStart":281.1000003814697,"fetchStart":281.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":281.1000003814697,"responseEnd":569.1000003814697,"responseStart":569.1000003814697,"secureConnectionStart":281.1000003814697},{"duration":796.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":282,"connectEnd":282,"connectStart":282,"domainLookupEnd":282,"domainLookupStart":282,"fetchStart":282,"redirectEnd":0,"redirectStart":0,"requestStart":282,"responseEnd":1078.3000001907349,"responseStart":1078.3000001907349,"secureConnectionStart":282},{"duration":792.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":286.30000019073486,"connectEnd":286.30000019073486,"connectStart":286.30000019073486,"domainLookupEnd":286.30000019073486,"domainLookupStart":286.30000019073486,"fetchStart":286.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":286.30000019073486,"responseEnd":1078.8000001907349,"responseStart":1078.8000001907349,"secureConnectionStart":286.30000019073486},{"duration":60.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":646.1000003814697,"connectEnd":646.1000003814697,"connectStart":646.1000003814697,"domainLookupEnd":646.1000003814697,"domainLookupStart":646.1000003814697,"fetchStart":646.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":646.1000003814697,"responseEnd":706.6000003814697,"responseStart":706.6000003814697,"secureConnectionStart":646.1000003814697},{"duration":182.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":916.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":916.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1098.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":182,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":916.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":916.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1098.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":162.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":917.8000001907349,"connectEnd":917.8000001907349,"connectStart":917.8000001907349,"domainLookupEnd":917.8000001907349,"domainLookupStart":917.8000001907349,"fetchStart":917.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":917.8000001907349,"responseEnd":1080.1000003814697,"responseStart":1080.1000003814697,"secureConnectionStart":917.8000001907349},{"duration":167,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":918.2000002861023,"connectEnd":918.2000002861023,"connectStart":918.2000002861023,"domainLookupEnd":918.2000002861023,"domainLookupStart":918.2000002861023,"fetchStart":918.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":918.2000002861023,"responseEnd":1085.2000002861023,"responseStart":1085.2000002861023,"secureConnectionStart":918.2000002861023},{"duration":169.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":918.7000002861023,"connectEnd":918.7000002861023,"connectStart":918.7000002861023,"domainLookupEnd":918.7000002861023,"domainLookupStart":918.7000002861023,"fetchStart":918.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":918.7000002861023,"responseEnd":1088,"responseStart":1087.9000000953674,"secureConnectionStart":918.7000002861023},{"duration":186.59999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":967.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":967.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1154,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":114,"responseStart":273,"responseEnd":278,"domLoading":276,"domInteractive":1158,"domContentLoadedEventStart":1158,"domContentLoadedEventEnd":1224,"domComplete":1491,"loadEventStart":1491,"loadEventEnd":1492,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1113.5},{"name":"bigPipe.sidebar-id.end","time":1114.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1114.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1117.5},{"name":"activityTabFullyLoaded","time":1244.8000001907349}],"measures":[],"correlationId":"dca48fd707a989","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":9,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
True that, in Fedora, we use:
-DWITH_UNIT_TESTS=%{?with_test:ON}%{!?with_test:NO}
which means, we are basically deleting them all, if we don't want them.
So if there's some easier way, I'd like to know that too