Compare commits

..

127 commits

Author SHA1 Message Date
Andrew Bauer
9c7ef9445d 34.0.3 release RHBZ#2515297 2026-08-16 15:57:47 -05:00
Andrew Bauer
4f892068ec 34.0.2 release RHBZ#2506423 2026-07-23 15:22:49 -05:00
Fedora Release Engineering
eb3b5fd33e Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 09:32:38 +00:00
Andrew Bauer
f0ed8f15a9 33.0.6 release 2026-06-26 14:53:11 -05:00
Brian J. Murrell
db98a32e09 Dynamically determine which .map file to update the occ upgrade command in
Currently, the .map file in which the message exists to inform the user
how to run the occ upgrade command is hard-coded.  This can change
from release to release and thus is quite fragile.

Instead, figure out which file to update by searching for the "occ upgrade"
command in all of the .map files and use the result of that search in the
update command.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
2026-06-09 22:31:01 +00:00
Andrew Bauer
b701ace299 33.0.5 Release 2026-06-08 09:23:08 -05:00
Andrew Bauer
796f9d876b 33.0.4 Release RHBZ#2482794 2026-05-28 13:32:26 -05:00
Andrew Bauer
5c14182672 33.0.3 Release RHBZ#2454311 2026-05-02 11:06:29 -05:00
Andrew Bauer
0224438526 fix cli upgrade advice 2026-04-18 07:49:00 -05:00
Andrew Bauer
a31e3cccd8 33.0.1 release RHBZ#2451773 2026-03-29 15:42:22 -05:00
Andrew Bauer
5fb288a672 32.0.6 release RHBZ#2440650 2026-02-21 16:07:58 -06:00
Andrew Bauer
c4d346f41d 32.0.5 Release RHBZ#2430382 2026-01-17 09:32:35 -06:00
Andrew Bauer
44fa2177d7 32.0.5 Release RHBZ#2430382 2026-01-17 09:16:59 -06:00
Fedora Release Engineering
cd2bac1d17 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 22:05:49 +00:00
Andrew Bauer
d67faf73ac 32.0.3 release, fixes RHBZ# 2420196 RHBZ# 2420197 RHBZ# 2420198 RHBZ# 2421368 2025-12-12 08:30:53 -06:00
Andrew Bauer
c34e89c698 32.0.2 release RHBZ#2416087 RHBZ#2415750 RHBZ#2415751 RHBZ#2415752 RHBZ#2415753 2025-11-23 19:43:04 -06:00
Andrew Bauer
d625665feb 32.0.1 release RHBZ#2399899 2025-10-25 15:31:28 -05:00
Andrew Bauer
f267212179 31.0.9 release RHBZ#2388493 RHBZ#2389830 RHBZ#2389831 RHBZ#2389842 RHBZ#2389843 RHBZ#2389814 RHBZ#2389815 2025-09-20 14:28:40 -05:00
Andrew Bauer
cff27361a1 31.0.7 release, fix link to cert bundle RHBZ#2372407 RHBZ#2383716 2025-08-03 16:03:15 -05:00
Fedora Release Engineering
7d4cd2558a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 22:48:11 +00:00
Andrew Bauer
9dc14f5076 31.0.6 release RHBZ#2372407 2025-07-05 20:23:32 -05:00
Andrew Bauer
f3e2eb4218 31.0.5 release RHBZ#2364462 RHBZ#2366729 RHBZ#2366735 2025-05-26 08:02:07 -05:00
Andrew Bauer
7ab2f104e8 31.04 release RHBZ#2359048 2025-04-19 07:53:07 -05:00
Andrew Bauer
ab682ab5e5 31.0.2 release RHBZ#2345769 RHBZ#2345775 RHBZ#2350414 2025-03-25 12:07:53 -05:00
Andrew Bauer
05c35a1326 31.0.0 release RHBZ#2324262 RHBZ#2336564 2025-03-02 16:29:20 -06:00
Andrew Bauer
7b50c912fe escape period 2025-02-07 07:02:02 -06:00
Andrew Bauer
ced6af0351 use composer-generators to autogenerate php-composer provides 2025-02-03 09:41:01 -06:00
Andrew Bauer
8c7282c8e7 delete bodhi template file 2025-01-23 09:09:24 -06:00
Andrew Bauer
2a1247110d 30.0.5 Release 2025-01-23 08:36:12 -06:00
Fedora Release Engineering
cb014a1f22 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 20:04:03 +00:00
Andrew Bauer
9af3572351 30.0.4 release RHBZ#2330565 2024-12-30 09:39:20 -06:00
Andrew Bauer
6e2d37e5ab 32.0.2 release RHBZ#2319576 2024-11-10 18:53:44 -06:00
Andrew Bauer
fc8ec08353 29.0.9 release 2024-11-10 18:13:11 -06:00
Andrew Bauer
31f5ea601e require php-pecl-redis6 or php-pecl-redis5 2024-10-18 09:25:09 -05:00
Andrew Bauer
5f0df84f1e nextcloud 29.0.8 release RHBZ#2310687 2024-10-15 10:04:49 -05:00
Andrew Bauer
5977cd12ba prevent accidental building on distros with old php's 2024-09-05 15:47:57 -05:00
Andrew Bauer
2200403fb8 29.0.6 release RHBZ#2305125 RHBZ#2309499 fixes CVE-2024-39338 2024-09-03 15:39:40 -05:00
Andrew Bauer
e26b2416fb 29.0.6 release RHBZ#2305125 RHBZ#2309499 fixes CVE-2024-39338 2024-09-03 15:39:02 -05:00
Andrew Bauer
c65a6fe4f4 29.0.6 release RHBZ#2305125 RHBZ#2309499 fixes CVE-2024-39338 2024-09-03 15:35:51 -05:00
Andrew Bauer
810deff518 29.0.6 release RHBZ#2305125 RHBZ# 2309499 fixes CVE-2024-39338 2024-09-03 14:39:31 -05:00
Miroslav Suchý
11821f6aa8 convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-09-02 12:08:12 +02:00
Andrew Bauer
ecf38e3889 29.0.5 release 2024-08-23 11:00:22 -05:00
Fedora Release Engineering
990cb3205c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 19:28:05 +00:00
Andrew Bauer
c455a1050d update httpd directives using latest upstream htaccess content 2024-07-08 12:46:19 -05:00
Andrew Bauer
57e90b3869 update to 29.0.3 release 2024-07-03 12:23:51 -05:00
Andrew Bauer
704431c4ef implement workaround for rhbz#2279608 2024-06-24 10:32:32 -05:00
Sérgio M. Basto
da145e7dfc Update the list of the bundle software 2024-06-24 01:46:54 +01:00
Andrew Bauer
3461401d17 add epel compatibility 2024-06-22 12:29:35 -05:00
Andrew Bauer
cda4bc06db remove nextcloud-fedora-autoloader.php as it is no longer used 2024-06-22 10:11:58 -05:00
Sérgio M. Basto
104a40bc81 Update nextcloud to 28.0.6 2024-06-06 12:36:23 +01:00
Sérgio M. Basto
09b27f7653 Update nextcloud to 28.0.6 2024-06-05 23:29:40 +01:00
Sérgio M. Basto
662a74cdbf Update nextcloud to 28.0.5 and PR #11
PR #11 Many issues fixed by aviram:
- Better HTTPS handling in Apache configs
- Better cron job compatibility with APC
- Better nextcloud-systemd-timer.service
2024-05-19 19:56:13 +01:00
Sérgio M. Basto
5fe8e1ea11 Fix typo and 2 RPM build warnings
absolute symlink: /etc/nextcloud/ca-bundle.crt -> /etc/pki/tls/certs/ca-bundle.crt
absolute symlink: /usr/share/nextcloud/config -> /etc/nextcloud
2024-04-22 18:47:27 +01:00
Sérgio M. Basto
b379529877 Update nextcloud to 28.0.4 2024-04-21 18:45:35 +01:00
Sérgio M. Basto
9c7713f3ea (#2193123) Add requires php-bcmath php-intl php-sodiumm php-opcache 2024-04-20 21:24:49 +01:00
Sérgio M. Basto
69c14756e5 sort requires alphabetically 2024-04-20 21:23:29 +01:00
Iván Chavero
3598940ccc Merge branch 'rawhide' of ssh://pkgs.fedoraproject.org/rpms/nextcloud into rawhide 2024-04-09 15:46:04 -06:00
Iván Chavero
dc8dd19e99 Update to 28.0.3 2024-04-09 15:45:58 -06:00
Fedora Release Engineering
6e4b536f6d Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 08:55:50 +00:00
Fedora Release Engineering
5421d59536 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 09:39:19 +00:00
Iván Chavero
63b1c07960 Fix post install bugs
- Fix CAN_INSTALL permissions
- Restart php-fpm
2023-09-12 20:02:00 -06:00
Iván Chavero
ad714e79e2 Update for 27.0.2
- Update configuration file
- Fix missing CAN_INSTALL file for new installations
- Fix upgrade patch
2023-09-11 19:33:37 -06:00
Fedora Release Engineering
4b147e3fae Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 16:37:20 +00:00
Iván Chavero
748b1f68bd Add sources file 2023-05-18 23:15:16 -06:00
Iván Chavero
5e1f4caff2 Update to 26.0.0 2023-05-18 11:06:37 -06:00
Iván Chavero
39224eb82e Update to 25.0.3 2023-02-21 10:40:13 -06:00
Fedora Release Engineering
6ef46d5fe9 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:32:23 +00:00
Iván Chavero
1053fdee18 Update for 25.0.1 2022-11-27 17:51:37 -06:00
Avi Alkalay
d94c4af65d
update to 24.0.5 2022-09-26 15:07:47 -05:00
Avi Alkalay
4d543f424e
Set PHP output_buffering to false to kill nextcloud setup warnings 2022-09-26 15:07:46 -05:00
Avi Alkalay
9e3b394cdc
Add new .well-known redirects 2022-09-26 15:07:46 -05:00
Avi Alkalay
8ea470cd32 use FPM’s specific configuration 2022-09-23 05:56:40 -03:00
Iván Chavero
47c19c6313 Update to 24.0.3 2022-07-29 23:56:50 -06:00
Fedora Release Engineering
eb1820eb9f Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:31:30 +00:00
Fedora Release Engineering
193ac7f158 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:09:34 +00:00
Christopher Engelhard
c0eb2f9d51 Update to 22.1.0 2021-08-05 11:08:54 +02:00
Fedora Release Engineering
560c9df0eb - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:05:25 +00:00
Christopher Engelhard
417c20ec5d convert to rpmautospec 2021-07-12 19:42:37 +02:00
Christopher Engelhard
46041201ef Update to 22.0.0 2021-07-06 19:22:29 +02:00
Christopher Engelhard
36c8256f8f Add Referrer-Policy no-referrer always (RHBZ 1933530) 2021-06-30 12:44:02 +02:00
Christopher Engelhard
cc7fd53e0a update changelog for memory limit (RHBZ 1933529) 2021-06-30 12:38:52 +02:00
Christopher Engelhard
150ec7a301 update changelog for httpd/php-fpm 2021-06-30 12:36:24 +02:00
Christopher Engelhard
6bd25af18e Require php-fpm instead of php in httpd subpackage 2021-06-30 12:26:39 +02:00
Christopher Engelhard
03cae4799e Increase PHP memory limit to 512MB (RHBZ 1933529) 2021-06-30 12:22:21 +02:00
Christopher Engelhard
1ce22856b3 Update to 21.0.2 2021-06-30 12:19:02 +02:00
Christopher Engelhard
5890e801ce Remove dependency on php-imap 2021-02-28 17:50:47 +01:00
Christopher Engelhard
89fa9b3da6 Clean up sources file 2021-02-28 09:26:13 +01:00
Christopher Engelhard
c7217d191d Update to 21.0.0 2021-02-24 10:39:49 +01:00
Christopher Engelhard
09829dc43e Update changelog & release 2021-02-20 13:05:00 +01:00
Christopher Engelhard
0e47473c10 Update to 20.0.7 2021-02-20 13:02:59 +01:00
Fedora Release Engineering
08f49df206 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:28:57 +00:00
Christopher Engelhard
98ca85608b Update to 20.0.5 2021-01-16 13:00:30 +01:00
Christopher Engelhard
84fb3520f8 nicer output, generate .pkgtmp files 2 2020-12-30 14:08:09 +01:00
Christopher Engelhard
e091af1f54 nicer output, generate .pkgtmp files 2020-12-30 13:54:10 +01:00
Christopher Engelhard
a57f8ec2fc exclude temporary packaging files from git 2020-12-30 12:14:57 +01:00
Christopher Engelhard
e86f6f7f45 move helper scripts to subfolder 2020-12-30 11:03:33 +01:00
Christopher Engelhard
3f6dac606c Bump release to 20.0.4-2 2020-12-28 20:43:07 +01:00
Christopher Engelhard
ce3ab7ff5f specfile formatting 2020-12-28 20:41:10 +01:00
Christopher Engelhard
67aaf62a2a add provides for bundled libraries 2020-12-28 20:35:54 +01:00
Christopher Engelhard
bbad8d3a8c add helperscript to determine bundled versions 2020-12-28 20:35:36 +01:00
Christopher Engelhard
de0b910396 remove selinux stuff and duplicate deps 2020-12-28 19:51:58 +01:00
Christopher Engelhard
8ca211d5e5 Update to 20.0.4 2020-12-17 13:00:56 +01:00
Christopher Engelhard
5dff3d9c42 update gating 2020-12-17 12:57:10 +01:00
Christopher Engelhard
266fce3bac update to 20.0.3 2020-12-10 10:27:44 +01:00
Christopher Engelhard
ecf481aa18 update to 20.0.2 2020-11-19 11:13:02 +01:00
Christopher Engelhard
a334c7061c upload new sources 2020-11-14 20:13:44 +01:00
Christopher Engelhard
bfe4e54f92 update to 20.0.2RC1 2020-11-14 20:11:36 +01:00
Christopher Engelhard
ed26156816 ignore extracted sources 2020-11-14 20:09:37 +01:00
Christopher Engelhard
bfd9e55213 enable gating 2020-11-12 16:09:30 +01:00
Christopher Engelhard
bbf2ec738b fix repo url 2020-11-11 21:30:03 +01:00
Christopher Engelhard
85d72108c4 add tests 2020-11-11 21:24:30 +01:00
Christopher Engelhard
c47da899c5 Bump release to nextcloud-20.0.1-3 2020-11-11 11:33:05 +01:00
Christopher Engelhard
0eba130f8a remove el7 support 2020-11-11 09:31:10 +01:00
Christopher Engelhard
cb9544c0d0 add readme 2020-11-11 09:19:28 +01:00
Christopher Engelhard
83025bf932 bump release 2020-11-10 20:01:00 +01:00
Christopher Engelhard
f290bf06e4 fix occ shebang and make it executable 2020-11-10 19:44:19 +01:00
Christopher Engelhard
1719ce2670 fix wrong conf.avail filename 2020-11-10 19:41:31 +01:00
Christopher Engelhard
87ca5954cd remove unneccessary BR on php-cli 2020-11-10 19:20:27 +01:00
Christopher Engelhard
b7bf5756d4 spec cleanup 2020-11-10 19:19:45 +01:00
Christopher Engelhard
cc418ada90 Require php-cli for occ command 2020-11-10 19:11:08 +01:00
Christopher Engelhard
0d336cb8f8 add patch to allow updates across multiple versions 2020-11-10 11:01:35 +01:00
Michael S
a88ee0f5d8 Add requires on php-process
Without this package, occ refuse to work. 
# php /usr/share/nextcloud/occ
The posix extensions are required - see http://php.net/manual/en/book.posix.php
2020-11-05 15:32:35 +00:00
Christopher Engelhard
69cfa9eb29 update to 20.0.1 2020-10-26 09:00:22 +01:00
Christopher Engelhard
010fbebdb4 update to 20.0.0 2020-10-11 10:37:20 +02:00
Fedora Release Engineering
503c9f882a - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 09:07:10 +00:00
Ivan Chavero
a4e7ed8572 Update to version 19.0.0 2020-06-28 21:58:53 -05:00
Ivan Chavero
258c03d8a7 Update to Nextcloud 18.0.4 2020-04-30 20:27:40 -05:00
32 changed files with 1415 additions and 1 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/nextcloud-*.tar.bz2
/nextcloud
*.pkgtmp

View file

@ -0,0 +1,21 @@
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 5a14bb17507..38dcb55db7f 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -174,10 +174,13 @@
$this->config->setAppValue('core', 'vendor', $currentVendor);
}
+ /*
+ Fedora package:
+ Remove updater version check, we know that updates across more than one
+ version are possible
+ */
if ($currentVendor === 'nextcloud') {
- return isset($allowedPreviousVersions[$currentVendor][$majorMinor])
- && (version_compare($oldVersion, $newVersion, '<=')
- || $this->config->getSystemValueBool('debug', false));
+ return true;
}
// Check if the instance can be migrated

