Merge lp:~abychko/percona-server/bug1099809 into lp:percona-server/5.5

Proposed by Alexey Bychko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 419
Proposed branch: lp:~abychko/percona-server/bug1099809
Merge into: lp:percona-server/5.5
Diff against target: 111 lines (+23/-6)
5 files modified
Percona-Server/CMakeLists.txt (+2/-0)
Percona-Server/plugin/percona-pam-for-mysql/CMakeLists.txt (+5/-0)
build/build-binary.sh (+2/-1)
build/debian/rules (+4/-2)
build/percona-server.spec (+10/-3)
To merge this branch: bzr merge lp:~abychko/percona-server/bug1099809
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+143636@code.launchpad.net

Description of the change

[+] new cmake option WITH_PAM default OFF
[*] fixed build scripts for using WITH_PAM cmake option
[*] fixed rpm spec, added pam-devel as build dependency
[*] fixed debian rules for using WITH_PAM cmake option

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Alexey,

The patch looks good except two minor things:

- I suggest "Build with Percona PAM plugin" instead of "Compiling
  Percona PAM AUTH libraries" as the option description.

- please revert all unrelated changes to the .spec file. Some of them
  are not safe, and other ones should be reported and fixed separately.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/CMakeLists.txt'
2--- Percona-Server/CMakeLists.txt 2013-01-09 23:45:25 +0000
3+++ Percona-Server/CMakeLists.txt 2013-01-21 07:36:24 +0000
4@@ -50,6 +50,8 @@
5 MARK_AS_ADVANCED(MANUFACTURER)
6 ENDIF()
7
8+#PAM build Handling
9+OPTION(WITH_PAM "Build with Percona PAM plugin" OFF)
10 # We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug
11 # which turns out to be not trivial, as this involves synchronization
12 # between CMAKE_BUILD_TYPE and WITH_DEBUG. Besides, we have to deal with cases
13
14=== modified file 'Percona-Server/plugin/percona-pam-for-mysql/CMakeLists.txt'
15--- Percona-Server/plugin/percona-pam-for-mysql/CMakeLists.txt 2012-06-22 06:57:40 +0000
16+++ Percona-Server/plugin/percona-pam-for-mysql/CMakeLists.txt 2013-01-21 07:36:24 +0000
17@@ -13,8 +13,12 @@
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #
21+IF(WITH_PAM)
22 INCLUDE (CheckLibraryExists)
23 CHECK_LIBRARY_EXISTS(pam pam_authenticate "" HAVE_PAM)
24+IF(NOT HAVE_PAM)
25+ MESSAGE(FATAL_ERROR "Required PAM dev library not found. Please install PAM development files!")
26+ENDIF(NOT HAVE_PAM)
27 CHECK_SYMBOL_EXISTS(getpwnam_r "pwd.h" HAVE_GETPWNAM_R)
28 CHECK_SYMBOL_EXISTS(getgrgid_r "grp.h" HAVE_GETGRGID_R)
29 IF(HAVE_PAM AND HAVE_GETPWNAM_R AND HAVE_GETGRGID_R)
30@@ -27,3 +31,4 @@
31 MYSQL_ADD_PLUGIN(auth_pam_compat ${AUTH_PAM_COMPAT_SOURCES} LINK_LIBRARIES pam MODULE_ONLY)
32 MYSQL_ADD_PLUGIN(dialog src/dialog.c LINK_LIBRARIES mysqlclient MODULE_ONLY)
33 ENDIF(HAVE_PAM AND HAVE_GETPWNAM_R AND HAVE_GETGRGID_R)
34+ENDIF(WITH_PAM)
35
36=== modified file 'build/build-binary.sh'
37--- build/build-binary.sh 2012-10-23 18:24:36 +0000
38+++ build/build-binary.sh 2013-01-21 07:36:24 +0000
39@@ -127,7 +127,8 @@
40 -DCMAKE_INSTALL_PREFIX="/usr/local/$PRODUCT_FULL" \
41 -DMYSQL_DATADIR="/usr/local/$PRODUCT_FULL/data" \
42 -DMYSQL_SERVER_SUFFIX="-$PERCONA_SERVER_VERSION" \
43- -DCOMPILATION_COMMENT="$COMMENT"
44+ -DCOMPILATION_COMMENT="$COMMENT" \
45+ -DWITH_PAM=ON
46
47 make $MAKE_JFLAG $QUIET
48 make DESTDIR="$INSTALLDIR" install
49
50=== modified file 'build/debian/rules'
51--- build/debian/rules 2013-01-18 03:34:53 +0000
52+++ build/debian/rules 2013-01-21 07:36:24 +0000
53@@ -32,7 +32,8 @@
54 -DMYSQL_UNIX_ADDR="/var/run/mysqld/mysqld.sock" \
55 -DFEATURE_SET=$(feature_set) \
56 -DCOMPILATION_COMMENT=$(compilation_comment_debug) \
57- -DMYSQL_SERVER_SUFFIX=$(server_suffix)
58+ -DMYSQL_SERVER_SUFFIX=$(server_suffix) \
59+ -DWITH_PAM=ON
60 endif
61
62 mkdir release
63@@ -43,7 +44,8 @@
64 -DMYSQL_UNIX_ADDR="/var/run/mysqld/mysqld.sock" \
65 -DFEATURE_SET=$(feature_set) \
66 -DCOMPILATION_COMMENT=$(compilation_comment_release) \
67- -DMYSQL_SERVER_SUFFIX=$(server_suffix)
68+ -DMYSQL_SERVER_SUFFIX=$(server_suffix) \
69+ -DWITH_PAM=ON
70
71 override_dh_auto_build:
72 ifneq ($(BUILD_DEBUG_BINARY),)
73
74=== modified file 'build/percona-server.spec'
75--- build/percona-server.spec 2013-01-18 03:34:53 +0000
76+++ build/percona-server.spec 2013-01-21 07:36:24 +0000
77@@ -232,8 +232,13 @@
78 Packager: Percona MySQL Development Team <mysqldev@percona.com>
79 Vendor: %{percona_server_vendor}
80 Provides: mysql-server
81+#
82+%if %{rhel}
83+BuildRequires: pam-devel
84+%endif
85+#
86 BuildRequires: %{distro_buildreq}
87-
88+#
89 # Think about what you use here since the first step is to
90 # run a rm -rf
91 BuildRoot: %{_tmppath}/%{name}-%{version}-build
92@@ -411,7 +416,8 @@
93 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
94 -DFEATURE_SET="%{feature_set}" \
95 -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
96- -DMYSQL_SERVER_SUFFIX="%{server_suffix}"
97+ -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \
98+ -DWITH_PAM=ON
99 echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG
100 make ${MAKE_JFLAG}
101 )
102@@ -427,7 +433,8 @@
103 -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
104 -DFEATURE_SET="%{feature_set}" \
105 -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
106- -DMYSQL_SERVER_SUFFIX="%{server_suffix}"
107+ -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \
108+ -DWITH_PAM=ON
109 echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
110 make ${MAKE_JFLAG}
111 cd ../%{src_dir}

Subscribers

People subscribed via source and target branches