Commit graph

61 commits

Author SHA1 Message Date
Vladislav Vaintroub
64e308e28d Fix build and packaging on Windows:
- build executables we have in 5.3 (mysql_install_db.exe, mysq_upgrade_service.exe, upgrade wizard), and MSI

- add some missing headers to windows specific source files. 
This needs to be done since 5.5 is using WIN32_LEAN_AND_MEAN preprocessor constant thus windows.h 
no more includes whiole Windows

- do not deliver perl scripts  (mysql_install_db.pl & friends)  -they do not work, are not documented, and we 
have native executables for this functionality. do not pack echo.exe, replace.exe  into MSI, they 
are not needed. Do not build resolveip on Windows, it is not used.

- precache results of  of system checks in cmake/os/WindowsCache.cmake (like it is alreay done for  majority of tests
to speed up cmake run with VS)

- make feedback plugin DEFAULT on Windows (so MSI works if user enables plugin), 
fix null pointer access in PSI_register
2011-11-26 23:07:53 +01:00
Joerg Bruehe
3690fa63e3 Bug #58241
Please exclude make_binary_distribution from the distribution

With cmake (5.5 and up), "make package" will do it,
or cpack.
The (generated) "scripts/make_binary_distribution" is just
a wrapper around a "cpack" call,
with path names set at build time.

Similar, "make_win_bin_dist" is not needed any more.

scripts/CMakeLists.txt:
  Cleanup:
  Append a trailing newline when generating "make_binary_distribution"
  (which is just a wrapper around a "cpack" call).
support-files/mysql.spec.sh:
  "make_win_bin_dist" is removed from the sources,
  so its man page is gone,
  and it need not be removed when creating the RPMs.
2011-09-13 12:32:53 +02:00
Nirbhay Choubey
a3ff4f7c93 BUG#11878394 - MYSQLD_SAFE TEST FOR ALREADY RUNNING PROCESS
FAILS, CAUSING CLOBBERED SOCKET

A check for running mysqld instances was failing in mysqld_safe
because of an incorrect shell command generated by cmake. The
problem is that cmake retains the '\' of escaped double-quote,
so the generated mysqld_safe script's command contained \" in
the shell command, and hence the failure. 

Fixed the command in scripts\CMakeLists.txt.


scripts/CMakeLists.txt:
  BUG#1878394 - MYSQLD_SAFE TEST FOR ALREADY RUNNING PROCESS
                FAILS, CAUSING CLOBBERED SOCKET
  
  Removed the escaped quotes and grep for 'grep process' from
  the shell commands.
2011-09-02 16:52:04 +05:30
Vladislav Vaintroub
f0c2b9c5c6 add missing COMPONENT to all CMake INSTALL commands 2010-11-13 23:16:52 +01:00
Vladislav Vaintroub
a1fe23668f Fix compile error on Windows after WL#1054 push.
The error was introduced by typo in variable name (errormsg instead of correct
errmsg)

- Also, precache  HAVE_PEERCRED to OFF in cmake\os\WindowsCache.cmake
(to avoid useless system check).
- Also, add missing check for errors from FormatMessage().

- Also, remove annoying CMake debug printout of MALLOC_LIB if this is not set.
2010-10-04 21:25:53 +02:00
Joerg Bruehe
bf18e8529a Fix bug#56267:
tcmalloc lib (libtcmalloc_minimal.so) is missing from mysql 5.5 binary

Ensure that a "-DMALLOC_LIB=/foo/bar/libtcmalloc_minimal.so"
will ensure that this library gets included in the tar.gz
binary package.

It depends on the build environment to set this variable
to the correct path name, if it is available.
2010-10-03 18:24:45 +02:00
Joerg Bruehe
9defb07e7d Fix bug#56574:
After installation from RPM, server is run under root, not mysql user

The problem was that in the cmake way of building
the variable "MYSQLD_USER" was not set and propagated.
In the script "mysqld_safe" its value is used as the
name of the user who should run the server process.