View file

@ -0,0 +1,9 @@
diff -Naur a/occ b/occ
--- a/occ 2020-10-24 10:37:44.000000000 +0200
+++ b/occ 2020-11-10 19:39:56.523178958 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
/**
* Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu>

16
README-PACKAGING.md Normal file
View file

@ -0,0 +1,16 @@
# Packaging Notes
Nextcloud has a fairly quick release cadence. Luckily they follow a strick system of alph-beta-rc-final releases and differences between major versions aren't huge so this rarely causes problems.
## Versions/Branches/Modules/Releases
### Upstream versioning
Upstream uses semantic versioning `major.minor.bugfix` for their version numbers. Contrary to what one might expect, they generally only push releases to their `stable` release channel after the first bugfix release `x.y.1`.
### In Fedora
`rawhide` generally contains whatever the latest non-rc release upstream is, including the `x.y.0` initial releases of a new major version.
Fedora releases stay on whatever major version they inherited from `rawhide` at branching as much as possible. Since nextcloud's and Fedora's release schedule don't entirely sync up, this means that occasionally a Fedora release might ship a `x.y.0` or EOL'd version of nextcloud for a brief time, but this is the best tradeoff between keeping Fedora in sync with upstream and minimizing disruptions within one Fedora release. Users who are unhappy with that can choose modules to work around that.
Module streams `nextcloud-X` ship the current release of major version `X`. Module stream `nextcloud-stable` should be rebased to a new major version only after the `x.y.1` bugfix release, in keeping with what upstream considers it's stable branch.
### Security fixes
Upstream is very conscientious with publishing and fixing CVEs discovered in their code. They generally backport fixes to all but very minor vulnerabilities to all supported versions, so it is generally safe not to change major versions within one Fedora release, even if a vulnerability has been discovered. Impacted users can always choose to upgrade via modules.
## Tarballs
Release tarballs are located at https://download.nextcloud.com/server/releases while prerelease tarballs are located ata https://download.nextcloud.com/server/prereleases/ . It generally takes about a day after the release annoucement for tarballs to actually appear in those directories.
## Bundled dependencies
Nextcloud ships a lot of bundled composer libraries, but these are easy to unbundle. The repos `utils` directory contains a script `get-composer-requires.py` that will output all required libraries/versions as well as if they're already available in the Fedora repositories or need to be added, by scanning the `composer.json` files shipped with the nextcloud sources.

11
README.md Normal file
View file

@ -0,0 +1,11 @@
### Installation, setup & updating
Nextcloud requires some additional steps after installation/upgrade that are not part of the package update process. After installation/update, visiting your install's website will automatically trigger the internal Nextcloud updater which will take care of these steps. For more details, see this package's documentation files.
### Other versions
[modular nextcloud package Fedora and CentOS/RHEL](https://src.fedoraproject.org/modules/nextcloud) is over
https://fedoraproject.org/wiki/Changes/RetireModularity
Once Fedora Linux 38 reaches end of life, we will retire the Fedora instance of Module Build Service.

126
changelog Normal file
View file

@ -0,0 +1,126 @@
* Tue Jul 6 2021 Christopher Engelhard <ce@lcts.de> - 22.0.0-1
- Update to 22.0.0
* Wed Jun 30 2021 Christopher Engelhard <ce@lcts.de> - 21.0.2-1
- Update to 21.0.2, fixes RHBZ 1977202 / CVE-2021-22915
- Include php-fpm config in httpd subpackage
- Set php memory limit to 512MB (RHBZ 1933529)
- Add Referrer-policy no-referrer to nginx config (RHBZ 1933530)
* Wed Feb 24 2021 Christopher Engelhard <ce@lcts.de> - 21.0.0-2
- Drop dependency on php-imap. Fixes RHBZ #1933023
* Wed Feb 24 2021 Christopher Engelhard <ce@lcts.de> - 21.0.0-1
- Update to 21.0.0
* Sat Feb 20 2021 Christopher Engelhard <ce@lcts.de> - 20.0.7-1
- Update to 20.0.7
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Jan 16 2021 Christopher Engelhard <ce@lcts.de> - 20.0.5-1
- Update to 20.0.5
* Mon Dec 28 2020 Christopher Engelhard <ce@lcts.de> - 20.0.4-2
- Remove duplicate dependencies on database drivers
- Remove syslinux related stuff, as these are included in
the syslinux policy
- Add Provides: for bundled libraries
* Thu Dec 17 2020 Christopher Engelhard <ce@lcts.de> - 20.0.4-1
- Update to 20.0.4
* Thu Dec 10 2020 Christopher Engelhard <ce@lcts.de> - 20.0.3-1
- Update to 20.0.3
* Thu Nov 19 2020 Christopher Engelhard <ce@lcts.de> - 20.0.2-1
- Update to 20.0.2
* Sat Nov 14 2020 Christopher Engelhard <ce@lcts.de> - 20.0.2-0.1.rc1
- Update to 20.0.2RC1
* Wed Nov 11 2020 Christopher Engelhard <ce@lcts.de> - 20.0.1-3
- Remove CentOS/RHEL 7 support from spec file
* Tue Nov 10 2020 Christopher Engelhard <ce@lcts.de> - 20.0.1-2
- Add dependencies on php-cli (for occ) and php-process (for posix)
- Remove unneeded BR on php-cli
- Add patch to allow updates across more than one major version
* Mon Oct 26 2020 Christopher Engelhard <ce@lcts.de> - 20.0.1-1
- Update to Nextcloud 20.0.1
* Sun Oct 11 2020 Christopher Engelhard <ce@lcts.de> - 20.0.0-1
- Update to Nextcloud 20.0.0
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 19.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun Jun 28 2020 Ivan Chavero <ichavero@redhat.com> - 19.0.0-1
- Update to Nextcloud 19.0.0
- Update licenses
* Thu Apr 30 2020 Ivan Chavero <ichavero@redhat.com> - 18.0.4-1
- Update to Nextcloud 18.0.4
* Sat Feb 08 2020 Ivan Chavero <ichavero@redhat.com> - 18.0.0-1
- Refactor spec file
- Update to Nextcoud 18.0.0
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 9 2019 Remi Collet <remi@remirepo.net> - 10.0.4-6
- drop dependency on php-password-compat #1658730
- allow php-smbclient 1.0.0 #1663672
- allow doctrine/dbal 2.x
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Mar 25 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 10.0.4-2
- Add max versions to dependencies to limit each to 1 major version
- Update some dependencies to use php-composer(*) instead of package names
- Prepare for php-composer(google/apiclient) version 2 and new version 1 package
* Tue Feb 28 2017 James Hogarth <james.hogarth@gmail.com> - 10.0.4-1
- update to 10.0.4
- Add migration from owncloud documentation
- Add systemd timer for background jobs
* Wed Feb 08 2017 James Hogarth <james.hogarth@gmail.com> - 10.0.3-1
- update to 10.0.3
* Thu Oct 06 2016 James Hogarth <james.hogarth@gmail.com> - 10.0.1-1
- update to 10.0.1
* Mon Aug 01 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.53-5
- Use lua to have a common srpm between epel7 and fedora
* Fri Jul 29 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.53-4
- Don't unbundle javascript on EPEL7 due to versioning issues
* Fri Jul 29 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.53-3
- Unbundle javascript libraries from core where possible
* Tue Jul 26 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.53-2
- Update the autoloader to use the path from the approved package
* Tue Jul 19 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.53-1
- New release 9.0.53
* Thu Jul 14 2016 James Hogarth <james.hogarth@gmail.com> - 9.0.52-1
- Initial nextcloud build

View file

@ -1 +0,0 @@
Nextcloud 18 is EOLed upstream and no longer supported

17
gating.yml Normal file
View file

@ -0,0 +1,17 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}

165
nextcloud-MIGRATION.fedora Normal file
View file

@ -0,0 +1,165 @@
# Migration from owncloud
When migrating from an existing owncloud install it's possible to use the same database,
or to rename the database to reduce confusion.
Before carrying out the migration it is important to prevent anyone from changing things.
Of course it's advised to carry out a backup of the database and files before any migration.
### Prevent people using owncloud
sudo -u apache php /usr/share/owncloud/occ maintenance:mode --on
### Migration whilst keeping owncloud data intact
This is the safest option as it is nondestructive to owncloud, but it will require
double the data storage during the migration.
#### Copy data over from one location to the other
The data layout is identical, it's just the location that differs.
```
rsync -aPh /var/lib/owncloud/ /var/lib/nextcloud/
```
## Renaming the database
This is optional but might serve to confuse less, and prevents any changes to the owncloud
database in case there are issues requiring a fallback. Naturally use better credentials and
use the correct database names for your setup!
##### MySQL
```
mysql -e 'create database nextclouddb;'
mysql -e "grant all on nextclouddb.* to 'nextcloud_user'@'localhost' identified by 'nextcloud_pass';"
mysqldump -v ownclouddb | mysql -D nextclouddb
```
##### PostgreSQL
```
sudo -u postgres psql <<EOF
/* Create the user for nextcloud */
CREATE USER nextcloud_user WITH PASSWORD 'nextcloud_pass';
/* KILL ALL EXISTING CONNECTION FROM ORIGINAL DB (ownclouddb)*/
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'ownclouddb' AND pid <> pg_backend_pid();
/* CLONE DATABASE TO NEW ONE(nextclouddb) */
CREATE DATABASE nextclouddb WITH TEMPLATE ownclouddb OWNER nextcloud_user;
GRANT ALL PRIVILEGES ON DATABASE nextclouddb TO nextcloud_user;
/* The tables need to be transferred in owner as well */
\c nextclouddb;
REASSIGN OWNED BY owncloud_user TO nextcloud_user;
EOF
```
Don't forget to update pg_hba.conf to allow access to the new database as the new user!
```
host nextclouddb nextcloud_user ::1/128 password
host nextclouddb nextcloud_user 127.0.0.1/32 password
```
### Migration in place without preserving owncloud data
If there is not sufficient disk then data can be moved, this will break owncloud in the process
and there won't be a fallback option if things go wrong beyond restiring data/backups.
#### Copy data over from one location to the other
```
mv /var/lib/owncloud/* /var/lib/nextcloud/
```
#### Renaming the database
This is even more optional since the old database will be destroyed in the process, but it may serve
to lessen confusion later on for future maintenance. Again replace with the desired credentials and
database names for your environment.
Note that since the database sizes are small it's more reliable and safer for the data stores to follow
the steps to duplicate the database laid out above.
##### MySQL
```
mysql -e 'create database nextclouddb;'
mysql -e "grant all on nextclouddb.* to 'nextcloud_user'@'localhost' identified by 'nextcloud_pass';"
mysql ownclouddb -sNe 'show tables' | while read table; do mysql -sNe "rename table ownclouddb.$table to nextclouddb.$table;"; done
```
##### PostgreSQL
```
sudo -u postgres psql <<EOF
/* Create the user for nextcloud */
CREATE USER nextcloud_user WITH PASSWORD 'nextcloud_pass';
/* KILL ALL EXISTING CONNECTION FROM ORIGINAL DB (ownclouddb)*/
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'ownclouddb' AND pid <> pg_backend_pid();
/* ALTER DATABASE to rename it */
ALTER DATABASE ownclouddb RENAME TO nextclouddb;
ALTER DATABASE nextclouddb OWNER TO nextcloud_user;
GRANT ALL PRIVILEGES ON DATABASE nextclouddb TO nextcloud_user;
/* The tables need to be transferred in owner as well */
\c nextclouddb;
REASSIGN OWNED BY owncloud_user TO nextcloud_user;
EOF
```
Again remember to update pg_hba.conf so the new database and user can be used.
### Bring over the old configuration and update paths
The config can be copied as-is which will preserve most settings. This is a coarse rename of everything
from owncloud to nextcloud, but if the database isn't renamed then this too much. Verify the database
credentials and name in the config file are correct before moving on to the next step.
```
cp /etc/owncloud/config.php /etc/nextcloud/config.php
sed -i 's/owncloud/nextcloud/g' /etc/nextcloud/config.php
```
### Enable the nextcloud interface on httpd
If using httpd then enable the interface the same way as the README describes for a fresh install
```
ln -s /etc/httpd/conf.d/nextcloud-access.conf.avail /etc/httpd/conf.d/z-nextcloud-access.conf
```
### Carry out any migration required
A migration step for database schemas etc needs to be carried out to ensure everything is correct.
Although the WebUI will be prompting the standard "click here to update" it is best for this major
migration to carry it out at the command line.
```
sudo -u apache php /usr/share/nextcloud/occ upgrade
```
### Verify that everything looks right
It's best at this stage to enter as an admin and have the instance in single user mode only
```
sudo -u apache php /usr/share/nextcloud/occ maintenance:singleuser --on
sudo -u apache php /usr/share/nextcloud/occ maintenance:mode --off
```
__NOTE__ It is usual for things like webdav to be disabled during singleuser which may prevent seeing
files, however just use this to verify the admin screens. On testing apps needed to be disabled
and then enabled again for nextcloud to correctly pick them up.
### Enable allow people to use nextcloud
If things are looking good then open the floodgates to everyone else.
```
sudo -u apache php /usr/share/nextcloud/occ maintenance:singleuser --off
```
### Clean up the owncloud stuff
Finally clean up the old owncloud install, replace with the database and user for your own setup.
```
dnf remove -y owncloud\*
rm -rf /var/lib/owncloud /etc/owncloud /etc/httpd/conf.d/*owncloud*
# mysql
mysql -e "drop database ownclouddb; drop user owncloud_user@'localhost';"
# postgres
sudo -u postgres psql <<EOF
DROP DATABASE ownclouddb;
DROP USER owncloud_user;
EOF
```

118
nextcloud-README.fedora Normal file
View file

@ -0,0 +1,118 @@
nextcloud packaging notes
========================
Start
------
After installation you should be able to access the login/configuration page
at the following URL:
http://localhost/nextcloud/
If not, make sure your webserver is running properly.
Webserver
---------
Currently nextcloud in Fedora/EPEL supports httpd (Apache) and nginx. You must install
at least one webserver subpackage (nextcloud-<webserver>). These packages
include additional configuration files for the webservers. Remote access is
disabled by default on httpd. To enable access from any host for Apache **AFTER** you
complete the initial setup process, do this:
ln -s /etc/httpd/conf.d/nextcloud-access.conf.avail /etc/httpd/conf.d/z-nextcloud-access.conf
If you wish to adjust any of the settings it is recommended that you create
a new configuration file that will override nextcloud.conf, rather than editing
it, so future changes to the packaged file will be respected on your server.
If you do not do this, please be careful to check for changes in the packaged
configuration file (especially on major nextcloud upgrades) and merge into
your modified configuration as appropriate.
Database
--------
You can choose between three databases: MySQL, PostgreSQL and SQLite.
For each of them there is an nextcloud subpackage (nextcloud-<database>).
You are required to install at least one of them. The packages only ensure
the necessary requirements to communicate with a database server of that type
are installed, they do not require the database server package itself, as
you may wish to use a remote database server. If you wish to use a local one,
you must ensure it is installed and configured.
For larger installs you should use MySQL or PostgreSQL.
If you choose MySQL or PostgreSQL, keep in mind that you must create a database
and user for nextcloud manually, before you can finish the setup process. The
README.postgresql and README.mysql files provide more details and help with
this.
In addition if using a remote database then then selinux must be configured to
allow the webserver to connect to it - see the selinux section further down.
Configuration
-------------
You can find the main configuration file at '/etc/nextcloud/config.php'. Until
you first access the server it will be just a small stub containing settings
that differ in this package from the upstream defaults. After you first access
nextcloud, the initial setup process will populate it with some more settings.
Other settings that can be provided in this file are documented at:
https://docs.nextcloud.com/server/10/admin_manual/configuration_server/config_sample_php_parameters.html
User Data
---------
The default data directory is '/var/lib/nextcloud/data'. Every file that is
uploaded by your users to nextcloud gets saved into this folder. Consider doing
a backup of this directory, together with the database and the main
configuration. Note that if you change this location, you must set appropriate
ownership and SELinux context attributes.
Logging
-------
As specified by the configuration file, nextcloud sends messages to the system
logger, which means in a standard Fedora/EPEL configuration it will log to the
systemd journal: try "journalctl -b -t Nextcloud". You can also change the
loglevel or switch to the built-in log mechanism of nextcloud.
App Store
---------
If you install additional third party apps using the built-in app store, you
can find them in the directory '/var/lib/nextcloud/apps'. This functionality is
enabled by default. If this is moved then it's important to configure httpd/nginx
appropriately for the correct /nextcloud/apps-appstore path to alias to the new location.
The app store URL is coded into the core php and does not need to be listed in config.php
If there are any empty proxy entries in config.php this will prevent connectivity to the store.
If not using a proxy it is important to remove any proxy entries from config.php, not just be ""
Selinux Booleans
----------------
If you want to use external files (eg remote smb/cifs server) the httpd_can_network_connect
selinux boolean should be toggled on. If you want to use libreoffice document conversion
then the httpd_execmem should be toggled on and the unoconv package should be installed.
If not using an external file source but still using an external database then the boolean
httpd_can_network_connect_db should be toggled on for access to regular DB ports. The general
network connect can alternatiely be used for non-standard ports or for a broader permission
in case of future external files requirements.
Memory caching
--------------
For performance reasons a memory cache should be configured. In larger installs redis
may be required but as a basic lightweight alternative edit config.php as per upstream
documentation and install ACPu via:
dnf install 'php-pecl(apcu)'
For further information see http://nextcloud.org/ and http://doc.nextcloud.org/
Scheduling Background Jobs
--------------------------
The default behaviour is to use the AJAX webcron, however this is fairly inefficient and does not scale very well.
It's recommended to set the option "Cron" to use the system scheduler and to enable the included systemd timer.
systemctl enable --now nextcloud-cron.timer
Migration from owncloud
-----------------------
For detailed instructions on this please read MIGRATION.distro

View file

@ -0,0 +1,24 @@
# If symlinked or copied to /etc/httpd/conf.d/z-nextcloud-access.conf
# (or any other name that is alphabetically later than
# 'nextcloud.conf'), this file will permit access to the ownCloud
# installation from any client. Ensure your deployment is correctly
# configured and secured before doing this!
#
# If you SYMLINK this file, you can rely on the ownCloud package to
# handle any future changes in the directory or URL hierarchy; this
# file will always achieve the high-level goal 'allow access to the
# ownCloud installation from any client'. If you COPY this file, you
# will have to check for changes to the original in future ownCloud
# package updates, and make any appropriate adjustments to your copy.
<Directory /usr/share/nextcloud/>
Include conf.d/nextcloud-auth-any.inc
</Directory>
<Directory /var/lib/nextcloud/apps/>
Include conf.d/nextcloud-auth-any.inc
</Directory>
<Directory /var/lib/nextcloud/assets/>
Include conf.d/nextcloud-auth-any.inc
</Directory>

12
nextcloud-auth-any.inc Normal file
View file

@ -0,0 +1,12 @@
# Apache config snippet. To be used by /etc/httpd/conf.d/*.conf files
# with Include. Allows access from any system.
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Allow from all
</IfModule>

14
nextcloud-auth-local.inc Normal file
View file

@ -0,0 +1,14 @@
# Apache config snippet. To be used by /etc/httpd/conf.d/*.conf files
# with Include. Allows access only from local system.
<IfModule mod_authz_core.c>
# Apache 2.4
Require local
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</IfModule>

12
nextcloud-auth-none.inc Normal file
View file

@ -0,0 +1,12 @@
# Apache config snippet. To be used by /etc/httpd/conf.d/*.conf files
# with Include. Denies all access.
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from all
</IfModule>

View file

@ -0,0 +1,4 @@
upstream php-nextcloud {
server unix:/run/php-fpm/nextcloud.sock;
}

23
nextcloud-config.php Normal file
View file

@ -0,0 +1,23 @@
<?php
$CONFIG = [
"log_type" => "syslog",
"datadirectory" => "/var/lib/nextcloud/data",
"updatechecker" => false,
"check_for_working_htaccess" => false,
"asset-pipeline.enabled" => false,
"assetdirectory" => '/var/lib/nextcloud',
"preview_libreoffice_path" => '/usr/bin/libreoffice',
"apps_paths" => [
[ 'path'=> '/usr/share/nextcloud/apps',
'url' => '/apps',
'writable' => false,
],
[
'path' => '/var/lib/nextcloud/apps',
'url' => '/apps-appstore',
'writable' => true,
],
],
];

View file

@ -0,0 +1,82 @@
rewrite ^/nextcloud$ /nextcloud/ redirect;
location /nextcloud/ {
root /usr/share/;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this topic first.
# add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer always;
# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
# Disable gzip to avoid the removal of the ETag header
gzip off;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
index index.php;
error_page 403 /nextcloud/core/templates/403.php;
error_page 404 /nextcloud/core/templates/404.php;
location ~ ^/nextcloud/apps-appstore/(.*)$ {
alias /var/lib/nextcloud/apps/$1;
}
location ~ ^/nextcloud/assets/(.*)$ {
alias /var/lib/nextcloud/assets/$1;
}
location ~ ^/nextcloud/(build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/nextcloud/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
rewrite ^/nextcloud/remote/(.*) /nextcloud/remote.php last;
rewrite ^/nextcloud/core/doc/([^\/]+)(?:$|/) /nextcloud/core/doc/$1/index.html;
try_files $uri $uri/ =404;
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
fastcgi_pass php-nextcloud;
fastcgi_intercept_errors on;
}
# Adding the cache control header for js and css files
# Make sure it is BELOW the location ~ \.php(?:$|/) { block
location ~* \.(?:css|js)$ {
add_header Cache-Control "public, max-age=7200";
# Optional: Don't log access to assets
access_log off;
}
# Optional: Don't log access to other assets
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|swf)$ {
access_log off;
}
}

8
nextcloud-defaults.inc Normal file
View file

@ -0,0 +1,8 @@
# The contents of the default Nextcloud .htaccess file are appended to this
# file during build. Some directives may be irrelevant to the Fedora/EPEL
# ecosystem but are NOT omitted.
#
# DO NOT EDIT THIS FILE DIRECTLY. To override any element of the
# packaged Nextcloud configuration, create a new /etc/httpd/conf.d/
# file which will be read later than this one.

55
nextcloud-httpd.conf Normal file
View file

@ -0,0 +1,55 @@
# DO NOT EDIT THIS FILE DIRECTLY. To override any element of the
# packaged ownCloud configuration, create a new /etc/httpd/conf.d/
# file which will be read later than 'nextcloud.conf'.
#
# As the initial setup wizard is active upon installation, access is
# initially allowed only from localhost. *AFTER* configuring the
# installation correctly and creating the admin account, to allow
# access from any host, do this:
#
# ln -s /etc/httpd/conf.d/nextcloud-access.conf.avail /etc/httpd/conf.d/z-nextcloud-access.conf
Alias /nextcloud/apps-appstore /var/lib/nextcloud/apps
Alias /nextcloud/assets /var/lib/nextcloud/assets
Alias /nextcloud /usr/share/nextcloud
# Allows compliant CalDAV / CardDAV clients to be configured using only
# the domain name. For more details see # http://tools.ietf.org/html/rfc6764
# Nextcloud 29 checks specifically for trailing slash in dav 301 redirects
# https://github.com/nextcloud/server/issues/45033#issuecomment-2079306503
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav/
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav/
Redirect 301 /.well-known/webdav /nextcloud/remote.php/dav/
Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger
Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo
<Directory /usr/share/nextcloud/>
Include conf.d/nextcloud-auth-local.inc
Include conf.d/nextcloud-defaults.inc
<FilesMatch ^(\.|autotest|occ|issue|indie|db_|console).*>
Include conf.d/nextcloud-auth-none.inc
</FilesMatch>
</Directory>
<Directory /var/lib/nextcloud/apps/>
Include conf.d/nextcloud-auth-local.inc
Include conf.d/nextcloud-defaults.inc
</Directory>
<Directory /var/lib/nextcloud/assets/>
Include conf.d/nextcloud-auth-local.inc
Include conf.d/nextcloud-defaults.inc
</Directory>
# For safety, explicitly deny any access to these locations.
# Upstream's .htaccess does something similar with mod_rewrite.
<Directory /var/lib/nextcloud/data/>
Include conf.d/nextcloud-auth-none.inc
</Directory>
<DirectoryMatch /usr/share/nextcloud/(3rdparty|lib|config|templates)/>
Include conf.d/nextcloud-auth-none.inc
</DirectoryMatch>

View file

@ -0,0 +1,34 @@
From 9f38c6300712a23ccdc75e140143a1c461e15705 Mon Sep 17 00:00:00 2001
From: Andrew Bauer <zonexpertconsulting@outlook.com>
Date: Mon, 24 Jun 2024 10:11:23 -0500
Subject: [PATCH] silence integrity check for excluded files
---
lib/private/IntegrityCheck/Checker.php | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index a6de3cf6030d7..3974483601b08 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -337,7 +337,20 @@ private function verify(string $signaturePath, string $basePath, string $certifi
$differencesB = array_diff_assoc($currentInstanceHashes, $expectedHashes);
$differences = array_unique(array_merge($differencesA, $differencesB));
$differenceArray = [];
+
+ # Nasty hack to silence the integrity checker for files patched during the build process or files we simply don't care about
+ $excludedFilenames = [
+//sedplaceholder ];
+
foreach ($differences as $filename => $hash) {
+
+ # Skip if the file in question matches our exclusion list
+ foreach ($excludedFilenames as $excludedFilename) {
+ if (strpos($filename, $excludedFilename)!==false) {
+ break 2;
+ }
+ }
+
// Check if file should not exist in the new signature table
if (!array_key_exists($filename, $expectedHashes)) {
$differenceArray['EXTRA_FILE'][$filename]['expected'] = '';

28
nextcloud-mysql.txt Normal file
View file

@ -0,0 +1,28 @@
Configure MariaDB / MySQL for ownCloud
======================================
To use MariaDB / MySQL as database backend, you need to do the following:
1. Make sure that your mysql service is configured and running properly. If this
is a fresh install, you will need to run "systemctl enable mysqld.service;
systemctl start mysqld.service" (or mariadb.service) as root. It's also
strongly advised to run "mysql_secure_installation" after starting the
database for the first time.
2. Log in to the database as privileged user to create the database and a
dedicated user account for ownCloud:
$ mysql -u root -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Choose identifier and password accordingly.
Now you can launch the ownCloud setup screen, select MySQL in the advanced
settings and fill in your credentials.
References
==========
https://fedoraproject.org/wiki/MariaDB
https://mariadb.com/kb/en/mariadb/documentation/
http://doc.nextcloud.org/server/7.0/admin_manual/configuration/configuration_database.html

27
nextcloud-php-fpm.conf Normal file
View file

@ -0,0 +1,27 @@
[nextcloud]
user = apache
group = apache
listen = /run/php-fpm/nextcloud.sock
listen.acl_users = apache,nginx
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/nextcloud-slow.log
php_admin_value[error_log] = /var/log/php-fpm/nextcloud-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
php_value[memory_limit] = 512M
php_value[upload_max_filesize] = 10G
php_value[post_max_size] = 10G
php_value[output_buffering] = false
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

1
nextcloud-php.ini Normal file
View file

@ -0,0 +1 @@
apc.enable_cli=1

43
nextcloud-postgresql.txt Normal file
View file

@ -0,0 +1,43 @@
Configure PostgreSQL for ownCloud
=================================
To use PostgreSQL as database backend, you need to do the following:
1. Make sure that your PostgreSQL service is configured and running properly.
If this is a fresh install, you will need to run "postgresql-setup initdb"
as root, then "systemctl enable postgresql.service; systemctl start
postgresql.service". For more details on initial configuration of PostgreSQL
in Fedora, see https://fedoraproject.org/wiki/PostgreSQL
2. Log in to PostgreSQL as system user to create the database and a dedicated
user account for ownCloud:
# su - -c "psql" postgres
CREATE USER username WITH PASSWORD 'password';
CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UNICODE';
ALTER DATABASE nextcloud OWNER TO username;
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO username;
Choose identifier and password accordingly.
3. ownCloud talks to PostgreSQL via TCP/IP, so you need to configure an
appropriate authentication mechanism in /var/lib/pgsql/data/pg_hba.conf.
For a simple configuration with ownCloud and PostgreSQL on the same host,
set the METHOD for the lines that apply to localhost TCP/IP connections
to "password". ownCloud does *not* use a socket to communicate with the
database, so the 'local' line in pg_hba.conf does *not* apply to it.
Note that this will result in the password being sent unencrypted from
ownCloud to the PostgreSQL server. For more details, see
http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html.
4. You also need to allow the web server to communicate with the database by
TCP/IP: SELinux disallows this by default. Run:
# setsebool -P httpd_can_network_connect_db on
Now you can launch the ownCloud setup screen, select PostgreSQL in the advanced
settings and fill in your credentials.
References
==========
https://fedoraproject.org/wiki/PostgreSQL
http://www.postgresql.org/docs
http://doc.nextcloud.org/server/7.0/admin_manual/configuration/configuration_database.html

View file

@ -0,0 +1,11 @@
[Unit]
Description=Cron for nextcloud background jobs
[Service]
# https://docs.nextcloud.com/server/25/admin_manual/configuration_server/background_jobs_configuration.html#systemd
Type=oneshot
User=apache
KillMode=process
ExecStart=/usr/bin/php -f /usr/share/nextcloud/cron.php

View file

@ -0,0 +1,10 @@
[Unit]
Description=This triggers the nextcloud cron service
[Timer]
OnBootSec=5min
OnUnitInactiveSec=15min
[Install]
WantedBy=timers.target

392
nextcloud.spec Normal file
View file

@ -0,0 +1,392 @@
%if 0%{?fedora}
%global distro fedora
%else
%global distro epel
%endif
Name: nextcloud
Version: 34.0.3
Release: %autorelease
Summary: Private file sync and share server
# Automatically converted from old format: AGPLv3+ and MIT and BSD and ASL 2.0 and WTFPL and CC-BY-SA and GPLv3+ and Adobe - review is highly recommended.
License: AGPL-3.0-or-later AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-BSD AND Apache-2.0 AND WTFPL AND LicenseRef-Callaway-CC-BY-SA AND GPL-3.0-or-later AND Adobe-2006
URL: http://nextcloud.com
Source0: https://download.nextcloud.com/server/releases/%{name}-%{version}.tar.bz2
# basic nextcloud config.php, nextcloud's
# initial setup will fill out other settings appropriately
Source1: %{name}-config.php
# Systemd timer for background jobs
Source2: %{name}-systemd-timer.service
Source3: %{name}-systemd-timer.timer
# httpd config files
Source100: %{name}-httpd.conf
Source101: %{name}-access-httpd.conf.avail
Source102: %{name}-auth-any.inc
Source103: %{name}-auth-local.inc
Source104: %{name}-auth-none.inc
Source105: %{name}-defaults.inc
# nginx/php-fpm config files
Source200: %{name}-default-nginx.conf
Source201: %{name}-conf-nginx.conf
Source202: %{name}-php-fpm.conf
Source203: %{name}-php.ini
# packaging notes and doc
Source300: %{name}-README.fedora
Source301: %{name}-mysql.txt
Source302: %{name}-postgresql.txt
Source303: %{name}-MIGRATION.fedora
# Remove updater version check, we know that updates across more than one
# version are possible
Patch0: 0000-disable-update-version-check.patch
# Add the ability to exclude files we specify from the nextcloud integrity checker
Patch1: nextcloud-integritycheck-exclusion.patch
BuildArch: noarch
# Set this to the minimum supported php version Nextcloud will run on
# Exists to prevent accidental building on distros with outdated php's
BuildRequires: php(language) >= 8.2
BuildRequires: systemd-rpm-macros
BuildRequires: sed
# Auto-generate Provides from bundled php-composer libraries
BuildRequires: composer-generators
# expand pear macros on install
BuildRequires: php-pear
# Require one webserver and database backend
Requires: %{name}-webserver = %{version}-%{release}
Requires: %{name}-database = %{version}-%{release}
Requires: php-bcmath
# Require php CLI for occ command
Requires: php-cli
# Core PHP libs/extensions required by OC core
Requires: php-curl
Requires: php-dom
Requires: php-exif
Requires: php-fileinfo
Requires: php-filter
Requires: php-gd
Requires: php-gmp
Requires: php-iconv
Requires: php-intl
Requires: php-json
Requires: php-ldap
Requires: php-mbstring
Requires: php-openssl
Requires: php-pcre
Requires: php-pdo
Requires: php-pecl-apcu
Requires: php-pecl-imagick
Requires: php-pecl-memcached
Requires: (php-pecl-redis6 or php-pecl-redis5)
Requires: php-process
Requires: php-session
Requires: php-simplexml
Requires: php-smbclient
Requires: php-spl
Recommends: php-sodium
Requires: php-opcache
Requires: php-xmlwriter
Requires: php-zip
# For systemd support during install/uninstall
%{?systemd_requires}
# Fedora dropped legacy CA cert bundle symlinks
# See https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile
Requires: %{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
# jquery-ui-multiselect bundled via user_ldap app
Provides: bundled(jquery-ui-multiselect) = 1.13
# zxcvbn bundled via core
Provides: bundled(zxcvbn) = 4.4.2
%description
NextCloud gives you universal access to your files through a web interface or
WebDAV. It also provides a platform to easily view & sync your contacts,
calendars and bookmarks across all your devices and enables basic editing right
on the web. NextCloud is extendable via a simple but powerful API for
applications and plugins.
%package httpd
Summary: Httpd integration for NextCloud
Provides: %{name}-webserver = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
# PHP dependencies
Requires: php-fpm httpd
%description httpd
%{summary}.
%package nginx
Summary: Nginx integration for NextCloud
Provides: %{name}-webserver = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
# PHP dependencies
Requires: php-fpm nginx
%description nginx
%{summary}.
%package mysql
Summary: MySQL database support for NextCloud
Provides: %{name}-database = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
# From getSupportedDatabases, mysql => pdo, mysql
Requires: php-mysqlnd
%description mysql
This package ensures the necessary dependencies are in place for NextCloud to
work with MySQL / MariaDB databases. It does not require a MySQL / MariaDB
server to be installed, as you may well wish to use a remote database
server.
If you want the database to be on the same system as NextCloud itself, you must
also install and enable a MySQL / MariaDB server package. See README.mysql for
more details.
%package postgresql
Summary: PostgreSQL database support for NextCloud
Provides: %{name}-database = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
# From getSupportedDatabases, pgsql => function, pg_connect
Requires: php-pgsql
%description postgresql
This package ensures the necessary dependencies are in place for NextCloud to
work with a PostgreSQL database. It does not require the PostgreSQL server
package to be installed, as you may well wish to use a remote database
server.
If you want the database to be on the same system as NextCloud itself, you must
also install and enable the PostgreSQL server package. See README.postgresql
for more details.
%package sqlite
Summary: SQLite 3 database support for NextCloud
Provides: %{name}-database = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
# From getSupportedDatabases, pgsql => class, SQLite3
%description sqlite
This package ensures the necessary dependencies are in place for NextCloud to
work with an SQLite 3 database stored on the local system.
%prep
%autosetup -n %{name} -p1
# Fix php shebang in occ
sed -ri 's\^#!/usr/bin/env php$\#!%{_bindir}/php\' occ
# patch backup files and .git stuff
find . -name \*.orig -type f -delete -print
find . -name .gitignore -type f -delete -print
find . -name .github -type d -prune -exec rm -r {} \; -print
# fix CLI upgrade advice on splash screen
if ! file=$(grep -l 'occ upgrade' dist/*.map); then
echo "Could not find the occ upgrade instructions in dist/*.map"
exit 1
fi
echo "Updating occ upgrade instructions in $file"
sed -i -e 's#\./\(occ upgrade\)#sudo -u apache php /usr/share/nextcloud/\1#' $file
# prepare package doc
cp %{SOURCE300} README.%{distro}
cp %{SOURCE301} README.mysql
cp %{SOURCE302} README.postgresql
cp %{SOURCE303} MIGRATION.%{distro}
# point the reader to the correct README filename
sed -i 's/distro/%{distro}/g' README.%{distro}
# Locate license files and put them sensibly in place
# get rid of all composer licenses
find -wholename "*/composer/LICENSE" -exec mv {} composer-LICENSE \;
# Deal with licenses automatically
find . -mindepth 2 \( -name '*LICENSE*' -o -name '*LICENCE*' \) | { while read a ; do mv "$a" $(echo $a | sed "s_^./__" | tr "/ " "__" )-LICENSE ; done ; }
find . -mindepth 2 -name '*COPYING*' | { while read a ; do mv "$a" $(echo $a | sed "s_^./__" | tr "/ " "__" )-COPYING ; done ; }
# case-sensitive list of partial matches to exclude from the nextcloud integrity checker
# include readme, license, other docs, and any files we move or patch during the build
excludedFilenames="
README
readme
LICENSE
LICENCE
license
copying
COPYING
AUTHORS
htaccess
gitignore
user.ini
update.admin.php
Updater.php
occ
Checker.php
"
# nextcloud source files use tabs rather than spaces, ew
tabs=" "
cr="
"
# Add quotes, commas, and escaped newlines
for f in $excludedFilenames; do
formattedlist="$formattedlist$tabs'$f',\\$cr"
done
# look for our sed placeholder we patched in earlier, then insert our formatted list of keywords
sed -i "s|//sedplaceholder|${formattedlist}|" lib/private/IntegrityCheck/Checker.php
# Build nextcloud-defaults.inc from upstream .htaccess. We will install it later.
cat .htaccess >> %{SOURCE105}
%check
# Make sure there are no license files left over
: Check for leftover license files
find . -mindepth 2 \( -name '*LICENSE*' -o -name '*LICENCE*' -o -name '*COPYING*' \)
nb=$( find . -mindepth 2 \( -name '*LICENSE*' -o -name '*LICENCE*' -o -name '*COPYING*' \) | wc -l )
if [ $nb -gt 0 ]
then
false Found unexpected licenses to verify
fi
%build
# Nothing to build
%install
install -dm 755 %{buildroot}%{_datadir}/%{name}
# create nextcloud datadir
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/data
# create writable app dir for appstore
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/apps
# create nextcloud sysconfdir
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
# install content
for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do
cp -a "$d" %{buildroot}%{_datadir}/%{name}
done
for f in {*.php,*.html,robots.txt}; do
install -pm 644 "$f" %{buildroot}%{_datadir}/%{name}
done
# occ should be executable
install -pm 755 occ %{buildroot}%{_datadir}/%{name}
# symlink config dir
ln -s ../../../%{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config
# nextcloud looks for ca-bundle.crt in config dir
ln -s ../pki/ca-trust/extracted/pem/tls-ca-bundle.pem %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt
# set default config
install -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.php
# httpd config
install -Dpm 644 %{SOURCE100} \
%{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
install -Dpm 644 %{SOURCE101} \
%{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-access.conf.avail
install -Dpm 644 %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} \
%{buildroot}%{_sysconfdir}/httpd/conf.d/
# nginx config
install -Dpm 644 %{SOURCE200} \
%{buildroot}%{_sysconfdir}/nginx/default.d/%{name}.conf
install -Dpm 644 %{SOURCE201} \
%{buildroot}%{_sysconfdir}/nginx/conf.d/%{name}.conf
# php-fpm config
install -Dpm 644 %{SOURCE202} \
%{buildroot}%{_sysconfdir}/php-fpm.d/%{name}.conf
# php.ini config
install -Dpm 644 %{SOURCE203} \
%{buildroot}%{_sysconfdir}/php.d/60-%{name}.ini
# Install the systemd timer
install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/nextcloud-cron.service
install -Dpm 644 %{SOURCE3} %{buildroot}%{_unitdir}/nextcloud-cron.timer
# If there's a new installation activate the installation wizard
%post
INSTALLED=$(grep -c secret /etc/nextcloud/config.php)
if [ "${INSTALLED}" -eq "0" ]; then
echo "First time installation, enabling installation wizard"
touch %{_sysconfdir}/%{name}/CAN_INSTALL
chown apache:apache %{_sysconfdir}/%{name}/CAN_INSTALL
fi
/usr/bin/systemctl restart php-fpm.service > /dev/null 2>&1 || :
%post httpd
/usr/bin/systemctl reload httpd.service > /dev/null 2>&1 || :
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
%postun httpd
if [ $1 -eq 0 ]; then
/usr/bin/systemctl reload httpd.service > /dev/null 2>&1 || :
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
fi
%post nginx
/usr/bin/systemctl reload nginx.service > /dev/null 2>&1 || :
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
%postun nginx
if [ $1 -eq 0 ]; then
/usr/bin/systemctl reload nginx.service > /dev/null 2>&1 || :
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
fi
%files
%doc AUTHORS README.%{distro} MIGRATION.%{distro} config/config.sample.php
%license *-LICENSE
%dir %attr(-,apache,apache) %{_sysconfdir}/%{name}
# contains sensitive data (dbpassword, passwordsalt)
%config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name}/config.php
%config(noreplace) %{_sysconfdir}/php.d/60-%{name}.ini
# need the symlink in confdir but it's not config
%{_sysconfdir}/%{name}/ca-bundle.crt
%{_datadir}/%{name}
%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}
# user data must not be world readable
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/data
%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/apps
%{_unitdir}/nextcloud-cron.service
%{_unitdir}/nextcloud-cron.timer
%files httpd
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
%{_sysconfdir}/httpd/conf.d/%{name}-access.conf.avail
%{_sysconfdir}/httpd/conf.d/%{name}*.inc
%config(noreplace) %{_sysconfdir}/php-fpm.d/%{name}.conf
%files nginx
%config(noreplace) %{_sysconfdir}/nginx/default.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/nginx/conf.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/php-fpm.d/%{name}.conf
%files mysql
%doc README.mysql
%files postgresql
%doc README.postgresql
%files sqlite
%changelog
%autochangelog

