Eric Schirra
f7ce7b4cf9
- Update to 24.0.7 - Update behat/behat requirement from ~3.10.0 to ~3.11.0 in /build/integration (server#33185) - Fix quota type to int (server#34032) - Use filesystem user instead of file owner for creating version (server#34040) - Fix renaming in shared with you file list (server#34355) - Url encode the web dav url for copying (server#34381) - Trigger a rescan when trying to fopen a file that exists in cache but not on disk (server#34410) - Fix User profile picture when performing the search (server#34440) - Fix: Prevent deadlocks during mtime/size/etag propagation (server#34447) - Makes untrusted domain error on info (server#34454) - Fix Error: Undefined index: redirect_url (server#34460) - Harden disk_free_space check in CheckSetupController (server#34506) - Update ca-cert bundle (server#34518) - Update security.txt expires field (server#34527) - Fix password length limitation (server#34532) - Avoid allocating too much memory for the buffer on s3 uploads (server#34552) - Return proper error code when reporting exception fails in remote.php (server#34584) - Fix “email changed” activity email check (server#34600) - LDAP to not register new users when outside of fair use or over limits (server#34730) - Fix external storages access (server#34750) - Fix null error in getUnencryptedSize (server#34770) - Fix Uninitialized string offset 0 at GenerateMimetypeFileBuilder.php#39 (server#34792) - Expose mapped user count from LDAP and use that for user limit check (server#34795) - Fix updating cached mounts that didn’t have their mount provider set previously (server#34797) - DB mounts table: Add index for mount_provider_class (server#34798) - Add pre-commit configuration to stable24 as well (server#34802) - Update notifications for one-click instances (server#34805) - Update psalm-baseline.xml (server#34812) - Check share attributes on preview endpoints (server#34824) - Propagate attributes when resharing (server#34840) - Fix psalm errors fron the end of the baseline file (server#34845) - Run NPM audit fix (activity#972) - Improve email logging (activity#982) - Update nextcloud/ocp dependency (activity#989) - Bump terser from 5.7.1 to 5.15.1 (files_videoplayer#293) - Update nextcloud/ocp dependency (nextcloud_announcements#128) - Fix multi-tab usage with notify_push (notifications#1303) - Run audit fix (notifications#1311) - Send the subscription key to the Community push proxy (notifications#1320) - Adjust the expected query count (notifications#1338) - Update nextcloud/ocp dependency (notifications#1351) - Bump workbox-webpack-plugin, qs, postcss, @nextcloud/moment and autoprefixed (photos#1401) - Bump vue-router from 3.5.3 to 3.5.4 (photos#1412) - Update nextcloud/ocp dependency (photos#1413) - Bump autoprefixer from 10.4.12 to 10.4.13 (photos#1437) - Run audit (recommendations#557) - Bump terser and moment (text#3136) - Fix(deps): update tiptap (text#3171) - Chore(deps): update dependency @vue/vue2-jest to ^27.0.0 (text#3198) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.6 (text#3199) - Fix(deps): update dependency highlight.js to ^10.7.3 (text#3200) - Chore(deps): update dependency cypress to ^9.7.0 (text#3201) - Fix(deps): update dependency @nextcloud/moment to ^1.2.1 (text#3205) - Fix emoji suggestion regression (text#3206) - Chore(deps): update dependency @cypress/webpack-preprocessor to ^5.14.0 (text#3207) - Chore(deps): update dependency @nextcloud/browserslist-config to ^2.3.0 (text#3208) - Chore(deps): update dependency @nextcloud/stylelint-config to ^2.2.0 (text#3211) - Fix(deps): update dependency @nextcloud/axios to ^1.11.0 (text#3215) - Fix(deps): update dependency @nextcloud/dialogs to ^3.2.0 (text#3216) - Chore(deps): update dependency regenerator-runtime to ^0.13.10 (text#3220) - Fix(deps): update dependency @nextcloud/vue to ^5.4.0 (text#3221) - Fix(deps): update dependency core-js to ^3.25.5 (text#3222) - Fix(deps): update dependency prosemirror-view to ^1.29.0 (text#3223) - Fix(deps): update dependency vue-material-design-icons to ^5.1.2 (text#3225) - Chore(deps): update dependency @nextcloud/stylelint-config to ^2.3.0 (text#3254) - Fix(deps): update dependency prosemirror-state to ^1.4.2 (text#3264) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.13 (text#3272) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.14 (text#3281) - Chore(deps): update dependency @cypress/webpack-preprocessor to ^5.15.0 (text#3287) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.20 (text#3293) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.21 (text#3297) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.23 (text#3299) - Fix(deps): update dependency core-js to ^3.26.0 (text#3300) - Fix(deps): update dependency @nextcloud/browser-storage to ^0.2.0 (text#3310) - Chore(deps): update dependency eslint-plugin-jsdoc to ^39.3.25 (text#3316) - Bump terser and async (viewer#1406) - Use preview for unsupported images (viewer#1415) - Fix previewpath legacy variable (viewer#1430) OBS-URL: https://build.opensuse.org/request/show/1033148 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/nextcloud?expand=0&rev=184
328 lines
11 KiB
RPMSpec
328 lines
11 KiB
RPMSpec
#
|
|
# spec file for package nextcloud
|
|
#
|
|
# Copyright (c) 2022 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_myserverroot %{apache_serverroot}/htdocs
|
|
%define apache_confdir %{apache_sysconfdir}/conf.d
|
|
%define apache_docdir /usr/share/doc/packages
|
|
%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 nc_user %{apache_user}
|
|
%define nc_dir %{apache_myserverroot}/%{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: 24.0.7
|
|
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
|
|
BuildRequires: apache-rpm-macros
|
|
BuildRequires: cron
|
|
BuildRequires: fdupes
|
|
BuildRequires: unzip
|
|
#
|
|
Requires: cron
|
|
Requires: curl
|
|
Requires: libxml2-2
|
|
Requires: mariadb >= 10.2
|
|
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 < 8.2.0
|
|
Requires: php >= 7.4.0
|
|
Requires: php-process
|
|
Requires: php-xml
|
|
Recommends: sqlite
|
|
%endif
|
|
#
|
|
%if 0%{?suse_version}
|
|
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: php-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.
|
|
|
|
%package apache
|
|
Summary: Apache configuration for %{name}
|
|
Group: Productivity/Networking/Web/Utilities
|
|
BuildRequires: apache2 >= 2.4
|
|
Requires: %{name} = %{version}
|
|
Requires: apache2
|
|
Requires: mod_php_any < 8.2.0
|
|
Requires: mod_php_any >= 7.4.0
|
|
Supplements: packageand(apache2:%name)
|
|
|
|
%description apache
|
|
This subpackage contains the Apache configuration files
|
|
|
|
%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_myserverroot}/%{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_myserverroot}/%{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_myserverroot}/%{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
|
|
sed -i -e"s|@APACHE_USER@|%{apache_user}|g" %{buildroot}%{_sysconfdir}/cron.d/%{name}
|
|
sed -i -e"s|@APACHE_MYSERVERROOT@|%{apache_myserverroot}|g" %{buildroot}%{_sysconfdir}/cron.d/%{name}
|
|
sed -i -e"s|@APACHE_USER@|%{apache_user}|g" %{buildroot}%{_unitdir}/%{name}-cron.service
|
|
sed -i -e"s|@APACHE_MYSERVERROOT@|%{apache_myserverroot}|g" %{buildroot}%{_unitdir}/%{name}-cron.service
|
|
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 "o %{name} pre-install: Checking for running Apache"
|
|
# FIXME: this above should make it idempotent -- a requirement with openSUSE.
|
|
# it does not work.
|
|
%if 0%{?suse_version} && 0
|
|
service apache2 status | grep running > %{statedir}/apache_stopped_during_nextcloud_install
|
|
service apache2 stop
|
|
%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 "o %{name} pre-install: Stopping Apache"
|
|
fi
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
echo "o %{name} pre-install: First install starting"
|
|
else
|
|
echo "o %{name} pre-install: Upgrade starting ..."
|
|
fi
|
|
# https://github.com/nextcloud
|
|
if [ -x %{ocphp_bin}/php -a -f %{nc_dir}/occ ]; then
|
|
echo "o %{name} pre-install: occ maintenance:mode --on"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_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
|
|
%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 "o %{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}
|
|
service apache2 start
|
|
%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 "o %{name} post-install: occ maintenance:repair (fix possible errors)"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:repair" || true
|
|
echo "o %{name} post-install: occ db:add-missing-* (add missing db things)"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ maintenance:mimetype:update-db" || true
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-columns" || true
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-indices" || true
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ db:add-missing-primary-keys" || true
|
|
echo "o %{name} post-install: occ update apps"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ app:update --all" || true
|
|
echo "o %{name} post-install: occ upgrade"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_dir}; PATH=%{ocphp_bin}:$PATH php ./occ upgrade" || true
|
|
echo "o %{name} post-install: occ maintenance:mode --off"
|
|
su %{nc_user} -s /bin/sh -c "cd %{nc_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
|
|
|
|
if [ $1 -eq 1 ]; then
|
|
echo "o %{name} post-install: First install complete"
|
|
else
|
|
echo "o %{name} post-install: Upgrade complete"
|
|
fi
|
|
|
|
%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_myserverroot}/%{name}/README
|
|
%exclude %{apache_myserverroot}/%{name}/README.SUSE
|
|
%exclude %{apache_myserverroot}/%{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_myserverroot}/%{name}
|
|
%attr(-,%{apache_user},%{apache_group}) %{apache_myserverroot}/%{name}/occ
|
|
%config(noreplace) %{apache_myserverroot}/%{name}/.user.ini
|
|
%defattr(664,%{apache_user},%{apache_group},775)
|
|
%{apache_myserverroot}/%{name}/apps
|
|
%{apache_myserverroot}/%{name}/core/js/mimetypelist.js
|
|
%dir %{apache_myserverroot}/%{name}/core/img/filetypes
|
|
%defattr(660,%{apache_user},%{apache_group},770)
|
|
%{apache_myserverroot}/%{name}/config
|
|
%{apache_myserverroot}/%{name}/data
|
|
|
|
%files apache
|
|
%config(noreplace) %{apache_confdir}/nextcloud.conf
|
|
|
|
%changelog
|