1 |
# $Id: e-smith-mysql.spec,v 1.1 2016/02/05 22:29:58 stephdl Exp $ |
# $Id: e-smith-mysql.spec,v 1.17 2020/12/08 03:49:44 jpp Exp $ |
2 |
|
|
3 |
Summary: e-smith specific mysql configuration and templates. |
Summary: e-smith specific mysql configuration and templates. |
4 |
%define name e-smith-mysql |
%define name e-smith-mysql |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 2.6.0 |
%define version 2.6.0 |
7 |
%define release 2 |
%define release 15 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
11 |
Group: Networking/Daemons |
Group: Networking/Daemons |
12 |
Source: %{name}-%{version}.tar.xz |
Source: %{name}-%{version}.tar.xz |
13 |
|
Patch0: e-smith-mysql-2.6.0-mariadb1.patch |
14 |
|
Patch1: e-smith-mysql-2.6.0-mysqld2mariadb.patch |
15 |
|
Patch2: e-smith-mysql-2.6.0-use_default_innodb_settings.patch |
16 |
|
Patch3: e-smith-mysql-2.6.0-mariadb_forgotten_var.patch |
17 |
|
Patch4: e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch |
18 |
|
Patch5: e-smith-mysql-2.6.0.bz9688.skipredirect.patch |
19 |
|
Patch6: e-smith-mysql-2.6.0-bz11145-updateevent.patch |
20 |
|
Patch7: e-smith-mysql-2.6.0-bz11021-mariadb2systemd.patch |
21 |
|
Patch8: e-smith-mysql-2.6.0-bz11120-mysql.init2systemd.patch |
22 |
|
|
23 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
24 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
25 |
Requires: mariadb-server |
Requires: mariadb-server |
30 |
AutoReqProv: no |
AutoReqProv: no |
31 |
|
|
32 |
%changelog |
%changelog |
33 |
|
* Mon Dec 07 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-15.sme |
34 |
|
- e-smith-update event [SME: 11145] |
35 |
|
- mariadb systemd integration [SME: 11021] |
36 |
|
move set.password and template |
37 |
|
create /usr/lib/systemd/system/mariadb.service.d/sme.conf |
38 |
|
create /sbin/e-smith/systemd/mariadb-initialize + chmod |
39 |
|
cleanup and remove old /var/service/mariadb |
40 |
|
- mysql.init systemd integration [SME: 11120] |
41 |
|
create mysql_init.service |
42 |
|
|
43 |
|
|
44 |
|
* Sun Jul 24 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-13.sme |
45 |
|
- systemd skip redirect [SME: 9688] |
46 |
|
|
47 |
|
* Sat Jul 23 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-12.sme |
48 |
|
- Corrected a typo in e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch |
49 |
|
- [SME: 9671] |
50 |
|
|
51 |
|
* Thu Jul 21 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-11.sme |
52 |
|
- fix broken link /etc/init.d/supervise/mariadb [SME: 9686] |
53 |
|
|
54 |
|
* Mon Jul 18 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-10.sme |
55 |
|
- Remove Dummy database from backup and restoration [SME: 9671] |
56 |
|
- Added e-smith-mysql-2.6.0.bz9671.RemoveDummyMysqlDatabase.patch |
57 |
|
|
58 |
|
* Mon Jul 18 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-8.sme |
59 |
|
- fix forgotten mysqld variables in various scripts [SME: 9438] |
60 |
|
- e-smith-mysql-2.6.0-mariadb_forgotten_var.patch |
61 |
|
|
62 |
|
* Mon Apr 11 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-7.sme |
63 |
|
- Use default InnoDB settings [SME: 9439] |
64 |
|
|
65 |
|
* Mon Apr 11 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-6.sme |
66 |
|
- Rename mysqld to mariadb [SME: 9438] |
67 |
|
|
68 |
|
* Mon Apr 11 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-5.sme |
69 |
|
- Remove uneeded scriplets %post and %postun [SME: 9422] |
70 |
|
|
71 |
|
* Thu Mar 31 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme |
72 |
|
- new path for pid file with mariadb [SME: 9407] |
73 |
|
- my.cnf : Innodb needs to be active for mariadb [SME: 9406] |
74 |
|
|
75 |
* Fri Mar 18 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-2.sme |
* Fri Mar 18 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-2.sme |
76 |
- fix mysql-server not found [SME: 9345] |
- fix mysql-server not found [SME: 9345] |
77 |
- now using mariadb-server and mariadb |
- now using mariadb-server and mariadb |
78 |
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
79 |
|
by assuming the date is correct and changing the weekday. |
80 |
|
Wed Mar 23 2001 --> Wed Mar 21 2001 or Fri Mar 23 2001 or Wed Mar 28 2001 or .... |
81 |
|
|
82 |
* Fri Feb 05 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme |
* Fri Feb 05 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme |
83 |
- Initial release to sme10 |
- Initial release to sme10 |
519 |
- [1.3.0-12] |
- [1.3.0-12] |
520 |
- force mysql.init to print to stderr instead of stout |
- force mysql.init to print to stderr instead of stout |
521 |
|
|
522 |
* Wed Mar 23 2001 Tony Clayton <tonyc@e-smith.com> |
* Fri Mar 23 2001 Tony Clayton <tonyc@e-smith.com> |
523 |
|
Wed Mar 23 2001 --> Wed Mar 21 2001 or Fri Mar 23 2001 or Wed Mar 28 2001 or .... |
524 |
- [1.3.0-11] |
- [1.3.0-11] |
525 |
- fixed uninitialized value error in conf-mysql-startup |
- fixed uninitialized value error in conf-mysql-startup |
526 |
|
|
771 |
|
|
772 |
%prep |
%prep |
773 |
%setup |
%setup |
774 |
|
%patch0 -p1 |
775 |
|
%patch1 -p1 |
776 |
|
%patch2 -p1 |
777 |
|
%patch3 -p1 |
778 |
|
%patch4 -p1 |
779 |
|
%patch5 -p1 |
780 |
|
# mysqld renamed to mariadb [SME: 9438] |
781 |
|
# TODO: remove on next tarball creation |
782 |
|
rm -f root/service/mysqld |
783 |
|
rm -rf root/var/service/mysqld |
784 |
|
rm -rf root/var/run/ |
785 |
|
rm -rf root/var/log/mysqld |
786 |
|
rm -f root/etc/rc.d/init.d/supervise/mysqld |
787 |
|
rm -f root/etc/rc.d/rc7.d/S50mysqld |
788 |
|
|
789 |
|
mkdir -p root/var/log/mariadb.run |
790 |
|
%patch6 -p1 |
791 |
|
# move mariadb to systemd |
792 |
|
%patch7 -p1 |
793 |
|
rm -rf root/etc/e-smith/templates.metadata/var/service |
794 |
|
rm -rf root/etc/e-smith/templates/var/service/mariadb |
795 |
|
rm -rf root/var/service |
796 |
|
rm -rf root/service |
797 |
|
rm -rf root/etc/rc.d/init.d/supervise |
798 |
|
rm -rf root/var/log |
799 |
|
|
800 |
|
# move mysql.init |
801 |
|
%patch8 -p1 |
802 |
|
rm -rf root/etc/rc.d/rc7.d |
803 |
|
|
804 |
%build |
%build |
805 |
perl createlinks |
perl createlinks |
808 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
809 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
810 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
811 |
--dir /var/run/mysqld 'attr(0755,mysql,mysql)' \ |
--file /sbin/e-smith/systemd/mariadb-initialize 'attr(0554,root,root)' \ |
812 |
--file /var/service/mysqld/run 'attr(0755,root,root)' \ |
--file /var/service/mariadb/run 'attr(0755,root,root)' \ |
813 |
--file /var/service/mysqld/control/t 'attr(0750,root,root)' \ |
--file /var/service/mariadb/control/t 'attr(0750,root,root)' \ |
814 |
--file /var/service/mysqld/control/d 'attr(0750,root,root)' \ |
--file /var/service/mariadb/control/d 'attr(0750,root,root)' \ |
815 |
--file /var/service/mysqld/control/i 'attr(0750,root,root)' \ |
--file /var/service/mariadb/control/i 'attr(0750,root,root)' \ |
816 |
--file /var/service/mysqld/control/q 'attr(0750,root,root)' \ |
--file /var/service/mariadb/control/q 'attr(0750,root,root)' \ |
817 |
--file /var/service/mysqld/log/run 'attr(0755,root,root)' \ |
--file /var/service/mariadb/log/run 'attr(0755,root,root)' \ |
818 |
--dir '/var/log/mysqld' 'attr(2750,smelog,smelog)' \ |
--dir '/var/log/mariadb.run' 'attr(2750,smelog,smelog)' \ |
819 |
--dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \ |
--dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \ |
820 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
821 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
823 |
%clean |
%clean |
824 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
825 |
|
|
826 |
%post |
%pre |
827 |
# mysql.com compatibility |
if [ $1 -gt 1 ] ; then |
828 |
[ -e /etc/rc.d/init.d/mysqld ] || ln -s ./mysql /etc/rc.d/init.d/mysqld |
if [ -e /var/service/mariadb/run ] ; then |
829 |
# We remove this because the template has been renamed |
/usr/bin/sv d mariadb |
830 |
/bin/rm -f /etc/e-smith/events/bootstrap-console-save/templates2expand/etc/e-smith/sql/init/10fix_privilege_tables |
/usr/bin/sv d mariadb/log |
831 |
|
# also |
832 |
|
rm -rf /var/service/mariadb |
833 |
|
fi |
834 |
|
fi |
835 |
|
|
836 |
|
%post |
837 |
|
|
838 |
%postun |
%postun |
|
if [ "$1" == 0 ]; then |
|
|
[ -L /etc/rc.d/init.d/mysqld ] && rm /etc/rc.d/init.d/mysqld || : |
|
|
fi |
|
839 |
|
|
840 |
%files -f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
841 |
%defattr(-,root,root) |
%defattr(-,root,root) |