1 |
Summary: smeserver specific mysql57 configuration and templates. |
2 |
%define name smeserver-mysql57 |
3 |
Name: %{name} |
4 |
%define version 2.0.0 |
5 |
%define release 7 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Networking/Daemons |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
Patch0: smeserver-mysql57-2.0.0-SME10096.patch |
12 |
Patch1: smeserver-mysql57-2.0.0-SME10145-phmyadminFragment.patch |
13 |
Patch2: smeserver-mysql57-2.0.0-SME10146-aliases.patch |
14 |
Patch3: smeserver-mysql57-2.0.0-SME10147-rhpath.patch |
15 |
Patch4: smeserver-mysql57-2.0.0-SME10148.patch |
16 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
17 |
BuildArchitectures: noarch |
18 |
Requires: rh-mysql57 |
19 |
Requires: e-smith-base |
20 |
Requires: e-smith-lib >= 1.15.1-19 |
21 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
22 |
AutoReqProv: no |
23 |
|
24 |
%changelog |
25 |
* Sun Mar 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-7.sme |
26 |
- update run file and template paths [SME: 10148] |
27 |
|
28 |
* Sun Mar 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-6.sme |
29 |
- fix wrong path /opt/rh/mysql57/ [SME: 10147] |
30 |
|
31 |
* Sun Mar 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-5.sme |
32 |
- NFR new aliases for fast use: mysql57 mysqlshow57 mysqladmin57 mysqldump57 mysqlimport57 mysqlbinlog57 [SME: 10146] |
33 |
|
34 |
* Sun Mar 12 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-4.sme |
35 |
- fix conflict with mysql55 phpmyadmin fragment [SME: 10145] |
36 |
|
37 |
* Wed Mar 08 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-3.sme |
38 |
- fix init57 not used by dedicated mysql.init [SME: 10096] |
39 |
|
40 |
* Sun Feb 19 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-2.sme |
41 |
- fix requires rh-myql57 |
42 |
|
43 |
* Sun Feb 19 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.0.0-1.sme |
44 |
- first version forked from smeserver-mysql57-2.0.0-5 |
45 |
|
46 |
|
47 |
%description |
48 |
This package adds necessary startup and configuration items for |
49 |
mysql57. |
50 |
|
51 |
%prep |
52 |
%setup |
53 |
%patch0 -p1 |
54 |
%patch1 -p1 |
55 |
%patch2 -p1 |
56 |
%patch3 -p1 |
57 |
%patch4 -p1 |
58 |
|
59 |
%build |
60 |
mkdir -p root/etc/e-smith/sql/init57 |
61 |
perl createlinks |
62 |
|
63 |
# add this for mysql.com rpm compatibility |
64 |
#mkdir -p root/var/run/mysql57-mysqld |
65 |
# we hould we rather link to the actual dir in opt , done in createlinks |
66 |
|
67 |
mkdir -p root/etc/rc.d/init.d/supervise |
68 |
ln -s ../daemontools root/etc/rc.d/init.d/supervise/mysql57-mysqld |
69 |
|
70 |
mkdir -p root/etc/rc.d/rc7.d |
71 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S50mysql57-mysqld |
72 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S99mysql57-mysql.init |
73 |
|
74 |
mkdir -p root/service |
75 |
ln -s /var/service/mysql57-mysqld root/service |
76 |
touch root/var/service/mysql57-mysqld/down |
77 |
|
78 |
mkdir -p root/var/log/mysql57-mysqld |
79 |
mkdir -p root/home/e-smith/db/mysql57 |
80 |
|
81 |
|
82 |
%install |
83 |
rm -rf $RPM_BUILD_ROOT |
84 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
85 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
86 |
--dir /var/run/mysql57-mysqld 'attr(0757,mysql,mysql)' \ |
87 |
--file /var/service/mysql57-mysqld/run 'attr(0757,root,root)' \ |
88 |
--file /var/service/mysql57-mysqld/control/t 'attr(0750,root,root)' \ |
89 |
--file /var/service/mysql57-mysqld/control/d 'attr(0750,root,root)' \ |
90 |
--file /var/service/mysql57-mysqld/control/i 'attr(0750,root,root)' \ |
91 |
--file /var/service/mysql57-mysqld/control/q 'attr(0750,root,root)' \ |
92 |
--file /var/service/mysql57-mysqld/log/run 'attr(0757,root,root)' \ |
93 |
--dir '/var/log/mysql57-mysqld' 'attr(2750,smelog,smelog)' \ |
94 |
--dir '/home/e-smith/db/mysql57' 'attr(0750,root,root)' \ |
95 |
> %{name}-%{version}-filelist |
96 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
97 |
|
98 |
%clean |
99 |
rm -rf $RPM_BUILD_ROOT |
100 |
|
101 |
%pre |
102 |
%preun |
103 |
|
104 |
%post |
105 |
## mysql.com compatibility |
106 |
#[ -e /etc/rc.d/init.d/mysql57-mysqld ] || ln -s ./mysql /etc/rc.d/init.d/mysql57-mysqld |
107 |
|
108 |
%postun |
109 |
#if [ "$1" == 0 ]; then |
110 |
# [ -L /etc/rc.d/init.d/mysql57-mysqld ] && rm /etc/rc.d/init.d/mysql57-mysqld || : |
111 |
#fi |
112 |
|
113 |
%files -f %{name}-%{version}-filelist |
114 |
%defattr(-,root,root) |