diff options
-rw-r--r-- | centos/README.md | 45 | ||||
-rw-r--r-- | centos/nextcloud.spec | 74 |
2 files changed, 110 insertions, 9 deletions
diff --git a/centos/README.md b/centos/README.md index 3ed839c..390146f 100644 --- a/centos/README.md +++ b/centos/README.md @@ -1,6 +1,10 @@ Nextcloud ========= + +About +----- + This repository can be used to build a very basic RPM suited for CentOS 7. It uses Apache 2.4 with PHP-FPM to avoid conflicts with existing PHP 5.4 applications. @@ -14,6 +18,24 @@ After the installation, the administrator should take care of the following: * if needed, install and configure MariaDB/MySQL database * configure Nextcloud following the official documentation + +Building RPM +------------ + +Before building the RPM, you should make sure that rpm-build and +rpmdevtools packages are installed. This can be done by running: + + yum -y install rpm-build rpmdevtools + +Then download the required source files by running: + + spectool -g -R nextcloud.spec + +And finally building the nextcloud RPM by running: + + rpmbuild -bb nextcloud.spec + + Dependencies ------------ @@ -25,18 +47,28 @@ The following dependencies are installed: * PHP packages for builtin apps (php-ldap) * PHP packages for MariaDB/MySQL connection -You need to enable EPEL repository. +You need to enable EPEL and SCL repositories. + +On CentOS this can be done by running: -The administrator can enable extra features installing following RPMs (from centos-sclo-sclo repository): + yum -y install epel-release centos-release-scl + +On Red Hat Enterprise Linux run: + + yum -y install epel-release + yum-config-manager --enable rhel-server-rhscl-7-rpms + +The administrator can enable extra features installing following RPMs +(from centos-sclo-sclo repository): + + * sclo-php72-php-smbclient + * sclo-php72-php-imap -* sclo-php72-php-smbclient -* rh-php72-php-imap SELinux ------- -It's all on your own, please follow official documentation if you have SELinux enabled -(which is the default on CentOS 7). +It's all on your own, please follow official documentation if you have SELinux enabled (which is the default on CentOS 7). Alternatives RPMs ----------------- @@ -44,3 +76,4 @@ Alternatives RPMs If PHP-FPM doesn't fit your environment, please see also @mbevc1 packages: https://github.com/mbevc1/nextcloud + diff --git a/centos/nextcloud.spec b/centos/nextcloud.spec index fd3bc08..16059b7 100644 --- a/centos/nextcloud.spec +++ b/centos/nextcloud.spec @@ -13,12 +13,17 @@ Summary: Nextcloud package Name: nextcloud -Version: 17.0.2 +Version: 17.0.3 Release: 1%{?dist} License: GPL Source: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2 -Source1: nextcloud.conf -Source2: nextcloud-fpm.conf +Source1: https://raw.githubusercontent.com/nextcloud/server-packages/v17/centos/nextcloud.conf +Source2: https://raw.githubusercontent.com/nextcloud/server-packages/v17/centos/nextcloud-fpm.conf +Source3: https://nextcloud.com/nextcloud.asc +Source4: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2.asc +Source5: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2.md5 +Source6: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2.sha256 +Source7: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2.sha512 BuildArch: noarch URL: https://nextcloud.com/ @@ -42,6 +47,9 @@ Requires: rh-php72-php-ldap # Required php packages for MariaDB Requires: rh-php72-php-pdo_mysql +# NextCloud does not support skipping a major version number +Conflicts: nextcloud < 16 + %description Nextcloud files and configuration. @@ -52,6 +60,19 @@ nc_data_dir: %{nc_data_dir} nc_config_dir: %{nc_config_dir} +%prep +cd %{_sourcedir} +/usr/bin/md5sum -c %{SOURCE5} +if [ $? -ne 0 ] ; then echo md5sum did not match ; exit 1 ; fi +/usr/bin/sha256sum -c %{SOURCE6} +if [ $? -ne 0 ] ; then echo sha256sum did not match ; exit 1 ; fi +/usr/bin/sha512sum -c %{SOURCE7} +if [ $? -ne 0 ] ; then echo sha512sum did not match ; exit 1 ; fi +/usr/bin/gpg --import %{SOURCE3} +/usr/bin/gpg --verify %{SOURCE4} %{SOURCE0} +if [ $? -ne 0 ] ; then echo gpg signature did not match ; exit 1 ; fi + + %install rm -rf %{buildroot} mkdir -p %{buildroot}/%{nc_data_dir} @@ -71,6 +92,48 @@ mkdir -p %{buildroot}/etc/opt/rh/rh-php72/php-fpm.d/ cp %{SOURCE2} %{buildroot}/etc/opt/rh/rh-php72/php-fpm.d/nextcloud.conf +%post +YM=$(date +%Y%m) +if [ $YM -ge 202008 ] ; then +cat << EOF + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +NextCloud v17 End of Life Notice +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +This NextCloud version is stated as End of Life as of September 2020 + +There will no longer be security or maintenance fixes provided. + +It is important to plan an upgrade schedule to NextCloud version 18 +accordingly. + +NextCloud does not support skipping major versions. To keep the +database schema current, it is important to run the upgrade (such as +through the OCC CLI) for each major version. +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +EOF +fi +if [ $YM -ge 202010 ] ; then +/usr/bin/systemctl status rh-php72-php-fpm > /dev/null +if [ $? -eq 0 ] ; then +cat << EOF + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +PHP 7.2 End of Life Notice +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +This system is still running the rh-php72-php-fpm service. + +As of November 2020, the primary PHP project will no longer be releasing +security updates for PHP version 7.2. + +It is recommended you plan accordingly to upgrade to using PHP 7.3. +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +EOF +fi +fi + %files %defattr(0640,root,%{nc_group},0750) %dir %attr(0755,root,%{nc_group}) %{nc_dir} @@ -103,6 +166,11 @@ cp %{SOURCE2} %{buildroot}/etc/opt/rh/rh-php72/php-fpm.d/nextcloud.conf %changelog +* Wed Feb 05 2020 B Galliart <ben@steadfast.net> - 17.0.3-1 +- Update to release 17.0.3 +- Added hash/gpg validity checking of nextcloud tar.bz2 file +- Added sanity checking for end of life dates + * Wed Jan 08 2020 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>- 17.0.2-1 - Update to release 17.0.2 |