Browse Source

updated 5 packages

clamav-0.102.3-1

galera-26.4.4-1

mariadb-10.4.13-1

php74-7.4.6-1

postgresql-12.3-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12399 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 3 years ago
parent
commit
c203521196
5 changed files with 371 additions and 87 deletions
  1. 142 27
      c/clamav/clamav-vl.spec
  2. 7 4
      g/galera/galera-vl.spec
  3. 117 21
      m/mariadb/mariadb-vl.spec
  4. 5 2
      p/php74/php74-vl.spec
  5. 100 33
      p/postgresql/postgresql-vl.spec

+ 142 - 27
c/clamav/clamav-vl.spec

@@ -1,3 +1,4 @@
+%bcond_with systemd
 %bcond_with external_llvm
 
 %define dbdir %{_localstatedir}/lib/clamav
@@ -13,10 +14,14 @@
 Summary: Clam AntiVirus
 Summary(ja): Clamアンチウィルススキャナ
 Name: clamav
-Version: 0.102.2
-Release: 1%{?_dist_release}
-License: GPL
+Version: 0.102.3
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
 Group: Applications/System
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: tomop, inagaki
+
+License: GPL
 URL: https://www.clamav.net/
 Source0: https://www.clamav.net/downloads/production/%{name}-%{version}.tar.gz
 Source1: clamd.init
@@ -25,6 +30,13 @@ Source3: clamav-milter.init
 Source4: clamav.logrotate
 Source5: clamav-milter.logrotate
 
+#for clamonacc
+Source100:  clamonacc.service
+#for clamav-milter.systemd
+Source330:  clamav-milter.systemd
+#for scanner-systemd/server-systemd
+Source530:  clamd.service
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: bzip2-devel, curl-devel > 7.10.0, gmp-devel, ncurses-devel
 BuildRequires: openssl-devel, pcre-devel, libxml2-devel, zlib-devel
@@ -37,10 +49,12 @@ BuildRequires: sendmail-devel
 %endif
 Requires: logrotate
 Requires(pre): shadow-utils, grep
-
-Vendor: Project Vine
-Distribution: Vine Linux
-Packager: tomop, inagaki
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+%endif
 
 %description
 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
@@ -59,12 +73,19 @@ AMaViS、圧縮ファイルをサポートし、OpenAntivirus.orgのウィルス
 %package milter
 Summary: Virus scanner for sendmail/postfix
 Group: Applications/System
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+%endif
 
 %description milter
 clamav-milter is a milter module to scan mails using Clam AntiVirus.
 
 %endif
 
+
 %package devel
 Group: Development/Libraries
 Summary: headers and libraries for development using Clam AntiVirus
@@ -80,19 +101,13 @@ Clam AntiVirus.
  clamav-devel パッケージは、Clam AntiVirus を用いた開発を行うための
 ヘッダファイルやライブラリファイルを提供します。
 
-%prep
-%setup -q
 
-perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamd.pid|' etc/clamd.conf.sample
-perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamd.log|' etc/clamd.conf.sample
+%debug_package
 
-perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/freshclam.pid|' etc/freshclam.conf.sample
-perl -pi -e 's|^#UpdateLogFile .+$|UpdateLogFile /var/log/clamav/freshclam.log|' etc/freshclam.conf.sample
 
-%if %{?milter}
-perl -pi -e 's|^#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|' etc/clamav-milter.conf.sample
-perl -pi -e 's|^#LogFile .+$|LogFile /var/log/clamav/clamav-milter.log|' etc/clamav-milter.conf.sample
-%endif
+%prep
+%setup -q
+
 
 %build
 %if %{?milter}
@@ -102,7 +117,12 @@ export have_milter=yes
 
 CFLAGS="%{pcre_cflags}" \
 %configure \
+	--disable-rpath \
+	--disable-silent-rules \
+	--enable-clamdtop \
 	--disable-clamav \
+	--enable-id-check \
+	--enable-dns \
 %if %{with external_llvm}
 	--enable-llvm \
 %else
@@ -121,34 +141,84 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_sysconfdir}/clamd.d
 mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
 mkdir -p %{buildroot}%{_initdir}
 mkdir -p %{buildroot}%{_localstatedir}/run/clamav
 mkdir -p %{buildroot}%{_localstatedir}/log/clamav
 make install DESTDIR=%{buildroot} transform='s,x,x,'
