Skip to content

Commit 1c68fe1

Browse files
author
Jean-Marie Renouard
committed
#574 script modified with CR end of line
1 parent cb74b19 commit 1c68fe1

17 files changed

+567
-567
lines changed

.perltidy

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
--backup-and-modify-in-place
2-
--backup-file-extension=beforeTidy
3-
--block-brace-tightness=2
4-
--brace-tightness=2
5-
--closing-token-indentation=1
6-
--continuation-indentation=4
7-
--indent-columns=4
8-
--maximum-line-length=134
9-
--cuddled-else
10-
--opening-sub-brace-on-new-line
11-
--noopening-brace-on-new-line
12-
--nooutdent-labels
13-
--paren-tightness=2
14-
--square-bracket-tightness=2
15-
--vertical-tightness=0
16-
--vertical-tightness-closing=0
17-
--break-at-old-comma-breakpoints
18-
--entab-leading-whitespace=4
19-
--tabs
1+
--backup-and-modify-in-place
2+
--backup-file-extension=beforeTidy
3+
--block-brace-tightness=2
4+
--brace-tightness=2
5+
--closing-token-indentation=1
6+
--continuation-indentation=4
7+
--indent-columns=4
8+
--maximum-line-length=134
9+
--cuddled-else
10+
--opening-sub-brace-on-new-line
11+
--noopening-brace-on-new-line
12+
--nooutdent-labels
13+
--paren-tightness=2
14+
--square-bracket-tightness=2
15+
--vertical-tightness=0
16+
--vertical-tightness-closing=0
17+
--break-at-old-comma-breakpoints
18+
--entab-leading-whitespace=4
19+
--tabs

.travis.yml

