Commit graph

913 commits

Author SHA1 Message Date
Colleen Murphy
83e87f5198 Add IntelliJ files to the ignore list 2014-12-29 10:41:12 -08:00
Igor Galić
d3f7254ecc Merge pull request #616 from takumin/install_db_with_freebsd
mysql_install_db freebsd support
2014-12-23 18:03:25 +01:00
Igor Galić
5f62e6d455 Merge pull request #615 from KlavsKlavsen/master
ensure mysql-config-file and server package is in place before trying to...
2014-12-22 10:32:35 +01:00
Igor Galić
457194ce21 Merge pull request #629 from pishro-oss/master
under Debian 8 package name for ruby mysql biding is called ruby-mysql, ...
2014-12-19 20:37:04 +01:00
Armin ranjbar
263a9fa210 useless whitespace removed 2014-12-19 18:54:51 +03:30
Armin ranjbar
9f9061ea8f under Debian 8 package name for ruby mysql biding is called ruby-mysql, just like trusty. 2014-12-19 17:03:46 +03:30
Hunter Haugen
ea7d66a7e4 Merge pull request #628 from mhaskel/merge_3.1.x_into_master
Merge 3.1.x into master
2014-12-16 17:12:00 -08:00
Colleen Murphy
09325e6451 Merge pull request #627 from mhaskel/metadata_fix
Forgot to add SLES12 to metadata. yay.
2014-12-16 16:47:55 -08:00
Morgan Haskel
b12890da3c Forgot to add SLES12 to metadata. yay. 2014-12-16 16:46:47 -08:00
Hunter Haugen
bb12e9db7a Merge pull request #626 from mhaskel/3.1.0-prep
3.1.0 prep
2014-12-16 11:57:38 -08:00
Morgan Haskel
c7f179d977 3.1.0 prep 2014-12-16 11:53:34 -08:00
Travis Fields
120e6b1dc8 Merge pull request #625 from mhaskel/lint_cleanup
Clean up lint warnings
2014-12-16 11:29:40 -08:00
Morgan Haskel
a367b3e1e4 Clean up lint warnings 2014-12-16 11:19:04 -08:00
Travis Fields
407e869b0f Merge pull request #624 from mhaskel/FM-2112
Remove mysqltuner, fetch with staging instead
2014-12-16 11:17:04 -08:00
Morgan Haskel
3c872abcd2 Remove mysqltuner, fetch with staging instead
mysqltuner is licensed under GPL so we don't want to package it with the
module.
2014-12-16 10:52:39 -08:00
Hunter Haugen
468986d85f Merge pull request #623 from mhaskel/FM-2111
Fix issues introduced in puppetlabs/puppetlabs-mysql#612
2014-12-15 09:23:19 -08:00
Morgan Haskel
a611686530 Fix issues introduced in puppetlabs/puppetlabs-mysql#612
The regex updates caused failures in some places where it previously
(correctly) worked.
2014-12-12 17:36:46 -08:00
Hunter Haugen
2f9820ced8 Merge pull request #622 from mhaskel/puppet_not_shell
Use puppet() instead of shell() to install module dependencies
2014-12-12 13:28:02 -08:00
Morgan Haskel
93615453b5 Use puppet() instead of shell() to install module dependencies 2014-12-12 12:55:31 -08:00
Igor Galić
aeb5ae52b4 Merge pull request #612 from lavoiesl/identifier-quoting
Reworked all identifier quoting detections
2014-12-10 12:02:34 +01:00
Morgan Haskel
8e24162afa Merge pull request #619 from cmurphy/master
Update .travis.yml, Gemfile, Rakefile, and CONTRIBUTING.md
2014-12-09 08:22:24 -08:00
Colleen Murphy
e8708f25d8 Add json gem
The puppet_facts gem implicitly depends on the json gem.
On Ruby 1.8.7, json is not built in. On Puppet 2.7, it is
not explicitly pulled in by the hiera gem. So we add it
here explicitly.
2014-12-08 22:52:30 -08:00
Colleen Murphy
638b9c5704 Update .travis.yml, Gemfile, Rakefile, and CONTRIBUTING.md 2014-12-08 10:23:34 -08:00
Morgan Haskel
619fa7c07a Merge pull request #618 from cmurphy/sync
Remove mime-types from .sync.yml
2014-12-08 10:20:59 -08:00
Colleen Murphy
94448f370a Remove mime-types from .sync.yml
Gemfile no longer needs mime-types so it does not need to be
modulesynced separately.
2014-12-07 16:44:23 -08:00
takumi
7d3962fc28 mysql_install_db freebsd support 2014-12-05 18:45:38 +09:00
Klavs Klavsen
a8fd4d375b ensure mysql-config-file and server package is in place before trying to start service - to ensure it gets started with correct settings and does not try to enable service before it actually exists :) 2014-12-04 16:14:09 +01:00
Morgan Haskel
67bf7a344c Merge pull request #613 from justinstoller/maint/master/update-for-geppetto
Update for using Geppetto plugin in CI
2014-12-02 15:02:00 -05:00
Justin Stoller
f0f5f64723 Update for using Geppetto plugin in CI 2014-12-02 11:37:42 -08:00
Sébastien Lavoie
60838a5837 Reworked all identifier quoting detections
Otherwise, trying to manage `debian-sys-maint` will fail miserably, quoted or not.

