|
@@ -1,9 +1,11 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
%global _initddir %{_sysconfdir}/init.d/
|
|
%global _initddir %{_sysconfdir}/init.d/
|
|
|
|
|
|
Name: groonga
|
|
Name: groonga
|
|
Summary: An Embeddable Fulltext Search Engine
|
|
Summary: An Embeddable Fulltext Search Engine
|
|
-Version: 11.0.0
|
|
|
|
-Release: 1%{?_dist_release}
|
|
|
|
|
|
+Version: 11.0.4
|
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
Group: office
|
|
Group: office
|
|
Vendor: Project Vine
|
|
Vendor: Project Vine
|
|
Distribution: Vine Linux
|
|
Distribution: Vine Linux
|
|
@@ -21,6 +23,9 @@ BuildRequires: libzstd-devel
|
|
BuildRequires: pcre-devel
|
|
BuildRequires: pcre-devel
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
Requires: %{name}-plugin-suggest = %{version}-%{release}
|
|
Requires: %{name}-plugin-suggest = %{version}-%{release}
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%else
|
|
|
|
+%endif
|
|
|
|
|
|
%description
|
|
%description
|
|
Groonga is an embeddable full-text search engine library. It can
|
|
Groonga is an embeddable full-text search engine library. It can
|
|
@@ -151,18 +156,22 @@ Munin plugins for Groonga
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-#% define optflags -O0
|
|
|
|
%setup -q
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
%configure \
|
|
%configure \
|
|
--disable-static \
|
|
--disable-static \
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ --with-package-platform=centos8 \
|
|
|
|
+%else
|
|
--with-package-platform=centos6 \
|
|
--with-package-platform=centos6 \
|
|
|
|
+%endif
|
|
--with-zlib \
|
|
--with-zlib \
|
|
--with-lz4 \
|
|
--with-lz4 \
|
|
--with-zstd \
|
|
--with-zstd \
|
|
--with-mecab \
|
|
--with-mecab \
|
|
|
|
+ --with-rapidjson=bundled \
|
|
--with-munin-plugins \
|
|
--with-munin-plugins \
|
|
--enable-mruby
|
|
--enable-mruby
|
|
|
|
|
|
@@ -177,6 +186,7 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|
rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la
|
|
rm $RPM_BUILD_ROOT%{_libdir}/groonga/plugins/*/*.la
|
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
|
|
|
|
|
+rm -rf groonga-doc
|
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc
|
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/groonga groonga-doc
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga
|
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/groonga
|
|
@@ -212,8 +222,15 @@ cat <<EOC > $RPM_BUILD_ROOT%{_sysconfdir}/munin/plugin-conf.d/groonga
|
|
env.gqtp_query_log_path %{_localstatedir}/log/groonga/query-gqtp.log
|
|
env.gqtp_query_log_path %{_localstatedir}/log/groonga/query-gqtp.log
|
|
EOC
|
|
EOC
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
+mkdir -p %{buildroot}%{_tmpfilesdir}
|
|
|
|
+mv -f %{buildroot}%{_sysconfdir}/tmpfiles.d/* %{buildroot}%{_tmpfilesdir}/
|
|
|
|
+mv -f %{buildroot}/usr%{_unitdir}/* %{buildroot}%{_unitdir}/
|
|
|
|
+%else
|
|
# this file is needed by systemd only
|
|
# this file is needed by systemd only
|
|
rm -rf %{buildroot}%{_sysconfdir}/tmpfiles.d
|
|
rm -rf %{buildroot}%{_sysconfdir}/tmpfiles.d
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%clean
|
|
%clean
|
|
@@ -235,53 +252,113 @@ fi
|
|
exit 0
|
|
exit 0
|
|
|
|
|
|
%post server-gqtp
|
|
%post server-gqtp
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post groonga-server-gqtp.service
|
|
|
|
+%else
|
|
/sbin/chkconfig --add groonga-server-gqtp
|
|
/sbin/chkconfig --add groonga-server-gqtp
|
|
|
|
+%endif
|
|
|
|
|
|
%post server-http
|
|
%post server-http
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post groonga-server-http.service
|
|
|
|
+%else
|
|
/sbin/chkconfig --add groonga-server-http
|
|
/sbin/chkconfig --add groonga-server-http
|
|
|
|
+%endif
|
|
|
|
|
|
%post httpd
|
|
%post httpd
|
|
if [ $1 = 1 ] ; then
|
|
if [ $1 = 1 ] ; then
|
|
mkdir -p %{_localstatedir}/log/groonga/httpd
|
|
mkdir -p %{_localstatedir}/log/groonga/httpd
|
|
chown -R groonga:groonga %{_localstatedir}/log/groonga/httpd
|
|
chown -R groonga:groonga %{_localstatedir}/log/groonga/httpd
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ %systemd_post groonga-httpd.service
|
|
|
|
+elif [ $1 = 2 ] ; then
|
|
|
|
+ /usr/sbin/groonga-httpd-restart > /dev/null 2>&1 || :
|
|
|
|
+%else
|
|
elif [ $1 = 2 ] ; then
|
|
elif [ $1 = 2 ] ; then
|
|
/sbin/service groonga-httpd restart >/dev/null 2>&1 || :
|
|
/sbin/service groonga-httpd restart >/dev/null 2>&1 || :
|
|
|
|
+%endif
|
|
fi
|
|
fi
|
|
|
|
|
|
%post munin-plugins
|
|
%post munin-plugins
|
|
%{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh
|
|
%{_sbindir}/munin-node-configure --shell --remove-also | grep -e 'groonga_' | sh
|
|
[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
|
|
[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ /bin/systemctl restart munin-node.service
|
|
|
|
+%else
|
|
/sbin/service munin-node restart > /dev/null 2>&1
|
|
/sbin/service munin-node restart > /dev/null 2>&1
|
|
|
|
+%endif
|
|
:
|
|
:
|
|
|
|
|
|
%preun server-http
|
|
%preun server-http
|
|
-if [ $1 = 0 ] ; then
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun groonga-server-http.service
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
|
|
/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
|
|
/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
|
|
/sbin/chkconfig --del groonga-server-http
|
|
/sbin/chkconfig --del groonga-server-http
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%postun server-http
|
|
%postun server-http
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_postun groonga-server-http.service
|
|
|
|
+%else
|
|
if [ $1 -ge 1 ] ; then
|
|
if [ $1 -ge 1 ] ; then
|
|
/sbin/service groonga-server-http condrestart >/dev/null 2>&1 || :
|
|
/sbin/service groonga-server-http condrestart >/dev/null 2>&1 || :
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%preun server-gqtp
|
|
%preun server-gqtp
|
|
-if [ $1 = 0 ] ; then
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun groonga-server-gqtp.service
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
|
|
/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
|
|
/sbin/service groonga-server-http stop >/dev/null 2>&1 || :
|
|
/sbin/chkconfig --del groonga-server-gqtp
|
|
/sbin/chkconfig --del groonga-server-gqtp
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%postun server-gqtp
|
|
%postun server-gqtp
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_postun groonga-server-gqtp.service
|
|
|
|
+%else
|
|
if [ $1 -ge 1 ] ; then
|
|
if [ $1 -ge 1 ] ; then
|
|
/sbin/service groonga-server-gqtp condrestart >/dev/null 2>&1 || :
|
|
/sbin/service groonga-server-gqtp condrestart >/dev/null 2>&1 || :
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%preun httpd
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun groonga-httpd.service
|
|
|
|
+%else
|
|
|
|
+if [ $1 = 0 -o -x /bin/systemctl ] ; then
|
|
|
|
+ %{_initddir}/groonga-httpd stop >/dev/null 2>&1 || :
|
|
|
|
+ /sbin/chkconfig --del groonga-server-gqtp
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%postun httpd
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_postun groonga-httpd.service
|
|
|
|
+%else
|
|
|
|
+if [ $1 -ge 1 ] ; then
|
|
|
|
+ %{_initddir}/groonga-httpd condrestart >/dev/null 2>&1 || :
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
|
|
|
|
%postun munin-plugins
|
|
%postun munin-plugins
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%else
|
|
if [ $1 -eq 0 ]; then
|
|
if [ $1 -eq 0 ]; then
|
|
[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
|
|
[ -f %{_localstatedir}/lock/subsys/munin-node ] && \
|
|
- /sbin/service munin-node restart >/dev/null 2>&1
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+ /bin/systemctl restart munin-node.service
|
|
|
|
+%else
|
|
|
|
+ /sbin/service munin-node restart > /dev/null 2>&1
|
|
|
|
+%endif
|
|
:
|
|
:
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
|
|
%triggerpostun -n groonga-server-common -- groonga-server-common < 2.0.8-2
|
|
%triggerpostun -n groonga-server-common -- groonga-server-common < 2.0.8-2
|
|
chown -R groonga:groonga %{_localstatedir}/lib/groonga
|
|
chown -R groonga:groonga %{_localstatedir}/lib/groonga
|
|
@@ -304,38 +381,53 @@ chown -R groonga:groonga %{_localstatedir}/run/groonga
|
|
%config(noreplace) %{_sysconfdir}/groonga/synonyms.tsv
|
|
%config(noreplace) %{_sysconfdir}/groonga/synonyms.tsv
|
|
|
|
|
|
%files server-common
|
|
%files server-common
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_tmpfilesdir}/*
|
|
|
|
+%endif
|
|
|
|
|
|
%files server-gqtp
|
|
%files server-gqtp
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%config(noreplace) %{_sysconfdir}/groonga/
|
|
%config(noreplace) %{_sysconfdir}/groonga/
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-gqtp
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-gqtp
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-gqtp
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-gqtp
|
|
-%{_initddir}/groonga-server-gqtp
|
|
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/groonga-server-gqtp.service
|
|
|
|
+%else
|
|
|
|
+%{_initddir}/groonga-server-gqtp
|
|
|
|
+%endif
|
|
|
|
|
|
%files server-http
|
|
%files server-http
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%config(noreplace) %{_sysconfdir}/groonga/
|
|
%config(noreplace) %{_sysconfdir}/groonga/
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-http
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-server-http
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-http
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-server-http
|
|
-%{_initddir}/groonga-server-http
|
|
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/groonga-server-http.service
|
|
|
|
+%else
|
|
|
|
+%{_initddir}/groonga-server-http
|
|
|
|
+%endif
|
|
|
|
|
|
%files httpd
|
|
%files httpd
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
%config(noreplace) %{_sysconfdir}/groonga/httpd/*
|
|
%config(noreplace) %{_sysconfdir}/groonga/httpd/*
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-httpd
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/groonga-httpd
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-httpd
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/groonga-httpd
|
|
-%{_initddir}/groonga-httpd
|
|
|
|
%{_sbindir}/groonga-httpd
|
|
%{_sbindir}/groonga-httpd
|
|
%{_sbindir}/groonga-httpd-restart
|
|
%{_sbindir}/groonga-httpd-restart
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%ghost %dir %{_localstatedir}/run/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
%attr(0750,groonga,groonga) %dir %{_localstatedir}/lib/%{name}/db
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%{_unitdir}/groonga-httpd.service
|
|
|
|
+%else
|
|
|
|
+%{_initddir}/groonga-httpd
|
|
|
|
+%endif
|
|
|
|
|
|
%files doc
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%defattr(-,root,root,-)
|
|
@@ -365,6 +457,10 @@ chown -R groonga:groonga %{_localstatedir}/run/groonga
|
|
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/*
|
|
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/*
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Jun 29 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.4-1
|
|
|
|
+- new upstream release.
|
|
|
|
+- added systemd support (disabled as default).
|
|
|
|
+
|
|
* Fri Mar 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
|
|
* Fri Mar 19 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 11.0.0-1
|
|
- new upstream release.
|
|
- new upstream release.
|
|
- dropped ldconfig scriptlets.
|
|
- dropped ldconfig scriptlets.
|