ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/mysql.spec
Revision: 1.27
Committed: Wed Sep 2 21:30:52 2009 UTC (15 years, 7 months ago) by valya
Branch: MAIN
CVS Tags: builder_2010-10-13_13-04-14_dbs-apps, builder_2010-10-13_12-53-04_dbs-web, DD_20101007_slc5_amd64_gcc434, HG1009c, builder_2010-09-15_18-10-44_dbs-apps, HG1009b, builder_2010-09-15_16-49-36_dbs3, HG1009a, dg-base-rev21, dg-base-rev20, dg-base-rev19, dg-base-rev18, DD_20100824_slc5_amd64_gcc434_v1, DD_20100824_slc5_amd64_gcc434, DS_20100813, builder_2010-08-12_16-07-39_crab-server, DS_20100812, dg-base-rev17, dg20100809-crabserver, FRONTEND_CONF_3_30_20100724, FRONTEND_CONF_3_29_20100723, dg-base-rev16, ge20100722-rpm-osx-64-bit, builder2010_07_09_1278688493-dbs-web, builder2010_07_08_1278610746-dbs3, builder2010_07_08_1278610490-prodagent, builder2010_07_08_1278582827-dbs-server, builder2010_07_08_1278582199-dbs-server, builder2010_07_08_1278580992-dbs-schema, builder2010_07_08_1278580384-dbs-schema, dg-base-rev15, ge20100621-bootstrap-rpm-4-8-macosx, dg20100617-crabserver, dg20100617-dbs, dg20100617-dd, DD_20100615_slc5_amd64_gcc434, ge20100611-apt-rpm-4-8-gcc-4-5-0, MotT0_1_0_15, dg20100609-dd, MotT0_1_0_14, DD_20100609_slc5_amd64_gcc434, dg20100608-dd, dg20100608-dbs, MotT0_1_0_13, DD_20100607_slc5_amd64_gcc434, MotT0_1_0_12, MotT0_1_0_11, MotT0_1_0_10, MotT0_1_0_9, dg-base-rev14, MotT0_1_0_8, MotT0_1_0_6, MotT0_1_0_5, MotT0_1_0_4, MotT0_1_0_3, dg20100527-dbs3, dg20100526-dd, dg-base-rev13, DD_20100525_slc5_amd64_gcc434, ge20100521b-new-rpm, dg20100521-dbs, ge20100521-new-rpm, DBS_20100520_slc5_amd64_gcc434, ge20100519-new-apt, dg20100511-dbs3, dg20100504-dd, dg20100504-dbs, DD_20100503_slc5_amd64_gcc434, dg20100503b-prodagent, DBS_20100503_slc5_amd64_gcc434, dg20100503-prodagent, ge20100427-rpm-on-linux, dg-base-rev12, ge20100422-rpm-4-8-0, dg20100416-dbs, dg-base-rev11, dg-base-rev10, dg-base-rev9, dg20100401-dbs, dg20100329-dbs3, dg-base-rev8, dg20100322-dbs3, DAS_20100302_slc5_amd64_gcc434, dg-base-rev7, forPHEDEX-web-20100301, dg20100226-dbs, dg-base-rev6, forPHEDEX-web-20100226, DBS_20100226_slc5_amd64_gcc434, forPHEDEX-web-20100225, dg20100225-prodagent, dg-base-rev5, dg-base-rev4, CRABSERVER_1_1_1_pre9_BUILD_SLC5rev3py24, dg-base-rev3, dg-base-rev2, dg-base-rev1, DBS_20100217_slc5_amd64_gcc434, FILEMOVER_20100217_slc5_amd64_gcc434, FRONTEND_CONF_3_24_20100217, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, DAS_20100216_slc5_amd64_gcc434, T0Mon_100204_2, dg20100201-dbs3, FILEMOVER_20100201_slc5_amd64_gcc434, FILEMOVER_20100128b_slc5_amd64_gcc434, dg20100129-dbs3, dg20100128-dbs3, FILEMOVER_20100128_slc5_amd64_gcc434, DAS_20100127_slc5_amd64_gcc434, DAS_20100126_slc5_amd64_gcc434, DBS-APP_20100122_slc4, FILEMOVER_20100122_slc5_amd64_gcc434, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DAS_20100119_slc5_amd64_gcc434, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DAS_20100115_slc5_amd64_gcc434, dg20100115-security, DBS_20100115_slc5_amd64_gcc434, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, dg20100112-security, DBS_20100112_slc5_amd64_gcc434, DBS_20100111_slc5_amd64_gcc434, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DQMCATTEST_0_0_1, FILEMOVER_20091118, DBS-APPS_20090929, DAS_20091117, BUILDBOT_01, CERNOIDv02, DBS-WEB_20091021, CouchDB_0_10_0, CERNOIDv01, WMCORE-before-refactor, DBS-WEB_20091012, PerfSuiteDB_20090930, DBS-WEB_20090921, PerfSuiteDB_20090916, FILEMOVER_20090910, PerfSuiteDB_20090904_almost_stable, DBS-WEB_20090817, PerfSuiteDB_20090904
Changes since 1.26: +1 -1 lines
Log Message:
Added autoextend to innodb_data_file_path to go beyond 2GB in MySQL DB size