Fixes #609
2014-11-27 12:47:09 -05:00
Morgan Haskel
f235f34cab Merge pull request #611 from cmurphy/sles12
Fix operating system release fact for SLES
2014-11-26 18:27:14 -05:00
Colleen Murphy
e23da83230 Fix operating system release fact for SLES
PE on SLES 11 does not support the operatingsystemmajrelease fact.
2014-11-26 15:25:37 -08:00
Travis Fields
137d0dba0e Merge pull request #610 from cmurphy/sles12
Fix support for SLES 12
2014-11-26 16:08:08 -05:00
Colleen Murphy
25b65342b3 Add support for SLES 12
SLES 12 has different package names for the server and client. It also
doesn't seem to want to start if basedir is defined.
2014-11-26 12:57:44 -08:00
Colleen Murphy
e0e797e480 Revert "Default to MariaDB for SLES 12"
SLES belongs in the Suse family, not the RedHat family.

This reverts commit 8cc0083d6e.
2014-11-26 12:11:46 -08:00
Travis Fields
510dfda002 Merge pull request #607 from laurenrother/summary
Add metadata summary per FM-1523
2014-11-21 16:05:19 -05:00
Hunter Haugen
5a0ad6d0df Merge pull request #608 from cyberious/SLES12
Default to MariaDB for SLES 12
2014-11-21 12:53:13 -08:00
Travis Fields
8cc0083d6e Default to MariaDB for SLES 12 2014-11-21 15:07:50 -05:00
Igor Galić
790305b2c4 Merge pull request #606 from michaeltchapman/usernameregex
Support size 15 and 16 quoted usernames
2014-11-21 09:54:59 +01:00
Lauren Rother
cfec01f3a3 Add metadata summary per FM-1523 2014-11-20 15:37:52 -08:00
Michael Chapman
fe0365e80d Support size 15 and 16 quoted usernames
As usernames containing special characters must be quoted, they
may have two extra characters that are not counted against the
size limit of 16 characters. This patch adds a regex to handle
this case.
2014-11-20 17:23:11 +11:00
Colleen Murphy
31191b64b7 Merge pull request #604 from mhaskel/rebase_581
Fixed test classes
2014-11-19 10:24:25 -08:00
Hunter Haugen
b7feb9503f Merge pull request #605 from slamont/master
Proper containment for mysql::client in mysql::db
2014-11-18 14:54:50 -08:00
Sylvain Lamontagne
3b5d5af855 Proper containment for mysql::client in mysql::db 2014-11-18 17:33:18 -05:00
Andrea Biancini
473a3c3307 Fixed test classes
Oracle 7 uses mariadb

Update PE and OS compatibility info in metadata

Now compatible with PE 3.4 and SLES 10.

Clean up metadata for new SLES support

Add timeout parameter to increase for long time running sql imports

Signed-off-by: refnode <refnode@gmail.com>

Add documentation for new mysql::db "import_timeout" parameter

Signed-off-by: refnode <refnode@gmail.com>

Add support for Gentoo

The old regex requires something after the 'host' part. Fix this.

Old regex is : /^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/ . The
last part (\s.*)$ means "a space followed by anything". The issue is
that when user has no GRANT privileges, the "SHOW GRANTS FOR #{user_string}" returns
"GRANT SELECT ON `database`.* TO 'user'@'%'" which does not match (\s.*)$ .
This small patch fixes this making last bloc optional (thanks to '?').

Add explicit dependencies for types

mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.

I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.

I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.

(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template

Improve checks for MySQL user's name.

As per http://dev.mysql.com/doc/refman/5.5/en/identifiers.html , MySQL
allows for more than '\w-'. This commit improves the check to ensure
that:
 - if username only contains [0-9a-zA-Z$_], it might be quoted. It is
   not a requirement though
 - if username contains anything else, it MUST be quoted

I kept 2 checks, but the 2nd one can probably be removed (I can't find a
username which match the 2nd one but not the first.)

Fix escaped backslashes in grants

* Mysql uses the underscore character to represent a single character
  wildcard.
* A grant on table `the_database`.* would match `theAdatabase`.*, so
  underscores must be escaped to avoid this match.
* The output from mysql escapes special characters (\n, \t, \0, and \\),
  but the input does not need to be escaped.
* In order for the provider to compare the tables, the output of
  mysql -NBe <query> must have \\ substituted with \.

Fixed backup test

Oracle 7 uses mariadb

Update PE and OS compatibility info in metadata

Now compatible with PE 3.4 and SLES 10.

Add timeout parameter to increase for long time running sql imports

Signed-off-by: refnode <refnode@gmail.com>

Add documentation for new mysql::db "import_timeout" parameter

Signed-off-by: refnode <refnode@gmail.com>

Add support for Gentoo

The old regex requires something after the 'host' part. Fix this.

Old regex is : /^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/ . The
last part (\s.*)$ means "a space followed by anything". The issue is
that when user has no GRANT privileges, the "SHOW GRANTS FOR #{user_string}" returns
"GRANT SELECT ON `database`.* TO 'user'@'%'" which does not match (\s.*)$ .
This small patch fixes this making last bloc optional (thanks to '?').

Add explicit dependencies for types

mysql_grant has an autorequire()'d dependency on the .my.cnf file used
by the provider to talk to the database.

I've added this to mysql_database and mysql_user too since logically
these also need the file to be in place.

I've hit this bug because of a slightly unusual edge case in our own
manifests, but I think this fix belongs upstream regardless.

(maint) add statement "MANAGED BY PUPPET" to my.cnf config file template and remove unused my.conf.cnf.erb template

Improve checks for MySQL user's name.

As per http://dev.mysql.com/doc/refman/5.5/en/identifiers.html , MySQL
allows for more than '\w-'. This commit improves the check to ensure
that:
 - if username only contains [0-9a-zA-Z$_], it might be quoted. It is
   not a requirement though
 - if username contains anything else, it MUST be quoted

I kept 2 checks, but the 2nd one can probably be removed (I can't find a
username which match the 2nd one but not the first.)

Fix escaped backslashes in grants

* Mysql uses the underscore character to represent a single character
  wildcard.
* A grant on table `the_database`.* would match `theAdatabase`.*, so
  underscores must be escaped to avoid this match.
* The output from mysql escapes special characters (\n, \t, \0, and \\),
  but the input does not need to be escaped.
* In order for the provider to compare the tables, the output of
  mysql -NBe <query> must have \\ substituted with \.
2014-11-18 16:27:57 -05:00
Hunter Haugen
18265e0d4c Merge pull request #603 from mhaskel/mysql_test_fixes
Fix test issues
2014-11-14 13:59:42 -08:00
Morgan Haskel
11fb01c736 Fix test issues
Remove the dependency on stdlib 4.x puppetlabs/puppetlabs-mysql#574
introduced, add some input validation, and improve test checks.
2014-11-14 13:16:01 -08:00
Igor Galić
ab84a671f9 Merge pull request #574 from Mylezeem/allow_multiple_import_at_a_time
(MODULES-1338) Allow mysql::db to import several files
2014-11-14 17:15:13 +01:00
Igor Galić
22b07aef6f Merge pull request #602 from theasci/fix-user-validation-regression
Fix regression in username validation
2014-11-14 17:13:46 +01:00
Mason Malone
4f0d4311d9 Fix regression in username validation
Commit cdd7132ff9 added logic to catch invalid database usernames,
but the regex it uses fails to match usernames with special characters that are properly quoted,
causing errors with usernames that used to work in versions < 3.0.0. This fixes the regex so that
if the username is quoted, anything is allowed between the quotes.

From the docs (http://dev.mysql.com/doc/refman/5.5/en/identifiers.html):
"Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP),
except U+0000"
2014-11-13 18:18:02 -05:00