Eric Schirra
42ddfa5291
- Update to 19.0.2 - [stable19] lower minimum search length to 2 characters (server#21782) - [stable19] Call openssl_pkey_export with $config and log errors. (server#21804) - [stable19] Improve error reporting on sharing errors (server#21806) - [stable19] Do not log RequestedRangeNotSatisfiable exceptions in DAV (server#21840) - [stable19] Fix parsing of language code (server#21857) - [stable19] fix typo in revokeShare() (server#21876) - [stable19] Discourage webauthn user interaction (server#21917) - [stable19] Encryption is ready if master key is enabled (server#21935) - [stable19] Disable fragile comments tests (server#21939) - [stable19] Do not double encode the userid in webauthn login (server#21953) - [stable19] update icewind/smb to 3.2.6 (server#21955) - [stable19] Respect default share permissions (server#21967) - [stable19] allow admin to configure the max trashbin size (server#21975) - [stable19] Fix risky test in twofactor_backupcodes (server#21978) - [stable19] Fix PHPUnit deprecation warnings (server#21981) - [stable19] fix moving files from external storage to object store trashbin (server#21983) - [stable19] Ignore whitespace in sharing by mail (server#21991) - [stable19] Properly fetch translation for remote wipe confirmation dialog (server#22036) - [stable19] parse_url returns null in case a parameter is not found (server#22044) - Bump elliptic from 6.5.2 to 6.5.3 (server#22050) - [stable19] Correctly remove usergroup shares on removing group members (server#22053) - [stable19] Fix height to big for iPhone when using many apps (server#22064) - [stable19] reset the cookie internally in new API when abandoning paged results op (server#22069) - [stable19] Add Guzzle's InvalidArgumentException (server#22070) - [stable19] contactsmanager shall limit number of results early (server#22091) - [stable19] Fix browser freeze on long password input (server#22094) - [stable19] Search also the email and displayname in user mangement for groups (server#22118) - [stable19] Ensured large image is unloaded from memory when generating previews (server#22121) - [stable19] fix display of remote users in incoming share notifications (server#22131) - [stable19] Reuse cache for directory mtime/size if filesystem changes can be ignored (server#22171) - [stable19] Remove unexpected argument (server#22178) - [stable19] Do not exit if available space cannot be determined on file transfer (server#22181) - [stable19] Fix empty 'more' apps navigation after installing an app (server#22183) - [stable19] Fix default log_rotate_size in config.sample.php (server#22192) - [stable19] shortcut in reading nested group members when IN_CHAIN is available (server#22203) - [stable19] Fix chmod on file descriptor (server#22208) - [stable19] Do clearstatcache() on rmdir (server#22209) - [stable19] SSE enhancement of file signature (server#22210) - [stable19] remove logging message carrying no valuable information (server#22215) - [stable19] Add app config option to disable "Email was changed by admin" activity (server#22232) - [stable19] Delete chunks if the move on an upload failed (server#22239) - [stable19] Silence duplicate session warnings (server#22247) - [3rdparty] Doctrine: Fix unquoted stmt fragments backslash escaping (server#22252) - [stable19] Allow to disable share emails (server#22300) - [stable19] Show disabled user count in occ user:report (server#22302) - Bump 3rdparty to last stable19 commit (server#22303) - [stable19] fixing a logged deprecation message (server#22309) - [stable19] CalDAV: Add ability to limit sharing to owner (server#22333) - [stable19] Only copy the link when updating a share or no password was forced (server#22337) - [stable19] Remove encryption option for nextcloud external storage (server#22341) - [stable19] l10n:Correct appid for WebAuthn (server#22348) - [stable19] Properly search for users when limittogroups is enabled (server#22355) - [stable19] SSE: make legacy format opt in (server#22381) - [stable19] Update the CRL (server#22387) - [stable19] Fix missing FN from federated contact (server#22400) - [stable19] fix event icon sizes and text alignment (server#22414) - [stable19] Bump stecman/symfony-console-completion from 0.8.0 to 0.11.0 (3rdparty#457) - [stable19] Add Guzzle's InvalidArgumentException (3rdparty#474) - [stable19] Doctrine: Fix unquoted stmt fragments backslash escaping (3rdparty#486) - [stable19] Fix cypress (viewer#545) - Move to webpack vue global config & bump deps (viewer#558) OBS-URL: https://build.opensuse.org/request/show/830270 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=118
320 lines
9.8 KiB
RPMSpec
320 lines
9.8 KiB
RPMSpec
#
|
|
# spec file for package nextcloud
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# 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 https://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
|
|
Version: 19.0.2
|
|
Release: 0
|
|
Summary: File hosting service
|
|
License: AGPL-3.0-only
|
|
Group: Productivity/Networking/Web/Utilities
|
|
URL: https://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
|
|
Source10: %{name}-cron
|
|
Source11: %{name}-cron.service
|
|
Source12: %{name}-cron.timer
|
|
Source99: %{name}-rpmlintrc
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
|
|
%if 0%{?suse_version}
|
|
BuildRequires: apache2 >= 2.4
|
|
BuildRequires: cron
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: fdupes
|
|
%endif
|
|
BuildRequires: unzip
|
|
%endif
|
|
#
|
|
Requires: cron
|
|
Requires: curl
|
|
Requires: libxml2-2
|
|
Requires: mysql
|
|
Requires: php-bz2
|
|
Requires: php-dom
|
|
Requires: php-gd
|
|
Requires: php-intl
|
|
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.5.0
|
|
Requires: php >= 7.2.0
|
|
Requires: php-process
|
|
Requires: php-xml
|
|
#
|
|
Recommends: sqlite
|
|
%endif
|
|
#
|
|
%if 0%{?suse_version}
|
|
Requires: apache2
|
|
Requires: mod_php_any < 7.5.0
|
|
Requires: mod_php_any >= 7.2.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-zip
|
|
Requires: php-zlib
|
|
Recommends: sqlite3
|
|
%{?systemd_requires}
|
|
%endif
|
|
# Database connectors:
|
|
Recommends: php-sqlite
|
|
#Recommends: php-pgsql
|
|
# Require for specific apps:
|
|
Requires: php-ftp
|
|
Requires: php-ldap
|
|
#Requires: php-imap
|
|
#Requires: php-smbclient
|
|
# Recommend for specific apps:
|
|
Recommends: php-exif
|
|
Recommends: php-gmp
|
|
# For enhanced server performance:
|
|
Recommends: php-APCu
|
|
Recommends: php7-bcmath
|
|
# For preview generation:
|
|
Recommends: php-imagick
|
|
Recommends: php-ffmpeg
|
|
#Recommends: libreoffice
|
|
# For command line processing:
|
|
Recommends: php-pcntl
|
|
|
|
%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
|
|
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
|
|
|
|
# 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
|
|
%service_add_pre %{name}-cron.timer %{name}-cron.service
|
|
# 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
|
|
%service_add_post %{name}-cron.timer %{name}-cron.service
|
|
if [ $1 -eq 1 ]; then
|
|
echo "%{name} First install complete"
|
|
else
|
|
echo "%{name} Upgrade complete"
|
|
fi
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
%if 0%{?suse_version}
|
|
%if 0%{?suse_version} >= 1500
|
|
a2enmod php7
|
|
%else
|
|
a2enmod php5
|
|
%endif
|
|
%endif
|
|
fi
|
|
|
|
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 maintenance:repair (fix possible errors)"
|
|
su %{oc_user} -s /bin/sh -c "cd %{oc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:repair" || true
|
|
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
|
|
|
|
%preun
|
|
%service_del_preun %{name}-cron.timer %{name}-cron.service
|
|
|
|
%postun
|
|
%service_del_postun %{name}-cron.timer %{name}-cron.service
|
|
|
|
%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
|
|
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
|
|
%{_sbindir}/rc%{name}-cron
|
|
%{_unitdir}/%{name}-cron.service
|
|
%{_unitdir}/%{name}-cron.timer
|
|
%{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
|
|
%{apache_serverroot}/%{name}/core/js/mimetypelist.js
|
|
%dir %{apache_serverroot}/%{name}/core/img/filetypes
|
|
%defattr(660,wwwrun,www,770)
|
|
%{apache_serverroot}/%{name}/config
|
|
%{apache_serverroot}/%{name}/data
|
|
|
|
%changelog
|