12
plans/base.fmf Normal file
View file

@ -0,0 +1,12 @@
summary: Basic occ functionality
discover:
how: fmf
url: https://src.fedoraproject.org/tests/nextcloud
prepare:
how: install
package: nextcloud
environment:
PACKAGES: nextcloud
VERSION: 20.0.2 RC1
execute:
how: tmt

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (nextcloud-34.0.3.tar.bz2) = 3463dbbdeae5275a0791b115cf86aed41c5a138fdd19bb32ec12837a6698106b6f172e24fb1264a2d4e20b2b805bcf7841b2338e4e02f1fd5394fbed830cc695

26
utils/get-bundled-versions.py Executable file
View file

@ -0,0 +1,26 @@
#!/bin/env python
import os
import json
for root, dirs, files in os.walk("apps"):
for file in files:
if file == 'composer.lock':
with open(os.path.join(root, file)) as f:
lockdata = json.load(f)
try:
for i in lockdata['packages']:
print("Provides: bundled(php-composer(" + i['name'] + ")) = " + i['version'].strip('v'))
except KeyError:
pass
for root, dirs, files in os.walk("3rdparty"):
for file in files:
if file == 'composer.lock':
with open(os.path.join(root, file)) as f:
lockdata = json.load(f)
try:
for i in lockdata['packages']:
print("Provides: bundled(php-composer(" + i['name'] + ")) = " + i['version'].strip('v'))
except KeyError:
pass