The fix is to explicitly set this variable to "mysql"
and propagate it in the build process.
It was analyzed and proposed by Jonathan Perkin.
2010-09-07 17:05:16 +02:00
Alexey Botchkov
e4246244a0 Bug#54129 Missing the execute bit for scripts
files for cmake had some minor bugs causing this.
      
per-file comments:
  mysql-test/CMakeLists.txt
Bug#54129      Missing the execute bit for scripts
    use same permissions as in the source folder

  mysql-test/t/disabled.def
Bug#54129      Missing the execute bit for scripts
      mysqlhotcopy tests enabled

  scripts/CMakeLists.txt
Bug#54129      Missing the execute bit for scripts
    chmod +x for the script files
2010-08-19 17:11:31 +05:00
Alexander Nozdrin
8b645bed97 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Jonathan Perkin
69091c4949 Merge to mysql-5.5-bugfixing 2010-08-10 15:06:04 +01:00
Jonathan Perkin
2355224c8b Don't try to remove from an empty list. 2010-08-09 15:41:15 +01:00
Jonathan Perkin
d8d55a57d5 Apply wlad's fix for bug#55215 2010-08-09 14:27:04 +01:00
Vladislav Vaintroub
b94d86215d Build cleanups
- Simplify sql-bench installation, 
do not try to resolve names : this leads to probem
if builddir is symlink located on different filesystem.
(reported by alik)

- Make WITHOUT_XXX (disabling plugin) work for DEFAULT
plugins. Prior to the patch is behaved just like 
MANDATORY.

- LINK_LIBRARIES in MYSQL_ADD_PLUGIN had no effect for
statically linked plugins.

- Fix constant rebuild of initdb target on Windows.
2010-08-05 18:38:24 +02:00
Alexander Nozdrin
b5eac2b2ce Manual merge from mysql-trunk.
Conflicts:
  - scripts/CMakeLists.txt
2010-07-19 18:00:29 +04:00
Davi Arnaut
efc96e571c Strip maintainer mode options from the flags written to
mysql_config. Those are mainly warning options intended
to monitor the server code and shouldn't be leaked to
client code.
2010-07-15 17:16:24 -03:00
Jonathan Perkin
2c4588acc6 Include CMAKE_{C,CXX}_FLAGS. 2010-07-05 19:32:46 +01:00
Jonathan Perkin
271fcfaf11 No need to save/restore C*FLAGS, they are only used for one script.
Use CMAKE_*_FLAGS_RELWITHDEBINFO for C*FLAGS expansion, they are
the most likely to contain the flags we need.
2010-07-05 15:44:40 +01:00
Jonathan Perkin
596440455f bug#54991: mysqld_safe reports syntax error and skips part of logic
while restarting server

TARGET_LINUX must be 'true' or 'false'.
2010-07-05 12:53:03 +01:00
Davi Arnaut
54a5c00de9 Unset the execute bit where it's not needed. 2010-07-03 20:17:03 -03:00
Jonathan Perkin
b72c99a157 Put mysqlbug back into bin/ 2010-06-30 18:47:42 +01:00
Jonathan Perkin
c49335e8a7 Copy-pasted the wrong line from configure.in, fix gcc detection. 2010-06-29 19:21:59 +01:00
Jonathan Perkin
c72dec2184 mysqlbug is Unix-only. 2010-06-28 18:30:53 +01:00
Jonathan Perkin
829cd2446d Try to fix more mysqlbug problems. 2010-06-28 17:44:12 +01:00
Jonathan Perkin
1758bf199d Expand some variables for mysqlbug. 2010-06-28 14:59:15 +01:00
Daniel Fischer
073943cd7d merge 2010-06-18 17:04:15 +02:00
Daniel Fischer
d6fe8c47b8 post-merge fix 1 2010-05-28 16:50:23 +02:00
Jonathan Perkin
ce2aabb712 Changes to build using CMake according to existing release packages:
- Update/fix file layouts for each package type, add new types for
   native package formats including deb, rpm and svr4.

 - Build all plugins, including debug versions

 - Update compiler flags to match current release

 - Add missing @VAR@ expansions

 - Install correct mysqclient library symlinks

 - Fix icc/ia64 builds

 - Fix install of libmysqld-debug

 - Don't include mysql_embedded

 - Remove unpackaged manual pages to avoid missing files warnings

 - Don't install mtr's test suite