File Contents

# Content
1 ### RPM external mysql 5.1.35
2 ## INITENV +PATH LD_LIBRARY_PATH %i/lib/mysql
3 ## INITENV SET MYSQL_HOME $MYSQL_ROOT
4
5 #Different download locations according to the version.
6
7 %if "%(echo %realversion | cut -d. -f1)" == "4"
8 %define source http://downloads.mysql.com/archives/mysql-4.0/%n-%realversion.tar.gz
9 %else
10 #%define source http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-%realversion.tar.gz
11 %define source http://opensource.become.com/mysql/Downloads/MySQL-5.1/mysql-%realversion.tar.gz
12 %endif
13
14 Source: %source
15 # Let's fake the fact that we have perl (DBI) so that rpm does not complain.
16 Provides: perl(DBI)
17
18 %prep
19 %setup -n %n-%realversion
20 %ifos darwin
21 # There's for some reason a "-traditional-cpp", which breaks with GCC 3.3
22 # so remove it. (FIXME: check if this is solved in a newer version.)
23 perl -p -i -e 's/-traditional-cpp/-no-cpp-precomp/g' configure.in configure
24 %endif
25
26 %build
27 CFLAGS=-O3 CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
28 ./configure --prefix=%i --with-extra-charsets=complex \
29 --enable-thread-safe-client --enable-local-infile \
30 --with-plugins=innobase
31 make %makeprocesses
32
33 %install
34 make install
35 perl -p -i -e "s|^#!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -r -e "^#!.*perl.*" %i | cut -d: -f1)
36 rm -fR %i/mysql-test
37
38 # SCRAM ToolBox toolfile
39 mkdir -p %i/etc/scram.d
40 cat << \EOF_TOOLFILE >%i/etc/scram.d/%n
41 <doc type=BuildSystem::ToolDoc version=1.0>
42 <Tool name=%n version=%v>
43 <Lib name=mysqlclient>
44 <Client>
45 <Environment name=MYSQL_BASE default="%i"></Environment>
46 <Environment name=LIBDIR default="$MYSQL_BASE/lib/mysql"></Environment>
47 <Environment name=MYSQL_BINDIR default="$MYSQL_BASE/bin"></Environment>
48 <Environment name=INCLUDE default="$MYSQL_BASE/include/mysql"></Environment>
49 </Client>
50 <Runtime name=PATH value="$MYSQL_BINDIR" type=path>
51 </Tool>
52 EOF_TOOLFILE
53
54 cat << \EOF > %i/etc/my.cnf
55 [mysqld]
56 max_allowed_packet=128M
57
58 max_connections = 1000
59 connect_timeout = 60
60
61 set-variable = innodb_log_file_size=512M
62 set-variable = innodb_log_buffer_size=8M
63 set-variable = innodb_buffer_pool_size=2G
64 set-variable = innodb_additional_mem_pool_size=50M
65
66 key_buffer=512M
67
68 query_cache_type=1
69 query_cache_limit=10M
70 query_cache_size=128M
71
72 innodb_thread_concurrency=0
73 innodb_concurrency_tickets=10000
74 innodb_commit_concurrency=0
75 innodb_flush_logs_at_trx_commit=0
76 innodb_flush_method=O_DIRECT
77 innodb_file_io_threads = 4
78 innodb_checksums=0
79 innodb_doublewrite=0
80 innodb_data_file_path = ibdata1:2047M;ibdata2:2000M:autoextend
81
82 max_heap_table_size=1024M
83 tmp_table_size=1024M
84
85 long_query_time=5
86 innodb_sync_spin_loops=60
87
88 innodb_force_recovery = 0
89 innodb_lock_wait_timeout = 100
90 innodb_autoinc_lock_mode = 2
91
92
93 [mysql.server]
94 STRICT_TRANS_TABLES=1
95 transaction-isolation = READ-COMMITTED
96 EOF
97
98
99 %post
100 %{relocateConfig}bin/msql2mysql
101 %{relocateConfig}bin/mysqlaccess
102 %{relocateConfig}bin/mysqlbug
103 %{relocateConfig}bin/mysql_config
104 %{relocateConfig}bin/mysqld_multi
105 %{relocateConfig}bin/mysqld_safe
106 %{relocateConfig}bin/mysql_fix_privilege_tables
107 %{relocateConfig}bin/mysql_install_db
108 %{relocateConfig}etc/scram.d/%n
109