/[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.3 - (hide annotations) (download)
Sat Jun 5 02:26:54 2021 UTC (2 years, 11 months ago) by terryfage
Branch: MAIN
CVS Tags: smeserver-automysqlbackup-3_0_RC6-18_el7_sme
Changes since 1.2: +7 -3 lines
* Sat Jun 05 2021 Terry Fage <terryf@ozemail.com.au> 3.0.RC6-18.sme
-  mariadb should not backup information_schema [SME: 11622]

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

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