1 |
%define name smeserver-automysqlbackup |
%define name smeserver-automysqlbackup |
2 |
%define version 3.0.RC6 |
%define version 3.0.RC6 |
3 |
%define release 22 |
%define release 26 |
4 |
%define rpmver 3.0.RC6 |
%define rpmver 3.0.RC6 |
5 |
|
|
6 |
epoch: 2 |
epoch: 2 |
15 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
16 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
17 |
Requires: e-smith-base, e-smith-release >= 10 |
Requires: e-smith-base, e-smith-release >= 10 |
18 |
Requires: pax |
Requires: pax |
19 |
Requires: automysqlbackup |
Requires: automysqlbackup |
20 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
21 |
Patch0: smeserver-automysqlbackup-AdjustableCronJob.patch |
Patch0: smeserver-automysqlbackup-AdjustableCronJob.patch |
22 |
Patch1: smeserver-automysqlbackup-enhanced-templates.patch |
Patch1: smeserver-automysqlbackup-enhanced-templates.patch |
28 |
Patch7: smeserver-automysqlbackup-3.0.RC6-bz11622.patch |
Patch7: smeserver-automysqlbackup-3.0.RC6-bz11622.patch |
29 |
Patch8: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-support.patch |
Patch8: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-support.patch |
30 |
Patch9: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-rename-templates.patch |
Patch9: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-rename-templates.patch |
31 |
|
Patch10: smeserver-automysqlbackup-3.0.RC6-bz11970.update-cron.patch |
32 |
|
Patch11: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-fix-typos.patch |
33 |
|
Patch12: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-rename-cron-directories.patch |
34 |
|
|
35 |
|
|
36 |
%description |
%description |
37 |
This RPM is an unofficial addon for the SME Server 10.x. |
This RPM is an unofficial addon for the SME Server 10.x. |
41 |
|
|
42 |
|
|
43 |
%changelog |
%changelog |
44 |
|
* Mon Aug 08 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-26.sme |
45 |
|
- Change cron directories to match templates [SME:11970] |
46 |
|
|
47 |
|
* Mon Aug 08 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-25.sme |
48 |
|
- Change rc2 to RC6 in config templates [SME:11970] |
49 |
|
- Fix DONT'T typo |
50 |
|
|
51 |
|
* Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-24.sme |
52 |
|
- Update cron [SME:11970] |
53 |
|
- Fix SQL in Maria 105 |
54 |
|
- Remove automysql event and leave just smeserver-automysqlbackup-update |
55 |
|
- Fix some createlinks |
56 |
|
- Modify inits - but still leaves log errors if version not installed |
57 |
|
|
58 |
|
* Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-23.sme |
59 |
|
- Modify backup directory names [SME: 11970] |
60 |
|
|
61 |
* Tue May 31 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-22.sme |
* Tue May 31 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-22.sme |
62 |
- Fix more typos in templates [SME: 11970] |
- Fix more typos in templates [SME: 11970] |
63 |
|
|
142 |
%patch7 -p1 |
%patch7 -p1 |
143 |
%patch8 -p1 |
%patch8 -p1 |
144 |
%patch9 -p1 |
%patch9 -p1 |
145 |
|
%patch10 -p1 |
146 |
|
%patch11 -p1 |
147 |
|
%patch12 -p1 |
148 |
|
|
149 |
%build |
%build |
150 |
perl createlinks |
perl createlinks |
182 |
|
|
183 |
#protect the backup folder |
#protect the backup folder |
184 |
chmod -R 700 /root/backup |
chmod -R 700 /root/backup |
185 |
|
|
186 |
%preun |
%preun |
187 |
%postun |
%postun |
188 |
if [ $1 = 0 ] ; then |
if [ $1 = 0 ] ; then |
191 |
echo "=======================================================================" |
echo "=======================================================================" |
192 |
echo " " |
echo " " |
193 |
echo " delete mysql user and revoke all permissions" |
echo " delete mysql user and revoke all permissions" |
194 |
# This section deletes backupuser |
# This section deletes backupuser for the standard DB |
195 |
mysql -u root -e "REVOKE ALL PRIVILEGES ON *.* FROM '$MYSQLUSER'@'localhost';" |
mysql -u root -e "REVOKE ALL PRIVILEGES ON *.* FROM '$MYSQLUSER'@'localhost';" |
196 |
mysql -u root -e "DROP USER $MYSQLUSER@localhost;" |
mysql -u root -e "DROP USER $MYSQLUSER@localhost;" |
197 |
echo " " |
echo " " |
198 |
echo "Do that for each DB - e.g mysq55, mysql57, mariadb101, maria105 etc" |
echo "Do that for each DB - e.g mysq55, mysql57, mariadb101, maria105 etc" |
199 |
echo " " |
echo " " |
200 |
# Delete custom template fragment |
# Delete custom template fragment |
201 |
echo " delete db configuration automysqlbackup" |
echo " Deleting configuration automysqlbackup" |
202 |
echo " " |
echo " " |
203 |
echo "=======================================================================" |
echo "=======================================================================" |
204 |
|
|