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
This commit is contained in:
Eric Schirra 2017-05-22 17:45:53 +00:00 committed by Git OBS Bridge
parent e9c461ada6
commit 65916946be
4 changed files with 34 additions and 13 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28d5ee39f31c6be20f037ad2eb300272ad9bb72a7d428eb0152c7a3fde87d545
size 39873178

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

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

View File

@ -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 Mon Apr 24 18:09:20 UTC 2017 - adamradovits12@hotmail.com

View File

@ -48,7 +48,7 @@
%define statedir /run %define statedir /run
%endif %endif
Name: nextcloud Name: nextcloud
%define base_version 11.0.3 %define base_version 12.0.0
Version: %{base_version} Version: %{base_version}
Release: 0 Release: 0
Summary: File hosting service Summary: File hosting service
@ -118,6 +118,7 @@ cp %{SOURCE2} .
cp %{SOURCE3} . cp %{SOURCE3} .
cp %{SOURCE4} . cp %{SOURCE4} .
#%%patch0 -p0 #%%patch0 -p0
rm `find . -name ".gitignore" -or -name ".gitkeep"`
%build %build
@ -157,25 +158,25 @@ rm -f ${idir}/indie.json
# We don't do this for new installs. Only for updates. # 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, # 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. # 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" echo "%{name} update: Checking for running Apache"
# FIXME: this above should make it idempotent -- a requirement with openSUSE. # FIXME: this above should make it idempotent -- a requirement with openSUSE.
# it does not work. # it does not work.
%if 0%{?suse_version} && 0 %if 0%{?suse_version} && 0
%if 0%{?suse_version} <= 1110 %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 rcapache2 stop
%else %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 service apache2 stop
%endif %endif
%endif %endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} %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 service httpd stop
%endif %endif
fi 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" echo "%{name} pre-install: Stopping Apache"
fi 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 perl -pani -e 's@^(APACHE_MODULES=")@${1}php5 @' /etc/sysconfig/apache2
%endif %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" echo "%{name} post-install: Restarting Apache"
## If we stopped apache in pre section, we now should restart. -- but *ONLY* then! ## 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. ## 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 su %{oc_user} -s /bin/sh -c "cd %{oc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mode --off" || true
fi 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 %files
%defattr(-,wwwrun,www) %defattr(644,root,root,755)
%exclude %{apache_serverroot}/%{name}/README %exclude %{apache_serverroot}/%{name}/README
%exclude %{apache_serverroot}/%{name}/README.SELinux %exclude %{apache_serverroot}/%{name}/README.SELinux
%doc README README.SELinux %doc README README.SELinux
%{apache_serverroot}/%{name} %{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 %changelog