/[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.11 by jpp, Mon Mar 14 02:49:56 2022 UTC Revision 1.34 by jpp, Fri Nov 24 04:16:21 2023 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 5  %define release 18
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    
18  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
19  BuildArchitectures: noarch  BuildArchitectures: noarch
20  Requires: mariadb-server  Requires: mariadb-server
21    # mariadb after 5.5 /in Centos 8 will package mysql_upgrade in mariadb-server-utils
22    # Requires: /usr/bin/mysql_upgrade
23  Requires: mariadb  Requires: mariadb
24  Requires: e-smith-base  Requires: e-smith-base
25  Requires: e-smith-lib >= 1.15.1-19  Requires: e-smith-lib >= 1.15.1-19
# Line 29  mysql. Line 36  mysql.
36  %prep  %prep
37  %setup  %setup
38  %patch0 -p1  %patch0 -p1
39    %patch1 -p1
40    %patch2 -p1
41    %patch3 -p1
42    %patch4 -p1
43    %patch5 -p1
44    
45  %build  %build
46  for ver in  101 102 103 105  for ver in  101 102 103 105
# Line 63  port="${ports[$ver]}" Line 75  port="${ports[$ver]}"
75  mkdir -p root$ver/etc/e-smith/sql/init$ver  mkdir -p root$ver/etc/e-smith/sql/init$ver
76  mkdir -p root$ver/home/e-smith/db/mariadb$ver  mkdir -p root$ver/home/e-smith/db/mariadb$ver
77  mkdir -p root$ver/var/log/mariadb$ver  mkdir -p root$ver/var/log/mariadb$ver
78  mkdir -p root$ver/home/e-smith/db/mysql/mariadb$ver  #mkdir -p root$ver/home/e-smith/db/mysql/mariadb$ver
79  mkdir -p root$ver/etc/e-smith/events/actions  mkdir -p root$ver/etc/e-smith/events/actions
80    
81  # create configuration db default  # create configuration db default
# Line 112  sed -i root$ver/etc/e-smith/events/actio Line 124  sed -i root$ver/etc/e-smith/events/actio
124          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-delete-dumped-tables \          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-delete-dumped-tables \
125          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \
126          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \
127          -e "s_!!!VER!!!_${ver}_g"          -e "s_!!!VER!!!_${ver}_g" \
128            -e "s_!!!SOCKET!!!_${socket}_g"
129    
130  ##metadata  ##metadata
131  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
132  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
133    
134    
135  ##templates  ##templates
# Line 125  cp   root/etc/e-smith/templates/etc/e-sm Line 138  cp   root/etc/e-smith/templates/etc/e-sm
138  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 \
139          -e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \          -e "s_e-smith/db/mysql_e-smith/db/mariadb${ver}_g" \
140          -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" \
141          -e "s_mariadb.service_rh-mariadb$ver-mariadb.service_" \          -e "s_mariadb.service_mariadb$ver-mariadb.service_" \
142          -e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \          -e "s_/var/run/mariadb/mariadb.pid_${pidfile}_g" \
143          -e "s_mysqld_rh-mariadb$ver-mariadb_g" \          -e "s_mysqld_mariadb$ver-mariadb_g" \
144          -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" \
145          -e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g"          -e "s_mysql\_upgrade_mysql\_upgrade --socket=$socket _g"
146  mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf  mkdir -p root$ver/etc/e-smith/templates/etc/my.cnf
# Line 135  echo " Line 148  echo "
148  [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
149  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
150  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
151  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
152  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 \
153          -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \  #       -e "s_mariadb_{'mariadb${ver}\-mariadb'}_" \
154          -e "s_^socket.*_socket=${socket}_"  #       -e "s_^socket.*_socket=${socket}_"
155    cp rootscl/etc/e-smith/templates/etc/my.conf/_VER_-09socket root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket
156    sed -i root$ver/etc/e-smith/templates/etc/my.cnf/${ver}-09socket \
157            -e "s_!!!VER!!!_${ver}_g" \
158            -e "s_!!!PORT!!!_${port}_g"
159  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
160  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 \
161          -e "s_!!!VER!!!_${ver}_g" \          -e "s_!!!VER!!!_${ver}_g" \
# Line 160  cp rootscl/sbin/e-smith/mariadb_VER_-pre Line 177  cp rootscl/sbin/e-smith/mariadb_VER_-pre
177  sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-initialize -i root$ver/sbin/e-smith/systemd/mariadb${ver}-mysql.init \  sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-initialize -i root$ver/sbin/e-smith/systemd/mariadb${ver}-mysql.init \
178          -i root$ver/sbin/e-smith/mariadb${ver}-preload \          -i root$ver/sbin/e-smith/mariadb${ver}-preload \
179          -e "s_!!!VER!!!_${ver}_g" \          -e "s_!!!VER!!!_${ver}_g" \
180          -e "s_!!!SOCKET!!!_$socket _g"          -e "s_!!!SOCKET!!!_${socket}_g"
181    if [ $ver -ge  104 ]
182    then
183      cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post
184      sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g"
185    fi
186    
187    
188  ## logrotate  ## logrotate
189  mkdir -p root$ver/etc/logrotate.d/  mkdir -p root$ver/etc/logrotate.d/
# Line 179  sed -i root$ver/usr/lib/systemd/system/m Line 202  sed -i root$ver/usr/lib/systemd/system/m
202  if [ $ver -ge  102 ]  if [ $ver -ge  102 ]
203  then  then
204    sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \    sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
205          -e "s/_safe//";          -e "s/_safe//" \
206            -e "s/^ExecStopPost.*//";
207    fi
208    if [ $ver -ge  104 ]
209    then
210      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
211            -e 's_set.password$_set.password2_'
212      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
213             -e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post"
214    
215  fi  fi
216    
217  #### TODO check it is similar to rh one and functional !  #### TODO check it is similar to rh one and functional !
218    
219  #/usb/bin to ease user  #/usr/bin to ease user
220  mkdir root$ver/usr/bin  mkdir root$ver/usr/bin
221  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog
222  do  do
# Line 194  done Line 226  done
226  #phpMyAdmin template  #phpMyAdmin template
227  mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/  mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/
228  sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_  \  sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_  \
229          -e "s_!!!SOCKET!!!_$socket _g" \          -e "s_!!!SOCKET!!!_${socket}_g" \
230          -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver}          -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver}
231    
232  done  done
# Line 212  rm -rf $RPM_BUILD_ROOT Line 244  rm -rf $RPM_BUILD_ROOT
244      --file "/sbin/e-smith/systemd/mysql.init" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mysql.init" 'attr(0554,root,root)' \
245      --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \      --dir '/home/e-smith/db/mysql' 'attr(0750,root,root)' \
246      --dir "/var/log/mariadb" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb" 'attr(0750,mysql,mysql)' \
247        --dir "/var/log/mysql.init" 'attr(0750,root,root)' \
248      > %{name}-%{version}-filelist      > %{name}-%{version}-filelist
249  echo "%doc COPYING"          >> %{name}-%{version}-filelist  echo "%doc COPYING"          >> %{name}-%{version}-filelist
250    
# Line 222  do Line 255  do
255  /sbin/e-smith/genfilelist root$ver/ \  /sbin/e-smith/genfilelist root$ver/ \
256      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \
257      --file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mariadb$ver-mysql.init" 'attr(0554,root,root)' \
258        --file "/sbin/e-smith/systemd/mariadb$ver-post" 'attr(0554,root,root)' \
259      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \
260      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \
261      --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \      --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \
# Line 291  Group:          Database Line 325  Group:          Database
325  Requires:       rh-mariadb103  Requires:       rh-mariadb103
326  Requires:       rh-mariadb103-mariadb  Requires:       rh-mariadb103-mariadb
327  Requires:       rh-mariadb103-mariadb-server  Requires:       rh-mariadb103-mariadb-server
328    Requires:       rh-mariadb103-mariadb-server-utils
329  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
330    
331  %description    -n smeserver-mariadb103  %description    -n smeserver-mariadb103
# Line 306  Group:          Database Line 341  Group:          Database
341  Requires:       rh-mariadb105  Requires:       rh-mariadb105
342  Requires:       rh-mariadb105-mariadb  Requires:       rh-mariadb105-mariadb
343  Requires:       rh-mariadb105-mariadb-server  Requires:       rh-mariadb105-mariadb-server
344    Requires:       rh-mariadb105-mariadb-server-utils
345  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
346  Requires:       smeserver-mysql >= 2.7.0-4  Requires:       smeserver-mysql >= 2.7.0-5
347  %description    -n smeserver-mariadb105  %description    -n smeserver-mariadb105
348  Koozali SME Server configuration package for mariadb105 RH SCLo  Koozali SME Server configuration package for mariadb105 RH SCLo
349    
# Line 319  Koozali SME Server configuration package Line 355  Koozali SME Server configuration package
355    
356    
357  %changelog  %changelog
358    * Thu Nov 23 2023 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-18.sme
359    - fix OpenFilesLimit too low preventing backup [SME: 12417]
360    - deleting extra folder in /home/e-smith/db/mysql/ for mariadb10*
361    
362    * Sun Dec 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-17.sme
363    - fix mariadb overriding skip-networking for other versions  [SME: 12262]
364    
365    * Mon Jul 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-16.sme
366    - use dedicated log file for *mysql.init [SME: 11953]
367    
368    * Tue Jun 07 2022 John Crisp <jcrisp@safeandsoundit.co.uk> 2.7.0-15.sme
369    - Fix init for MariaDB 104+ [SME:11991]
370    
371    * Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-14.sme
372    - /usr/libexec/mysql-wait-stop not used after mariadb101 [SME: 11936]
373    
374    * Sat Apr 09 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-13.sme
375    - fix few typos [SME: 11936]
376    
377    * Sat Apr 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-12.sme
378    - remove SourcePath from mysql-init service file [SME: 11922]
379    
380    * Wed Mar 16 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-11.sme
381    - fix mariadb*-mysql.init path in service file [SME: 11899]
382    
383    * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-10.sme
384    - fix sclo metadata path for sql/init templated scripts [SME: 11899]
385    
386    * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme
387    - missing sockets for backup of db [SME: 11899]
388    
389    * Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-7.sme
390    - adding requirement for mariadb-server-utils (105 and 103) [SME: 11899]
391    
392    * Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme
393    - fix password for mariadb 105 [SME: 11899]
394    
395  * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme  * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme
396  - fix typo in socket, seen with phpmyadmin [SME: 11899]  - fix typo in socket, seen with phpmyadmin [SME: 11899]
397  - fix permissions for mariadb105 [SME: 11899]  - fix permissions for mariadb105 [SME: 11899]
398    revert change in release 2 for root password and fix set.password    create a dedicated set.password for mariadb>103
399    
400  * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme  * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme
401  - missing phpMyAdmin fragments [SME: 11899]  - missing phpMyAdmin fragments [SME: 11899]


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