nextcloud/nextcloud.spec

265 lines
8.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package nextcloud
#
Accepting request 569360 from home:ecsos:server - update to 12.0.5 Many fixes were merged, the most important ones include: - #7144 Unlock files even if an exception occurs - #7322 Set primary action button color to same as theming color - #7323 Use the correct root for shared jail when the source storage is also a jail - #7353 Fix translation of federation scope menu - #7362 Allow to skip data dir permission checks - #7407 Check if owner of share exists - #7409 Add retry wrapper when reading files from swift - #7451 Fix constructor spy in unit test with Sinon 4.1.3 - #7455 Remove wrong entry in admin_settings that causes 500 - #7456 CardDAV convertor check should not be to wide - #7457 Fix loading icon position in the app menu - #7464 Allow getting the filepath when getting cached mounts - #7468 Allow 'Nextcloud' in the user agent string of Android - #7558 Fix email buttons for white theme - #7567 Respect sharing options when searching for Sharees - #7568 Fix duplicate session token after remembered login - #7577 Check userExists later, saves lookups for appData_INSTANCEID userids - #7672 Added additional methods for removal of sensitive info - #7688 Fix scss webroot and url rewrite - #7717 Throw ServerNotAvailableException when LDAP is caught shutting down - #7666 Fix drag shadow not visible when dragging a file on a narrow screen - #7674 Do no run SyncJob in cron - #7684 Fix inverted app icons on IE11 - #7694 Don't attempt to translate login names to uids when uids are provided - #7708 Don't show recurring msg when pages result was turned off - #7742 Hide favourite icon in details view if favourite action is not available - #7745 Don't lie about preview types - #7747 Update of composer - #7758 add option to use legacy v2 auth with s3 - #7759 Use correct L10N files for jsconfig - #7757 Wait for the shared link to be set in the acceptance tests - gallery/#349 Fix date picker not visible in slideshow sharing dialog - activity/#229 Properly construct path of root on file rename - #7770 Fix SCSS processing when undoing theming values - #7774 Update icewind/smb to 2.0.3 - #7777 Set height for sidebar icons - #7779 Improve zip support - #7786 Return correct mount type for federated shares - #7792 Fix empty details view after renaming a file - #7817 Fix preview when theming changes invertion of icons - #7821 Log full exception in cron instead of only the message - #7888 Keep all shipped apps enabled because they should be okay - #7962 update icewind/smb to 2.0.4 OBS-URL: https://build.opensuse.org/request/show/569360 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=29
2018-01-24 18:27:47 +01:00
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
#
%if 0%{?suse_version}
%define apache_serverroot /srv/www/htdocs
%define apache_confdir /etc/apache2/conf.d
%define apache_docdir /usr/share/doc/packages
%define apache_user wwwrun
%define apache_group www
%else
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%define apache_serverroot /var/www/html
%define apache_confdir /etc/httpd/conf.d
%define apache_user apache
%define apache_group apache
%define __jar_repack 0
%else
%define apache_serverroot /var/www
%define apache_confdir /etc/httpd/conf.d
%define apache_user www
%define apache_group www
%endif
%endif
%define oc_user %{apache_user}
%define oc_dir %{apache_serverroot}/%{name}
%define ocphp_bin /usr/bin
%if 0%{?rhel} == 600 || 0%{?rhel_version} == 600 || 0%{?centos_version} == 600
%define statedir /var/run
%else
%define statedir /run
%endif
Name: nextcloud
Accepting request 651187 from home:ecsos:server - update to 14.0.4 - Allow overwrite.cli.url without trailing slash (server#11772) - Remove duplicate call to decodeURIComponent (server#11781) - Check for empty string (server#11783) - Add "Referrer-Policy" to htaccess file, addresses issue #11099 (server#11798) - Always query the lookup server in a global scale setup (server#11800) - Fix a case where "password_by_talk" was not a boolean (server#11851) - Add .l10nignore files for compiled assets (server#11925) - Properly escape column name in "createFunction" call (server#11929) - Allow userId to be null (server#11939) - Allow "same-origin" as "Referrer-Policy" (Backport to stable14) (server#11950) - Do not emit preHooks twice on non-part-storage (server#11961) - Filter null values for UserManager::getByEmail (server#11976) - Allow local delivery of schedule message while prohibiting FreeBusy requests (server#11979) - Load apps/APP/l10n/*.js and themes/THEME/apps/APP/l10n/*.js (server#11990) - Lazy open first source stream in assemblystream (server#11994) - Fix opening a section again in the Files app (server#11995) - Remove cookies from Clear-Site-Data Header (server#12005) - Forwarded ExpiredTokenException (server#12032) - Allow chunked uploads even if your quota is not sufficient (server#12040) - Improve encrypt all / decrypt all (server#12045) - Double check for failed cache with a shared storage (server#12108) - Implement the size of an assembly stream (server#12111) - Bring the browser window of an actor to the foreground when acting as him (server#12120) - Move acceptance tests that crash the PHP built-in server to Apache (server#12121) - Remove unneeded empty search attribute values, fixes #12086 (server#12122) - Fixes wrong variable usage (server#12137) - LDAP: announce display name changes so that addressbook picks it up (server#12141) - Bruteforce protection handling in combination with (server#12160) - Add global site selector as user back-end which doesn't support password confirmation (server#12184) - Do not set indeterminate state for file shares (server#12187) - Revert "Wait for cron to finish before running upgrade command" (server#12197) - Fix bug #12151: fix list formatting by correcting malformed html (server#12202) - A folder should get a folder mimetype (server#12297) - Use the proper server for the apptoken flow login (server#12299) - Do not log FileLock as exception (server#12300) - Set the filemodel before rending the detailsview (server#12301) - Disabled ldap fix (server#12331) - Fix - Add to favorites not working in IE11 (server#12339) - Remove arrow function for ie compatibility (server#12341) - Fix default types of activity event member variables (server#12353) - Suppress wrong audit log messages about failed login attempts (server#12372) - Add fix for IE11 flexbox height bug (server#12374) - Properly search the root of a shared external storage (server#12375) - Fix app update available check (server#12412) - Use nextcloud-password-confirmation (server#12416) - Fix IE rule for min width (server#12431) - Added cache override to ensure an always up-to-date accessibility css (server#12432) - Unique contraint and deadlock fixes for filecache and file_locks (server#12433) - Fix app menu calculation for random size of the right header (server#12440) - Fix missing quickaccess favorite folder on add (server#12441) - Fixes dav share issue with owner (server#12459) - Fix wrong share popover opening on share link (server#12482) - Only use width and opacity for transition (server#12492) - Forward object not found error in swift as dav 404 (server#12502) - Fix the warning appearing in the admin section when mail_smtpmode is not configured (server#12529) - Remove unused svg api route (server#12542) - Bearer tokens are app token (server#12545) - Handle permission in update of share better (server#12561) - Correctly restrict affected users when using command to send emails (activity#312) - Improve code blocks in markdown rendering (files_texteditor#121) - Properly escape column name in "createFunction" call (survey_client#85) OBS-URL: https://build.opensuse.org/request/show/651187 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=57
2018-11-22 18:18:45 +01:00
Version: 14.0.4
Release: 0
Summary: File hosting service
License: AGPL-3.0-only
Group: Productivity/Networking/Web/Utilities
Url: http://www.nextcloud.com
Source0: https://download.nextcloud.com/server/releases/%{name}-%{version}.tar.bz2
Source1: apache_secure_data
Source2: README
Source3: README.SELinux
Source4: README.SUSE
Source5: robots.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?suse_version}
BuildRequires: apache2 >= 2.4
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%endif
BuildRequires: unzip
%endif
#
Requires: curl
Requires: mysql
Requires: php-gd
Requires: php-json
Requires: php-mbstring
Requires: php-mysql
Requires: php-posix
Requires: php-zip
#
%if 0%{?fedora_version} || 0%{?rhel} || 0%{?rhel_version} || 0%{?centos_version}
Requires: php < 7.3.0
Accepting request 569360 from home:ecsos:server - update to 12.0.5 Many fixes were merged, the most important ones include: - #7144 Unlock files even if an exception occurs - #7322 Set primary action button color to same as theming color - #7323 Use the correct root for shared jail when the source storage is also a jail - #7353 Fix translation of federation scope menu - #7362 Allow to skip data dir permission checks - #7407 Check if owner of share exists - #7409 Add retry wrapper when reading files from swift - #7451 Fix constructor spy in unit test with Sinon 4.1.3 - #7455 Remove wrong entry in admin_settings that causes 500 - #7456 CardDAV convertor check should not be to wide - #7457 Fix loading icon position in the app menu - #7464 Allow getting the filepath when getting cached mounts - #7468 Allow 'Nextcloud' in the user agent string of Android - #7558 Fix email buttons for white theme - #7567 Respect sharing options when searching for Sharees - #7568 Fix duplicate session token after remembered login - #7577 Check userExists later, saves lookups for appData_INSTANCEID userids - #7672 Added additional methods for removal of sensitive info - #7688 Fix scss webroot and url rewrite - #7717 Throw ServerNotAvailableException when LDAP is caught shutting down - #7666 Fix drag shadow not visible when dragging a file on a narrow screen - #7674 Do no run SyncJob in cron - #7684 Fix inverted app icons on IE11 - #7694 Don't attempt to translate login names to uids when uids are provided - #7708 Don't show recurring msg when pages result was turned off - #7742 Hide favourite icon in details view if favourite action is not available - #7745 Don't lie about preview types - #7747 Update of composer - #7758 add option to use legacy v2 auth with s3 - #7759 Use correct L10N files for jsconfig - #7757 Wait for the shared link to be set in the acceptance tests - gallery/#349 Fix date picker not visible in slideshow sharing dialog - activity/#229 Properly construct path of root on file rename - #7770 Fix SCSS processing when undoing theming values - #7774 Update icewind/smb to 2.0.3 - #7777 Set height for sidebar icons - #7779 Improve zip support - #7786 Return correct mount type for federated shares - #7792 Fix empty details view after renaming a file - #7817 Fix preview when theming changes invertion of icons - #7821 Log full exception in cron instead of only the message - #7888 Keep all shipped apps enabled because they should be okay - #7962 update icewind/smb to 2.0.4 OBS-URL: https://build.opensuse.org/request/show/569360 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=29
2018-01-24 18:27:47 +01:00
Requires: php >= 5.6.0
Requires: php-process
Requires: php-xml
#
Recommends: sqlite
%endif
#
%if 0%{?suse_version}
Requires: apache2
Requires: mod_php_any < 7.3.0
Accepting request 569360 from home:ecsos:server - update to 12.0.5 Many fixes were merged, the most important ones include: - #7144 Unlock files even if an exception occurs - #7322 Set primary action button color to same as theming color - #7323 Use the correct root for shared jail when the source storage is also a jail - #7353 Fix translation of federation scope menu - #7362 Allow to skip data dir permission checks - #7407 Check if owner of share exists - #7409 Add retry wrapper when reading files from swift - #7451 Fix constructor spy in unit test with Sinon 4.1.3 - #7455 Remove wrong entry in admin_settings that causes 500 - #7456 CardDAV convertor check should not be to wide - #7457 Fix loading icon position in the app menu - #7464 Allow getting the filepath when getting cached mounts - #7468 Allow 'Nextcloud' in the user agent string of Android - #7558 Fix email buttons for white theme - #7567 Respect sharing options when searching for Sharees - #7568 Fix duplicate session token after remembered login - #7577 Check userExists later, saves lookups for appData_INSTANCEID userids - #7672 Added additional methods for removal of sensitive info - #7688 Fix scss webroot and url rewrite - #7717 Throw ServerNotAvailableException when LDAP is caught shutting down - #7666 Fix drag shadow not visible when dragging a file on a narrow screen - #7674 Do no run SyncJob in cron - #7684 Fix inverted app icons on IE11 - #7694 Don't attempt to translate login names to uids when uids are provided - #7708 Don't show recurring msg when pages result was turned off - #7742 Hide favourite icon in details view if favourite action is not available - #7745 Don't lie about preview types - #7747 Update of composer - #7758 add option to use legacy v2 auth with s3 - #7759 Use correct L10N files for jsconfig - #7757 Wait for the shared link to be set in the acceptance tests - gallery/#349 Fix date picker not visible in slideshow sharing dialog - activity/#229 Properly construct path of root on file rename - #7770 Fix SCSS processing when undoing theming values - #7774 Update icewind/smb to 2.0.3 - #7777 Set height for sidebar icons - #7779 Improve zip support - #7786 Return correct mount type for federated shares - #7792 Fix empty details view after renaming a file - #7817 Fix preview when theming changes invertion of icons - #7821 Log full exception in cron instead of only the message - #7888 Keep all shipped apps enabled because they should be okay - #7962 update icewind/smb to 2.0.4 OBS-URL: https://build.opensuse.org/request/show/569360 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=29
2018-01-24 18:27:47 +01:00
Requires: mod_php_any >= 5.6.0
Requires: php-ctype
Requires: php-curl
# SUSE does not include the fileinfo module in php-common.
Requires: php-fileinfo
Requires: php-iconv
Requires: php-openssl
Requires: php-pear
Requires: php-xmlreader
Requires: php-xmlwriter
Requires: php-zlib
#
Recommends: sqlite3
%endif
#
Recommends: php-imagick
Recommends: php-sqlite
%description
Nextcloud is a suite of client-server software for creating file
hosting services and using them.
%prep
%setup -q -n %{name}
cp %{SOURCE2} .
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
### Don't remove git files!!
### git files should not be removed, otherwise nextcloud rise up integrity check failure in some situations.
###
## 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" "{}" \;
#rm -f 3rdparty/symfony/debug/Resources/ext/*.{c,h}
%build
%install
# no server side java code contained, alarm is false
idir=$RPM_BUILD_ROOT/%{apache_serverroot}/%{name}
mkdir -p $idir
mkdir -p $idir/data
mkdir -p $idir/search
cp -aRf * $idir
cp -aRf .htaccess $idir
cp -aRf .user.ini $idir
# $idir/l10n to disappear in future
#rm -f $idir/l10n/l10n.pl
if [ ! -f $idir/robots.txt ]; then
Accepting request 569360 from home:ecsos:server - update to 12.0.5 Many fixes were merged, the most important ones include: - #7144 Unlock files even if an exception occurs - #7322 Set primary action button color to same as theming color - #7323 Use the correct root for shared jail when the source storage is also a jail - #7353 Fix translation of federation scope menu - #7362 Allow to skip data dir permission checks - #7407 Check if owner of share exists - #7409 Add retry wrapper when reading files from swift - #7451 Fix constructor spy in unit test with Sinon 4.1.3 - #7455 Remove wrong entry in admin_settings that causes 500 - #7456 CardDAV convertor check should not be to wide - #7457 Fix loading icon position in the app menu - #7464 Allow getting the filepath when getting cached mounts - #7468 Allow 'Nextcloud' in the user agent string of Android - #7558 Fix email buttons for white theme - #7567 Respect sharing options when searching for Sharees - #7568 Fix duplicate session token after remembered login - #7577 Check userExists later, saves lookups for appData_INSTANCEID userids - #7672 Added additional methods for removal of sensitive info - #7688 Fix scss webroot and url rewrite - #7717 Throw ServerNotAvailableException when LDAP is caught shutting down - #7666 Fix drag shadow not visible when dragging a file on a narrow screen - #7674 Do no run SyncJob in cron - #7684 Fix inverted app icons on IE11 - #7694 Don't attempt to translate login names to uids when uids are provided - #7708 Don't show recurring msg when pages result was turned off - #7742 Hide favourite icon in details view if favourite action is not available - #7745 Don't lie about preview types - #7747 Update of composer - #7758 add option to use legacy v2 auth with s3 - #7759 Use correct L10N files for jsconfig - #7757 Wait for the shared link to be set in the acceptance tests - gallery/#349 Fix date picker not visible in slideshow sharing dialog - activity/#229 Properly construct path of root on file rename - #7770 Fix SCSS processing when undoing theming values - #7774 Update icewind/smb to 2.0.3 - #7777 Set height for sidebar icons - #7779 Improve zip support - #7786 Return correct mount type for federated shares - #7792 Fix empty details view after renaming a file - #7817 Fix preview when theming changes invertion of icons - #7821 Log full exception in cron instead of only the message - #7888 Keep all shipped apps enabled because they should be okay - #7962 update icewind/smb to 2.0.4 OBS-URL: https://build.opensuse.org/request/show/569360 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=29
2018-01-24 18:27:47 +01:00
install -p -D -m 644 %{SOURCE5} $idir/robots.txt
fi
# create the AllowOverride directive
install -p -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{apache_confdir}/nextcloud.conf
ocpath="%{apache_serverroot}/%{name}"
sed -i -e"s|@DATAPATH@|${ocpath}|g" $RPM_BUILD_ROOT/%{apache_confdir}/nextcloud.conf
# not needed for distro packages
rm -f ${idir}/indie.json
%if 0%{?suse_version}
# link duplicate doc files
%fdupes -s $RPM_BUILD_ROOT/%{apache_serverroot}/%{name}
%endif
%pre
# avoid fatal php errors, while we are changing files
# https://github.com/nextcloud
#
# 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 %{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 > %{statedir}/apache_stopped_during_nextcloud_install
rcapache2 stop
%else
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 > %{statedir}/apache_stopped_during_nextcloud_install
service httpd stop
%endif
fi
if [ -s %{statedir}/apache_stopped_during_nextcloud_install ]; then
echo "%{name} pre-install: Stopping Apache"
fi
if [ $1 -eq 1 ]; then
echo "%{name}-server: First install starting"
else
echo "%{name}-server: installing upgrade ..."
fi
# https://github.com/nextcloud
if [ -x %{ocphp_bin}/php -a -f %{oc_dir}/occ ]; then
echo "%{name}: occ maintenance:mode --on"
su %{oc_user} -s /bin/sh -c "cd %{oc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mode --on" || true
echo yes > %{statedir}/occ_maintenance_mode_during_nextcloud_install
fi
%post
if [ $1 -eq 1 ]; then
echo "%{name} First install complete"
else
echo "%{name} Upgrade complete"
fi
%if 0%{?suse_version}
# make sure php5 is not in APACHE_MODULES, so that we don't create dups.
perl -pani -e 's@^(APACHE_MODULES=".*)\bphp5\b@$1@' /etc/sysconfig/apache2
# add php5 to APACHE_MODULES
perl -pani -e 's@^(APACHE_MODULES=")@${1}php5 @' /etc/sysconfig/apache2
%endif
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.
%if 0%{?suse_version}
%if 0%{?suse_version} <= 1310
rcapache2 start
%else
rcapache2 restart apache2.service
%endif
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
service httpd start
%endif
fi
if [ -s %{statedir}/occ_maintenance_mode_during_nextcloud_install ]; then
echo "%{name}: occ upgrade"
su %{oc_user} -s /bin/sh -c "cd %{oc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ upgrade" || true
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 %{statedir}/apache_stopped_during_nextcloud_install
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}
%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