Modified version for RPM packaging
This commit is contained in:
parent
9f3c9bdb78
commit
b8c5adb4cc
3 changed files with 9 additions and 4 deletions
|
@ -8,11 +8,11 @@ sh ./clean.sh
|
|||
|
||||
perl -pe "s/%VERSION%/$VERSION/g" mysqltuner.spec.tpl > mysqltuner.spec
|
||||
mkdir -p $BUILD_DIR/mysqltuner-$VERSION
|
||||
cp $BUILD_DIR/../mysqltuner.pl mysqltuner.spec $BUILD_DIR/../LICENSE $BUILD_DIR/../basic_passwords.txt $BUILD_DIR/mysqltuner-$VERSION
|
||||
cp $BUILD_DIR/../mysqltuner.pl mysqltuner.spec $BUILD_DIR/../LICENSE $BUILD_DIR/../basic_passwords.txt $BUILD_DIR/../*.csv $BUILD_DIR/mysqltuner-$VERSION
|
||||
pod2man $BUILD_DIR/../mysqltuner.pl | gzip > $BUILD_DIR/mysqltuner-$VERSION/mysqltuner.1.gz
|
||||
|
||||
tar czf $BUILD_DIR/mysqltuner-${VERSION}.tgz mysqltuner-$VERSION
|
||||
rpmbuild -ta mysqltuner-${VERSION}.tgz 2>&1 | tee -a ./build.log
|
||||
set -x
|
||||
grep --color=never -E '^Wrote:' $BUILD_DIR/build.log | cut -d: -f2 | xargs -I{} mv {} .
|
||||
grep --color=never -E '(Wrote|crit)\S*:' $BUILD_DIR/build.log | cut -d: -f2 | xargs -I{} mv {} .
|
||||
#rm -rf mysqltuner-$VERSION ./build.log
|
||||
|
|
|
@ -46,6 +46,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 05 2015 Jean-Marie RENOUARD <jmrenouard@gmail.com> %VERSION%-1
|
||||
* Thu Jan 5 2015 Jean-Marie RENOUARD <jmrenouard@gmail.com> %VERSION%-1
|
||||
- Initial RPM release
|
||||
|
||||
|
|
|
@ -152,6 +152,11 @@ my $basic_password_files =
|
|||
$basic_password_files = "/usr/share/mysqltuner/basic_passwords.txt"
|
||||
unless -f "$basic_password_files";
|
||||
|
||||
# for RPM distributions
|
||||
$opt{cvefile} = "/usr/share/mysqltuner/vulnerabilities.csv"
|
||||
unless ( defined $opt{cvefile} and -f "$opt{cvefile}");
|
||||
$opt{cvefile} ='' unless -f "$opt{cvefile}";
|
||||
|
||||
#
|
||||
my $outputfile = undef;
|
||||
$outputfile = abs_path( $opt{outputfile} ) unless $opt{outputfile} eq "0";
|
||||
|
@ -769,7 +774,7 @@ sub cve_recommendations {
|
|||
prettyprint
|
||||
"\n-------- CVE Security Recommendations -------------------------------------------";
|
||||
unless ( defined($opt{cvefile}) && -f "$opt{cvefile}" ) {
|
||||
infoprint "Skipped due to --cvefile option";
|
||||
infoprint "Skipped due to --cvefile option undefined";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue