From 65916946becc9a4d59413710b88ee0da30a356fe87ed61a7d171af19d1af0c60 Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Mon, 22 May 2017 17:45:53 +0000 Subject: [PATCH 1/4] Accepting request 497369 from home:ecsos:server Update to 12.0.0 and fix boo#1036756 OBS-URL: https://build.opensuse.org/request/show/497369 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=15 --- nextcloud-11.0.3.tar.bz2 | 3 --- nextcloud-12.0.0.tar.bz2 | 3 +++ nextcloud.changes | 12 ++++++++++++ nextcloud.spec | 29 +++++++++++++++++++---------- 4 files changed, 34 insertions(+), 13 deletions(-) delete mode 100644 nextcloud-11.0.3.tar.bz2 create mode 100644 nextcloud-12.0.0.tar.bz2 diff --git a/nextcloud-11.0.3.tar.bz2 b/nextcloud-11.0.3.tar.bz2 deleted file mode 100644 index f7912a6..0000000 --- a/nextcloud-11.0.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28d5ee39f31c6be20f037ad2eb300272ad9bb72a7d428eb0152c7a3fde87d545 -size 39873178 diff --git a/nextcloud-12.0.0.tar.bz2 b/nextcloud-12.0.0.tar.bz2 new file mode 100644 index 0000000..798d689 --- /dev/null +++ b/nextcloud-12.0.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b9d9cf05e657cd564a552b418fbf42d669ca51e0fd1f1f118fe44cbf93a243f +size 41743343 diff --git a/nextcloud.changes b/nextcloud.changes index 288787b..f65633d 100644 --- a/nextcloud.changes +++ b/nextcloud.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon May 22 15:28:21 UTC 2017 - ecsos@opensuse.org + +- upstram update to version 12.0.0 + no changelog from upstream at this time + See https://github.com/nextcloud/server/issues?q=is%3Aissue+milestone%3A%22Nextcloud+12.0%22+is%3Aclosed + +------------------------------------------------------------------- +Fri Apr 28 22:46:46 UTC 2017 - ecsos@opensuse.org + +- fix boo#1036756: package security issue + ------------------------------------------------------------------- Mon Apr 24 18:09:20 UTC 2017 - adamradovits12@hotmail.com diff --git a/nextcloud.spec b/nextcloud.spec index 5774afd..91a7e7e 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -48,7 +48,7 @@ %define statedir /run %endif Name: nextcloud -%define base_version 11.0.3 +%define base_version 12.0.0 Version: %{base_version} Release: 0 Summary: File hosting service @@ -118,6 +118,7 @@ cp %{SOURCE2} . cp %{SOURCE3} . cp %{SOURCE4} . #%%patch0 -p0 +rm `find . -name ".gitignore" -or -name ".gitkeep"` %build @@ -157,25 +158,25 @@ rm -f ${idir}/indie.json # We don't do this for new installs. Only for updates. # If the first argument to pre is 1, the RPM operation is an initial installation. If the argument is 2, # the operation is an upgrade from an existing version to a new one. -if [ $1 -gt 1 -a ! -s /tmp/apache_stopped_during_nextcloud_install ]; then +if [ $1 -gt 1 -a ! -s %{statedir}/apache_stopped_during_nextcloud_install ]; then echo "%{name} update: Checking for running Apache" # FIXME: this above should make it idempotent -- a requirement with openSUSE. # it does not work. %if 0%{?suse_version} && 0 %if 0%{?suse_version} <= 1110 - rcapache2 status | grep running > /tmp/apache_stopped_during_nextcloud_install + rcapache2 status | grep running > %{statedir}/apache_stopped_during_nextcloud_install rcapache2 stop %else - service apache2 status | grep running > /tmp/apache_stopped_during_nextcloud_install + service apache2 status | grep running > %{statedir}/apache_stopped_during_nextcloud_install service apache2 stop %endif %endif %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} - service httpd status | grep running > /tmp/apache_stopped_during_nextcloud_install + service httpd status | grep running > %{statedir}/apache_stopped_during_nextcloud_install service httpd stop %endif fi -if [ -s /tmp/apache_stopped_during_nextcloud_install ]; then +if [ -s %{statedir}/apache_stopped_during_nextcloud_install ]; then echo "%{name} pre-install: Stopping Apache" fi @@ -205,7 +206,7 @@ perl -pani -e 's@^(APACHE_MODULES=".*)\bphp5\b@$1@' /etc/sysconfig/apache2 perl -pani -e 's@^(APACHE_MODULES=")@${1}php5 @' /etc/sysconfig/apache2 %endif -if [ -s /tmp/apache_stopped_during_nextcloud_install ]; then +if [ -s %{statedir}/apache_stopped_during_nextcloud_install ]; then echo "%{name} post-install: Restarting Apache" ## If we stopped apache in pre section, we now should restart. -- but *ONLY* then! ## Maybe delegate that task to occ upgrade? They also need to handle this, somehow. @@ -228,14 +229,22 @@ echo "%{name}: occ maintenance:mode --off" su %{oc_user} -s /bin/sh -c "cd %{oc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mode --off" || true fi -rm -f /tmp/apache_stopped_during_nextcloud_install +rm -f %{statedir}/apache_stopped_during_nextcloud_install +rm -f %{statedir}/occ_maintenance_mode_during_nextcloud_install %files -%defattr(-,wwwrun,www) +%defattr(644,root,root,755) %exclude %{apache_serverroot}/%{name}/README %exclude %{apache_serverroot}/%{name}/README.SELinux %doc README README.SELinux %{apache_serverroot}/%{name} -%config %attr(0644,root,root) %{apache_confdir}/nextcloud.conf +%attr(-,wwwrun,www) %{apache_serverroot}/%{name}/occ +%config(noreplace) %{apache_confdir}/nextcloud.conf +%config(noreplace) %{apache_serverroot}/%{name}/.user.ini +%defattr(664,wwwrun,www,775) +%{apache_serverroot}/%{name}/apps +%defattr(660,wwwrun,www,770) +%{apache_serverroot}/%{name}/config +%{apache_serverroot}/%{name}/data %changelog From fc540ae91e3f136e569047a9d7a62609b2ad517932dd79f7c1ec630ad5fd24fc Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Mon, 22 May 2017 19:16:16 +0000 Subject: [PATCH 2/4] Accepting request 497378 from home:ecsos:server minimal correction for update to 12.0.0 OBS-URL: https://build.opensuse.org/request/show/497378 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=16 --- README.SUSE | 14 ++++++++++++++ nextcloud.spec | 9 ++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 README.SUSE diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..3f6252f --- /dev/null +++ b/README.SUSE @@ -0,0 +1,14 @@ +To speed up nextcloud you should enable PHP OPcache + +The OPcache improves the performance of PHP applications by caching precompiled bytecode. We recommend at least following settings: + +Put this in this insert in /etc/php5/apache2/php.ini + +opcache.enable=On +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1 + diff --git a/nextcloud.spec b/nextcloud.spec index 91a7e7e..c820520 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -59,7 +59,8 @@ Source0: https://download.nextcloud.com/server/releases/%{name}-%{version Source1: apache_secure_data Source2: README Source3: README.SELinux -Source4: robots.txt +Source4: README.SUSE +Source5: robots.txt BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -117,8 +118,10 @@ hosting services and using them. cp %{SOURCE2} . cp %{SOURCE3} . cp %{SOURCE4} . +cp %{SOURCE5} . #%%patch0 -p0 -rm `find . -name ".gitignore" -or -name ".gitkeep"` +# git files should not be removed, otherwise nextcloud rise up ntegrity check failure. +#rm `find . -name ".gitignore" -or -name ".gitkeep"` %build @@ -236,7 +239,7 @@ rm -f %{statedir}/occ_maintenance_mode_during_nextcloud_install %defattr(644,root,root,755) %exclude %{apache_serverroot}/%{name}/README %exclude %{apache_serverroot}/%{name}/README.SELinux -%doc README README.SELinux +%doc README README.SUSE README.SELinux %{apache_serverroot}/%{name} %attr(-,wwwrun,www) %{apache_serverroot}/%{name}/occ %config(noreplace) %{apache_confdir}/nextcloud.conf From 9eae794eea9864049b38295e76a476d33d3fa6480644d4bd321c6170cc3ce36e Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Mon, 22 May 2017 20:01:49 +0000 Subject: [PATCH 3/4] Accepting request 497381 from home:ecsos:server another simple failure fix for update to 12.0.0 OBS-URL: https://build.opensuse.org/request/show/497381 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=17 --- nextcloud.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nextcloud.spec b/nextcloud.spec index c820520..e707da3 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -238,6 +238,7 @@ rm -f %{statedir}/occ_maintenance_mode_during_nextcloud_install %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 %{apache_serverroot}/%{name} From d24faa2277ba8eebecdd7550f7f86c091cdba10b8080c1279602664ec7157e1b Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Wed, 24 May 2017 20:59:15 +0000 Subject: [PATCH 4/4] Accepting request 498186 from home:ecsos:server Some other litle changes for 12.0 OBS-URL: https://build.opensuse.org/request/show/498186 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=18 --- nextcloud.changes | 2 +- nextcloud.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nextcloud.changes b/nextcloud.changes index f65633d..104ba5c 100644 --- a/nextcloud.changes +++ b/nextcloud.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon May 22 15:28:21 UTC 2017 - ecsos@opensuse.org -- upstram update to version 12.0.0 +- upstream update to version 12.0.0 no changelog from upstream at this time See https://github.com/nextcloud/server/issues?q=is%3Aissue+milestone%3A%22Nextcloud+12.0%22+is%3Aclosed diff --git a/nextcloud.spec b/nextcloud.spec index e707da3..0283457 100644 --- a/nextcloud.spec +++ b/nextcloud.spec @@ -119,9 +119,13 @@ cp %{SOURCE2} . cp %{SOURCE3} . cp %{SOURCE4} . cp %{SOURCE5} . -#%%patch0 -p0 -# git files should not be removed, otherwise nextcloud rise up ntegrity check failure. -#rm `find . -name ".gitignore" -or -name ".gitkeep"` +# delete unneeded gitfiles +rm -r `find . -name ".gitignore" -or -name ".gitkeep" -or -name ".github"` +# remove entries in signature.json to prevent integrity check failure +find . -iname signature.json \ + -exec sed -i "/\/.gitignore\": ./d" "{}" \; \ + -exec sed -i "/\/.gitkeep\": ./d" "{}" \; \ + -exec sed -i "/\/.github\": ./d" "{}" \; %build