2010-05-12 12:51:23 +01:00
Daniel Fischer
463a60ece6 merge 2010-04-30 13:36:57 +02:00
Kent Boortz
242600b7a7 On Mac OS X, add the "-arch" option to the 'mysql_config' output 2010-04-27 22:21:48 +02:00
Daniel Fischer
b83e1c8686 Merge 2010-04-21 14:58:09 +02:00
Joerg Bruehe
4b68b2d289 Merge the changes of the 5.5.3-m3 release build
back into the development branches.
2010-04-18 15:32:05 +02:00
Jonathan Perkin
c7ed531ce6 Expand @HOSTNAME@. 2010-04-01 20:47:19 +02:00
Jonathan Perkin
910e84216d Try a bunch of fixes. 2010-03-31 23:52:49 +02:00
Joerg Bruehe
d883671193 Some fixes for the build on Windows
as found necessary during the release build of 5.5.3-m3.

scripts/CMakeLists.txt:
  The scripts "mysqldumpslow" and "mysqlhotcopy" need to be handled.
scripts/make_win_bin_dist:
  1) We do not create ".map" files any more.
  
  2) Typing error fixed, it isn't "$DISTDIR" but "$DESTDIR".
  
  3) Security fix:
     If the argument isn't of the form "dst=src",
     then we want the variables to be empty.
  The original code would have used an argument "foo"
  to set both "$src" and "$dst" to this string,
  which doesn't make much sense.
