Accepting request 746388 from server:php:applications

OBS-URL: https://build.opensuse.org/request/show/746388
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nextcloud?expand=0&rev=35
This commit is contained in:
Dominique Leuenberger 2019-11-07 22:21:29 +00:00 committed by Git OBS Bridge
commit b556f34179
7 changed files with 69 additions and 4 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6081421b33ecdb3130b2bfb2293a3f4045aeb0b471ee570e675de3d931a142a6
size 64500339

3
nextcloud-17.0.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:773e0ee526c2bbc359c012783b3ec65f3b0119a8821bcbacfba2b84ed8bf2b4b
size 65252188

9
nextcloud-cron Normal file
View File

@ -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

9
nextcloud-cron.service Normal file
View File

@ -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

10
nextcloud-cron.timer Normal file
View File

@ -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

View File

@ -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 Tue Oct 1 14:29:36 UTC 2019 - ecsos@opensuse.org

View File

@ -49,7 +49,7 @@
%endif %endif
Name: nextcloud Name: nextcloud
Version: 17.0.0 Version: 17.0.1
Release: 0 Release: 0
Summary: File hosting service Summary: File hosting service
License: AGPL-3.0-only License: AGPL-3.0-only
@ -61,17 +61,22 @@ Source2: README
Source3: README.SELinux Source3: README.SELinux
Source4: README.SUSE Source4: README.SUSE
Source5: robots.txt Source5: robots.txt
Source10: %{name}-cron
Source11: %{name}-cron.service
Source12: %{name}-cron.timer
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: apache2 >= 2.4 BuildRequires: apache2 >= 2.4
BuildRequires: cron
%if 0%{?suse_version} > 1020 %if 0%{?suse_version} > 1020
BuildRequires: fdupes BuildRequires: fdupes
%endif %endif
BuildRequires: unzip BuildRequires: unzip
%endif %endif
# #
Requires: cron
Requires: curl Requires: curl
Requires: libxml2-2 Requires: libxml2-2
Requires: mysql Requires: mysql
@ -110,6 +115,7 @@ Requires: php-xmlwriter
Requires: php-zip Requires: php-zip
Requires: php-zlib Requires: php-zlib
Recommends: sqlite3 Recommends: sqlite3
%{?systemd_requires}
%endif %endif
# Database connectors: # Database connectors:
Recommends: php-sqlite Recommends: php-sqlite
@ -184,7 +190,16 @@ rm -f ${idir}/indie.json
%fdupes -s $RPM_BUILD_ROOT/%{apache_serverroot}/%{name} %fdupes -s $RPM_BUILD_ROOT/%{apache_serverroot}/%{name}
%endif %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 %pre
%service_add_pre %{name}-cron.timer %{name}-cron.service
# avoid fatal php errors, while we are changing files # avoid fatal php errors, while we are changing files
# https://github.com/nextcloud # https://github.com/nextcloud
# #
@ -226,6 +241,7 @@ if [ -x %{ocphp_bin}/php -a -f %{oc_dir}/occ ]; then
fi fi
%post %post
%service_add_post %{name}-cron.timer %{name}-cron.service
if [ $1 -eq 1 ]; then if [ $1 -eq 1 ]; then
echo "%{name} First install complete" echo "%{name} First install complete"
else else
@ -272,12 +288,22 @@ fi
rm -f %{statedir}/apache_stopped_during_nextcloud_install rm -f %{statedir}/apache_stopped_during_nextcloud_install
rm -f %{statedir}/occ_maintenance_mode_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 %files
%defattr(644,root,root,755) %defattr(644,root,root,755)
%exclude %{apache_serverroot}/%{name}/README %exclude %{apache_serverroot}/%{name}/README
%exclude %{apache_serverroot}/%{name}/README.SUSE %exclude %{apache_serverroot}/%{name}/README.SUSE
%exclude %{apache_serverroot}/%{name}/README.SELinux %exclude %{apache_serverroot}/%{name}/README.SELinux
%doc README README.SUSE 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} %{apache_serverroot}/%{name}
%attr(-,wwwrun,www) %{apache_serverroot}/%{name}/occ %attr(-,wwwrun,www) %{apache_serverroot}/%{name}/occ
%config(noreplace) %{apache_confdir}/nextcloud.conf %config(noreplace) %{apache_confdir}/nextcloud.conf