+54-54
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
language: perl
2-
perl:
3-
- "5.24"
4-
5-
os: linux
6-
dist: focal
7-
8-
services:
9-
- docker
10-
11-
env:
12-
- DB=mariadb:5.5
13-
- DB=mariadb:10.2
14-
- DB=mariadb:10.3
15-
- DB=mariadb:10.4
16-
- DB=mariadb:10.5
17-
- DB=mysql:5.5
18-
- DB=mysql:5.7
19-
- DB=mysql:8.0
20-
- DB=percona:5.6
21-
- DB=percona:5.7
22-
- DB=percona:8.0
23-
24-
install:
25-
- cpanm --quiet --notest Data::Dumper
26-
- cpanm --quiet --notest JSON
27-
- cpanm --quiet --notest Perl::Critic
28-
- cpanm --quiet --notest Text::Template
29-
30-
before_script:
31-
- mysql --version
32-
- mysqladmin --version
33-
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
34-
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
35-
- chmod 600 ~/.my.cnf
36-
- git clone https://github.com/datacharmer/test_db.git
37-
- cd test_db
38-
- count=10
39-
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
40-
- if [[ $DB =~ .*:8.0 ]] ; then
41-
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
42-
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
43-
done ;
44-
fi
45-
- "cat employees.sql | grep -v 'storage_engine' | mysql"
46-
- cd ..
47-
48-
script:
49-
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
50-
51-
after_script:
52-
- docker stop mysqltestinstance
53-
- echo "Standard Output: $(cat stdout.txt)"
54-
- echo "Standard Error : $(cat stderr.txt)"
1+
language: perl
2+
perl:
3+
- "5.24"
4+
5+
os: linux
6+
dist: focal
7+
8+
services:
9+
- docker
10+
11+
env:
12+
- DB=mariadb:5.5
13+
- DB=mariadb:10.2
14+
- DB=mariadb:10.3
15+
- DB=mariadb:10.4
16+
- DB=mariadb:10.5
17+
- DB=mysql:5.5
18+
- DB=mysql:5.7
19+
- DB=mysql:8.0
20+
- DB=percona:5.6
21+
- DB=percona:5.7
22+
- DB=percona:8.0
23+
24+
install:
25+
- cpanm --quiet --notest Data::Dumper
26+
- cpanm --quiet --notest JSON
27+
- cpanm --quiet --notest Perl::Critic
28+
- cpanm --quiet --notest Text::Template
29+
30+
before_script:
31+
- mysql --version
32+
- mysqladmin --version
33+
- docker run -it --name=mysqltestinstance -d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 ${DB}
34+
- echo -e "[client]\nuser=root\npassword=\"\"\nhost=127.0.0.1" > ~/.my.cnf
35+
- chmod 600 ~/.my.cnf
36+
- git clone https://github.com/datacharmer/test_db.git
37+
- cd test_db
38+
- count=10
39+
- while ! mysql -e 'select version()' && [ $count -gt 0 ]; do echo $count seconds to go; sleep 1; count=$(( $count - 1 )); done
40+
- if [[ $DB =~ .*:8.0 ]] ; then
41+
for file in public_key.pem ca.pem server-cert.pem client-key.pem client-cert.pem ; do
42+
docker cp mysqltestinstance:/var/lib/mysql/$file "${HOME}" ;
43+
done ;
44+
fi
45+
- "cat employees.sql | grep -v 'storage_engine' | mysql"
46+
- cd ..
47+
48+
script:
49+
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
50+
51+
after_script:
52+
- docker stop mysqltestinstance
53+
- echo "Standard Output: $(cat stdout.txt)"
54+
- echo "Standard Error : $(cat stderr.txt)"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ MySQLTuner needs you:
2727
* Please join us on issue track at [GitHub tracker](https://github.com/major/MySQLTuner-perl/issues).
2828
* Contribution guide is available following [MySQLTuner contributing guide](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
2929
* Star **MySQLTuner project** at [MySQLTuner Git Hub Project](https://github.com/major/MySQLTuner-perl)
30-
* Paid support for Releem available here: [Releem App](https://app.releem.com/)
30+
* Paid support for Releem available here: [Releem App](https://releem.com/)
3131

3232
## Stargazers over time
3333

Vagrant/Vagrantfile

+71-71
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1-
# -*- mode: ruby -*-
2-
# vi: set ft=ruby :
3-
4-
Vagrant.configure("2") do |config|
5-
config.vm.box = "generic/fedora30"
6-
config.vm.network "private_network", ip: "192.168.50.10", virtualbox__intnet: false
7-
8-
if Vagrant.has_plugin? "vagrant-vbguest"
9-
config.vbguest.no_install = true
10-
config.vbguest.auto_update = false
11-
config.vbguest.no_remote = true
12-
end
13-
config.hostmanager.enabled = true
14-
config.hostmanager.manage_host = false
15-
config.hostmanager.manage_guest = true
16-
config.hostmanager.ignore_private_ip = false
17-
config.hostmanager.include_offline = true
18-
19-
config.vm.network "public_network"
20-
config.vm.hostname = 'fedora-generic'
21-
config.hostmanager.aliases = %w(fedora-generic.localdomain fedora-generic.local fcg.local)
22-
23-
config.vm.synced_folder ".", "/data"
24-
25-
config.vm.provider "virtualbox" do |vb|
26-
vb.name="fedora-generic"
27-
vb.gui = false
28-
vb.memory = "3036"
29-
vb.cpus = 4
30-
end
31-
32-
config.vm.provision "shell", inline: <<-SHELL
33-
echo "secret" | sudo passwd --stdin root
34-
echo "secret" | sudo passwd --stdin vagrant
35-
sudo cp -pr ~vagrant/.ssh /root
36-
sudo chown -R root.root /root/.ssh
37-
38-
sudo dnf -y update
39-
sudo dnf -y install telnet vim-enhanced net-tools git python python2-pip python34-PyYAML moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 chromedriver wget
40-
sudo dnf -y install python34-pip moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 wget python-beautifulsoup4 npm rclone golang yum-utils device-mapper-persistent-data lvm2 docker
41-
42-
echo "alias h='function hdi(){ howdoi \$* -c -n 5; }; hdi'" >> /tmp/util.sh
43-
echo "alias s=sudo" >> /tmp/util.sh
44-
echo "alias h=history" >> /tmp/util.sh
45-
echo "alias hserver='python -m http.server 8000'" >> /tmp/util.sh
46-
sudo cp /tmp/util.sh /etc/profile.d
47-
cat /tmp/util.sh
48-
49-
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
50-
sudo dnf -y install dnf-plugins-core
51-
sudo dnf config-manager \
52-
--add-repo \
53-
https://download.docker.com/linux/fedora/docker-ce.repo
54-
55-
sudo dnf -y install docker-ce docker-ce-cli containerd.io
56-
dnf list docker-ce --showduplicates | sort -r
57-
58-
sudo systemctl start docker
59-
sudo systemctl enable docker
60-
sudo usermod -aG docker vagrant
61-
sudo systemctl daemon-reload
62-
63-
true
64-
65-
##########################################
66-
# Install container
67-
sudo systemctl restart docker
68-
SHELL
69-
config.vm.provision :hostmanager
70-
end
71-
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
config.vm.box = "generic/fedora30"
6+
config.vm.network "private_network", ip: "192.168.50.10", virtualbox__intnet: false
7+
8+
if Vagrant.has_plugin? "vagrant-vbguest"
9+
config.vbguest.no_install = true
10+
config.vbguest.auto_update = false
11+
config.vbguest.no_remote = true
12+
end
13+
config.hostmanager.enabled = true
14+
config.hostmanager.manage_host = false
15+
config.hostmanager.manage_guest = true
16+
config.hostmanager.ignore_private_ip = false
17+
config.hostmanager.include_offline = true
18+
19+
config.vm.network "public_network"
20+
config.vm.hostname = 'fedora-generic'
21+
config.hostmanager.aliases = %w(fedora-generic.localdomain fedora-generic.local fcg.local)
22+
23+
config.vm.synced_folder ".", "/data"
24+
25+
config.vm.provider "virtualbox" do |vb|
26+
vb.name="fedora-generic"
27+
vb.gui = false
28+
vb.memory = "3036"
29+
vb.cpus = 4
30+
end
31+
32+
config.vm.provision "shell", inline: <<-SHELL
33+
echo "secret" | sudo passwd --stdin root
34+
echo "secret" | sudo passwd --stdin vagrant
35+
sudo cp -pr ~vagrant/.ssh /root
36+
sudo chown -R root.root /root/.ssh
37+
38+
sudo dnf -y update
39+
sudo dnf -y install telnet vim-enhanced net-tools git python python2-pip python34-PyYAML moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 chromedriver wget
40+
sudo dnf -y install python34-pip moreutils net-tools python-psutil perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils vim-enhanced unzip zip jq youtube-dl ffmpeg make mariadb psmisc PyYAML tofrodos python3 wget python-beautifulsoup4 npm rclone golang yum-utils device-mapper-persistent-data lvm2 docker
41+
42+
echo "alias h='function hdi(){ howdoi \$* -c -n 5; }; hdi'" >> /tmp/util.sh
43+
echo "alias s=sudo" >> /tmp/util.sh
44+
echo "alias h=history" >> /tmp/util.sh
45+
echo "alias hserver='python -m http.server 8000'" >> /tmp/util.sh
46+
sudo cp /tmp/util.sh /etc/profile.d
47+
cat /tmp/util.sh
48+
49+
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
50+
sudo dnf -y install dnf-plugins-core
51+
sudo dnf config-manager \
52+
--add-repo \
53+
https://download.docker.com/linux/fedora/docker-ce.repo
54+
55+
sudo dnf -y install docker-ce docker-ce-cli containerd.io
56+
dnf list docker-ce --showduplicates | sort -r
57+
58+
sudo systemctl start docker
59+
sudo systemctl enable docker
60+
sudo usermod -aG docker vagrant
61+
sudo systemctl daemon-reload
62+
63+
true
64+
65+
##########################################
66+
# Install container
67+
sudo systemctl restart docker
68+
SHELL
69+
config.vm.provision :hostmanager
70+
end
71+

Vagrant/prepare.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/bin/sh
2-
VERSION=${1:-"10.4"}
3-
rm -f Vagrantfile
4-
cp Vagrantfile_for_MariaDB${VERSION} Vagrantfile
5-
mkdir data
6-
vagrant plugin install vagrant-hostmanager
7-
vagrant plugin install vagrant-vbguest
8-
vagrant plugin install vagrant-proxyconf
9-
vagrant --provision up
1+
#!/bin/sh
2+
VERSION=${1:-"10.4"}
3+
rm -f Vagrantfile
4+
cp Vagrantfile_for_MariaDB${VERSION} Vagrantfile
5+
mkdir data
6+
vagrant plugin install vagrant-hostmanager
7+
vagrant plugin install vagrant-vbguest
8+
vagrant plugin install vagrant-proxyconf
9+
vagrant --provision up

build/build_rpm.sh

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#!/bin/sh
2-
3-
BUILD_DIR=`dirname $(readlink -f $0)`
4-
5-
VERSION=$(grep -Ei 'my \$tunerversion' $BUILD_DIR/../mysqltuner.pl | grep = | cut -d\" -f2)
6-
cd $BUILD_DIR
7-
sh ./clean.sh
8-
9-
perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec
10-
mkdir -p $BUILD_DIR/mysqltuner-$VERSION
11-
cp $BUILD_DIR/../mysqltuner.pl mysqltuner.spec $BUILD_DIR/../LICENSE $BUILD_DIR/../basic_passwords.txt $BUILD_DIR/../*.csv $BUILD_DIR/mysqltuner-$VERSION
12-
pod2man $BUILD_DIR/../mysqltuner.pl | gzip > $BUILD_DIR/mysqltuner-$VERSION/mysqltuner.1.gz
13-
14-
tar czf $BUILD_DIR/mysqltuner-${VERSION}.tgz mysqltuner-$VERSION
15-
rpmbuild -ta mysqltuner-${VERSION}.tgz 2>&1 | tee -a ./build.log
16-
set -x
17-
grep --color=never -E '(Wrote|crit)\S*:' $BUILD_DIR/build.log | cut -d: -f2 | xargs -I{} mv {} .
18-
#rm -rf mysqltuner-$VERSION ./build.log
1+
#!/bin/sh
2+
3+
BUILD_DIR=`dirname $(readlink -f $0)`
4+
5+
VERSION=$(grep -Ei 'my \$tunerversion' $BUILD_DIR/../mysqltuner.pl | grep = | cut -d\" -f2)
6+
cd $BUILD_DIR
7+
sh ./clean.sh
8+
9+
perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec
10+
mkdir -p $BUILD_DIR/mysqltuner-$VERSION
11+
cp $BUILD_DIR/../mysqltuner.pl mysqltuner.spec $BUILD_DIR/../LICENSE $BUILD_DIR/../basic_passwords.txt $BUILD_DIR/../*.csv $BUILD_DIR/mysqltuner-$VERSION
12+
pod2man $BUILD_DIR/../mysqltuner.pl | gzip > $BUILD_DIR/mysqltuner-$VERSION/mysqltuner.1.gz
13+
14+
tar czf $BUILD_DIR/mysqltuner-${VERSION}.tgz mysqltuner-$VERSION
15+
rpmbuild -ta mysqltuner-${VERSION}.tgz 2>&1 | tee -a ./build.log
16+
set -x
17+
grep --color=never -E '(Wrote|crit)\S*:' $BUILD_DIR/build.log | cut -d: -f2 | xargs -I{} mv {} .
18+
#rm -rf mysqltuner-$VERSION ./build.log

build/clean.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#!/bin/sh
2-
3-
rm -rf mysqltuner-* mysqltuner.spec *.log
1+
#!/bin/sh
2+
3+
rm -rf mysqltuner-* mysqltuner.spec *.log

build/clearContainer.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#!/bin/sh
2-
3-
docker ps | awk '{ print $NF}' |grep -v NAMES | xargs -n 1 docker kill
4-
docker ps -a | awk '{ print $NF}' |grep -v NAMES | xargs -n 1 docker rm
5-
docker ps -a
1+
#!/bin/sh
2+
3+
docker ps | awk '{ print $NF}' |grep -v NAMES | xargs -n 1 docker kill
4+
docker ps -a | awk '{ print $NF}' |grep -v NAMES | xargs -n 1 docker rm
5+
docker ps -a

0 commit comments

Comments
 (0)