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