From dadfd3eb6d9e4afd5b5717010559fb0a9a0d9c11685fbe26a360504f40f1247d Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Thu, 7 Nov 2019 18:18:45 +0000 Subject: [PATCH] Accepting request 746378 from home:ecsos:server Update to 17.0.1 OBS-URL: https://build.opensuse.org/request/show/746378 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=94 --- nextcloud-17.0.0.tar.bz2 | 3 --- nextcloud-17.0.1.tar.bz2 | 3 +++ nextcloud-cron | 9 +++++++++ nextcloud-cron.service | 9 +++++++++ nextcloud-cron.timer | 10 ++++++++++ nextcloud.changes | 11 +++++++++++ nextcloud.spec | 28 +++++++++++++++++++++++++++- 7 files changed, 69 insertions(+), 4 deletions(-) delete mode 100644 nextcloud-17.0.0.tar.bz2 create mode 100644 nextcloud-17.0.1.tar.bz2 create mode 100644 nextcloud-cron create mode 100644 nextcloud-cron.service create mode 100644 nextcloud-cron.timer diff --git a/nextcloud-17.0.0.tar.bz2 b/nextcloud-17.0.0.tar.bz2 deleted file mode 100644 index fee8dcf..0000000 --- a/nextcloud-17.0.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6081421b33ecdb3130b2bfb2293a3f4045aeb0b471ee570e675de3d931a142a6 -size 64500339 diff --git a/nextcloud-17.0.1.tar.bz2 b/nextcloud-17.0.1.tar.bz2 new file mode 100644 index 0000000..5b65489 --- /dev/null +++ b/nextcloud-17.0.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:773e0ee526c2bbc359c012783b3ec65f3b0119a8821bcbacfba2b84ed8bf2b4b +size 65252188 diff --git a/nextcloud-cron b/nextcloud-cron new file mode 100644 index 0000000..54bc3aa --- /dev/null +++ b/nextcloud-cron @@ -0,0 +1,9 @@ +# +# Nextcloud CronJob every 15 minutes. +# +# Uncomment to enable it. + +SHELL=/bin/sh +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +#*/15 * * * * wwwrun /usr/bin/php -f /srv/www/htdocs/nextcloud/cron.php /dev/null 2>&1 diff --git a/nextcloud-cron.service b/nextcloud-cron.service new file mode 100644 index 0000000..7ecea29 --- /dev/null +++ b/nextcloud-cron.service @@ -0,0 +1,9 @@ +[Unit] +Description=Nextcloud CronJob + +[Service] +User=wwwrun +ExecStart=/usr/bin/php -f /srv/www/htdocs/nextcloud/cron.php + +[Install] +WantedBy=basic.target diff --git a/nextcloud-cron.timer b/nextcloud-cron.timer new file mode 100644 index 0000000..9a988d6 --- /dev/null +++ b/nextcloud-cron.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Nextcloud CronJob - run every 5 minutes + +[Timer] +OnBootSec=5min +OnUnitActiveSec=5min +Unit=nextcloud-cron.service + +[Install] +WantedBy=timers.target diff --git a/nextcloud.changes b/nextcloud.changes index d73a451..5d0db36 100644 --- a/nextcloud.changes +++ b/nextcloud.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Nov 7 17:21:19 UTC 2019 - ecsos@opensuse.org + +- Update to 17.0.1 + - No changelog from upstream. + +------------------------------------------------------------------- +Wed Oct 2 10:45:46 UTC 2019 - ecsos@opensuse.org + +- Add missing CronJob for Nextcloud. + ------------------------------------------------------------------- Tue Oct 1 14:29:36 UTC 2019 - ecsos@opensuse.org diff --git a/nextcloud.spec b/nextcloud.spec index 517e719..fb01ff8 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -49,7 +49,7 @@ %endif Name: nextcloud -Version: 17.0.0 +Version: 17.0.1 Release: 0 Summary: File hosting service License: AGPL-3.0-only @@ -61,17 +61,22 @@ Source2: README Source3: README.SELinux Source4: README.SUSE Source5: robots.txt +Source10: %{name}-cron +Source11: %{name}-cron.service +Source12: %{name}-cron.timer BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %if 0%{?suse_version} BuildRequires: apache2 >= 2.4 +BuildRequires: cron %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif BuildRequires: unzip %endif # +Requires: cron Requires: curl Requires: libxml2-2 Requires: mysql @@ -110,6 +115,7 @@ Requires: php-xmlwriter Requires: php-zip Requires: php-zlib Recommends: sqlite3 +%{?systemd_requires} %endif # Database connectors: Recommends: php-sqlite @@ -184,7 +190,16 @@ rm -f ${idir}/indie.json %fdupes -s $RPM_BUILD_ROOT/%{apache_serverroot}/%{name} %endif +# CronJob +install -d -m 0755 %{buildroot}%{_sysconfdir}/cron.d +install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/cron.d/%{name} +install -D -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-cron.service +install -D -m 0644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-cron.timer +mkdir -p %{buildroot}%{_sbindir} +ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-cron + %pre +%service_add_pre %{name}-cron.timer %{name}-cron.service # avoid fatal php errors, while we are changing files # https://github.com/nextcloud # @@ -226,6 +241,7 @@ if [ -x %{ocphp_bin}/php -a -f %{oc_dir}/occ ]; then fi %post +%service_add_post %{name}-cron.timer %{name}-cron.service if [ $1 -eq 1 ]; then echo "%{name} First install complete" else @@ -272,12 +288,22 @@ fi rm -f %{statedir}/apache_stopped_during_nextcloud_install rm -f %{statedir}/occ_maintenance_mode_during_nextcloud_install +%preun +%service_del_preun %{name}-cron.timer %{name}-cron.service + +%postun +%service_del_postun %{name}-cron.timer %{name}-cron.service + %files %defattr(644,root,root,755) %exclude %{apache_serverroot}/%{name}/README %exclude %{apache_serverroot}/%{name}/README.SUSE %exclude %{apache_serverroot}/%{name}/README.SELinux %doc README README.SUSE README.SELinux +%config(noreplace) %{_sysconfdir}/cron.d/%{name} +%{_sbindir}/rc%{name}-cron +%{_unitdir}/%{name}-cron.service +%{_unitdir}/%{name}-cron.timer %{apache_serverroot}/%{name} %attr(-,wwwrun,www) %{apache_serverroot}/%{name}/occ %config(noreplace) %{apache_confdir}/nextcloud.conf