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":2395.6000003814697,"ttfb":529.2000002861023,"pageVisibility":"visible","entityId":65301,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"ab325caf-287c-48ff-8d48-e27156609095","navigationType":0,"readyForUser":2504,"redirectCount":0,"resourceLoadedEnd":1880.1000003814697,"resourceLoadedStart":538.1000003814697,"resourceTiming":[{"duration":374.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":538.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":538.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":912.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":374.80000019073486,"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":538.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":538.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":913.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":1063.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":538.5,"connectEnd":538.5,"connectStart":538.5,"domainLookupEnd":538.5,"domainLookupStart":538.5,"fetchStart":538.5,"redirectEnd":0,"redirectStart":0,"requestStart":910.6000003814697,"responseEnd":1601.6000003814697,"responseStart":963.2000002861023,"secureConnectionStart":538.5},{"duration":1206.4000000953674,"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":538.7000002861023,"connectEnd":538.7000002861023,"connectStart":538.7000002861023,"domainLookupEnd":538.7000002861023,"domainLookupStart":538.7000002861023,"fetchStart":538.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":910.3000001907349,"responseEnd":1745.1000003814697,"responseStart":960,"secureConnectionStart":538.7000002861023},{"duration":433.69999980926514,"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":538.8000001907349,"connectEnd":538.8000001907349,"connectStart":538.8000001907349,"domainLookupEnd":538.8000001907349,"domainLookupStart":538.8000001907349,"fetchStart":538.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":927.6000003814697,"responseEnd":972.5,"responseStart":971.6000003814697,"secureConnectionStart":538.8000001907349},{"duration":438.1000003814697,"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":539,"connectEnd":539,"connectStart":539,"domainLookupEnd":539,"domainLookupStart":539,"fetchStart":539,"redirectEnd":0,"redirectStart":0,"requestStart":955.9000000953674,"responseEnd":977.1000003814697,"responseStart":974.9000000953674,"secureConnectionStart":539},{"duration":437.59999990463257,"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":539.3000001907349,"connectEnd":539.3000001907349,"connectStart":539.3000001907349,"domainLookupEnd":539.3000001907349,"domainLookupStart":539.3000001907349,"fetchStart":539.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":955.7000002861023,"responseEnd":976.9000000953674,"responseStart":972.8000001907349,"secureConnectionStart":539.3000001907349},{"duration":379,"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":539.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":539.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":918.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":447.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":539.6000003814697,"connectEnd":539.6000003814697,"connectStart":539.6000003814697,"domainLookupEnd":539.6000003814697,"domainLookupStart":539.6000003814697,"fetchStart":539.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":956.1000003814697,"responseEnd":987,"responseStart":977.2000002861023,"secureConnectionStart":539.6000003814697},{"duration":379.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":539.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":539.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":919.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":449.40000009536743,"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":539.9000000953674,"connectEnd":539.9000000953674,"connectStart":539.9000000953674,"domainLookupEnd":539.9000000953674,"domainLookupStart":539.9000000953674,"fetchStart":539.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":956.3000001907349,"responseEnd":989.3000001907349,"responseStart":981.4000000953674,"secureConnectionStart":539.9000000953674},{"duration":1338.2999997138977,"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":541.2000002861023,"connectEnd":541.2000002861023,"connectStart":541.2000002861023,"domainLookupEnd":541.2000002861023,"domainLookupStart":541.2000002861023,"fetchStart":541.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1867.8000001907349,"responseEnd":1879.5,"responseStart":1878.9000000953674,"secureConnectionStart":541.2000002861023},{"duration":1316.2000002861023,"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":563.9000000953674,"connectEnd":563.9000000953674,"connectStart":563.9000000953674,"domainLookupEnd":563.9000000953674,"domainLookupStart":563.9000000953674,"fetchStart":563.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1869.6000003814697,"responseEnd":1880.1000003814697,"responseStart":1879.6000003814697,"secureConnectionStart":563.9000000953674},{"duration":454.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1757.5,"connectEnd":1757.5,"connectStart":1757.5,"domainLookupEnd":1757.5,"domainLookupStart":1757.5,"fetchStart":1757.5,"redirectEnd":0,"redirectStart":0,"requestStart":2179.5,"responseEnd":2212,"responseStart":2211.300000190735,"secureConnectionStart":1757.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":347,"responseStart":529,"responseEnd":563,"domLoading":536,"domInteractive":2608,"domContentLoadedEventStart":2608,"domContentLoadedEventEnd":2684,"domComplete":3638,"loadEventStart":3638,"loadEventEnd":3638,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2571.9000000953674},{"name":"bigPipe.sidebar-id.end","time":2572.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":2572.800000190735},{"name":"bigPipe.activity-panel-pipe-id.end","time":2576.1000003814697},{"name":"activityTabFullyLoaded","time":2708.1000003814697}],"measures":[],"correlationId":"3544db73a8d053","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":7,"dbConnsTimeInMs":15,"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