Skip to content

Commit 5d4cfb3

Browse files
committed
BUG#25719975 SHEBANG HARD CODED AS /USR/BIN/PERL IN SCRIPTS, BREAKS ON FREEBSD
Use cmake variable to adjust shebang to platform.
1 parent 741305b commit 5d4cfb3

15 files changed

+33
-38
lines changed

scripts/CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -104,6 +104,13 @@ ELSE()
104104
"${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
105105
ENDIF()
106106

107+
108+
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
109+
SET (PERL_PATH "/usr/local/bin/perl")
110+
ELSE()
111+
SET (PERL_PATH "/usr/bin/perl")
112+
ENDIF()
113+
107114
IF(UNIX)
108115
# SHELL_PATH, FIND_PROC, CHECK_PID are used by mysqld_safe
109116
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")

scripts/dheadgen.pl

100755100644
+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
#!/usr/bin/perl -w
2-
3-
#
4-
# Copyright (c) 2008, 2009 Sun Microsystems, Inc.
5-
# Use is subject to license terms.
6-
#
7-
1+
# Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
82
#
93
# Redistribution and use in source and binary forms, with or without
104
# modification, are permitted provided that the following conditions are met:

scripts/mysql_config.pl.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22
# -*- cperl -*-
33
#
4-
# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by

scripts/mysql_convert_table_format.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/perl
2-
# Copyright (c) 2000-2002, 2006, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
3-
# Use is subject to license terms.
1+
#!@PERL_PATH@
2+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
43
#
54
# This program is free software; you can redistribute it and/or modify
65
# it under the terms of the GNU General Public License as published by

scripts/mysql_find_rows.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/perl
2-
# Copyright (c) 2000, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
3-
# Use is subject to license terms.
1+
#!@PERL_PATH@
2+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
43
#
54
# This program is free software; you can redistribute it and/or modify
65
# it under the terms of the GNU General Public License as published by

scripts/mysql_fix_extensions.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22

3-
# Copyright (c) 2001 MySQL AB, 2009 Sun Microsystems, Inc.
4-
# Use is subject to license terms.
3+
# Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
54
#
65
# This program is free software; you can redistribute it and/or
76
# modify it under the terms of the GNU Library General Public

scripts/mysql_install_db.pl.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22
# -*- cperl -*-
33
#
4-
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by

scripts/mysql_secure_installation.pl.in

100755100644
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22
# -*- cperl -*-
33
#
4-
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by

scripts/mysql_setpermission.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22
## Emacs, this is -*- perl -*- mode? :-)
33

4-
# Copyright (c) 2000, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
5-
# Use is subject to license terms.
4+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
65
#
76
# This program is free software; you can redistribute it and/or
87
# modify it under the terms of the GNU Library General Public

scripts/mysql_zap.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#!/usr/bin/perl
2-
# Copyright (c) 2000-2002, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
3-
# Use is subject to license terms.
1+
#!@PERL_PATH@
2+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
43
#
54
# This program is free software; you can redistribute it and/or modify
65
# it under the terms of the GNU General Public License as published by

scripts/mysqlaccess.conf

100755100644
File mode changed.

scripts/mysqlaccess.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22

3-
# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
44
#
55
# This program is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Library General Public

scripts/mysqld_multi.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22

3-
# Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
44
#
55
# This program is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Library General Public

scripts/mysqldumpslow.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22

3-
# Copyright (c) 2000-2002, 2005-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
4-
# Use is subject to license terms.
3+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
54
#
65
# This program is free software; you can redistribute it and/or
76
# modify it under the terms of the GNU Library General Public

scripts/mysqlhotcopy.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/perl
1+
#!@PERL_PATH@
22

3-
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
44
#
55
# This program is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Library General Public

0 commit comments

Comments
 (0)