109
utils/get-composer-requires.py Executable file
View file

@ -0,0 +1,109 @@
#!/bin/env python
import os
import json
import re
import subprocess
from colorama import Fore, Style
defaultconstraint = 2
excludes = ('php')
basedir = '..'
srcdir = os.path.join(basedir, 'nextcloud')
outdir = basedir
jsonfiles = ('3rdparty/composer.json', 'apps/files_external/3rdparty/composer.json')
constraintmap = ('any', 'loose', 'strict', 'exact')
def eval_version(version, constraint=3):
version = version.replace('v', '')
if version == '*':
constraint = 0
version = '0'
elif version.startswith('^'):
constraint = 1
version = version.strip('^')
elif version.startswith('~'):
constraint = 2
version = version.strip('~')
if re.search('[^.0-9]', version):
print('Unparseable version:', version)
version = '0.0.0'
constraint = 3
return version, constraint
def get_requires(name, version, constraint):
splitver = version.split('.')
if constraint == 0:
requires = 'php-composer(' + name + ')'
elif constraint == 1:
wipe = False
for i in range(0, len(splitver)):
if splitver[i] == '0' or wipe:
splitver[i] = '0'
else:
splitver[i] = str(int(splitver[i]) + 1)
wipe = True
requires = '(php-composer(' + name + ') >= ' + version + ' with php-composer(' + name + ') < ' + '.'.join(splitver) + ')'
elif constraint == 2:
splitver[-1] = '0'
splitver[-2] = str(int(splitver[-2]) + 1)
requires = '(php-composer(' + name + ') >= ' + version + ' with php-composer(' + name + ') < ' + '.'.join(splitver) + ')'
else:
requires = 'php-composer(' + name + ') = ' + version
return requires
def repoquery(query):
stdout = subprocess.run(['dnf', 'repoquery', '-q', '--whatprovides', requires], stdout=subprocess.PIPE, universal_newlines=True, check = True).stdout
return stdout
requirefile = open(os.path.join(outdir, 'require.pkgtmp'), 'w')
requirefile.write('# PHP composer dependencies\n')
providefile = open(os.path.join(outdir, 'provide.pkgtmp'), 'w')
providefile.write('# Bundled libraries\n')
for file in jsonfiles:
requirefile.write(f"# From {file}\n")
providefile.write(f"# From {file}\n")
with open(os.path.join(srcdir, file)) as f:
jsondata = json.load(f)
packages = jsondata['require'].items()
print(f"\n{Style.BRIGHT}Parsing '{file}'...{Style.RESET_ALL}")
for name, verrange in packages:
if name in excludes:
print(f"{name} {verrange} -> in exclude list, skipping.")
continue
version, constraint = eval_version(verrange, defaultconstraint)
requires = get_requires(name, version, constraint)
package = repoquery(requires)
color = Fore.GREEN
found = True
while len(package) == 0:
color = Fore.YELLOW
constraint -= 1
if constraint < 0:
constraint = 0
color = Fore.RED
package = 'none\n'
found = False
break
requires = get_requires(name, version, constraint)
package = repoquery(requires)
print(f"{name} {verrange} -> {Style.BRIGHT}{color}{package.rstrip()}{Style.RESET_ALL} ({constraintmap[constraint]})")
if found:
requirefile.write(f"Requires: {requires}\n")
else:
providefile.write(f"Provides: bundled(php-composer({name})) = {version}\n")