2010-03-22 16:02:31 +01:00
Vladislav Vaintroub
b1073a2213 Fix errors when building release
- package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow)
- do not try to pack .map files (no more produced)
- (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute
MY_MUTEX_INIT_FAST
2010-03-19 18:33:48 +01:00
Vladislav Vaintroub
c8141ce4c0 Bug#51949 - make_binary_distribution fails on Mac.
Unquoted ${CMAKE_CPACK_COMMAND} is used in this script.
This variable resolves to cpack's real path with spaces, e.g
 /Applications/CMake 2.6.4-app/Contents/bin/cpack. 
Script fails due to lack of quotes.

Fix is to use quotes around ${CMAKE_CPACK_COMMAND}.
2010-03-11 15:41:45 +01:00
Vladislav Vaintroub
cd03a4625f Bug #51488 :missing features and change behavior in cmake runs compared to
autotools runs
- Fix recognition of --with-debug=full in configure wrapper
- Remove CMakeCache.txt in configure wrapper, to match the original
- Fix recognition of max-no-ndb
- Fix broken dependencies of mysql_fix_privilege_table.sql from 
  mysql_system_tables.sql and mysql_system_tables_fix.sql
- Add "distclean target" that informs user about appropriate bzr command



cmake/configure.pl:
  - Recognize --with-debug=full, map to WITH_DEBUG_FULL
  - remove CMakeCache.txt, so the configuration is no more sticky
  (to match the original configure behavior)
cmake/plugin.cmake:
  - Recognize WITH_MAX_NO_NDB, this fixes missing storage engines after BUILD/*max-no-ndb scripts
mysql-test/CMakeLists.txt:
  test-force uses the same macros (MTR_FORCE) as test-bt* now
scripts/CMakeLists.txt:
  - Fix broken dependency when producing mysql_fix_privilege_tables.sql, reported by Davi.
  We now concatenate 2 scripts in custom command that
  has dependency on both scripts rather than concatenating them at cmake time.
sql/CMakeLists.txt:
  Address frequently asked question "where is distclean" by implementing distclean target 
  that does nothing except pointing to appropriate 
  bzr command.
  
  It is better not to call "bzr clean-tree" automatically, without user consent.
  It could clean new files that were meant to be added.
2010-03-03 12:29:34 +01:00
Vladislav Vaintroub
3fcd854852 Bug#51502: building with cmake creates an invalid mysqld_safe.
The problem was incorrect escaping used inside a strnig : in \"$MYSQLD\" was written as "\MYSQL\" 
(backslash and quote characters transposed), when defining FIND_PROC  variable for BSD or SysV
style "ps" command-

Additionally fixed obvious code duplication and random naming in CHECK_PID test.
2010-02-25 21:40:15 +01:00
Vladislav Vaintroub
b87ed568b4 merge, CMake bugfixes, remove sp-error from experimental 2010-02-23 13:50:45 +01:00
Vladislav Vaintroub
ea839618c4 Fix some glitches with INSTALL_LAYOUT=STANDALONE
- mysql_install_db is in scripts dir now
- sql-bench is installed
-some extra support-files (e.g ini) are in support-files
2010-02-19 18:30:08 +01:00
Vladislav Vaintroub
f68e8aa860 Fix a couple fo things replated to MSI 2010-02-16 16:06:57 +01:00
Vladislav Vaintroub
3bd236fefb Add components to INSTALL, some eraly Wix support 2010-02-10 20:23:24 +01:00
Vladislav Vaintroub
a52ea360b3 - Optionally, copy mysqld renamed to mysqld-debug from debug build directory into resulting package
- Fix  to mysql_install_db.pl to the correct place on Windows ( under scripts directory)
2010-02-04 02:17:18 +01:00
Vladislav Vaintroub
c514d75ebb Handle different installation layouts.
using  cmake option INSTALL_LAYOUT=STANDALONE would produce the layout as in 
tar.gz or zip packages.
INSTALL_LAYOUT=UNIX will produce unixish install layout  (with mysqld being in sbin subdirectory , libs in lib/mysql etc). This layout is used for RPM packages.

Subtle differences in both packages unfortunately lead to the need to recompile MySQL to use with other package type - as otherwise for example default plugins or data directories would be wrong set.

There are numerous other variables that  allow fine-tuning packaging layout. (INSTALL_BINDIR, INSTALL_LIBDIR , INSTALL_PLUGINDIR etc).

This options are different from autotools as they do not expect full paths to directories, but only subdirectory of CMAKE_INSTALL_PREFIX.

There are 2 special options that expect full directory paths
- MYSQL_DATADIR that defines default MYSQL data directory (autotools equivalent
is --localstatedir)
- SYSCONFDIR  can be added to search my.cnf search path (autotools equivalent is --sysconfdir)
2010-01-24 16:23:16 +01:00
Vladislav Vaintroub
a87f4e1bbb Fix some problems found by kent.
-lm is sometimes not linked, which causes errors about undefined rint()
- FreeBSD embedded library does not link with the flags returned by mysql_config
 (added -lcrypt to LIBS, whereby causing overlinking in case of normal non-embedded client)
2010-01-18 21:19:24 +01:00
Vladislav Vaintroub
76630626a2 port some mysql_binary_distribution hacks to cmake 2010-01-15 01:21:43 +01:00
Vladislav Vaintroub
905f48b6f3 fix syntax error in INSTALL cmake command 2010-01-14 15:02:27 +01:00
Vladislav Vaintroub
4d49915cf2 Remove support for "make install" DESTDIR - did not work as expected 2010-01-14 14:54:32 +01:00
Vladislav Vaintroub
50d56f0906 Delay configuring scripts like mysql_install_db until CPack runs
(to handle DESTDIR correctly)
2009-11-26 18:40:45 +01:00
Vladislav Vaintroub
a15d4127fd Fixes for cmake2.8 2009-11-16 14:45:06 +01:00