Merge lp:~abychko/percona-server/bug710799-5.1 into lp:percona-server/5.1

Proposed by Alexey Bychko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 539
Proposed branch: lp:~abychko/percona-server/bug710799-5.1
Merge into: lp:percona-server/5.1
Diff against target: 50 lines (+9/-14)
1 file modified
build/percona-server.spec (+9/-14)
To merge this branch: bzr merge lp:~abychko/percona-server/bug710799-5.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+149070@code.launchpad.net

Description of the change

[-] disabled uncongitional manual creation of /var/lib/mysql/*
[+] added conditional call of mysql_install_db, only for clean installation, but not for upgrade
[+] added debug possibility for %post

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

I see many unmerged revisions between lp:~abychko/percona-server/bug710799-5.1 and lp:~abychko/percona-server/bug710799 (including the fix itself).

The 5.1 fix should be rebased on current 5.1 and then upmerged to 5.5.

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 'build/percona-server.spec'
2--- build/percona-server.spec 2013-01-18 03:33:06 +0000
3+++ build/percona-server.spec 2013-03-07 12:50:27 +0000
4@@ -577,20 +577,19 @@
5 fi
6
7 %post -n Percona-Server-server%{package_suffix}
8+if [ X${PERCONA_DEBUG} == X1 ]; then
9+ set -x
10+fi
11+#
12 mysql_datadir=%{mysqldatadir}
13
14 # ----------------------------------------------------------------------
15-# Create data directory
16-# ----------------------------------------------------------------------
17-mkdir -p $mysql_datadir/{mysql,test}
18-
19-# ----------------------------------------------------------------------
20 # Make MySQL start/shutdown automatically when the machine does it.
21 # ----------------------------------------------------------------------
22 if [ -x /sbin/chkconfig ] ; then
23 /sbin/chkconfig --add mysql
24 fi
25-
26+#
27 # ----------------------------------------------------------------------
28 # Create a MySQL user and group. Do not report any problems if it already
29 # exists.
30@@ -601,16 +600,12 @@
31 usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true
32
33 # ----------------------------------------------------------------------
34-# Change permissions so that the user that will run the MySQL daemon
35-# owns all database files.
36-# ----------------------------------------------------------------------
37-chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
38-
39-# ----------------------------------------------------------------------
40 # Initiate databases
41 # ----------------------------------------------------------------------
42-%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
43-
44+if [ $1 -eq 1 ]; then #clean installation
45+ mkdir -p $mysql_datadir/{mysql,test}
46+ %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
47+fi
48 # ----------------------------------------------------------------------
49 # FIXME upgrade databases if needed would go here - but it cannot be
50 # automated yet

Subscribers

People subscribed via source and target branches