From 5d4cfb30e517e861defd9728e88f37ef6072becb Mon Sep 17 00:00:00 2001 From: Terje Rosten Date: Tue, 28 Mar 2017 13:22:32 +0200 Subject: [PATCH] BUG#25719975 SHEBANG HARD CODED AS /USR/BIN/PERL IN SCRIPTS, BREAKS ON FREEBSD Use cmake variable to adjust shebang to platform. --- scripts/CMakeLists.txt | 9 ++++++++- scripts/dheadgen.pl | 8 +------- scripts/mysql_config.pl.in | 4 ++-- scripts/mysql_convert_table_format.sh | 5 ++--- scripts/mysql_find_rows.sh | 5 ++--- scripts/mysql_fix_extensions.sh | 5 ++--- scripts/mysql_install_db.pl.in | 4 ++-- scripts/mysql_secure_installation.pl.in | 4 ++-- scripts/mysql_setpermission.sh | 5 ++--- scripts/mysql_zap.sh | 5 ++--- scripts/mysqlaccess.conf | 0 scripts/mysqlaccess.sh | 4 ++-- scripts/mysqld_multi.sh | 4 ++-- scripts/mysqldumpslow.sh | 5 ++--- scripts/mysqlhotcopy.sh | 4 ++-- 15 files changed, 33 insertions(+), 38 deletions(-) mode change 100755 => 100644 scripts/dheadgen.pl mode change 100755 => 100644 scripts/mysql_secure_installation.pl.in mode change 100755 => 100644 scripts/mysqlaccess.conf diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 920b6854334..d0fdf76ce9e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -104,6 +104,13 @@ ELSE() "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") ENDIF() + +IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + SET (PERL_PATH "/usr/local/bin/perl") +ELSE() + SET (PERL_PATH "/usr/bin/perl") +ENDIF() + IF(UNIX) # SHELL_PATH, FIND_PROC, CHECK_PID are used by mysqld_safe IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") diff --git a/scripts/dheadgen.pl b/scripts/dheadgen.pl old mode 100755 new mode 100644 index c42bd49b32e..69ece2e7c81 --- a/scripts/dheadgen.pl +++ b/scripts/dheadgen.pl @@ -1,10 +1,4 @@ -#!/usr/bin/perl -w - -# -# Copyright (c) 2008, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. -# - +# Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in index bced4a16360..edd258d5771 100644 --- a/scripts/mysql_config.pl.in +++ b/scripts/mysql_config.pl.in @@ -1,7 +1,7 @@ -#!/usr/bin/perl +#!@PERL_PATH@ # -*- cperl -*- # -# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh index 2e5b5c11ab5..869a25c152b 100644 --- a/scripts/mysql_convert_table_format.sh +++ b/scripts/mysql_convert_table_format.sh @@ -1,6 +1,5 @@ -#!/usr/bin/perl -# Copyright (c) 2000-2002, 2006, 2007 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +#!@PERL_PATH@ +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_find_rows.sh b/scripts/mysql_find_rows.sh index 48c4915ae00..20c3e2c3106 100644 --- a/scripts/mysql_find_rows.sh +++ b/scripts/mysql_find_rows.sh @@ -1,6 +1,5 @@ -#!/usr/bin/perl -# Copyright (c) 2000, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +#!@PERL_PATH@ +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_fix_extensions.sh b/scripts/mysql_fix_extensions.sh index 2a50bfe22bb..7aa07209d4d 100644 --- a/scripts/mysql_fix_extensions.sh +++ b/scripts/mysql_fix_extensions.sh @@ -1,7 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2001 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index 5f6bcabd518..760c7df887e 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -1,7 +1,7 @@ -#!/usr/bin/perl +#!@PERL_PATH@ # -*- cperl -*- # -# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in old mode 100755 new mode 100644 index 278fffe7322..09f2e20b6a3 --- a/scripts/mysql_secure_installation.pl.in +++ b/scripts/mysql_secure_installation.pl.in @@ -1,7 +1,7 @@ -#!/usr/bin/perl +#!@PERL_PATH@ # -*- cperl -*- # -# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysql_setpermission.sh b/scripts/mysql_setpermission.sh index 48f0b09b566..4416551eadd 100644 --- a/scripts/mysql_setpermission.sh +++ b/scripts/mysql_setpermission.sh @@ -1,8 +1,7 @@ -#!/usr/bin/perl +#!@PERL_PATH@ ## Emacs, this is -*- perl -*- mode? :-) -# Copyright (c) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/scripts/mysql_zap.sh b/scripts/mysql_zap.sh index a9c3e7a7f5a..725a4e247a4 100644 --- a/scripts/mysql_zap.sh +++ b/scripts/mysql_zap.sh @@ -1,6 +1,5 @@ -#!/usr/bin/perl -# Copyright (c) 2000-2002, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +#!@PERL_PATH@ +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/mysqlaccess.conf b/scripts/mysqlaccess.conf old mode 100755 new mode 100644 diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index 4ca3b2d3686..03810e95b72 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -1,6 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index d9ea6a117d2..a00704b6085 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -1,6 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index 94665f345f4..78040aac320 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -1,7 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2000-2002, 2005-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index a7f465dc891..2dc3a33c25d 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -1,6 +1,6 @@ -#!/usr/bin/perl +#!@PERL_PATH@ -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public