Merge lp:~ignacio-nin/percona-server/5.6-bug1181753 into lp:percona-server/5.6

Proposed by Ignacio Nin on 2013-06-05
Status: Merged
Approved by: Laurynas Biveinis on 2013-06-06
Approved revision: 379
Merged at revision: 379
Proposed branch: lp:~ignacio-nin/percona-server/5.6-bug1181753
Merge into: lp:percona-server/5.6
Diff against target: 67 lines (+32/-4)
1 file modified
build/percona-server.spec (+32/-4)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.6-bug1181753
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) 2013-06-05 Approve on 2013-06-06
Review via email: mp+167584@code.launchpad.net
To post a comment you must log in.
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-06-03 01:41:20 +0000
3+++ build/percona-server.spec 2013-06-05 16:06:47 +0000
4@@ -555,7 +555,16 @@
5
6 # ATTENTION: Parts of this are duplicated in the "triggerpostun" !
7
8-mysql_datadir=%{mysqldatadir}
9+# There are users who deviate from the default file system layout.
10+# Check local settings to support them.
11+if [ -x %{_bindir}/my_print_defaults ]
12+then
13+ mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'`
14+fi
15+if [ -z "$mysql_datadir" ]
16+then
17+ mysql_datadir=%{mysqldatadir}
18+fi
19 # Check if we can safely upgrade. An upgrade is only safe if it's from one
20 # of our RPMs in the same version family.
21
22@@ -709,7 +718,16 @@
23
24 # ATTENTION: Parts of this are duplicated in the "triggerpostun" !
25
26-mysql_datadir=%{mysqldatadir}
27+# There are users who deviate from the default file system layout.
28+# Check local settings to support them.
29+if [ -x %{_bindir}/my_print_defaults ]
30+then
31+ mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'`
32+fi
33+if [ -z "$mysql_datadir" ]
34+then
35+ mysql_datadir=%{mysqldatadir}
36+fi
37 NEW_VERSION=%{mysql_version}-%{release}
38 STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER
39
40@@ -760,7 +778,8 @@
41 # ----------------------------------------------------------------------
42 # Initiate databases if needed
43 # ----------------------------------------------------------------------
44-%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
45+%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} \
46+ --datadir=$mysql_datadir
47
48 # ----------------------------------------------------------------------
49 # Upgrade databases if needed would go here - but it cannot be automated yet
50@@ -889,7 +908,16 @@
51 # http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s02.html
52 # For all details of this code, see the "pre" and "post" sections.
53
54-mysql_datadir=%{mysqldatadir}
55+# There are users who deviate from the default file system layout.
56+# Check local settings to support them.
57+if [ -x %{_bindir}/my_print_defaults ]
58+then
59+ mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'`
60+fi
61+if [ -z "$mysql_datadir" ]
62+then
63+ mysql_datadir=%{mysqldatadir}
64+fi
65 NEW_VERSION=%{mysql_version}-%{release}
66 STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST # Note the difference!
67 STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY

Subscribers

People subscribed via source and target branches