/[smeserver]/rpms/smeserver-mysql/sme10/smeserver-mysql.spec
ViewVC logotype

Diff of /rpms/smeserver-mysql/sme10/smeserver-mysql.spec

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

Revision 1.20 by jpp, Wed Mar 16 07:29:21 2022 UTC Revision 1.37 by jpp, Thu Sep 5 14:09:41 2024 UTC
# Line 2  Summary: Koozali SME Server specific mys Line 2  Summary: Koozali SME Server specific mys
2  %define name smeserver-mysql  %define name smeserver-mysql
3  Name: %{name}  Name: %{name}
4  %define version 2.7.0  %define version 2.7.0
5  %define release 8  %define release 21
6  Version: %{version}  Version: %{version}
7  Release: %{release}%{?dist}  Release: %{release}%{?dist}
8  License: GPL  License: GPL
9  Group: Networking/Daemons  Group: Networking/Daemons
10  Source: %{name}-%{version}.tar.xz  Source: %{name}-%{version}.tar.xz
11  Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch  Patch0: smeserver-mysql-2.7.0-bz11899-sclo.patch
12    Patch1: smeserver-mysql-2.7.0-bz11922-mysqlinit.patch
13    Patch2: smeserver-mysql-2.7.0-bz11936.patch
14    Patch3: smeserver-mysql-2.7.0-bz11953-mysql.init-logging.patch
15    Patch4: smeserver-mysql-2.7.0-bz12262-skipnetworking.patch
16    Patch5: smeserver-mysql-2.7.0-bz12417-OpenFilesLimit.patch
17    Patch6: smeserver-mysql-2.7.0-bz12145-backupuserprivileges.patch
18    
19  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
20  BuildArchitectures: noarch  BuildArchitectures: noarch
# Line 31  mysql. Line 37  mysql.
37  %prep  %prep
38  %setup  %setup
39  %patch0 -p1  %patch0 -p1
40    %patch1 -p1
41    %patch2 -p1
42    %patch3 -p1
43    %patch4 -p1
44    %patch5 -p1
45    %patch6 -p1
46    
47  %build  %build
48  for ver in  101 102 103 105  for ver in  101 102 103 105
# Line 65  port="${ports[$ver]}" Line 77  port="${ports[$ver]}"
77  mkdir -p root$ver/etc/e-smith/sql/init$ver  mkdir -p root$ver/etc/e-smith/sql/init$ver
78  mkdir -p root$ver/home/e-smith/db/mariadb$ver  mkdir -p root$ver/home/e-smith/db/mariadb$ver
79  mkdir -p root$ver/var/log/mariadb$ver  mkdir -p root$ver/var/log/mariadb$ver
80  mkdir -p root$ver/home/e-smith/db/mysql/mariadb$ver  #mkdir -p root$ver/home/e-smith/db/mysql/mariadb$ver
81  mkdir -p root$ver/etc/e-smith/events/actions  mkdir -p root$ver/etc/e-smith/events/actions
82    
83  # create configuration db default  # create configuration db default
# Line 118  sed -i root$ver/etc/e-smith/events/actio Line 130  sed -i root$ver/etc/e-smith/events/actio
130          -e "s_!!!SOCKET!!!_${socket}_g"          -e "s_!!!SOCKET!!!_${socket}_g"
131    
132  ##metadata  ##metadata
133  mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/  mkdir -p root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql
134  cp -a root/etc/e-smith/templates.metadata/etc/e-smith/sql root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql$ver  cp -a root/etc/e-smith/templates.metadata/etc/e-smith/sql/init root$ver/etc/e-smith/templates.metadata/etc/e-smith/sql/init$ver
135    
136    
137  ##templates  ##templates
# Line 128  cp   root/etc/e-smith/templates/etc/e-sm Line 140  cp   root/etc/e-smith/templates/etc/e-sm
140  sed -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/00_restore_dumped_dbs  -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/10mysql_upgrade \  sed -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/00_restore_dumped_dbs  -i root$ver/etc/e-smith/templates/etc/e-smith/sql/init$ver/10mysql_upgrade \
141          -e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \          -e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \
142          -e "s_/usr/bin/mysql_/opt/rh/rh-mariadb${ver}/root/usr/bin/mysql_g" \          -e "s_/usr/bin/mysql_/opt/rh/rh-mariadb${ver}/root/usr/bin/mysql_g" \
143          -e "s_mariadb.service_rh-mariadb$ver-mariadb.service_" \          -e "s_mariadb.service_mariadb$ver-mariadb.service_" \
144          -e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \          -e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \
145          -e "s_mysqld_rh-mariadb$ver-mariadb_g" \          -e "s_mysqld_mariadb$ver-mariadb_g" \
146          -e "s_| mysql |_| /opt/rh/rh-mariadb${ver}/root/usr/bin/mysql --socket=$socket |_g" \          -e "s_| mysql |_| /opt/rh/rh-mariadb${ver}/root/usr/bin/mysql --socket=$socket |_g" \
147          -e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g"          -e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g"
148  mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf  mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf
# Line 138  echo " Line 150  echo "
150  [mariadb-$vers]" >  root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-05mariadb  [mariadb-$vers]" >  root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-05mariadb
151  echo "basedir=$basedir" >  root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-07basedir  echo "basedir=$basedir" >  root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-07basedir
152  echo "datadir=$datadir" > root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-08datadir  echo "datadir=$datadir" > root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-08datadir
153  cp -a root/etc/e-smith/templates/etc/my.cnf/009socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket  #cp -a root/etc/e-smith/templates/etc/my.cnf/009socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket
154  sed -i root$ver/etc/e-smith/templates/etc/my.cnf/$ver-09socket \  #sed -i root$ver/etc/e-smith/templates/etc/my.cnf/$ver-09socket \
155          -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \  #       -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \
156          -e "s_^socket.*_socket=${socket}_"  #       -e "s_^socket.*_socket=${socket}_"
157    cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_-09socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket
158    sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket \
159            -e "s_!!!VER!!!_${ver}_g" \
160            -e "s_!!!PORT!!!_${port}_g"
161  cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_-10port root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port  cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_-10port root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port
162  sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port \  sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-10port \
163          -e "s_!!!VER!!!_${ver}_g" \          -e "s_!!!VER!!!_${ver}_g" \
# Line 188  sed -i root$ver/usr/lib/systemd/system/m Line 204  sed -i root$ver/usr/lib/systemd/system/m
204  if [ $ver -ge  102 ]  if [ $ver -ge  102 ]
205  then  then
206    sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \    sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
207          -e "s/_safe//";          -e "s/_safe//" \
208            -e "s/^ExecStopPost.*//";
209  fi  fi
210  if [ $ver -ge  104 ]  if [ $ver -ge  104 ]
211  then  then
# Line 229  rm -rf $RPM_BUILD_ROOT Line 246  rm -rf $RPM_BUILD_ROOT
246      --file "/sbin/e-smith/systemd/mysql.init" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mysql.init" 'attr(0554,root,root)' \
247      --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \      --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \
248      --dir "/var/log/mariadb" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb" 'attr(0750,mysql,mysql)' \
249        --dir "/var/log/mysql.init" 'attr(0750,root,root)' \
250      > %{name}-%{version}-filelist      > %{name}-%{version}-filelist
251  echo "%doc COPYING"          >> %{name}-%{version}-filelist  echo "%doc COPYING"          >> %{name}-%{version}-filelist
252    
# Line 339  Koozali SME Server configuration package Line 357  Koozali SME Server configuration package
357    
358    
359  %changelog  %changelog
360    * Thu Sep 05 2024 Jean-Philippe Pialasse <jpp@koozali.org> 2.7.0-21.sme
361    - fix typo for user privileges backup [SME: 12145]
362    
363    * Sun Sep 01 2024 Jean-Philippe Pialasse <jpp@koozali.org> 2.7.0-19.sme
364    - backup user privileges in separate file [SME: 12145]
365      this will allow mariadb 10.3 and higher migration
366      and is needed to restore to SME 11
367    
368    * Thu Nov 23 2023 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-18.sme
369    - fix OpenFilesLimit too low preventing backup [SME: 12417]
370    - deleting extra folder in /home/e-smith/db/mysql/ for mariadb10*
371    
372    * Sun Dec 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-17.sme
373    - fix mariadb overriding skip-networking for other versions  [SME: 12262]
374    
375    * Mon Jul 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-16.sme
376    - use dedicated log file for *mysql.init [SME: 11953]
377    
378    * Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-15.sme
379    - Fix init for MariaDB 104+ [SME:11991]
380    
381    * Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-14.sme
382    - /usr/libexec/mysql-wait-stop not used after mariadb101 [SME: 11936]
383    
384    * Sat Apr 09 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-13.sme
385    - fix few typos [SME: 11936]
386    
387    * Sat Apr 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-12.sme
388    - remove SourcePath from mysql-init service file [SME: 11922]
389    
390    * Wed Mar 16 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-11.sme
391    - fix mariadb*-mysql.init path in service file [SME: 11899]
392    
393    * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-10.sme
394    - fix sclo metadata path for sql/init templated scripts [SME: 11899]
395    
396  * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme  * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme
397  - missing sockets for backup of db [SME: 11899]  - missing sockets for backup of db [SME: 11899]
398    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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