Compare commits
No commits in common. "rawhide" and "f30" have entirely different histories.
24 changed files with 503 additions and 608 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
|||
/nextcloud-*.tar.bz2
|
||||
/nextcloud
|
||||
*.pkgtmp
|
||||
/nextcloud-10.0.3.tar.bz2
|
||||
/nextcloud-10.0.4.tar.bz2
|
||||
/nextcloud-18.0.0.tar.bz2
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
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
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
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>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# 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
11
README.md
|
|
@ -1,11 +0,0 @@
|
|||
### 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
126
changelog
|
|
@ -1,126 +0,0 @@
|
|||
* 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
|
||||
17
gating.yml
17
gating.yml
|
|
@ -1,17 +0,0 @@
|
|||
--- !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}
|
||||
|
|
@ -12,7 +12,7 @@ If not, make sure your webserver is running properly.
|
|||
|
||||
Webserver
|
||||
---------
|
||||
Currently nextcloud in Fedora/EPEL supports httpd (Apache) and nginx. You must install
|
||||
Currently nextcloud in Fedora 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
|
||||
|
|
@ -67,7 +67,7 @@ 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
|
||||
logger, which means in a standard Fedora 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.
|
||||
|
||||
|
|
@ -115,4 +115,4 @@ systemctl enable --now nextcloud-cron.timer
|
|||
Migration from owncloud
|
||||
-----------------------
|
||||
|
||||
For detailed instructions on this please read MIGRATION.distro
|
||||
For detailed instructions on this please read MIGRATION.fedora
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$CONFIG = [
|
||||
$CONFIG = array (
|
||||
"log_type" => "syslog",
|
||||
"datadirectory" => "/var/lib/nextcloud/data",
|
||||
"updatechecker" => false,
|
||||
|
|
@ -9,15 +9,18 @@ $CONFIG = [
|
|||
"preview_libreoffice_path" => '/usr/bin/libreoffice',
|
||||
|
||||
|
||||
"apps_paths" => [
|
||||
[ 'path'=> '/usr/share/nextcloud/apps',
|
||||
"apps_paths" => array(
|
||||
0 =>
|
||||
array (
|
||||
'path'=> '/usr/share/nextcloud/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => false,
|
||||
],
|
||||
[
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'path' => '/var/lib/nextcloud/apps',
|
||||
'url' => '/apps-appstore',
|
||||
'writable' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,73 @@
|
|||
# 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.
|
||||
# These are based on the .htaccess file shipped by ownCloud, with
|
||||
# appropriate adjustments for distribution packaging. Some directives
|
||||
# that are irrelevant to the Fedora/EPEL ecosystem are omitted. This
|
||||
# file contains directives that should be applied within the /nextcloud
|
||||
# filesystem; directives that should be applied site-wide when
|
||||
# ownCloud is installed are placed directly in nextcloud.conf.
|
||||
#
|
||||
# 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.
|
||||
# packaged ownCloud configuration, create a new /etc/httpd/conf.d/
|
||||
# file which will be read later than 'nextcloud.conf'.
|
||||
|
||||
AllowOverride None
|
||||
|
||||
ErrorDocument 403 /nextcloud/core/templates/403.php
|
||||
ErrorDocument 404 /nextcloud/core/templates/404.php
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
|
||||
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
php_value upload_max_filesize 10G
|
||||
php_value post_max_size 10G
|
||||
php_value memory_limit 512M
|
||||
php_value mbstring.func_overload 0
|
||||
php_value always_populate_raw_post_data -1
|
||||
php_value default_charset 'UTF-8'
|
||||
php_value output_buffering off
|
||||
<IfModule mod_env.c>
|
||||
SetEnv htaccessWorking true
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_php7.c>
|
||||
php_value upload_max_filesize 10G
|
||||
php_value post_max_size 10G
|
||||
php_value memory_limit 512M
|
||||
php_value mbstring.func_overload 0
|
||||
php_value always_populate_raw_post_data -1
|
||||
php_value default_charset 'UTF-8'
|
||||
php_value output_buffering off
|
||||
<IfModule mod_env.c>
|
||||
SetEnv htaccessWorking true
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# The rewrites for legacy caldav and carddav URLs are omitted here
|
||||
# because they do not work with Fedora's ownCloud directory layout.
|
||||
# See https://github.com/nextcloud/core/issues/243#issuecomment-75426453
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteBase /nextcloud/
|
||||
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
RewriteRule ^remote/(.*) remote.php [QSA,L]
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
Options -Indexes
|
||||
|
||||
<IfModule pagespeed_module>
|
||||
ModPagespeed Off
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(css|js)$">
|
||||
Header set Cache-Control "max-age=7200, public"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
|
|
|||
24
nextcloud-el7-php-fpm.conf
Normal file
24
nextcloud-el7-php-fpm.conf
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[nextcloud]
|
||||
user = apache
|
||||
group = apache
|
||||
listen = /run/php-fpm/nextcloud.sock
|
||||
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[upload_max_filesize] = 10G
|
||||
php_value[post_max_size] = 10G
|
||||
env[HOSTNAME] = $HOSTNAME
|
||||
env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
env[TMP] = /tmp
|
||||
env[TMPDIR] = /tmp
|
||||
env[TEMP] = /tmp
|
||||
|
||||
70
nextcloud-fedora-autoloader.php
Normal file
70
nextcloud-fedora-autoloader.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
$vendor = '##DATADIR##/php';
|
||||
|
||||
if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
|
||||
if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
|
||||
require_once $vendor . '/Symfony/Component/ClassLoader/ClassLoader.php';
|
||||
}
|
||||
|
||||
$fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
|
||||
$fedoraClassLoader->register();
|
||||
}
|
||||
|
||||
// For PEAR components
|
||||
$fedoraClassLoader->setUseIncludePath(true);
|
||||
|
||||
// Dependencies from 3rdparty composer.json
|
||||
// "guzzlehttp/guzzle"
|
||||
require_once $vendor . '/GuzzleHttp/autoload.php';
|
||||
// "sabre/dav"
|
||||
require_once $vendor . '/Sabre/DAV/autoload.php';
|
||||
// "doctrine/dbal"
|
||||
require_once $vendor . '/Doctrine/DBAL/autoload.php';
|
||||
// mcnetic/zipstreamer"
|
||||
require_once $vendor . '/ZipStreamer/autoload.php';
|
||||
// "phpeclib/phpseclib"
|
||||
require_once $vendor . '/phpseclib/autoload.php';
|
||||
// "rackspace/php-opencloud"
|
||||
require_once $vendor . '/OpenCloud/autoload.php';
|
||||
// "jeremeamia/superclosure"
|
||||
require_once $vendor . '/SuperClosure/autoload.php';
|
||||
// "bantu/ini-get-wrapper"
|
||||
require_once $vendor . '/bantu/IniGetWrapper/IniGetWrapper.php';
|
||||
// "natxet/CssMin"
|
||||
require_once $vendor . '/natxet/CssMin/autoload.php';
|
||||
// "punic/punic"
|
||||
require_once $vendor . '/Punic/autoload.php';
|
||||
// "patchwork/utf8"
|
||||
require_once $vendor . '/Patchwork/autoload.php';
|
||||
// "symfony/console"
|
||||
require_once $vendor . '/Symfony/Component/Console/autoload.php';
|
||||
// "symfony/event-dispatcher"
|
||||
require_once $vendor . '/Symfony/Component/EventDispatcher/autoload.php';
|
||||
// "symfony/routing"
|
||||
require_once $vendor . '/Symfony/Component/Routing/autoload.php';
|
||||
// "symfony/process"
|
||||
require_once $vendor . '/Symfony/Component/Process/autoload.php';
|
||||
// "pimple/pimple"
|
||||
require_once $vendor . '/Pimple/autoload.php';
|
||||
// "ircmaxell/password-compat"
|
||||
if (file_exists($vendor . '/password_compat/password.php')) {
|
||||
require_once $vendor . '/password_compat/password.php';
|
||||
}
|
||||
// "nikic/php-parser"
|
||||
require_once $vendor . '/PhpParser/autoload.php';
|
||||
// "icewind/Streams"
|
||||
require_once $vendor . '/Icewind/Streams/autoload.php';
|
||||
// "swiftmailer/swiftmailer
|
||||
require_once $vendor . '/Swift/swift_required.php';
|
||||
// "league/flysystem"
|
||||
require_once $vendor . '/League/Flysystem/autoload.php';
|
||||
// "interfasys/lognormalizer"
|
||||
require_once $vendor . '/InterfaSys/LogNormalizer/autoload.php';
|
||||
// "deepdiver1975/TarSTreamer"
|
||||
require_once $vendor . '/ownCloud/TarStreamer/autoload.php';
|
||||
// "patchwork/jsqueeze"
|
||||
require_once $vendor . '/Patchwork/JSqueeze.php';
|
||||
// "symfony/polyfill-php{55,56,70}"
|
||||
require_once $vendor . '/Symfony/Polyfill/autoload.php';
|
||||
// "lukasreschke/id3parser": "^0.0.1"
|
||||
require_once $vendor . '/ID3Parser/autoload.php';
|
||||
|
|
@ -16,14 +16,9 @@ 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
|
||||
Redirect 301 /.well-known/carddav /nextcloud/remote.php/carddav
|
||||
Redirect 301 /.well-known/caldav /nextcloud/remote.php/caldav
|
||||
Redirect 301 /.well-known/webdav /nextcloud/remote.php/webdav
|
||||
|
||||
<Directory /usr/share/nextcloud/>
|
||||
Include conf.d/nextcloud-auth-local.inc
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
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'] = '';
|
||||
|
|
@ -15,10 +15,8 @@ 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
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
apc.enable_cli=1
|
||||
|
|
@ -2,10 +2,7 @@
|
|||
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
|
||||
|
||||
User=apache
|
||||
|
||||
|
|
|
|||
505
nextcloud.spec
505
nextcloud.spec
|
|
@ -1,107 +1,92 @@
|
|||
%if 0%{?fedora}
|
||||
%global distro fedora
|
||||
%else
|
||||
%global distro epel
|
||||
%endif
|
||||
|
||||
Name: nextcloud
|
||||
Version: 34.0.3
|
||||
Release: %autorelease
|
||||
Version: 18.0.0
|
||||
Release: 1%{?dist}
|
||||
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
|
||||
|
||||
License: AGPLv3+ and MIT and BSD and ASL 2.0 and WTFPL and CC-BY-SA and GPLv3+ and Adobe
|
||||
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
|
||||
Source1: %{name}-httpd.conf
|
||||
Source2: %{name}-access-httpd.conf.avail
|
||||
|
||||
# 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
|
||||
Source200: %{name}-default-nginx.conf
|
||||
Source201: %{name}-conf-nginx.conf
|
||||
Source202: %{name}-php-fpm.conf
|
||||
Source203: %{name}-el7-php-fpm.conf
|
||||
|
||||
# Config snippets
|
||||
Source100: %{name}-auth-any.inc
|
||||
Source101: %{name}-auth-local.inc
|
||||
Source102: %{name}-auth-none.inc
|
||||
Source103: %{name}-defaults.inc
|
||||
# packaging notes and doc
|
||||
Source3: %{name}-README.fedora
|
||||
Source4: %{name}-mysql.txt
|
||||
Source5: %{name}-postgresql.txt
|
||||
Source6: %{name}-MIGRATION.fedora
|
||||
# config.php containing just settings we want to specify, nextcloud's
|
||||
# initial setup will fill out other settings appropriately
|
||||
Source7: %{name}-config.php
|
||||
|
||||
# Our autoloader for core
|
||||
Source8: %{name}-fedora-autoloader.php
|
||||
|
||||
# Systemd timer for background jobs
|
||||
Source10: %{name}-systemd-timer.service
|
||||
Source11: %{name}-systemd-timer.timer
|
||||
|
||||
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
|
||||
# For the systemd macros
|
||||
%{?systemd_requires}
|
||||
BuildRequires: systemd
|
||||
|
||||
# expand pear macros on install
|
||||
BuildRequires: php-pear
|
||||
|
||||
# Require one webserver and database backend
|
||||
# For sanity %%check
|
||||
BuildRequires: php-cli
|
||||
|
||||
|
||||
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-spl
|
||||
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
|
||||
Requires: php-filter
|
||||
Requires: php-mysqlnd
|
||||
Requires: php-pgsql
|
||||
Requires: php-ldap
|
||||
Requires: php-smbclient
|
||||
Requires: php-imap
|
||||
Requires: php-gmp
|
||||
Requires: php-pecl-imagick
|
||||
Requires: php-pecl-memcached
|
||||
Requires: php-pecl-apcu
|
||||
Requires: php-pecl-redis5
|
||||
|
||||
# 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
|
||||
|
||||
# Need to label the httpd rw stuff correctly until base selinux policy updated
|
||||
Requires(post): %{_sbindir}/semanage
|
||||
Requires(postun): %{_sbindir}/semanage
|
||||
|
||||
%description
|
||||
NextCloud gives you universal access to your files through a web interface or
|
||||
|
|
@ -112,33 +97,39 @@ applications and plugins.
|
|||
|
||||
|
||||
%package httpd
|
||||
Summary: Httpd integration for NextCloud
|
||||
Provides: %{name}-webserver = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Httpd integration for NextCloud
|
||||
|
||||
Provides: %{name}-webserver = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
# PHP dependencies
|
||||
Requires: php-fpm httpd
|
||||
Requires: php
|
||||
|
||||
%description httpd
|
||||
%{summary}.
|
||||
|
||||
|
||||
%package nginx
|
||||
Summary: Nginx integration for NextCloud
|
||||
Provides: %{name}-webserver = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Nginx integration for NextCloud
|
||||
|
||||
Provides: %{name}-webserver = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
# PHP dependencies
|
||||
Requires: php-fpm nginx
|
||||
Requires: php-fpm nginx
|
||||
|
||||
%description nginx
|
||||
%{summary}.
|
||||
|
||||
|
||||
%package mysql
|
||||
Summary: MySQL database support for NextCloud
|
||||
Provides: %{name}-database = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: MySQL database support for NextCloud
|
||||
|
||||
Provides: %{name}-database = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
# From getSupportedDatabases, mysql => pdo, mysql
|
||||
Requires: php-mysqlnd
|
||||
Requires: php-mysqlnd
|
||||
|
||||
%description mysql
|
||||
This package ensures the necessary dependencies are in place for NextCloud to
|
||||
|
|
@ -150,13 +141,14 @@ 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}
|
||||
Summary: PostgreSQL database support for NextCloud
|
||||
|
||||
Provides: %{name}-database = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
# From getSupportedDatabases, pgsql => function, pg_connect
|
||||
Requires: php-pgsql
|
||||
Requires: php-pgsql
|
||||
|
||||
%description postgresql
|
||||
This package ensures the necessary dependencies are in place for NextCloud to
|
||||
|
|
@ -170,95 +162,159 @@ for more details.
|
|||
|
||||
|
||||
%package sqlite
|
||||
Summary: SQLite 3 database support for NextCloud
|
||||
Provides: %{name}-database = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
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 \*.orig -type f -exec rm {} \; -print
|
||||
find . -name .gitignore -type f -exec rm {} \; -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}
|
||||
cp %{SOURCE3} README.fedora
|
||||
cp %{SOURCE4} README.mysql
|
||||
cp %{SOURCE5} README.postgresql
|
||||
cp %{SOURCE6} MIGRATION.fedora
|
||||
|
||||
# Locate license files and put them sensibly in place
|
||||
# get rid of all composer licenses
|
||||
find -wholename "*/composer/LICENSE" -exec mv {} composer-LICENSE \;
|
||||
mv apps/files_pdfviewer/vendor/pdfjs/LICENSE js-pdfjs-LICENSE
|
||||
mv apps/files_pdfviewer/vendor/pdfjs/web/cmaps/LICENSE js-pdfjs-cmaps-LICENSE
|
||||
mv apps/notifications/COPYING notifications-LICENSE
|
||||
mv apps/password_policy/LICENSE password_policy-LICENSE
|
||||
mv apps/serverinfo/COPYING serverinfo-LICENSE
|
||||
mv apps/survey_client/COPYING survey_client-LICENSE
|
||||
mv apps/user_ldap/vendor/ui-multiselect/MIT-LICENSE js-jqueryui-multiselect-LICENSE
|
||||
mv COPYING nextcloud-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
|
||||
"
|
||||
mv core/vendor/zxcvbn/LICENSE.txt zxcvbn-LICENSE
|
||||
mv core/fonts/LICENSE_OFL.txt fonts-LICENSE
|
||||
mv lib/composer/composer/LICENSE composer-LICENSE
|
||||
mv 3rdparty/sabre/vobject/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/sabre/dav/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/sabre/dav/lib/DAV/Browser/assets/openiconic/ICON-LICENSE sabre-ICON-LICENSE
|
||||
mv 3rdparty/sabre/event/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/sabre/http/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/sabre/xml/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/sabre/uri/LICENSE sabre-LICENSE
|
||||
mv 3rdparty/nikic/php-parser/LICENSE nikic-LICENSE
|
||||
mv 3rdparty/bantu/ini-get-wrapper/LICENSE bantu-LICENSE
|
||||
mv '3rdparty/LICENSE INFO' 3rdparty-LICENSE_INFO
|
||||
mv 3rdparty/egulias/email-validator/LICENSE egulias-LICENSE
|
||||
mv 3rdparty/stecman/symfony-console-completion/LICENCE stecman-LICENCE
|
||||
mv 3rdparty/jeremeamia/SuperClosure/LICENSE.md jeremeamia-LICENSE
|
||||
mv 3rdparty/microsoft/azure-storage-blob/LICENSE microsoft-LICENSE
|
||||
mv 3rdparty/microsoft/azure-storage-common/LICENSE microsoft-LICENSE
|
||||
mv 3rdparty/justinrainbow/json-schema/LICENSE justinrainbow-LICENSE
|
||||
mv 3rdparty/doctrine/collections/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/event-manager/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/common/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/persistence/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/reflection/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/inflector/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/cache/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/dbal/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/doctrine/annotations/LICENSE doctrine-LICENSE
|
||||
mv 3rdparty/deepdiver/zipstreamer/COPYING deepdiver-COPYING
|
||||
mv 3rdparty/mtdowling/jmespath.php/LICENSE mtdowling-LICENSE
|
||||
mv 3rdparty/punic/punic/LICENSE.txt punic-LICENSE.txt
|
||||
mv 3rdparty/punic/punic/UNICODE-LICENSE.txt punic-UNICODE-LICENSE
|
||||
mv 3rdparty/christophwurst/id3parser/LICENSE christophwurst-LICENSE
|
||||
mv 3rdparty/symfony/event-dispatcher-contracts/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/process/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/event-dispatcher/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-php56/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/routing/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-intl-idn/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-iconv/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-mbstring/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-php72/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/translation/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/console/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-php73/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/translation-contracts/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/service-contracts/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/symfony/polyfill-util/LICENSE symfony-LICENSE
|
||||
mv 3rdparty/react/promise/LICENSE react-LICENSE
|
||||
mv 3rdparty/composer/LICENSE composer-LICENSE
|
||||
mv 3rdparty/icewind/searchdav/LICENSE icewind-LICENSE
|
||||
mv 3rdparty/aws/aws-sdk-php/LICENSE.md aws-LICENSE.md
|
||||
mv 3rdparty/interfasys/lognormalizer/COPYING interfasys-COPYING
|
||||
mv 3rdparty/php-opencloud/openstack/LICENSE php-opencloud-LICENSE
|
||||
mv 3rdparty/league/flysystem/LICENSE league-LICENSE
|
||||
mv 3rdparty/phpseclib/phpseclib/LICENSE phpseclib-LICENSE
|
||||
mv 3rdparty/deepdiver1975/tarstreamer/LICENSE deepdiver1975-LICENSE
|
||||
mv 3rdparty/patchwork/jsqueeze/LICENSE.GPLv2 patchwork-LICENSE
|
||||
mv 3rdparty/patchwork/jsqueeze/LICENSE.ASL20 patchwork-LICENSE
|
||||
mv 3rdparty/patchwork/utf8/LICENSE-GPL patchwork-LICENSE-GPL
|
||||
mv 3rdparty/patchwork/utf8/LICENSE-APACHE patchwork-LICENSE-APACHE
|
||||
mv 3rdparty/guzzlehttp/streams/LICENSE guzzlehttp-LICENSE
|
||||
mv 3rdparty/guzzlehttp/guzzle/LICENSE guzzlehttp-LICENSE
|
||||
mv 3rdparty/guzzlehttp/promises/LICENSE guzzlehttp-LICENSE
|
||||
mv 3rdparty/guzzlehttp/ringphp/LICENSE guzzlehttp-LICENSE
|
||||
mv 3rdparty/guzzlehttp/psr7/LICENSE guzzlehttp-LICENSE
|
||||
mv 3rdparty/pear/pear_exception/LICENSE pear-LICENSE
|
||||
mv 3rdparty/pear/console_getopt/LICENSE pear-LICENSE
|
||||
mv 3rdparty/leafo/scssphp/LICENSE.md leafo-LICENSE
|
||||
mv 3rdparty/ralouphie/getallheaders/LICENSE ralouphie-LICENSE
|
||||
mv 3rdparty/psr/log/LICENSE psr-LICENSE
|
||||
mv 3rdparty/psr/http-message/LICENSE psr-LICENSE
|
||||
mv 3rdparty/psr/container/LICENSE psr-LICENSE
|
||||
mv apps/encryption/composer/composer/LICENSE encryption-LICENSE
|
||||
mv apps/federatedfilesharing/composer/composer/LICENSE federatedfilesharing-LICENSE
|
||||
mv apps/theming/js/3rdparty/jscolor/LICENSE.txt jscolor-LICENSE
|
||||
mv apps/viewer/COPYING viewer-COPYING
|
||||
mv apps/workflowengine/composer/composer/LICENSE workflowengine-LICENSE
|
||||
mv apps/dav/composer/composer/LICENSE dav-LICENSE
|
||||
mv apps/nextcloud_announcements/COPYING nextcloud_announcements-COPYING
|
||||
mv apps/files_trashbin/composer/composer/LICENSE files_trashbin-LICENSE
|
||||
mv apps/photos/COPYING photos-COPYING
|
||||
mv apps/comments/composer/composer/LICENSE comments-LICENSE
|
||||
mv apps/files_external/3rdparty/composer/LICENSE files_external-LICENSE
|
||||
mv apps/files_external/3rdparty/icewind/streams/LICENCE icewind_streams-LICENCE
|
||||
mv apps/files_external/3rdparty/icewind/smb/LICENSE.txt icewind_smb-LICENSE
|
||||
mv apps/oauth2/composer/composer/LICENSE oauth2-LICENSE
|
||||
mv apps/systemtags/composer/composer/LICENSE systemtags-LICENSE
|
||||
mv apps/accessibility/composer/composer/LICENSE accessibility-LICENSE
|
||||
mv apps/updatenotification/composer/composer/LICENSE updatenotification-LICENSE
|
||||
mv apps/cloud_federation_api/LICENSE cloud_federation_api-LICENSE
|
||||
mv apps/cloud_federation_api/composer/composer/LICENSE cloud_federation_api-LICENSE
|
||||
mv apps/provisioning_api/composer/composer/LICENSE provisioning_api-LICENSE
|
||||
mv apps/admin_audit/composer/composer/LICENSE admin_audit-LICENSE
|
||||
mv apps/files_sharing/composer/composer/LICENSE files_sharing-LICENSE
|
||||
mv apps/federation/composer/composer/LICENSE federation-LICENSE
|
||||
mv apps/recommendations/LICENSE recommendations-LICENSE
|
||||
mv apps/settings/composer/composer/LICENSE settings-LICENSE
|
||||
mv apps/user_ldap/composer/composer/LICENSE user_ldap-LICENSE
|
||||
mv apps/files_rightclick/COPYING files_rightclick-COPYING
|
||||
mv apps/files_rightclick/LICENSE files_rightclick-LICENSE
|
||||
mv apps/sharebymail/composer/composer/LICENSE sharebymail-LICENSE
|
||||
mv apps/privacy/COPYING privacy-COPYING
|
||||
mv apps/files_versions/composer/composer/LICENSE files_versions-LICENSE
|
||||
mv apps/files/composer/composer/LICENSE files-LICENSE
|
||||
mv apps/twofactor_backupcodes/composer/composer/LICENSE twofactor_backupcodes-LICENSE
|
||||
mv apps/lookup_server_connector/composer/composer/LICENSE lookup_server_connector-LICENSE
|
||||
mv apps/text/COPYING text-COPYING
|
||||
|
||||
# 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
|
||||
false found unexpected licenses to verify
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -280,28 +336,25 @@ 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
|
||||
for f in {*.php,*.html,occ,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
|
||||
ln -sf %{_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
|
||||
ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt
|
||||
|
||||
# set default config
|
||||
install -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.php
|
||||
install -pm 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/config.php
|
||||
|
||||
# httpd config
|
||||
install -Dpm 644 %{SOURCE100} \
|
||||
install -Dpm 644 %{SOURCE1} \
|
||||
%{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||
install -Dpm 644 %{SOURCE101} \
|
||||
install -Dpm 644 %{SOURCE2} \
|
||||
%{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-access.conf.avail
|
||||
install -Dpm 644 %{SOURCE102} %{SOURCE103} %{SOURCE104} %{SOURCE105} \
|
||||
install -Dpm 644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} \
|
||||
%{buildroot}%{_sysconfdir}/httpd/conf.d/
|
||||
|
||||
# nginx config
|
||||
|
|
@ -310,42 +363,37 @@ install -Dpm 644 %{SOURCE200} \
|
|||
install -Dpm 644 %{SOURCE201} \
|
||||
%{buildroot}%{_sysconfdir}/nginx/conf.d/%{name}.conf
|
||||
|
||||
# php-fpm config
|
||||
%if 0%{?el7}
|
||||
install -Dpm 644 %{SOURCE203} \
|
||||
%{buildroot}%{_sysconfdir}/php-fpm.d/%{name}.conf
|
||||
%else
|
||||
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
|
||||
%endif
|
||||
|
||||
# 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 || :
|
||||
install -Dpm 644 %{SOURCE10} %{buildroot}%{_unitdir}/nextcloud-cron.service
|
||||
install -Dpm 644 %{SOURCE11} %{buildroot}%{_unitdir}/nextcloud-cron.timer
|
||||
|
||||
%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 || :
|
||||
%if 0%{?el7}
|
||||
# Work around missing php session directory for php-fpm in el7 bz#1338444
|
||||
if [ ! -d /var/lib/php/session ]
|
||||
then
|
||||
mkdir /var/lib/php/session
|
||||
fi
|
||||
/usr/bin/chown apache /var/lib/php/session
|
||||
%endif
|
||||
/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
|
||||
|
|
@ -353,28 +401,48 @@ if [ $1 -eq 0 ]; then
|
|||
/usr/bin/systemctl reload php-fpm.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# the selinux policies only cover owncloud right now
|
||||
# once this package is accepted pull request for selinux-policy to add
|
||||
# these will be made
|
||||
%post
|
||||
touch '%{_sysconfdir}/%{name}/CAN_INSTALL'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}/config.php' 2>/dev/null || :
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}' 2>/dev/null || :
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '%{_localstatedir}/lib/%{name}(/.*)?' 2>/dev/null || :
|
||||
restorecon -R %{_sysconfdir}/%{name} || :
|
||||
restorecon -R %{_localstatedir}/lib/%{name} || :
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}/config.php' 2>/dev/null || :
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '%{_sysconfdir}/%{name}' 2>/dev/null || :
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '%{_localstatedir}/lib/%{name}(/.*)?' 2>/dev/null || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc AUTHORS README.%{distro} MIGRATION.%{distro} config/config.sample.php
|
||||
%doc AUTHORS README.fedora MIGRATION.fedora 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
|
||||
%{_sysconfdir}/httpd/conf.d/*.inc
|
||||
|
||||
%files nginx
|
||||
%config(noreplace) %{_sysconfdir}/nginx/default.d/%{name}.conf
|
||||
|
|
@ -389,4 +457,63 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
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
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (nextcloud-34.0.3.tar.bz2) = 3463dbbdeae5275a0791b115cf86aed41c5a138fdd19bb32ec12837a6698106b6f172e24fb1264a2d4e20b2b805bcf7841b2338e4e02f1fd5394fbed830cc695
|
||||
SHA512 (nextcloud-18.0.0.tar.bz2) = c6a3b2bb2abed416fdebecd0c35b2547298370ef8a3a2cc884da877b39ab4a03d205653d94b20fdc0660fa355966771f65a7c0aa1c2117bb5abc85d2f091d4f7
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#!/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
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
#!/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")
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue