--- rpms/e-smith-cvm-unix-local/sme10/e-smith-cvm-unix-local.spec 2016/02/04 23:24:32 1.1 +++ rpms/e-smith-cvm-unix-local/sme10/e-smith-cvm-unix-local.spec 2022/02/18 04:07:52 1.6 @@ -1,15 +1,19 @@ -# $Id: e-smith-cvm-unix-local.spec,v 1.1 2013/02/07 22:48:09 slords Exp $ +# $Id: e-smith-cvm-unix-local.spec,v 1.5 2021/12/15 03:39:43 jpp Exp $ Summary: Module for supervising cvm auth daemon %define name e-smith-cvm-unix-local Name: %{name} -%define version 2.4.0 -%define release 1 +%define version 2.6.0 +%define release 5 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.xz +Patch0: e-smith-cvm-unix-local-2.6.0-bz11314-bz11125-systemd-update.patch +Patch1: e-smith-cvm-unix-local-2.6.0-bz11792-alwaysreload.patch +Patch2: e-smith-cvm-unix-local-2.6.0-bz11807-log.patch + BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot Requires: cvm daemontools Requires: e-smith-lib >= 1.13.1-90 @@ -21,6 +25,23 @@ AutoReqProv: no Module for supervising cvm auth daemon %changelog +* Thu Feb 17 2022 Jean-Philippe Pialasse 2.6.0-5.sme +- redirect and rotate log for cvm-unix [SME: 11807] + fix cvm-pre script permission + +* Tue Dec 14 2021 Jean-Philippe Pialasse 2.6.0-4.sme +- fix service stopping restarting on crash [SME: 11792] + +* Mon Jan 11 2021 Jean-Philipe Pialasse 2.6.0-3.sme +- fix typo [SME: 11314] + +* Fri Jan 08 2021 Jean-Philipe Pialasse 2.6.0-2.sme +- migrate to systemd [SME: 11314] +- add update event [SME: 11125] + +* Fri Feb 5 2016 Daniel Berteaud 2.6.0-1.sme +- Roll new stream for sme10 + * Thu Feb 7 2013 Shad L. Lords 2.4.0-1.sme - Roll new stream for sme9 @@ -80,31 +101,42 @@ Module for supervising cvm auth daemon %prep %setup +%patch0 -p1 +%patch1 -p1 +rm -rf root/var/service +%patch2 -p1 %build +perl createlinks %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) -mkdir -p $RPM_BUILD_ROOT/service mkdir -p $RPM_BUILD_ROOT/var/lib/cvm -ln -s /var/service/cvm-unix-local $RPM_BUILD_ROOT/service/cvm-unix-local mkdir -p $RPM_BUILD_ROOT/var/log/cvm +mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system/sme-server.target.wants +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + --file /sbin/e-smith/systemd/cvm-unix-pre 'attr(0554,root,root)' \ + --dir /var/lib/cvm 'attr(0755,root,root)' \ + --dir /var/log/cvm 'attr(0750,cvmlog,cvmlog)' \ + > %{name}-%{version}-%{release}-filelist + %pre /sbin/e-smith/create-system-user cvmlog 1003 'cvm output log user' /var/log/imap /bin/false +if [ $1 -gt 1 ] ; then + if [ -e /var/service/cvm-unix-local/run ] ; then + /usr/bin/sv d cvm-unix-local + /usr/bin/sv d cvm-unix-local/log + fi +fi %preun %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) -%dir %attr(1755,root,root)/var/service/cvm-unix-local -%attr(0755,root,root)/var/service/cvm-unix-local/run -%attr(0755,root,root)/var/lib/cvm -%dir %attr(0755,root,root)/var/service/cvm-unix-local/log -%attr(0755,root,root)/var/service/cvm-unix-local/log/run -%dir %attr(0750,cvmlog,cvmlog)/var/log/cvm -/service/cvm-unix-local + +