/[smecontribs]/rpms/smeserver-automysqlbackup/contribs10/smeserver-automysqlbackup.spec
ViewVC logotype

Annotation of /rpms/smeserver-automysqlbackup/contribs10/smeserver-automysqlbackup.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (hide annotations) (download)
Tue Jun 7 10:34:18 2022 UTC (2 years, 4 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-automysqlbackup-3_0_RC6-23_el7_sme
Changes since 1.7: +4 -1 lines
* Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-23.sme
- Modify backup directory names [SME: 11970]

1 brianr 1.1 %define name smeserver-automysqlbackup
2     %define version 3.0.RC6
3 jcrisp 1.8 %define release 23
4 brianr 1.1 %define rpmver 3.0.RC6
5    
6     epoch: 2
7     Summary: automysqlbackup is a script to backup your msql database on sme8
8     Name: %{name}
9     Version: %{version}
10     Release: %{release}%{?dist}
11     License: GPL
12     Group: /Web/Application
13     Source: %{name}-%{version}.tar.gz
14     URL: http://sourceforge.net/projects/automysqlbackup/
15     BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
16     BuildArchitectures: noarch
17 jcrisp 1.4 Requires: e-smith-base, e-smith-release >= 10
18 brianr 1.1 Requires: pax
19     Requires: automysqlbackup
20     BuildRequires: e-smith-devtools
21     Patch0: smeserver-automysqlbackup-AdjustableCronJob.patch
22     Patch1: smeserver-automysqlbackup-enhanced-templates.patch
23     Patch2: smeserver-automysqlbackup-fix-runmysql.patch
24     Patch3: smeserver-automysqlbackup-update-permission-change.patch
25     Patch4: smeserver-automysqlbackup-3.0.RC6-bz10806.errorsAndCreateUsers.patch
26     Patch5: smeserver-automysqlbackup-3.0.RC6-Update-MySQL-Init-for-Mariadb.patch
27 jpp 1.2 Patch6: smeserver-automysqlbackup-3.0.RC6-bz11561.patch
28 terryfage 1.3 Patch7: smeserver-automysqlbackup-3.0.RC6-bz11622.patch
29 jcrisp 1.4 Patch8: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-support.patch
30 jcrisp 1.5 Patch9: smeserver-automysqlbackup-3.0.RC6-bz11970.Add-Maria-10x-rename-templates.patch
31 brianr 1.1
32     %description
33 terryfage 1.3 This RPM is an unofficial addon for the SME Server 10.x.
34 brianr 1.1 The target audience is the Linux/E-smith administrator
35     who wants to backup their mysql databases with an automatic way.
36     This script is based on automysqlbackup V3.0
37    
38    
39 terryfage 1.3 %changelog
40 jcrisp 1.8 * Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-23.sme
41     - Modify backup directory names [SME: 11970]
42    
43 jcrisp 1.7 * Tue May 31 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-22.sme
44     - Fix more typos in templates [SME: 11970]
45    
46 jcrisp 1.6 * Tue May 31 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-21.sme
47     - Fix typos in templates [SME: 11970]
48    
49     * Mon May 30 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-20.sme
50     - Correct template names [SME: 11970]
51 jcrisp 1.5 - Add enable instructions
52    
53 jcrisp 1.6 * Mon May 09 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-19.sme
54 jcrisp 1.4 - Add Maria DB 10.x support [SME: 11970]
55     - Requires Koozali SME Server v10.x
56    
57 terryfage 1.3 * Sat Jun 05 2021 Terry Fage <terryf@ozemail.com.au> 3.0.RC6-18.sme
58     - mariadb should not backup information_schema [SME: 11622]
59 brianr 1.1
60 jpp 1.2 * Fri Apr 16 2021 Jean-Philippe Pialasse <tests@pialasse.com> 3.0.RC6-17.sme
61     - fix automysql freeze server on reboot after post-upgrade event [SME: 11561]
62    
63 brianr 1.1 * Mon Oct 19 2020 Brian Read <brianr@bjsystems.co.uk> 3.0-RC6-16.sme
64     - Initial Import to SME10 tree [SME: 11042]
65     - Update-MySQL-Init-for-Mariadb
66    
67     * Sun Sep 22 2019 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.RC6-15.sme
68     - fix multiple cause of error noise and performance [SME: 10806]
69     * avoid parallel run of all backups, cron template rewritten
70     * avoid multiple parallel or repeated chmod and chown
71     * protect from undesired chmod or chown
72     * consistent use of status for cron and conf templates
73     * create backup user for mysql, mysql55 and mysql57 (Maria to do)
74     * update mysql53 use to mysql51 as variable
75     * migrate fragment to remove Mysql55 Mysql57 Mymaria Mysql53 if Mysql53 exist
76     * remove default value in db for Mysql55 Mysql57 Mymaria Mysql53
77     * default as enabled in fragments for all automysql My* properties
78     - create default user in dbs [SME: 10808]
79     - tidy spec file
80    
81     * Mon Nov 26 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-11.sme
82     - fix runmysqlscript to allow for change in Backupdir key [SME: 10655]
83    
84     * Mon Nov 26 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-10.sme
85     - fix runmysqlbackup to allow for new databases [SME: 10654]
86    
87     * Fri Jul 06 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 3.0.RC6-9.sme
88     - Template configuration files
89     - run automysqlbackup per conf directly from cron rather than runmysqlbackup
90     - Add extra DB keys for mysql53, mysql55, mysql57
91    
92     * Sun Apr 02 2017 stephane de Labrusse <stephdl@de-labrusse.fr> 3.0.RC6-8.sme
93     - Added smeserver-automysqlbackup-AdjustableCronJob.patch
94     - The time to run the Job is adjustable
95    
96     * Wed Sep 16 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 3.0.RC6-6.sme
97     - Added 'epoch: 2'
98    
99     * Sat Aug 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 3.0.RC6-5.sme
100     - Initial release to contribs9
101    
102     * Sun Aug 17 2014 Stephane de Labrusse <stephdl@de-labrusse.fr> 3.0.RC6-4
103     - added my own patch against the --events warning
104     --Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
105    
106     * Sun Oct 27 2013 Stephane de Labrusse <stephdl@de-labrusse.fr> 3.0.RC6.3
107     - split the contrib in two versions smeserver-automysqlbackup and automysqlbackup
108     * Mon Apr 22 2013 Stephane de Labrusse <stephdl@de-labrusse.fr>
109     - [3.0.RC6] version Based on automysqlbackup V3.0 RC6
110     * Mon Apr 08 2013 Stephane de Labrusse <stephdl@de-labrusse.fr>
111     - [0.01] Initial version Based on automysqlbackup V3.0 RC6
112    
113     %prep
114     rm -rf $RPM_BUILD_ROOT
115    
116     %setup
117     %patch0 -p1
118     %patch1 -p1
119     %patch2 -p1
120     %patch3 -p1
121     %patch4 -p1
122     %patch5 -p1
123 jpp 1.2 %patch6 -p1
124 terryfage 1.3 %patch7 -p1
125 jcrisp 1.4 %patch8 -p1
126 jcrisp 1.5 %patch9 -p1
127 brianr 1.1
128     %build
129     perl createlinks
130     find . \( -name .gitinclude -o -name .gitignore \) -print0 | \
131     xargs -0 rm -f
132    
133     %install
134     /bin/rm -rf $RPM_BUILD_ROOT
135     (cd root ;/usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
136     /bin/rm -f %{name}-%{version}-filelist
137     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
138     --file /sbin/e-smith/runmysqlbackup 'attr(0750,root,root)' \
139     --dir /root/backup 'attr(0700,root,root)' \
140     --dir /root/backup/db 'attr(0700,root,root)' \
141     --dir /root/backup/db/daily 'attr(0700,root,root)' \
142     --dir /root/backup/db/fullschema 'attr(0700,root,root)' \
143     --dir /root/backup/db/latest 'attr(0700,root,root)' \
144     --dir /root/backup/db/monthly 'attr(0700,root,root)' \
145     --dir /root/backup/db/status 'attr(0700,root,root)' \
146     --dir /root/backup/db/tmp 'attr(0700,root,root)' \
147     --dir /root/backup/db/weekly 'attr(0700,root,root)' \
148     > %{name}-%{version}-filelist
149    
150    
151     %files -f %{name}-%{version}-filelist
152    
153     %defattr(-,root,root)
154    
155     %clean
156     rm -rf $RPM_BUILD_ROOT
157    
158     %pre
159    
160     %post
161    
162     #protect the backup folder
163     chmod -R 700 /root/backup
164    
165     %preun
166     %postun
167     if [ $1 = 0 ] ; then
168     SMEDB=automysqlbackup
169     MYSQLUSER=backupuser
170     echo "======================================================================="
171     echo " "
172     echo " delete mysql user and revoke all permissions"
173     # This section deletes backupuser
174     mysql -u root -e "REVOKE ALL PRIVILEGES ON *.* FROM '$MYSQLUSER'@'localhost';"
175     mysql -u root -e "DROP USER $MYSQLUSER@localhost;"
176     echo " "
177 jcrisp 1.5 echo "Do that for each DB - e.g mysq55, mysql57, mariadb101, maria105 etc"
178 brianr 1.1 echo " "
179     # Delete custom template fragment
180     echo " delete db configuration automysqlbackup"
181     echo " "
182     echo "======================================================================="
183    
184     /sbin/e-smith/config delete $SMEDB
185     fi

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed