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