From 3de70aa0098e170d26903c36e272c649294873f4 Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 27 Jan 2023 13:55:52 +0000 Subject: [PATCH] update to icinga-web2-2.11.4 unfortunately the sample Apache httpd config files were removed from the icingaweb2 distfile in a packaging reorganisation ("moved to the packaging repository", which appears to be non-public), so copy the files from the previous version. --- net/icinga/web2/Makefile | 16 ++- net/icinga/web2/distinfo | 4 +- net/icinga/web2/files/icingaweb2.conf | 60 +++++++++++ net/icinga/web2/files/icingaweb2.fpm.conf | 57 +++++++++++ net/icinga/web2/patches/patch-bin_icingacli | 9 ++ ...ion_views_scripts_form_setup-welcome_phtml | 16 +-- ...atch-packages_files_apache_icingaweb2_conf | 27 ----- ...-packages_files_apache_icingaweb2_fpm_conf | 30 ------ .../patch-packages_files_bin_icingacli | 9 -- net/icinga/web2/pkg/PLIST | 99 ++++--------------- 10 files changed, 164 insertions(+), 163 deletions(-) create mode 100644 net/icinga/web2/files/icingaweb2.conf create mode 100644 net/icinga/web2/files/icingaweb2.fpm.conf create mode 100644 net/icinga/web2/patches/patch-bin_icingacli delete mode 100644 net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_conf delete mode 100644 net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_fpm_conf delete mode 100644 net/icinga/web2/patches/patch-packages_files_bin_icingacli diff --git a/net/icinga/web2/Makefile b/net/icinga/web2/Makefile index 1088b79d21d..c5c637f0f8f 100644 --- a/net/icinga/web2/Makefile +++ b/net/icinga/web2/Makefile @@ -2,7 +2,7 @@ COMMENT = next-generation web UI for icinga GH_ACCOUNT = Icinga GH_PROJECT = icingaweb2 -GH_TAGNAME = v2.11.3 +GH_TAGNAME = v2.11.4 PKGNAME = icinga-web2-${GH_TAGNAME:S/v//} MODULES= lang/php @@ -25,14 +25,12 @@ do-configure: ${WRKSRC}/bin/icingacli do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/icinga-web2 \ - ${PREFIX}/conf/modules.sample + ${INSTALL_DATA_DIR} ${PREFIX}/icinga-web2 ${PREFIX}/conf/modules.sample + ${SUBST_DATA} \ + ${FILESDIR}/icingaweb2.conf ${PREFIX}/conf/modules.sample/icingaweb2.conf.dist \ + ${FILESDIR}/icingaweb2.fpm.conf ${PREFIX}/conf/modules.sample/icingaweb2.fpm.conf.dist cd ${WRKSRC}; pax -rw ./ ${PREFIX}/icinga-web2/ - rm -r ${PREFIX}/icinga-web2/test - ${SUBST_CMD} ${PREFIX}/icinga-web2/packages/files/apache/*conf - find ${PREFIX}/icinga-web2 \( -name '*${PATCHORIG}' \ - -or -name '*.beforesubst' \) -delete - ln -s ${TRUEPREFIX}/icinga-web2/bin/icingacli \ - ${WRKINST}/usr/local/bin/ + find ${PREFIX}/icinga-web2 \( -name '*${PATCHORIG}' -or -name '*.beforesubst' \) -delete + ln -s ${TRUEPREFIX}/icinga-web2/bin/icingacli ${WRKINST}/usr/local/bin/ .include diff --git a/net/icinga/web2/distinfo b/net/icinga/web2/distinfo index 17b10566f70..321c2099636 100644 --- a/net/icinga/web2/distinfo +++ b/net/icinga/web2/distinfo @@ -1,2 +1,2 @@ -SHA256 (icingaweb2-2.11.3.tar.gz) = 2ca8RStuyxxGcTu7kSJeG1cGy8hcWFJU6mjYH4Wk/F8= -SIZE (icingaweb2-2.11.3.tar.gz) = 11437384 +SHA256 (icingaweb2-2.11.4.tar.gz) = 6ZRL9Xo78zn9a9hi3a+IWZG4tFzo8FeYa3Mr+Vs/EU4= +SIZE (icingaweb2-2.11.4.tar.gz) = 11381515 diff --git a/net/icinga/web2/files/icingaweb2.conf b/net/icinga/web2/files/icingaweb2.conf new file mode 100644 index 00000000000..b31cec6bbd7 --- /dev/null +++ b/net/icinga/web2/files/icingaweb2.conf @@ -0,0 +1,60 @@ +Alias /icingaweb2 "${TRUEPREFIX}/icinga-web2/public" + +# Remove comments if you want to use PHP FPM and your Apache version is older than 2.4 +# +# # Forward PHP requests to FPM +# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 +# +# ProxyPassMatch "fcgi://127.0.0.1:9000/{documentRoot}/$1" +# +# + + + Options SymLinksIfOwnerMatch + AllowOverride None + + DirectoryIndex index.php + + + # Apache 2.4 + + Require all granted + + + + + # Apache 2.2 + Order allow,deny + Allow from all + + + SetEnv ICINGAWEB_CONFIGDIR "${TRUEPREFIX}/etc/icingaweb2" + + EnableSendfile Off + + + RewriteEngine on + RewriteBase /icingaweb2/ + RewriteCond %{REQUEST_FILENAME} -s [OR] + RewriteCond %{REQUEST_FILENAME} -l [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^.*$ - [NC,L] + RewriteRule ^.*$ index.php [NC,L] + + + + DirectoryIndex error_norewrite.html + ErrorDocument 404 /icingaweb2/error_norewrite.html + + +# Remove comments if you want to use PHP FPM and your Apache version +# is greater than or equal to 2.4 +# = 2.4> +# # Forward PHP requests to FPM +# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 +# +# SetHandler "proxy:fcgi://127.0.0.1:9000" +# ErrorDocument 503 {urlPath}/error_unavailable.html +# +# + diff --git a/net/icinga/web2/files/icingaweb2.fpm.conf b/net/icinga/web2/files/icingaweb2.fpm.conf new file mode 100644 index 00000000000..e55368b833f --- /dev/null +++ b/net/icinga/web2/files/icingaweb2.fpm.conf @@ -0,0 +1,57 @@ +Alias /icingaweb2 "${TRUEPREFIX}/icinga-web2/public" + + + # Forward PHP requests to FPM + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + + ProxyPassMatch "fcgi://127.0.0.1:9000${TRUEPREFIX}/icinga-web2/public/$1" + + + + + Options SymLinksIfOwnerMatch + AllowOverride None + + DirectoryIndex index.php + + + # Apache 2.4 + + Require all granted + + + + + # Apache 2.2 + Order allow,deny + Allow from all + + + SetEnv ICINGAWEB_CONFIGDIR "${TRUEPREFIX}/etc/icingaweb2" + + EnableSendfile Off + + + RewriteEngine on + RewriteBase /icingaweb2/ + RewriteCond %{REQUEST_FILENAME} -s [OR] + RewriteCond %{REQUEST_FILENAME} -l [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^.*$ - [NC,L] + RewriteRule ^.*$ index.php [NC,L] + + + + DirectoryIndex error_norewrite.html + ErrorDocument 404 /icingaweb2/error_norewrite.html + + + = 2.4> + # Forward PHP requests to FPM + SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + + SetHandler "proxy:fcgi://127.0.0.1:9000" + ErrorDocument 503 /icingaweb2/error_unavailable.html + + + diff --git a/net/icinga/web2/patches/patch-bin_icingacli b/net/icinga/web2/patches/patch-bin_icingacli new file mode 100644 index 00000000000..1dca479da61 --- /dev/null +++ b/net/icinga/web2/patches/patch-bin_icingacli @@ -0,0 +1,9 @@ +Index: bin/icingacli +--- bin/icingacli.orig ++++ bin/icingacli +@@ -4,4 +4,4 @@ + + require_once dirname(__DIR__) . '/library/Icinga/Application/Cli.php'; + +-Icinga\Application\Cli::start()->dispatch(); ++Icinga\Application\Cli::start('/var/www/icinga-web2')->dispatch(); diff --git a/net/icinga/web2/patches/patch-modules_setup_application_views_scripts_form_setup-welcome_phtml b/net/icinga/web2/patches/patch-modules_setup_application_views_scripts_form_setup-welcome_phtml index 10233019c7e..1677abc877a 100644 --- a/net/icinga/web2/patches/patch-modules_setup_application_views_scripts_form_setup-welcome_phtml +++ b/net/icinga/web2/patches/patch-modules_setup_application_views_scripts_form_setup-welcome_phtml @@ -15,9 +15,9 @@ Index: modules/setup/application/views/scripts/form/setup-welcome.phtml +$cliPath = '/var/www/icinga-web2/bin/icingacli'; $groupadd = null; - if (! (false === ($distro = Platform::getLinuxDistro(1)) || $distro === 'linux')) { -@@ -81,11 +81,11 @@ if (! (false === ($distro = Platform::getLinuxDistro(1 - ); ?>

+ $docker = getenv('ICINGAWEB_OFFICIAL_DOCKER_IMAGE'); +@@ -84,11 +84,11 @@ if (! (false === ($distro = Platform::getLinuxDistro(1 +

translate('In any case, make sure that all of the following applies to your environment:'); ?>

-@@ -96,12 +96,12 @@ if (! (false === ($distro = Platform::getLinuxDistro(1 - -

translate('If you\'ve got the IcingaCLI installed you can do the following:'); ?>

+@@ -101,14 +101,14 @@ if (! (false === ($distro = Platform::getLinuxDistro(1 +
+ - setup config directory --group icingaweb2; + setup config directory --group _icingaweb2; + setup token create;
+

translate('In case the IcingaCLI is missing you can create the token manually:'); ?>

- su translate(''); ?> -s /bin/sh -c "mkdir -m 2770 ; chgrp icingaweb2 ; head -c 12 /dev/urandom | base64 | tee ; chmod 0660 ;"; + su translate(''); ?> -s /bin/sh -c "mkdir -m 2770 ; chgrp _icingaweb2 ; openssl rand -base64 12 | tee ; chmod 0660 ;";
+

translate('Please see the %s for an extensive description on how to access and use this wizard.'), diff --git a/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_conf b/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_conf deleted file mode 100644 index 358af629661..00000000000 --- a/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_conf +++ /dev/null @@ -1,27 +0,0 @@ -Index: packages/files/apache/icingaweb2.conf ---- packages/files/apache/icingaweb2.conf.orig -+++ packages/files/apache/icingaweb2.conf -@@ -1,4 +1,4 @@ --Alias /icingaweb2 "/usr/share/icingaweb2/public" -+Alias /icingaweb2 "${TRUEPREFIX}/icinga-web2/public" - - # Remove comments if you want to use PHP FPM and your Apache version is older than 2.4 - # -@@ -9,7 +9,7 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public" - # - # - -- -+ - Options SymLinksIfOwnerMatch - AllowOverride None - -@@ -28,7 +28,7 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public" - Allow from all - - -- SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2" -+ SetEnv ICINGAWEB_CONFIGDIR "${TRUEPREFIX}/etc/icingaweb2" - - EnableSendfile Off - diff --git a/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_fpm_conf b/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_fpm_conf deleted file mode 100644 index d798f3ee481..00000000000 --- a/net/icinga/web2/patches/patch-packages_files_apache_icingaweb2_fpm_conf +++ /dev/null @@ -1,30 +0,0 @@ -Index: packages/files/apache/icingaweb2.fpm.conf ---- packages/files/apache/icingaweb2.fpm.conf.orig -+++ packages/files/apache/icingaweb2.fpm.conf -@@ -1,14 +1,14 @@ --Alias /icingaweb2 "/usr/share/icingaweb2/public" -+Alias /icingaweb2 "${TRUEPREFIX}/icinga-web2/public" - - - # Forward PHP requests to FPM - SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 - -- ProxyPassMatch "fcgi://127.0.0.1:9000/usr/share/icingaweb2/public/$1" -+ ProxyPassMatch "fcgi://127.0.0.1:9000${TRUEPREFIX}/icinga-web2/public/$1" - - - -- -+ - Options SymLinksIfOwnerMatch - AllowOverride None - -@@ -27,7 +27,7 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public" - Allow from all - - -- SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2" -+ SetEnv ICINGAWEB_CONFIGDIR "${TRUEPREFIX}/etc/icingaweb2" - - EnableSendfile Off - diff --git a/net/icinga/web2/patches/patch-packages_files_bin_icingacli b/net/icinga/web2/patches/patch-packages_files_bin_icingacli deleted file mode 100644 index 08d9e2716e0..00000000000 --- a/net/icinga/web2/patches/patch-packages_files_bin_icingacli +++ /dev/null @@ -1,9 +0,0 @@ -Index: packages/files/bin/icingacli ---- packages/files/bin/icingacli.orig -+++ packages/files/bin/icingacli -@@ -4,4 +4,4 @@ - - require_once '/usr/share/php/Icinga/Application/Cli.php'; - --Icinga\Application\Cli::start('/usr/share/icingaweb2')->dispatch(); -+Icinga\Application\Cli::start('/var/www/icinga-web2')->dispatch(); diff --git a/net/icinga/web2/pkg/PLIST b/net/icinga/web2/pkg/PLIST index 5f0fc50b1ef..179bc36aa2c 100644 --- a/net/icinga/web2/pkg/PLIST +++ b/net/icinga/web2/pkg/PLIST @@ -3,14 +3,16 @@ @extraunexec rm -rf %D/etc/icingaweb2/* @extraunexec rm -rf %D/icinga-web2/tmp/* conf/modules.sample/ +conf/modules.sample/icingaweb2.conf.dist +@sample conf/modules.sample/icingaweb2.conf +conf/modules.sample/icingaweb2.fpm.conf.dist +@sample conf/modules.sample/icingaweb2.fpm.conf icinga-web2/ icinga-web2/.mailmap icinga-web2/AUTHORS icinga-web2/CHANGELOG.md -icinga-web2/CONTRIBUTING.md -icinga-web2/COPYING +icinga-web2/LICENSE icinga-web2/README.md -icinga-web2/RELEASE.md icinga-web2/VERSION icinga-web2/application/ icinga-web2/application/VERSION @@ -260,21 +262,6 @@ icinga-web2/etc/bash_completion.d/ @sample ${SYSCONFDIR}/bash_completion.d/ icinga-web2/etc/bash_completion.d/icingacli @sample ${SYSCONFDIR}/bash_completion.d/icingacli -icinga-web2/etc/schema/ -icinga-web2/etc/schema/mysql-upgrades/ -icinga-web2/etc/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql -icinga-web2/etc/schema/mysql-upgrades/2.11.0.sql -icinga-web2/etc/schema/mysql-upgrades/2.5.0.sql -icinga-web2/etc/schema/mysql-upgrades/2.9.0.sql -icinga-web2/etc/schema/mysql-upgrades/2.9.1.sql -icinga-web2/etc/schema/mysql.schema.sql -icinga-web2/etc/schema/pgsql-upgrades/ -icinga-web2/etc/schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql -icinga-web2/etc/schema/pgsql-upgrades/2.11.0.sql -icinga-web2/etc/schema/pgsql-upgrades/2.5.0.sql -icinga-web2/etc/schema/pgsql-upgrades/2.9.0.sql -icinga-web2/etc/schema/pgsql-upgrades/2.9.1.sql -icinga-web2/etc/schema/pgsql.schema.sql icinga-web2/icingaweb2.ruleset.xml icinga-web2/library/ icinga-web2/library/Icinga/ @@ -1980,7 +1967,6 @@ icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/ icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/CREDITS icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/LICENSE.txt icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/README.md -icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/RELEASE.md icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/UPGRADING.md icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/bin/ icinga-web2/library/vendor/dompdf/vendor/masterminds/html5/bin/entities.php @@ -2758,29 +2744,6 @@ icinga-web2/modules/monitoring/public/css/tables.less icinga-web2/modules/monitoring/public/js/ icinga-web2/modules/monitoring/public/js/module.js icinga-web2/modules/monitoring/run.php -icinga-web2/modules/monitoring/test/ -icinga-web2/modules/monitoring/test/php/ -icinga-web2/modules/monitoring/test/php/application/ -icinga-web2/modules/monitoring/test/php/application/views/ -icinga-web2/modules/monitoring/test/php/application/views/helpers/ -icinga-web2/modules/monitoring/test/php/application/views/helpers/MonitoringFlagsTest.php -icinga-web2/modules/monitoring/test/php/application/views/helpers/PluginOutputTest.php -icinga-web2/modules/monitoring/test/php/library/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/Object/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/Object/MacroTest.php -icinga-web2/modules/monitoring/test/php/library/Monitoring/Plugin/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/Plugin/PerfdataSetTest.php -icinga-web2/modules/monitoring/test/php/library/Monitoring/Plugin/PerfdataTest.php -icinga-web2/modules/monitoring/test/php/library/Monitoring/Plugin/ThresholdRangeTest.php -icinga-web2/modules/monitoring/test/php/library/Monitoring/Web/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/Web/Rest/ -icinga-web2/modules/monitoring/test/php/library/Monitoring/Web/Rest/RestRequestTest.php -icinga-web2/modules/monitoring/test/php/regression/ -icinga-web2/modules/monitoring/test/php/regression/Bug11728Test.php -icinga-web2/modules/monitoring/test/php/regression/Bug11796Test.php -icinga-web2/modules/monitoring/test/php/regression/Bug6088Test.php -icinga-web2/modules/monitoring/test/php/regression/Bug7043Test.php icinga-web2/modules/setup/ icinga-web2/modules/setup/application/ icinga-web2/modules/setup/application/clicommands/ @@ -2854,17 +2817,6 @@ icinga-web2/modules/setup/library/Setup/Webserver.php icinga-web2/modules/setup/library/Setup/Webserver/Apache.php icinga-web2/modules/setup/library/Setup/Webserver/Nginx.php icinga-web2/modules/setup/module.info -icinga-web2/modules/setup/test/ -icinga-web2/modules/setup/test/php/ -icinga-web2/modules/setup/test/php/library/ -icinga-web2/modules/setup/test/php/library/Setup/ -icinga-web2/modules/setup/test/php/library/Setup/RequirementSetTest.php -icinga-web2/modules/test/ -icinga-web2/modules/test/application/ -icinga-web2/modules/test/application/clicommands/ -icinga-web2/modules/test/application/clicommands/PhpCommand.php -icinga-web2/modules/test/module.info -icinga-web2/modules/test/phpunit.xml icinga-web2/modules/translation/ icinga-web2/modules/translation/application/ icinga-web2/modules/translation/application/clicommands/ @@ -2889,32 +2841,6 @@ icinga-web2/modules/translation/library/Translation/Cli/TranslationCommand.php icinga-web2/modules/translation/library/Translation/Util/ icinga-web2/modules/translation/library/Translation/Util/GettextTranslationHelper.php icinga-web2/modules/translation/module.info -icinga-web2/packages/ -icinga-web2/packages/RPM.md -icinga-web2/packages/files/ -icinga-web2/packages/files/apache/ -icinga-web2/packages/files/apache/icingaweb2.conf -@sample conf/modules.sample/icingaweb2.conf -icinga-web2/packages/files/apache/icingaweb2.fpm.conf -@sample conf/modules.sample/icingaweb2.fpm.conf -icinga-web2/packages/files/bin/ -icinga-web2/packages/files/bin/icingacli -icinga-web2/packages/files/config/ -icinga-web2/packages/files/config/modules/ -icinga-web2/packages/files/config/modules/doc/ -icinga-web2/packages/files/config/modules/doc/config.ini -icinga-web2/packages/files/config/modules/setup/ -icinga-web2/packages/files/config/modules/setup/config.ini -icinga-web2/packages/files/config/modules/translation/ -icinga-web2/packages/files/config/modules/translation/config.ini -icinga-web2/packages/files/public/ -icinga-web2/packages/files/public/index.php -icinga-web2/packages/selinux/ -icinga-web2/packages/selinux/icingaweb2.fc -icinga-web2/packages/selinux/icingaweb2.if -icinga-web2/packages/selinux/icingaweb2.sh -icinga-web2/packages/selinux/icingaweb2.te -icinga-web2/phpcs.xml icinga-web2/public/ icinga-web2/public/css/ icinga-web2/public/css/icinga/ @@ -3125,6 +3051,21 @@ icinga-web2/public/js/icinga/timer.js icinga-web2/public/js/icinga/timezone.js icinga-web2/public/js/icinga/ui.js icinga-web2/public/js/icinga/utils.js +icinga-web2/schema/ +icinga-web2/schema/mysql-upgrades/ +icinga-web2/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql +icinga-web2/schema/mysql-upgrades/2.11.0.sql +icinga-web2/schema/mysql-upgrades/2.5.0.sql +icinga-web2/schema/mysql-upgrades/2.9.0.sql +icinga-web2/schema/mysql-upgrades/2.9.1.sql +icinga-web2/schema/mysql.schema.sql +icinga-web2/schema/pgsql-upgrades/ +icinga-web2/schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql +icinga-web2/schema/pgsql-upgrades/2.11.0.sql +icinga-web2/schema/pgsql-upgrades/2.5.0.sql +icinga-web2/schema/pgsql-upgrades/2.9.0.sql +icinga-web2/schema/pgsql-upgrades/2.9.1.sql +icinga-web2/schema/pgsql.schema.sql @mode 700 @owner _icingaweb2 @group _icingaweb2