/[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.12 by jpp, Mon Mar 14 05:05:33 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 5
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    
13  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot  BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
14  BuildArchitectures: noarch  BuildArchitectures: noarch
# Line 27  mysql. Line 28  mysql.
28    
29  %prep  %prep
30  %setup  %setup
31    %patch0 -p1
32    
33  %build  %build
34  for ver in  101 102 103 105  for ver in  101 102 103 105
# Line 48  do Line 50  do
50  # 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
51  basedir="/opt/rh/rh-mariadb$ver/root/usr"  basedir="/opt/rh/rh-mariadb$ver/root/usr"
52  datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql"  datadir="/var/opt/rh/rh-mariadb$ver/lib/mysql"
53  socket="/var/lib/mysql/maradb$ver.sock"  socket="/var/lib/mysql/mariadb$ver.sock"
54  logerror="/var//log/mariadb$ver/mariadb.log"  logerror="/var//log/mariadb$ver/mariadb.log"
55  #"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log"  #"/var/opt/rh/rh-mariadb$ver/log/mariadb/mariadb.log"
56  pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid"  pidfile="/var/run/rh-mariadb$ver-mariadb/mariadb.pid"
# Line 162  sed -i root$ver/sbin/e-smith/systemd/mar Line 164  sed -i root$ver/sbin/e-smith/systemd/mar
164    
165  ## logrotate  ## logrotate
166  mkdir -p root$ver/etc/logrotate.d/  mkdir -p root$ver/etc/logrotate.d/
167  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" \
168  #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  
169    
170    
171  #systemd service  #systemd service
# Line 175  cp rootscl/usr/lib/systemd/system/mariad Line 176  cp rootscl/usr/lib/systemd/system/mariad
176  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
177  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 \
178          -e "s_!!!VER!!!_${ver}_g"          -e "s_!!!VER!!!_${ver}_g"
179    if [ $ver -ge  102 ]
180    then
181      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
182            -e "s/_safe//";
183    fi
184    if [ $ver -ge  104 ]
185    then
186      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
187            -e "s_set.password$_set.password2_"
188    fi
189    
190  #### TODO check it is similar to rh one and functional !  #### TODO check it is similar to rh one and functional !
191    
192  #/usb/bin to ease user  #/usb/bin to ease user
193  mkdir root$ver/usr/bin  mkdir root$ver/usr/bin
194  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog
195  do  do
196    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}
197  done  done
198    
199    #phpMyAdmin template
200    mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/
201    sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_  \
202            -e "s_!!!SOCKET!!!_$socket _g" \
203            -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver}
204    
205  done  done
206    
207  ###################################################  ###################################################
# Line 210  do Line 229  do
229      --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)' \
230      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \
231      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \
232        --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \
233        --file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \
234        --file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \
235        --file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \
236        --file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \
237        --file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \
238  | grep -vE '/home/e-smith/db/mysql$' \  | grep -vE '/home/e-smith/db/mysql$' \
239      > %{name}-%{version}-filelist-mariadb$ver      > %{name}-%{version}-filelist-mariadb$ver
240  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver
# Line 287  Requires:       rh-mariadb105 Line 312  Requires:       rh-mariadb105
312  Requires:       rh-mariadb105-mariadb  Requires:       rh-mariadb105-mariadb
313  Requires:       rh-mariadb105-mariadb-server  Requires:       rh-mariadb105-mariadb-server
314  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
315    Requires:       smeserver-mysql >= 2.7.0-4
316  %description    -n smeserver-mariadb105  %description    -n smeserver-mariadb105
317  Koozali SME Server configuration package for mariadb105 RH SCLo  Koozali SME Server configuration package for mariadb105 RH SCLo
318    
# Line 299  Koozali SME Server configuration package Line 324  Koozali SME Server configuration package
324    
325    
326  %changelog  %changelog
327    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme
328    - fix typo in socket, seen with phpmyadmin [SME: 11899]
329    - fix permissions for mariadb105 [SME: 11899]
330      create a dedicated set.password for mariadb>103
331    
332    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme
333    - missing phpMyAdmin fragments [SME: 11899]
334    
335    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme
336    - fix few sclo issues [SME: 11899]
337      missing +x for binaries shortcut
338      mariadb105 passwordless root access
339      mysqld_safe-scl-helper vs mysqld-scl-helper
340    
341  * 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
342  - prepare spec for multiple version support [SME: 11899]  - prepare spec for multiple version support [SME: 11899]
343  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]
344  - remove duplicate logrotate and remove unsused template [SME: 11467]  - remove duplicate logrotate and remove unsused template [SME: 11467]
345  - 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]
346  - add rh-mariadb101 support [SME: ]  - add rh-mariadb101 support [SME: 11901]
347  - add rh-mariadb102 support [SME: ]  - add rh-mariadb102 support [SME: 11902]
348  - add rh-mariadb103 support [SME: ]  - add rh-mariadb103 support [SME: 11903]
349  - add rh-mariadb105 support [SME: ]  - add rh-mariadb105 support [SME: 11904]
350    
351  * 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
352  - 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