1 |
Summary: smeserver specific mysql55 configuration and templates. |
2 |
%define name smeserver-mysql55 |
3 |
Name: %{name} |
4 |
%define version 1.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-mysql55-1.0.0-typo.patch |
12 |
Patch1: smeserver-mysql55-1.0.0-SME10095-phpmyadmin.patch |
13 |
Patch2: smeserver-mysql55-1.0.0-SME10099-prebackupdump.patch |
14 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
BuildArchitectures: noarch |
16 |
Requires: mysql55-mysql-server |
17 |
Requires: mysql55-mysql |
18 |
Requires: mysql55-runtime |
19 |
Requires: mysql55-mysql-libs |
20 |
Requires: mysql55 |
21 |
Requires: e-smith-base |
22 |
Requires: e-smith-lib >= 1.15.1-19 |
23 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
24 |
AutoReqProv: no |
25 |
|
26 |
%changelog |
27 |
* Sat Feb 18 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-6.sme |
28 |
- fix failure to dump mysql55 table on pre-backup event [SME: 1099] |
29 |
- add direct integration to phpmyadmin [SME: 10095] |
30 |
|
31 |
* Wed Nov 04 2015 JP Pialasse <tests@pialasse.com> 1.0.0-5.sme |
32 |
- fixed root pass link typo [SME: 8527] |
33 |
|
34 |
* Mon May 19 2014 JP Pialasse <tests@pialasse.com> 1.0.0-4.sme |
35 |
- initial release from e-smith-mysql 2.0.0-4 |
36 |
|
37 |
%description |
38 |
This package adds necessary startup and configuration items for |
39 |
mysql55. |
40 |
|
41 |
%prep |
42 |
%setup |
43 |
%patch0 -p1 |
44 |
%patch1 -p1 |
45 |
%patch2 -p1 |
46 |
|
47 |
%build |
48 |
mkdir -p root/etc/e-smith/sql/init55 |
49 |
perl createlinks |
50 |
|
51 |
# add this for mysql.com rpm compatibility |
52 |
#mkdir -p root/var/run/mysql55-mysqld |
53 |
# we hould we rather link to the actual dir in opt , done in createlinks |
54 |
|
55 |
mkdir -p root/etc/rc.d/init.d/supervise |
56 |
ln -s ../daemontools root/etc/rc.d/init.d/supervise/mysql55-mysqld |
57 |
|
58 |
mkdir -p root/etc/rc.d/rc7.d |
59 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S50mysql55-mysqld |
60 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S99mysql55-mysql.init |
61 |
|
62 |
mkdir -p root/service |
63 |
ln -s /var/service/mysql55-mysqld root/service |
64 |
touch root/var/service/mysql55-mysqld/down |
65 |
|
66 |
mkdir -p root/var/log/mysql55-mysqld |
67 |
mkdir -p root/home/e-smith/db/mysql55 |
68 |
|
69 |
|
70 |
%install |
71 |
rm -rf $RPM_BUILD_ROOT |
72 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
73 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
74 |
--dir /var/run/mysql55-mysqld 'attr(0755,mysql,mysql)' \ |
75 |
--file /var/service/mysql55-mysqld/run 'attr(0755,root,root)' \ |
76 |
--file /var/service/mysql55-mysqld/control/t 'attr(0750,root,root)' \ |
77 |
--file /var/service/mysql55-mysqld/control/d 'attr(0750,root,root)' \ |
78 |
--file /var/service/mysql55-mysqld/control/i 'attr(0750,root,root)' \ |
79 |
--file /var/service/mysql55-mysqld/control/q 'attr(0750,root,root)' \ |
80 |
--file /var/service/mysql55-mysqld/log/run 'attr(0755,root,root)' \ |
81 |
--dir '/var/log/mysql55-mysqld' 'attr(2750,smelog,smelog)' \ |
82 |
--dir '/home/e-smith/db/mysql55' 'attr(0750,root,root)' \ |
83 |
> %{name}-%{version}-filelist |
84 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
85 |
|
86 |
%clean |
87 |
rm -rf $RPM_BUILD_ROOT |
88 |
|
89 |
%pre |
90 |
%preun |
91 |
|
92 |
%post |
93 |
## mysql.com compatibility |
94 |
#[ -e /etc/rc.d/init.d/mysql55-mysqld ] || ln -s ./mysql /etc/rc.d/init.d/mysql55-mysqld |
95 |
|
96 |
%postun |
97 |
#if [ "$1" == 0 ]; then |
98 |
# [ -L /etc/rc.d/init.d/mysql55-mysqld ] && rm /etc/rc.d/init.d/mysql55-mysqld || : |
99 |
#fi |
100 |
|
101 |
%files -f %{name}-%{version}-filelist |
102 |
%defattr(-,root,root) |