/[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.1 by jpp, Sun Mar 13 02:38:23 2022 UTC Revision 1.24 by jpp, Sat Apr 2 21:58:15 2022 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 1  %define release 12
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
12    Patch1: smeserver-mysql-2.7.0-bz11922-mysqlinit.patch
13    
14  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
15  BuildArchitectures: noarch  BuildArchitectures: noarch
16  Requires: mariadb-server  Requires: mariadb-server
17    # mariadb after 5.5 /in Centos 8 will package mysql_upgrade in mariadb-server-utils
18    # Requires: /usr/bin/mysql_upgrade
19  Requires: mariadb  Requires: mariadb
20  Requires: e-smith-base  Requires: e-smith-base
21  Requires: e-smith-lib >= 1.15.1-19  Requires: e-smith-lib >= 1.15.1-19
# Line 27  mysql. Line 31  mysql.
31    
32  %prep  %prep
33  %setup  %setup
34    %patch0 -p1
35    %patch1 -p1
36    
37  %build  %build
38  for ver in  101 102 103 105  for ver in  101 102 103 105
# Line 48  do Line 54  do
54  # default values from /etc/opt/rh/rh-mariadb101/my.cnf.d/mariadb-server.cnf  # default values from /etc/opt/rh/rh-mariadb101/my.cnf.d/mariadb-server.cnf
55  basedir="/opt/rh/rh-mariadb$ver/root/usr"  basedir="/opt/rh/rh-mariadb$ver/root/usr"
56  datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql"  datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql"
57  socket="/var/lib/mysql/maradb$ver.sock"  socket="/var/lib/mysql/mariadb$ver.sock"
58  logerror="/var//log/mariadb$ver/mariadb.log"  logerror="/var//log/mariadb$ver/mariadb.log"
59  #"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log"  #"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log"
60  pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid"  pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid"
# Line 110  sed -i root$ver/etc/e-smith/events/actio Line 116  sed -i root$ver/etc/e-smith/events/actio
116          -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 \
117          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-dump-tables \
118          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \          -i root$ver/etc/e-smith/events/actions/mariadb${ver}-load-tables \
119          -e "s_!!!VER!!!_${ver}_g"          -e "s_!!!VER!!!_${ver}_g" \
120            -e "s_!!!SOCKET!!!_${socket}_g"
121    
122  ##metadata  ##metadata
123  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
124  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
125    
126    
127  ##templates  ##templates
# Line 158  cp rootscl/sbin/e-smith/mariadb_VER_-pre Line 165  cp rootscl/sbin/e-smith/mariadb_VER_-pre
165  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 \
166          -i root$ver/sbin/e-smith/mariadb${ver}-preload \          -i root$ver/sbin/e-smith/mariadb${ver}-preload \
167          -e "s_!!!VER!!!_${ver}_g" \          -e "s_!!!VER!!!_${ver}_g" \
168          -e "s_!!!SOCKET!!!_$socket _g"          -e "s_!!!SOCKET!!!_${socket}_g"
169    if [ $ver -ge  104 ]
170    then
171      cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post
172      sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g"
173    fi
174    
175    
176  ## logrotate  ## logrotate
177  mkdir -p root$ver/etc/logrotate.d/  mkdir -p root$ver/etc/logrotate.d/
178  sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/logrotate.d/mariadb${ver}  sed rootscl/etc/logrotate.d/mariadb_VER_ -e "s_!!!VER!!!_${ver}_g" \
179  #cp -a root/etc/e-smith/templates/etc/logrotate.d/mariadb root$ver/etc/e-smith/templates/etc/logrotate.d/mariadb$ver          -e "s_!!!SOCKET!!!_${socket}_g" > root$ver/etc/logrotate.d/mariadb${ver}
 # TODO sed -i add  --socket= and change path  
180    
181    
182  #systemd service  #systemd service
# Line 175  cp rootscl/usr/lib/systemd/system/mariad Line 187  cp rootscl/usr/lib/systemd/system/mariad
187  cp rootscl/usr/lib/systemd/system/mariadb_VER_-mysql.init.service root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service  cp rootscl/usr/lib/systemd/system/mariadb_VER_-mysql.init.service root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service
188  sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service -i root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service \  sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service -i root$ver/usr/lib/systemd/system/mariadb${ver}-mysql.init.service \
189          -e "s_!!!VER!!!_${ver}_g"          -e "s_!!!VER!!!_${ver}_g"
190    if [ $ver -ge  102 ]
191    then
192      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
193            -e "s/_safe//";
194    fi
195    if [ $ver -ge  104 ]
196    then
197      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
198            -e 's_set.password$_set.password2_'
199      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
200             -e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post"
201    
202    fi
203    
204  #### TODO check it is similar to rh one and functional !  #### TODO check it is similar to rh one and functional !
205    
206  #/usb/bin to ease user  #/usr/bin to ease user
207  mkdir root$ver/usr/bin  mkdir root$ver/usr/bin
208  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog
209  do  do
210    echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/maradb${ver}.sock \"\$\@\" $i" >root$ver/usr/bin/$i${ver}    echo "/opt/rh/rh-mariadb${ver}/root/usr/bin/$i --socket=/var/lib/mysql/mariadb${ver}.sock \"\$@\"" >root$ver/usr/bin/$i${ver}
211  done  done
212    
213    #phpMyAdmin template
214    mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/
215    sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_  \
216            -e "s_!!!SOCKET!!!_${socket}_g" \
217            -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver}
218    
219  done  done
220    
221  ###################################################  ###################################################
# Line 208  do Line 241  do
241  /sbin/e-smith/genfilelist root$ver/ \  /sbin/e-smith/genfilelist root$ver/ \
242      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \
243      --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)' \
244        --file "/sbin/e-smith/systemd/mariadb$ver-post" 'attr(0554,root,root)' \
245      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \
246      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \
247        --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \
248        --file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \
249        --file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \
250        --file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \
251        --file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \
252        --file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \
253  | grep -vE '/home/e-smith/db/mysql$' \  | grep -vE '/home/e-smith/db/mysql$' \
254      > %{name}-%{version}-filelist-mariadb$ver      > %{name}-%{version}-filelist-mariadb$ver
255  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver
# Line 271  Group:          Database Line 311  Group:          Database
311  Requires:       rh-mariadb103  Requires:       rh-mariadb103
312  Requires:       rh-mariadb103-mariadb  Requires:       rh-mariadb103-mariadb
313  Requires:       rh-mariadb103-mariadb-server  Requires:       rh-mariadb103-mariadb-server
314    Requires:       rh-mariadb103-mariadb-server-utils
315  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
316    
317  %description    -n smeserver-mariadb103  %description    -n smeserver-mariadb103
# Line 286  Group:          Database Line 327  Group:          Database
327  Requires:       rh-mariadb105  Requires:       rh-mariadb105
328  Requires:       rh-mariadb105-mariadb  Requires:       rh-mariadb105-mariadb
329  Requires:       rh-mariadb105-mariadb-server  Requires:       rh-mariadb105-mariadb-server
330    Requires:       rh-mariadb105-mariadb-server-utils
331  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
332    Requires:       smeserver-mysql >= 2.7.0-5
333  %description    -n smeserver-mariadb105  %description    -n smeserver-mariadb105
334  Koozali SME Server configuration package for mariadb105 RH SCLo  Koozali SME Server configuration package for mariadb105 RH SCLo
335    
# Line 299  Koozali SME Server configuration package Line 341  Koozali SME Server configuration package
341    
342    
343  %changelog  %changelog
344    * Sat Apr 02 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-12.sme
345    - remove SourcePath from mysql-init service file [SME: 11922]
346    
347    * Wed Mar 16 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-11.sme
348    - fix mariadb*-mysql.init path in service file [SME: 11899]
349    
350    * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-10.sme
351    - fix sclo metadata path for sql/init templated scripts [SME: 11899]
352    
353    * Wed Mar 16 2022 Jean-Philipe Pialasse <tests@pialasse.com> 2.7.0-8.sme
354    - missing sockets for backup of db [SME: 11899]
355    
356    * Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-7.sme
357    - adding requirement for mariadb-server-utils (105 and 103) [SME: 11899]
358    
359    * Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme
360    - fix password for mariadb 105 [SME: 11899]
361    
362    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme
363    - fix typo in socket, seen with phpmyadmin [SME: 11899]
364    - fix permissions for mariadb105 [SME: 11899]
365      create a dedicated set.password for mariadb>103
366    
367    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme
368    - missing phpMyAdmin fragments [SME: 11899]
369    
370    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme
371    - fix few sclo issues [SME: 11899]
372      missing +x for binaries shortcut
373      mariadb105 passwordless root access
374      mysqld_safe-scl-helper vs mysqld-scl-helper
375    
376  * Fri Mar 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-1.sme  * Fri Mar 11 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-1.sme
377  - prepare spec for multiple version support [SME: 11899]  - prepare spec for multiple version support [SME: 11899]
378  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]
379  - remove duplicate logrotate and remove unsused template [SME: 11467]  - remove duplicate logrotate and remove unsused template [SME: 11467]
380  - move scripts /etc/rc.d/init.d/mysql-init to /sbin/e-smith/systemd [SME: 11898]  - move scripts /etc/rc.d/init.d/mysql-init to /sbin/e-smith/systemd [SME: 11898]
381  - add rh-mariadb101 support [SME: ]  - add rh-mariadb101 support [SME: 11901]
382  - add rh-mariadb102 support [SME: ]  - add rh-mariadb102 support [SME: 11902]
383  - add rh-mariadb103 support [SME: ]  - add rh-mariadb103 support [SME: 11903]
384  - add rh-mariadb105 support [SME: ]  - add rh-mariadb105 support [SME: 11904]
385    
386  * Tue Aug 17 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 2.6.0-22.sme  * Tue Aug 17 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 2.6.0-22.sme
387  - Remove template and set default max_allowed_packet=16M  - Remove template and set default max_allowed_packet=16M


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