/[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.2 by jpp, Sun Mar 13 02:42:12 2022 UTC Revision 1.16 by jpp, Mon Mar 14 06:40:49 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 6
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 158  cp rootscl/sbin/e-smith/mariadb_VER_-pre Line 160  cp rootscl/sbin/e-smith/mariadb_VER_-pre
160  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 \
161          -i root$ver/sbin/e-smith/mariadb${ver}-preload \          -i root$ver/sbin/e-smith/mariadb${ver}-preload \
162          -e "s_!!!VER!!!_${ver}_g" \          -e "s_!!!VER!!!_${ver}_g" \
163          -e "s_!!!SOCKET!!!_$socket _g"          -e "s_!!!SOCKET!!!_${socket}_g"
164    if [ $ver -ge  104 ]
165    then
166      cp rootscl/sbin/e-smith/systemd/mariadb_VER_-post root$ver/sbin/e-smith/systemd/mariadb${ver}-post
167      sed -i root$ver/sbin/e-smith/systemd/mariadb${ver}-post -e "s_!!!VER!!!_${ver}_g" -e "s_!!!SOCKET!!!_${socket}_g"
168    fi
169    
170    
171  ## logrotate  ## logrotate
172  mkdir -p root$ver/etc/logrotate.d/  mkdir -p root$ver/etc/logrotate.d/
173  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" \
174  #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  
175    
176    
177  #systemd service  #systemd service
# Line 175  cp rootscl/usr/lib/systemd/system/mariad Line 182  cp rootscl/usr/lib/systemd/system/mariad
182  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
183  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 \
184          -e "s_!!!VER!!!_${ver}_g"          -e "s_!!!VER!!!_${ver}_g"
185    if [ $ver -ge  102 ]
186    then
187      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
188            -e "s/_safe//";
189    fi
190    if [ $ver -ge  104 ]
191    then
192      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
193            -e 's_set.password$_set.password2_'
194      sed -i root$ver/usr/lib/systemd/system/mariadb${ver}-mariadb.service \
195             -e "/^#ExecStartPost=/ i ExecStartPost=\/sbin\/e-smith\/systemd\/mariadb${ver}-post"
196    
197    fi
198    
199  #### TODO check it is similar to rh one and functional !  #### TODO check it is similar to rh one and functional !
200    
201  #/usb/bin to ease user  #/usr/bin to ease user
202  mkdir root$ver/usr/bin  mkdir root$ver/usr/bin
203  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog  for i in  mysql mysqlshow mysqladmin mysqldump mysqlimport mysqlbinlog
204  do  do
205    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}
206  done  done
207    
208    #phpMyAdmin template
209    mkdir -p root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/
210    sed rootscl/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql_VER_  \
211            -e "s_!!!SOCKET!!!_${socket}_g" \
212            -e "s_!!!VER!!!_${ver}_g" > root$ver/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/11configMysql${ver}
213    
214  done  done
215    
216  ###################################################  ###################################################
# Line 208  do Line 236  do
236  /sbin/e-smith/genfilelist root$ver/ \  /sbin/e-smith/genfilelist root$ver/ \
237      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \      --file "/sbin/e-smith/systemd/mariadb$ver-initialize" 'attr(0554,root,root)' \
238      --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)' \
239        --file "/sbin/e-smith/systemd/mariadb$ver-post.init" 'attr(0554,root,root)' \
240      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \      --dir "/home/e-smith/db/mariadb$ver" 'attr(0750,root,root)' \
241      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \      --dir "/var/log/mariadb$ver" 'attr(0750,mysql,mysql)' \
242        --file "/usr/bin/mysql$ver" 'attr(0554,root,root)' \
243        --file "/usr/bin/mysqladmin$ver" 'attr(0554,root,root)' \
244        --file "/usr/bin/mysqlbinlog$ver" 'attr(0554,root,root)' \
245        --file "/usr/bin/mysqldump$ver" 'attr(0554,root,root)' \
246        --file "/usr/bin/mysqlimport$ver" 'attr(0554,root,root)' \
247        --file "/usr/bin/mysqlshow$ver" 'attr(0554,root,root)' \
248  | grep -vE '/home/e-smith/db/mysql$' \  | grep -vE '/home/e-smith/db/mysql$' \
249      > %{name}-%{version}-filelist-mariadb$ver      > %{name}-%{version}-filelist-mariadb$ver
250  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver  echo "%doc COPYING"          >> %{name}-%{version}-filelist-mariadb$ver
# Line 287  Requires:       rh-mariadb105 Line 322  Requires:       rh-mariadb105
322  Requires:       rh-mariadb105-mariadb  Requires:       rh-mariadb105-mariadb
323  Requires:       rh-mariadb105-mariadb-server  Requires:       rh-mariadb105-mariadb-server
324  BuildRequires:  e-smith-devtools >= 1.13.1-03  BuildRequires:  e-smith-devtools >= 1.13.1-03
325    Requires:       smeserver-mysql >= 2.7.0-5
326  %description    -n smeserver-mariadb105  %description    -n smeserver-mariadb105
327  Koozali SME Server configuration package for mariadb105 RH SCLo  Koozali SME Server configuration package for mariadb105 RH SCLo
328    
# Line 299  Koozali SME Server configuration package Line 334  Koozali SME Server configuration package
334    
335    
336  %changelog  %changelog
337    * Mon Mar 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-6.sme
338    - fix [SME: ]
339    
340    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-5.sme
341    - fix typo in socket, seen with phpmyadmin [SME: 11899]
342    - fix permissions for mariadb105 [SME: 11899]
343      create a dedicated set.password for mariadb>103
344    
345    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-3.sme
346    - missing phpMyAdmin fragments [SME: 11899]
347    
348    * Sun Mar 13 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.7.0-2.sme
349    - fix few sclo issues [SME: 11899]
350      missing +x for binaries shortcut
351      mariadb105 passwordless root access
352      mysqld_safe-scl-helper vs mysqld-scl-helper
353    
354  * 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
355  - prepare spec for multiple version support [SME: 11899]  - prepare spec for multiple version support [SME: 11899]
356  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]  - package renamed from e-smith-mysql to smeserver-mysql [SME: 11897]


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