+
+%if %{with systemd}
+rm -f %{buildroot}%{_unitdir}/clamav-daemon.s*
+install -Dpm 0644 %{SOURCE100} %{buildroot}%{_unitdir}/clamonacc.service
+install -Dpm 0644 %{SOURCE530} %{buildroot}%{_unitdir}/clamd.service
+mkdir -p %{buildroot}%{_tmpfilesdir}
+cat << EOF > %{buildroot}%{_tmpfilesdir}/clamav.conf
+d %{_rundir}/clamav 0710 clamav clamav
+EOF
+%else
 install -m755 %{SOURCE1} %{buildroot}%{_initdir}/clamd
 install -m755 %{SOURCE2} %{buildroot}%{_initdir}/freshclam
-%if %{?milter}
-install -m755 %{SOURCE3} %{buildroot}%{_initdir}/clamav-milter
-install -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/clamav-milter
-mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdir}/clamav-milter.conf
 %endif
+
 install -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/clamav
 
+sed -ri \
+	-e 's!^Example!#Example!' \
+	-e 's|^#UpdateLogFile .*$|UpdateLogFile /var/log/clamav/freshclam.log|' \
+	%{buildroot}%_sysconfdir/freshclam.conf.sample
+
+sed -ri \
+	-e 's!^Example!#Example!' \
+	-e 's!^#?(LogFile ).*!#\1/var/log/clamav/clamd.log!g' \
+	-e 's!^#?(LocalSocket ).*!#\1%{_rundir}/clamav/clamd.sock!g' \
+	-e 's! /usr/local/share/clamav,! %{_sharedstatedir}/clamav,!g' \
+	%{buildroot}%_sysconfdir/clamd.conf.sample
+
+%if %{with systemd}
+sed -i -e 's|^#PidFile /var/run/|PidFile %{_rundir}/clamav/|' \
+	%{buildroot}%{_sysconfdir}/clamd.conf.sample \
+	%{buildroot}%{_sysconfdir}/freshclam.conf.sample
+%else
+sed -i -e 's|^#PidFile /var/run/|PidFile %{_localstatedir}/run/clamav/|' \
+	%{buildroot}%{_sysconfdir}/clamd.conf.sample \
+	%{buildroot}%{_sysconfdir}/freshclam.conf.sample
+%endif
+
 mv %{buildroot}%{_sysconfdir}/clamd.conf.sample %{buildroot}%{_sysconfdir}/clamd.conf
 mv %{buildroot}%{_sysconfdir}/freshclam.conf.sample %{buildroot}%{_sysconfdir}/freshclam.conf
 
-perl -pi -e 's|^#PidFile /var/run/|PidFile %{_localstatedir}/run/clamav/|' \
-	%{buildroot}%{_sysconfdir}/clamd.conf \
-	%{buildroot}%{_sysconfdir}/freshclam.conf
+%if %{?milter}
+sed -ri \
+    -e 's!^Example!#Example!' \
+	-e 's|^#LogFile .+$|LogFile /var/log/clamav/clamav-milter.log|' \
+    %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample
+
+%if %{with systemd}
+install -Dpm 0644 %{SOURCE330} %{buildroot}%{_unitdir}/clamav-milter.service
+sed -ri \
+	-e 's|^#PidFile .+$|PidFile /run/clamav/clamav-milter.pid|' \
+    %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample
+%else
+install -m755 %{SOURCE3} %{buildroot}%{_initdir}/clamav-milter
+sed -ri \
+	-e 's|^#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|' \
+    %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample
+%endif
+install -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/clamav-milter
+
+mv %{buildroot}%{_sysconfdir}/clamav-milter.conf.sample %{buildroot}%{_sysconfdir}/clamav-milter.conf
+%endif
 
 rm -f %{buildroot}%{_libdir}/lib*a
 
 mkdir -p %{buildroot}%{dbdir}
 
+
 %clean
 rm -rf %{buildroot}
 
+
 %pre
 if ! grep -q '^clamav:' /etc/group; then
     /usr/sbin/groupadd -r clamav
@@ -159,16 +229,27 @@ fi
 
 %post
 /sbin/ldconfig
+%if %{with systemd}
+%systemd_post clamd.service
+%systemd_post clamav-freshclam.service
+%{?with_tmpfiles:/bin/systemd-tmpfiles --create %{_tmpfilesdir}/clamav.conf || :}
+%else
 /sbin/chkconfig --add clamd
 /sbin/chkconfig --add freshclam
+%endif
 
 %preun
-if [ "$1" = 0 ]; then
+%if %{with systemd}
+%systemd_preun clamd.service
+%systemd_preun clamav-freshclam.service
+%else
+if [ "$1" = 0 -o -x /bin/systemctl ]; then
     [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd stop
     [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam stop
     /sbin/chkconfig --del clamd
     /sbin/chkconfig --del freshclam
 fi
+%endif
 
 %postun
 /sbin/ldconfig
@@ -180,33 +261,59 @@ if [ "$1" = 0 ]; then
         /usr/sbin/groupdel clamav
     fi
 else
+%if %{with systemd}
+%systemd_postun_with_restart clamd.service
+%systemd_postun_with_restart clamav-freshclam.service
+%else
     [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamd restart
     [ ! -f /var/run/clamav/freshclam.pid ] || /etc/init.d/freshclam restart
+%endif
 fi
 
 %if %{?milter}
 %post milter
+%if %{with systemd}
+%systemd_post clamav-milter.service
+%else
 /sbin/chkconfig --add clamav-milter
+%endif
 
 %preun milter
-if [ "$1" = 0 ]; then
+%if %{with systemd}
+%systemd_preun clamav-milter.service
+%else
+if [ "$1" = 0 -o -x /bin/systemctl ]; then
     [ ! -f /var/run/clamav/clamd.pid ] || /etc/init.d/clamav-milter stop
     /sbin/chkconfig --del clamav-milter
 fi
+%endif
 
 %postun milter
+%if %{with systemd}
+%systemd_postun_with_restart clamav-milter.service
+%else
 if [ "$1" -ge 1 ]; then
     [ ! -f /var/run/clamav/clamav-milter.pid ] || /etc/init.d/clamav-milter restart
 fi
 %endif
+%endif
+
 
 %files 
 %defattr(-,root,root)
 %license COPYING*
 %doc NEWS* README* examples
 %doc docs/UserManual
+%if %{with systemd}
+%{_unitdir}/clamav-freshclam.service
+%{_unitdir}/clamd.service
+%{_unitdir}/clamonacc.service
+%{_tmpfilesdir}/clamav.conf
+%else
 %{_initdir}/clamd
 %{_initdir}/freshclam
+%attr(-,clamav,clamav) %dir %{_localstatedir}/run/clamav
+%endif
 %config(noreplace) %{_sysconfdir}/clamd.conf
 %config(noreplace) %{_sysconfdir}/freshclam.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/clamav
@@ -215,7 +322,6 @@ fi
 %{_sbindir}/*
 %{_libdir}/lib*.so.*
 %{_libdir}/libclamunrar_iface.so
-%attr(-,clamav,clamav) %dir %{_localstatedir}/run/clamav
 %attr(-,clamav,clamav) %dir %{_localstatedir}/log/clamav
 %attr(0755,clamav,clamav) %dir %{dbdir}
 #%attr(-,clamav,clamav) %config(noreplace) %{dbdir}/main.cvd
@@ -226,7 +332,11 @@ fi
 
 %files milter
 %defattr(-,root,root)
+%if %{with systemd}
+%{_unitdir}/clamav-milter.service
+%else
 %{_initdir}/clamav-milter
+%endif
 %config(noreplace) %{_sysconfdir}/clamav-milter.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/clamav-milter
 %{_sbindir}/clamav-milter
@@ -243,6 +353,11 @@ fi
 %{_includedir}/*
 
 %changelog
+* Thu May 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.102.3-1
+- new upstream release.
+- added systemd support (disabled as default).
+- added debuginfo.
+
 * Thu Feb 06 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.102.2-1
 - new upstream release.
 

+ 7 - 4
g/galera/galera-vl.spec

@@ -2,7 +2,7 @@
 %bcond_with		python3
 
 %define galera_api_version 26.4
-%define mariadb_version 10.4.12
+%define mariadb_version 10.4.13
 
 %if %{with python3}
 %global scons scons-3
@@ -11,8 +11,8 @@
 %endif
 
 Name:           galera
-Version:        %{galera_api_version}.3
-Release:        2%{?_dist_release}%{?with_systemd:.systemd}
+Version:        %{galera_api_version}.4
+Release:        1%{?_dist_release}%{?with_systemd:.systemd}
 Summary:        Synchronous multi-master wsrep provider (replication engine)
 
 License:        GPLv2
@@ -100,7 +100,7 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE
 %if %{with systemd}
 %systemd_preun garbd.service
 %else
-if [ $1 = 0 ]; then
+if [ $1 = 0 -o -x /bin/systemctl ]; then
 /sbin/service garbd stop >/dev/null 2>/dev/null ||:
 /sbin/chkconfig --del garbd
 fi
@@ -134,6 +134,9 @@ fi
 
 
 %changelog
+* Thu May 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.4-1
+- new upstream release.
+
 * Sat Apr 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 26.4.3-2
 - rebuilt with boost-1.72.0.
 

+ 117 - 21
m/mariadb/mariadb-vl.spec

@@ -1,6 +1,9 @@
+%bcond_with systemd
 %bcond_with source
 %bcond_without onigmo
 
+%global daemon_name mariadb
+
 %define mysqld_user		mysql
 %define mysqld_group		mysql
 %define mysqldatadir /var/lib/mysql
@@ -11,32 +14,41 @@
 
 %define _unpackaged_files_terminate_build 1
 
+%define mariadb_version		10.4.13
 %define mariadb_base_version	10.4
-%define mariadb_version		10.4.12
-%define mroonga_version		9.12
-%define groonga_version		9.1.2
+%define mroonga_version		10.02
+%define groonga_version		10.0.2
 %define client_version		18
 
 %define galera_api_version	26.4
 
-Vendor: Project Vine
-Distribution: Vine Linux
-Packager:	tomop
-
-Name: mariadb
+Name:		mariadb
 Summary:	MariaDB: a very fast and robust SQL database server
 Version:	%{mariadb_version}
-Release:	1%{_dist_release}
-
+Release:	1%{_dist_release}%{?with_systemd:.systemd}
 Group:		Applications/Databases
+Vendor:		Project Vine
+Distribution:	Vine Linux
+Packager:	tomop
+
 License:	GPL2
 URL:		https://mariadb.org/
-
 Source:		https://downloads.mariadb.com/MariaDB/mariadb-%{version}/source/mariadb-%{version}.tar.gz
+
+# for systemd
+Source10:	mysql.tmpfiles.d.in
+Source11:	mysql.service.in
+Source12:	mysql-prepare-db-dir.sh
+Source14:	mysql-check-socket.sh
+Source15:	mysql-scripts-common.sh
+Source16:	mysql-check-upgrade.sh
+Source18:	mysql@.service.in
+
 # Don't depend on lib::mtr*
 Source998:	perl-requires.sh
 Source1000:	macros.mariadb.in
 
+Patch0:		mariadb-scripts.patch
 # replace mroonga to the newest version.
 #patch1000: mariadb-%{mariadb_version}-mroonga-master.patch
 Patch1000: 0001-MariaDB-%{mariadb_version}-Mroonga-v%{mroonga_version}-Groonga-v%{groonga_version}.patch
@@ -58,6 +70,14 @@ BuildRequires:	lz4-devel
 Requires:		fileutils sh-utils
 Provides:		msqlormysql MySQL mysql
 Obsoletes:		mysql MySQL5
+%if %{with systemd}
+BuildRequires:	systemd
+BuildRequires:	systemd-devel
+%{?systemd_requires}
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig
+%endif
 
 # From the manual
 %description
@@ -90,6 +110,7 @@ conditions of the GNU General Public License Version 2 (http://www.gnu.org/licen
 MariaDB documentation can be found at http://kb.askmonty.org/
 MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
 
+
 %package mroonga
 ##Version: %{mroonga_version}
 Version:	%{mariadb_version}
@@ -106,6 +127,7 @@ Mroonga is a fast fulltext searchable storage plugin for MariaDB.
 It is based on groonga that is a fast fulltext search engine and
 column store. Groonga is good at real-time update.
 
+
 %package connect
 Version:	%{mariadb_version}
 Summary:	CONNECT storage engine for MariaDB.
@@ -125,6 +147,7 @@ This storage engine supports table partitioning, MariaDB virtual
 columns and also permits defining special columns such as ROWID,
 FILEID, and SERVID.
 
+
 %package galera
 Version:	%{mariadb_version}
 Summary:	The configuration files and scripts for galera replication
@@ -137,6 +160,7 @@ Requires:	galera(%{galera_api_version})
 %description galera
  This package contains the files for MariaDB Galera Cluster.
 
+
 %ifarch x86_64
 %package tokudb
 Version:	%{mariadb_version}
@@ -152,6 +176,7 @@ better performance.
 
 %endif
 
+
 %package client
 Version:	%{mariadb_version}
 Summary: MariaDB - Client
@@ -186,6 +211,7 @@ Requires: %{name}-devel
 %description static
 This package provides static libraries of MariaDB.
 
+
 %if %{with source}
 %package source
 Version:	%{mariadb_version}
@@ -200,6 +226,7 @@ This package contains the sources files of MariaDB.
 
 %endif
 
+
 %package test
 Version:	%{mariadb_version}
 Requires: %{name}-client = %{version}-%{release} perl-DBI perl
@@ -224,13 +251,22 @@ This package contains a version of the MariaDB server that can be embedded
 into a client application instead of running as a separate process.
 
 
+%debug_package
+
+
 %prep
 %setup -q
+%if %{with systemd}
+%patch0 -p1
+%endif
 git --git-dir= apply -p1 %{PATCH1000}
-#patch1000 -p1 -b .mroonga
+cp -f \
+	%{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE14} \
+	%{SOURCE15} %{SOURCE16} %{SOURCE18} \
+	scripts/
 
-%build
 
+%build
 # Be strict about variables, bail at earliest opportunity, etc.
 set -eu
 
@@ -292,11 +328,34 @@ install -d %{buildroot}%{_infodir}
   make DESTDIR=%{buildroot} install
 )
 
+%if %{with systemd}
+install -d %{buildroot}%{_libexecdir}
+pushd release
+rm -rf %{buildroot}/usr/lib/systemd/system
+# install systemd unit files and scripts for handling server startup
+install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service
+install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}.service
+# Remove the upstream version
+rm -f %{buildroot}%{_tmpfilesdir}/tmpfiles.conf
+# Install downstream version
+install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf
+# helper scripts for service starting
+install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir
+install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket
+install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade
+install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common
+popd
+%else
+# drop systemd files.
+rm -rf %{buildroot}%{_sysconfdir}/systemd
+%endif
+
 install -m 0644  Docs/mysql.info %{buildroot}%{_infodir}
 rm -rf ./doc
 mv -f %{buildroot}%{_docdir} ./
 rm doc/README-wsrep
 
+rm -rf ./groonga ./groonga-normalizer-mysql
 mv -f %{buildroot}%{_datadir}/groonga ./
 mv -f %{buildroot}%{_datadir}/groonga-normalizer-mysql ./
 
@@ -322,6 +381,10 @@ rm -f %{buildroot}%{_libdir}/mysql/plugin/daemon_example.ini
 pushd release
 install -m644 ./storage/tokudb/tokudb.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/
 popd
+%if %{with systemd}
+mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d
+mv %{buildroot}/etc/systemd/system/mariadb.service.d/tokudb.conf %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf
+%endif
 %else
 rm -f %{buildroot}%{_mandir}/man1/tokuft*
 %endif
@@ -340,13 +403,12 @@ perl -pi -e 's,-lmariadb,%{_libdir}/libmariadbclient.a,' %{buildroot}%{_datadir}
 
 # install pam_user_map.so to /lib64/security for 64bit architectures
 %ifarch x86_64
-mkdir -p %{buildroot}/%{_lib}/security
-mv %{buildroot}/lib/security/pam_user_map.so %{buildroot}/%{_lib}/security/
+if [ ! -e %{buildroot}/%{_lib}/security/pam_user_map.so ]; then
+	mkdir -p %{buildroot}/%{_lib}/security
+	mv %{buildroot}/lib/security/pam_user_map.so %{buildroot}/%{_lib}/security/
+fi
 %endif
 
-# drop systemd files.
-rm -rf %{buildroot}%{_sysconfdir}/systemd
-
 # drop client library
 rm -f %{buildroot}%{_libdir}/libmariadb.so*
 rm -f %{buildroot}%{_prefix}/lib/pkgconfig/libmariadb.pc
@@ -364,12 +426,16 @@ useradd -M -r -d $datadir -s /bin/bash -c "MySQL server" -g mysql mysql 2> /dev/
 usermod -g mysql mysql 2> /dev/null || true
 
 %post server
-
 # Make MySQL start/shutdown automatically when the machine does it.
+
 if [ $1 = 1 ] ; then
+%if %{with systemd}
+%systemd_post %{daemon_name}.service
+%else
   if [ -x /sbin/chkconfig ] ; then
           /sbin/chkconfig --add mysql
   fi
+%endif
 
   basedir=`/usr/bin/my_print_defaults --mysqld|sed -ne 's/^--basedir=//p'|tail -1`
   if [ -z "$basedir" ] ; then
@@ -418,6 +484,10 @@ if [ $1 = 1 ] ; then
 fi
 
 %preun server
+%if %{with systemd}
+%systemd_preun %{daemon_name}.service
+%else
+%endif
 if [ $1 = 0 ] ; then
 	# Stop MySQL before uninstalling it
 	if [ -x /etc/init.d/mysql ] ; then
@@ -430,6 +500,9 @@ if [ $1 = 0 ] ; then
 fi
 
 %postun server
+%if %{with systemd}
+%systemd_postun_with_restart %{daemon_name}.service
+%else
 if [ $1 -ge 1 ]; then
   if [ -x /etc/init.d/mysql ] ; then
     # only restart the server if it was alredy running
@@ -437,6 +510,8 @@ if [ $1 -ge 1 ]; then
     /etc/init.d/mysql restart
   fi
 fi
+%endif
+
 
 %pre mroonga
 if [ $1 -gt 1 ]; then
@@ -585,12 +660,22 @@ fi
 %exclude %{_libdir}/mysql/plugin/ha_connect.so
 %exclude %{_libdir}/mysql/plugin/ha_mroonga.so
 %exclude %{_datadir}/mysql/mroonga
+%exclude %{_datadir}/mysql/systemd/use_galera_new_cluster.conf
 %dir %{_sysconfdir}/my.cnf.d
 %config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset
 %config(noreplace) %{_sysconfdir}/my.cnf.d/server.cnf
 %config(noreplace) %{_sysconfdir}/security/user_map.conf
 %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
+%if %{with systemd}
+%{_bindir}/mariadb-service-convert
+%{_unitdir}/*.service
+%{_tmpfilesdir}/%{name}.conf
+%dir %{_unitdir}/mariadb.service.d
+%{_libexecdir}/*
+%{_sysusersdir}/%{name}.conf
+%else
 %{_sysconfdir}/init.d/mysql
+%endif
 %{_datadir}/mysql
 %attr(755, mysql, mysql) %dir %{mysqldatadir}
 %ifarch x86_64
@@ -621,6 +706,9 @@ fi
 %config(noreplace) %{_sysconfdir}/my.cnf.d/galera.cnf
 %{_bindir}/galera_new_cluster
 %{_bindir}/galera_recovery
+%if %{with systemd}
+%{_datadir}/mysql/systemd/use_galera_new_cluster.conf
+%endif
 
 %ifarch x86_64
 %files tokudb
@@ -630,6 +718,9 @@ fi
 %{_libdir}/mysql/plugin/ha_tokudb.so
 %{_bindir}/tokuft*
 %doc %{_mandir}/man1/tokuft*
+%if %{with systemd}
+%{_unitdir}/mariadb.service.d/tokudb.conf
+%endif
 %endif
 
 %files client
@@ -697,7 +788,7 @@ fi
 %{_bindir}/mysql_config
 %{_includedir}/mysql
 %{_datadir}/aclocal/mysql.m4
-%{_datadir}/pkgconfig/mariadb.pc
+%{_libdir}/pkgconfig/mariadb.pc
 %exclude %{_libdir}/pkgconfig/libmariadb.pc
 %{_libdir}/*.so
 %{_sysconfdir}/rpm/*
@@ -743,6 +834,11 @@ fi
 
 
 %changelog
+* Thu May 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.4.13-1
+- new upstream release.
+- replaced patch1000 to update Groonga to v10.0.2.
+- added systemd support (disabled as default).
+
 * Mon Feb 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.4.12-1
 - new upstream release.
 - replaced patch1000 to update Groonga to v9.1.2.
@@ -924,7 +1020,7 @@ fi
 
 * Sat Sep 15 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.5.27-1
 - new upstream release.
-- added a sub-package 'MySQL-source".
+- added a sub-package "MySQL-source".
 - added some macros for rpm.
 
 * Thu Jun 21 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.5.25-1

+ 5 - 2
p/php74/php74-vl.spec

@@ -51,8 +51,8 @@
 Name: php%{majorver}
 Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
 Summary(ja): HTML 埋め込み型スクリプト言語 PHP
-Version: 7.4.5
-Release: 2%{_dist_release}%{?with_systemd:.systemd}
+Version: 7.4.6
+Release: 1%{_dist_release}%{?with_systemd:.systemd}
 Conflicts: php5 < 5.6.11
 
 Vendor: Project Vine
@@ -1051,6 +1051,9 @@ rm -f files.*
 
 #======================================================================
 %changelog
+* Thu May 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.6-1
+- new upstream release.
+
 * Fri Apr 24 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.4.5-2
 - rebuilt with icu67.
 

+ 100 - 33
p/postgresql/postgresql-vl.spec

@@ -1,10 +1,8 @@
+%bcond_with systemd
+
 %define plperl %{?_without_perl:0}%{!?_without_perl:1}
 %define plpython %{?_without_python:0}%{!?_without_python:1}
 %define non6xpamdeps 0
-#%define rel 0
-%define beta 0
-%{?beta:%define __os_install_post /usr/lib/rpm/brp-compress}
-%define _unpackaged_files_terminate_build 1
 
 %define tcl 1
 %define test 0
@@ -20,8 +18,12 @@
 Summary: PostgreSQL client programs
 Summary(ja): PostgreSQL のクライアントプログラム群
 Name: postgresql
-Version: 12.2
-Release: 1%{?_dist_release}
+Version: 12.3
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
+Group: Applications/Databases
+Vendor: Project Vine
+Distribution: Vine Linux
+
 %global pgver %(echo %{version} | sed -e 's/\\.[0-9]*$//')
 # Conventions for PostgreSQL Global Development Group RPM releases:
 #
@@ -44,44 +46,45 @@ Release: 1%{?_dist_release}
 # -- only test releases or full releases should be.
 
 License: BSD
-Group: Applications/Databases
+Url: https://www.postgresql.org/ 
 Source0: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
 Source3: postgresql.init
 Source5: https://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2.sha256
 Source6: README.rpm-dist
 Source15: postgresql-bashprofile
+Source1000: postgresql.service
+Source1001: postgresql.tmpfiles.d
 Patch2: postgresql-8.3.3-nls.patch
 Patch3: postgresql-7.4-ecpg-patch
-Buildrequires: perl build-essential
-Requires: /sbin/ldconfig initscripts
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: perl build-essential
+BuildRequires: bison, flex, pam-devel
+BuildRequires: libicu-devel
 %if %plpython
-Buildrequires: python python-devel
+BuildRequires: python python-devel
 %endif
 %if %tcl
-Buildrequires: tcl-devel
+BuildRequires: tcl-devel
 %endif
-Buildrequires: libedit-devel
-Buildrequires: zlib-devel >= 1.0.4
+BuildRequires: libedit-devel
+BuildRequires: zlib-devel >= 1.0.4
 %if %ssl
-Buildrequires: openssl-devel
+BuildRequires: openssl-devel
 %endif
 %if %kerberos
-Buildrequires: krb5-devel
+BuildRequires: krb5-devel
 %endif
 %if %nls
-Buildrequires: gettext >= 0.10.35
+BuildRequires: gettext >= 0.10.35
 %endif
 
 %if %pam
 %if %non6xpamdeps
-Buildrequires: pam-devel
+BuildRequires: pam-devel
 %endif
 %endif
 
-BuildRequires: bison, flex, pam-devel
-
-Url: http://www.postgresql.org/ 
-Buildroot: %{_tmppath}/%{name}-%{version}-root
 Obsoletes: postgresql-clients
 Obsoletes: postgresql-python
 Obsoletes: postgresql7
@@ -93,6 +96,17 @@ Conflicts: postgresql-jdbc < %{pgver}
 Obsoletes: postgresql7-plperl
 %endif
 
+Requires: /sbin/ldconfig initscripts
+Requires(pre): shadow-utils
+%if %{with systemd}
+BuildRequires: systemd-devel
+%{?systemd_requires}
+%else
+Requires(post): chkconfig
+Requires(preun): chkconfig, /sbin/service
+Requires(postun): chkconfig, /sbin/service
+%endif
+
 # This is the PostgreSQL Global Development Group Official RPMset spec file,
 # or a derivative thereof.
 # Copyright 2001 Lamar Owen <lamar@postgresql.org> <lamar.owen@wgcr.org>
@@ -118,9 +132,6 @@ Obsoletes: postgresql7-plperl
 # rpm --define 'packagename 0' .... to force the package NOT to build.
 # The base package, the lib package, the devel package, and the server package always get built.
 
-Vendor: Project Vine
-Distribution: Vine Linux
-
 %description
 PostgreSQL is an advanced Object-Relational database management system
 (DBMS) that supports almost all SQL constructs (including
@@ -210,6 +221,21 @@ PostgreSQL は先進的でオブジェクト指向的なデータベース管理
 テナンスしたりしたい場合は postgresql-server をインストールする必要が
 あります。さらに postgresql パッケージもインストールしてください。
 
+%package llvmjit
+Summary:        Just-in-time compilation support for PostgreSQL
+Summary(ja):    PostgreSQLのJust-in-timeコンパイルサポート
+Requires:       %{name}-server%{?_isa} = %{version}-%{release}
+Requires:       llvm => 5.0
+Provides:       postgresql-llvmjit >= %{version}-%{release}
+BuildRequires:  llvm-devel
+BuildRequires:  clang-devel
+
+%description llvmjit
+The postgresql-llvmjit package contains support for
+just-in-time compiling parts of PostgreSQL queries. Using LLVM it
+compiles e.g. expressions and tuple deforming into native code, with the
+goal of accelerating analytics queries.
+
 %package docs
 Summary: Extra documentation for PostgreSQL
 Summary(ja): PostgreSQL に関するその他の文書
@@ -240,6 +266,9 @@ Summary: PostgreSQL development header files.
 Summary(ja): PostgreSQL のサーバサイド開発用ヘッダファイル
 Group: Development/Libraries
 Requires: %{name}-static = %{version}
+Requires: libicu-devel
+Requires: clang-devel
+Requires: llvm-devel
 Obsoletes: postgresql7-devel
 Conflicts: postgresql8-devel
 Conflicts: libpq-devel >= 9.3.0
@@ -318,6 +347,9 @@ system, including regression tests and benchmarks.
 %endif
 
 
+%debug_package
+
+
 %prep
 %setup -q -n postgresql-%{version}
 
@@ -338,10 +370,6 @@ CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
 	--disable-rpath \
-%if %beta
-	--enable-debug \
-	--enable-cassert \
-%endif
 %if %plperl
 	--with-perl \
 %endif
@@ -369,7 +397,13 @@ CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
 	--mandir=%{_mandir} \
 	--with-docdir=%{_docdir} \
 	--includedir=%{_includedir}/pgsql \
-	--datadir=%{_datadir}/pgsql
+	--datadir=%{_datadir}/pgsql \
+	--with-icu \
+	--with-llvm \
+%if %{with systemd}
+	--with-systemd \
+%endif
+	%{nil}
 
 make %{?_smp_mflags} all
 make %{?_smp_mflags} -C contrib all
@@ -394,12 +428,18 @@ make -C contrib DESTDIR=$RPM_BUILD_ROOT install
 install -m644 src/Makefile.global $RPM_BUILD_ROOT%{_includedir}/pgsql
 install -m644 src/Makefile.shlib $RPM_BUILD_ROOT%{_includedir}/pgsql
 
+%if %{with systemd}
+install -Dpm0644 %{SOURCE1000} $RPM_BUILD_ROOT%{_unitdir}/postgresql.service
+# ... and make a tmpfiles script to recreate it at reboot.
+install -Dpm0644 %{SOURCE1001} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql.conf
+%else
 # initscript
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 sed -e "s/@pgver@/%{pgver}/" \
 	-e "s|@docdir@|%{_docdir}/postgresql-%{version}|" %{SOURCE3} \
 	> $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
 chmod 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/postgresql
+%endif
 
 # PGDATA needs removal of group and world permissions due to pg_pwd hole.
 install -d -m 700 $RPM_BUILD_ROOT/var/lib/pgsql/data
@@ -490,6 +530,7 @@ rm -rf ./extension
 mv -f %{buildroot}%{_docdir}/postgresql/extension ./
 rm -f %{buildroot}%{_mandir}/man1/ecpg.*
 
+
 %pre server
 groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
 useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
@@ -532,16 +573,27 @@ EOF
 fi
 
 %post server
-chkconfig --add postgresql
 /sbin/ldconfig
+%if %{with systemd}
+%systemd_post postgresql.service
+%else
+chkconfig --add postgresql
+%endif
 
 %preun server
-if [ $1 = 0 ] ; then
+%if %{with systemd}
+%systemd_preun postgresql.service
+%else
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
 	chkconfig --del postgresql
 fi
+%endif
 
 %postun server
 /sbin/ldconfig 
+%if %{with systemd}
+%systemd_postun_with_restart postgresql.service
+%else
 if [ $1 -ge 1 ]; then
   /sbin/service postgresql condrestart >/dev/null 2>&1
 fi
@@ -551,6 +603,7 @@ if [ $1 = 0 ] ; then
 	    groupdel postgres >/dev/null 2>&1 || : 
     fi
 fi
+%endif
 
 %if %tcl
 %post -p /sbin/ldconfig   tcl
@@ -603,9 +656,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/vacuumdb.*
 %{_mandir}/man3/*
 %{_mandir}/man7/*
-
-
 %{_localedir}/*/LC_MESSAGES/pgscripts-%{pgver}.mo
+%dir %{_libdir}/postgresql/bitcode
 
 %files docs
 %defattr(-,root,root)
@@ -679,7 +731,12 @@ rm -rf $RPM_BUILD_ROOT
 %files server -f server.lst
 %defattr(-,root,root)
 %doc extension
+%if %{with systemd}
+%{_unitdir}/postgresql.service
+%{_tmpfilesdir}/postgresql.conf
+%else
 %{_sysconfdir}/rc.d/init.d/postgresql
+%endif
 %dir %{_sysconfdir}/sysconfig/pgsql
 %{_bindir}/initdb
 %{_bindir}/pg_archivecleanup
@@ -742,6 +799,12 @@ rm -rf $RPM_BUILD_ROOT
 %attr(700,postgres,postgres) %dir /var/lib/pgsql/backups
 %attr(644,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile
 
+%files llvmjit
+%defattr(-,root,root)
+%{_libdir}/postgresql/bitcode/*
+%{_libdir}/postgresql/llvmjit.so
+%{_libdir}/postgresql/llvmjit_types.bc
+
 %files devel -f devel.lst
 %defattr(-,root,root)
 %{_includedir}/pgsql
@@ -789,6 +852,10 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Fri May 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.3-1
+- new upstream release.
+- added systemd support (disabled as default).
+
 * Fri Feb 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 12.2-1
 - new upstream release.