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