SHA256
1
0
forked from pool/nextcloud
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 587584 from home:ecsos:server - update to 13.0.1 - Dont polute the log on DAV emaillogin (server#8045) - Don't perform CSRF check on OCS routes with Bearer auth (server#8099) - Use S3Client::upload instead of splitting single/multipart upload ourselves (server#8102) - Remove old perl script to update l10n files (server#8145) - Scss hardening (server#8156) - Do not try to get the jailed path if we can't find the id (server#8177) - Handle SSL certificate verifications for others than Let's Encrypt (server#8183) - Use a phan version instead of master (server#8195) - Repair step to clear frontend related caches (server#8197) - Keep previous exception when transforming to dav exception (server#8228) - Actually return stream from swift (server#8250) - Remove invalid link to documentation (server#8253) - Fix deleting folders when using s3 external storage (server#8261) - Link to NC13 dev manual (server#8264) - Better result handling of email search (server#8267) - Update CRL to revoke files_rightclick (server#8271) - Fix styling issues of guest pages #8155 (server#8286) - Remove jquery ui background image (server#8287) - Show open graph preview in WhatsApp (server#8309) - Make acceptance tests for comments more consistent with the others (server#8395) - Fix edit tag textbox size (server#8407) - Use TTF fonts for avatar generation (server#8440) - Use mb_* string methods to extract first character for generated avatars (server#8470) - Show hint in OCS API for user creation (server#8515) - Fix hiding and event propagation issues with the user management popover (server#8517) - Add some whitespace around change.svg icon (server#8518) - Avoid fruitless login attempts (server#8532) - Fix retrieval of group members with numerical uids from LDAP (server#8536) - Theming: handle not being in the serverroot (server#8554) - Ext storage error warning (server#8561) - Set autocomplete=new-password for mail share password (server#8577) - Fix upload button visible on read-only folders (server#8595) - Fixed app navigation for IE11 (server#8609) - Fix breadcrumbs width calculation (server#8610) - Fix comments (and systemtags) when involving users with numerical ids (server#8615) - Update commentstabview.js (server#8621) - Properly encapsulate require_once for app.php (server#8631) - AppData hardening (server#8636) - Use hash algo that's robust against collisions (server#8654) - Fixed date/time picker on IE11 (server#8663) - Use a more widely available method to test s3 settings (server#8667) - Use proper lanugage in langauge code (server#8668) - Display the proper language strings in setttings (server#8669) - Do not create empty userid when attribute does not have allowed chars (server#8673) - Remove too restrict check for background image/color (server#8675) - Fix example regex for user agent matching (server#8676) - Generate different UIDs for Birthday, Anniversary and Death event (server#8678) - Don't use double quotes in MySQL queries (server#8680) - Log exceptions that happen when writing the app store reply to storage (server#8683) - Set the correct active navigation entry (server#8685) - Fix activities for end2end encryption (server#8686) - Filter out the current user when searching for emails too (server#8687) - Fix check if theming defaults instance is available (server#8688) - Fix undefined index problem (server#8693) - Disable part files for object stores (server#8725) - Better handling of invisible elements in acceptance tests (server#8738) - Remove base url from global cache prefix (server#8745) - Check if the cached js file exists (server#8746) - Sharee email matches not limited (server#8749) - Fix integer overflow in ChunkingPlugin (server#8752) - Revert wording back to updates (server#8755) - Add acceptance tests for permissions on public shared folders (server#8758) - Also send file emails in ASAP mode (activity#249) - Ensure userids are strings (activity#252) - Null coalescing operator is PHP7+ (activity#254) - Update PDF.js to 1.9.426 (files_pdfviewer#55) - Enable full screen mode for PDF files (files_pdfviewer#59) - Fix ACE module files failing to load (files_texteditor#83) - Do not keep FileInfoModels returned by "getModelForFile" (files_texteditor#89) - Fix share drop down in gallery not properly shown (gallery#394) - Fix gallery button hidden in folders without create permission (gallery#402) - Fix controls position in gallery layout (gallery#405) - Removed old code already present thanks to the files app (gallery#406) - Create "file app" public share links if the slideshow is opened from ... (gallery#407) - Allow to check against haveibeenpwned.com password list (password_policy#61) OBS-URL: https://build.opensuse.org/request/show/587584 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=35
2018-03-15 17:54:01 +01:00
Version: 13.0.1
Release: 0
Summary: File hosting service
License: AGPL-3.0
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