summaryrefslogtreecommitdiff
path: root/net-analyzer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
commit61f10f985e19dfe20a4d9552902625edd5b6eabb (patch)
tree50db31971b38c4e0358253ef5005058a46fc773e /net-analyzer
parent34dea8e38f88007799629d0a56b12dec480b1d21 (diff)
gentoo resync : 21.06.2021
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/Manifest.gzbin45700 -> 45702 bytes
-rw-r--r--net-analyzer/pnp4nagios/Manifest3
-rw-r--r--net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-magic-quotes.patch23
-rw-r--r--net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-sizeof.patch357
-rw-r--r--net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r11.ebuild104
-rw-r--r--net-analyzer/suricata/Manifest4
-rw-r--r--net-analyzer/suricata/suricata-5.0.6.ebuild2
-rw-r--r--net-analyzer/suricata/suricata-6.0.2.ebuild16
8 files changed, 504 insertions, 5 deletions
diff --git a/net-analyzer/Manifest.gz b/net-analyzer/Manifest.gz
index a23bc1f4a515..b8a14fc252b4 100644
--- a/net-analyzer/Manifest.gz
+++ b/net-analyzer/Manifest.gz
Binary files differ
diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest
index 2d3e7c1e57d8..f18071c9482a 100644
--- a/net-analyzer/pnp4nagios/Manifest
+++ b/net-analyzer/pnp4nagios/Manifest
@@ -1,6 +1,9 @@
AUX 98_pnp4nagios-2.4.conf 725 BLAKE2B ca04f13ad57a90d339980566008d7176aed8be5def8ddb1d4e55ed9ef846900f690ca9bcf37893d73c559c8dea625a027966407f9b87c9ea474447dad9d61314 SHA512 9698529decd9587b4c48dfd5a92069645d4a8fb0796f05fea104459bc4a58aab081f10fc110d75e97331ec960e5fef71a85745c3ea58c6b9f6c37bcec4143000
AUX npcd.initd 364 BLAKE2B b985e4951f95807f4d1d887cfe4f65780150ec827cbe6995e24a955290ce040c263c5848773f24c4ab8e05f5d78ab34693a3636bc8837aae8ef718e64f5c4e3c SHA512 efbf969865ce8f61a733ea0f0e3846854231b55d148dbf0121b4cf6022fedd94cb1ea8f717920f38aedddd6a8f33edf473f139599dc01cc2da14eedb80f7f4f2
AUX pnp4nagios-0.6.14-makefile.patch 1057 BLAKE2B 623115771d66839df357cf19ceb0eac9600cac220cb77b77638c76ac1a5a419b7dd83145192779cfeb845a122729728bccd7cc069de1a4da51180aabbff1b91c SHA512 a67e4b66b0f24db25f9b67d982d99a90c20ad229d404537c9963b2e9f1c5df39a46faa34ecdeb1a9e69b46efd96104d97a39a7e326a01d1c2d09dcc149171602
+AUX pnp4nagios-0.6.26-magic-quotes.patch 987 BLAKE2B 02bc9b3f3c8d3289593147530d8f7f41927e301e9af854c0c57840ea769b3db2fef1222ede7c125f22e1d0ea7e1c62e14bedc387b6e9f185d0bafcf6b1f2532b SHA512 80fdb4013740dabfc31cf990f4c1a517c0002b94aec7f48d408230045ca696147763fedb04cff5da4954962305fe026bf4bcbc575f04cb16e7d96f49536b0715
+AUX pnp4nagios-0.6.26-sizeof.patch 15528 BLAKE2B f6db44720ef2a68dc5d617427fd9d0813ce34e5fe922bd25153df482420a5b2d718ccd90a09a6073e803345a48e6545e39430522d45b6fea4f4924617ff4583e SHA512 02e671a31371662a1e0958dd704b7918360d20bd2fc4171d2d8c7d0332bc37356b24929834ae910858072812f7fa6d61ba4097ff1f93848e0d02b55aee515290
DIST pnp4nagios-0.6.26.tar.gz 3039265 BLAKE2B 1adb3c41222e6bc93671af955a1564387d77901ce118f5d309d101d88c691140e0feef1c2594bc5db44706ff01505a4fcf99b79b6a0c5b5cb923838dd00f1ff0 SHA512 caf6dcced74967174d9e6f09dd1a5bee17397c10a68d0f577c37dcc836f928d78c20d75a0189539e9ffa93715ab7b6e732e9f36b9698cf4dd9c09cfb65184427
EBUILD pnp4nagios-0.6.26-r10.ebuild 3074 BLAKE2B 4ba7815161da54bf4e9e66e0509d1c2cd1acc070d2c66ec619a560b13a496c72505a8f28183054c2b3d3efb354c608d866c86cc1ff177c868da18fddca04f912 SHA512 726614c8530d171320acc7909b1b3e735759983ed77e10361b6d9e3c61d8b51744d668110a887c723935e6351497518d4401d73c887d2978bb6e72b71f3cf4b9
+EBUILD pnp4nagios-0.6.26-r11.ebuild 3167 BLAKE2B 81d5d18234042e730d7430d9780a782c85091337d5e4011f04abe9ad4809c56f748bbf9b9453961a18e51c9660055b4c52baf03b9f4cac85b760477816355181 SHA512 935b3a92f92787ba4c74da329bed1fd363d0e5302c1a3796a0a30d8ca14ca5a49431b09812f7eb379d0669d604cca7e1c99cb5f31b95b5b3ede634c1616b035e
MISC metadata.xml 676 BLAKE2B 39cbab00f63f5b7e6cdd10826ef65eeb9ec85616c48c8c94939216e75615c1d0903285be99b53a99aaf0ed56a79845c63f42111b3fde6b1d6b1af9fb736d8596 SHA512 6efd39f07514cbdf85f95fdb0e7bb9f69bf7ba7ab78c1345bdde1eea645cd89415db5044fe2f1b458211c7b002c895e2e9e225c00172be416f1b30f47765f78e
diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-magic-quotes.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-magic-quotes.patch
new file mode 100644
index 000000000000..7f1d8ae0cf51
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-magic-quotes.patch
@@ -0,0 +1,23 @@
+# https://github.com/lingej/pnp4nagios/commit/08ce9e26171b888c8e3b036b6693fd8f751970a8
+diff --git a/lib/kohana/system/libraries/Input.php b/lib/kohana/system/libraries/Input.php
+index 0e23c80..b0b24f8 100644
+--- a/lib/kohana/system/libraries/Input.php
++++ b/lib/kohana/system/libraries/Input.php
+@@ -54,14 +54,14 @@ public function __construct()
+ if (Input::$instance === NULL)
+ {
+ // magic_quotes_runtime is enabled
+- if (get_magic_quotes_runtime())
++ if (function_exists('get_magic_quotes_runtime'))
+ {
+- set_magic_quotes_runtime(0);
++ ini_set('magic_quotes_runtime', 0);
+ Kohana::log('debug', 'Disable magic_quotes_runtime! It is evil and deprecated: http://php.net/magic_quotes');
+ }
+
+ // magic_quotes_gpc is enabled
+- if (get_magic_quotes_gpc())
++ if (function_exists('get_magic_quotes_gpc'))
+ {
+ $this->magic_quotes_gpc = TRUE;
+ Kohana::log('debug', 'Disable magic_quotes_gpc! It is evil and deprecated: http://php.net/magic_quotes');
diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-sizeof.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-sizeof.patch
new file mode 100644
index 000000000000..360b4be4f76e
--- /dev/null
+++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.26-sizeof.patch
@@ -0,0 +1,357 @@
+# https://github.com/lingej/pnp4nagios/commit/d5e04540d52238dfcb877d7116316ba1be8c1963
+diff --git a/share/pnp/application/controllers/ajax.php b/share/pnp/application/controllers/ajax.php
+index 9e0428d..c5f89e2 100644
+--- a/share/pnp/application/controllers/ajax.php
++++ b/share/pnp/application/controllers/ajax.php
+@@ -59,7 +59,7 @@ public function basket($action=FALSE){
+
+ if($action == "list"){
+ $basket = $this->session->get("basket");
+- if(is_array($basket) && sizeof($basket) > 0){
++ if(is_array($basket) && (!empty($basket))){
+ foreach($basket as $item){
+ printf("<li class=\"ui-state-default %s\" id=\"%s\"><a title=\"%s\" id=\"%s\"><img width=12px height=12px src=\"%smedia/images/remove.png\"></a>%s</li>\n",
+ "basket_action_remove",
+@@ -135,7 +135,7 @@ public function basket($action=FALSE){
+ echo "Action $action not known";
+ }
+ $basket = $this->session->get("basket");
+- if(is_array($basket) && sizeof($basket) == 0){
++ if(is_array($basket) && empty($basket)){
+ echo Kohana::lang('common.basket-empty');
+ }else{
+ echo "<div align=\"center\" class=\"p2\">\n";
+diff --git a/share/pnp/application/controllers/image.php b/share/pnp/application/controllers/image.php
+index b41ca83..869435c 100644
+--- a/share/pnp/application/controllers/image.php
++++ b/share/pnp/application/controllers/image.php
+@@ -47,7 +47,7 @@ public function index()
+ $this->rrdtool->streamImage("ERROR: NOT_AUTHORIZED");
+
+ #print Kohana::debug($this->data->STRUCT);
+- if(sizeof($this->data->STRUCT) > 0){
++ if(!empty($this->data->STRUCT)){
+ $image = $this->rrdtool->doImage($this->data->STRUCT[0]['RRD_CALL']);
+ }else{
+ $image = FALSE;
+diff --git a/share/pnp/application/controllers/page.php b/share/pnp/application/controllers/page.php
+index 7bd877e..fcfffe8 100644
+--- a/share/pnp/application/controllers/page.php
++++ b/share/pnp/application/controllers/page.php
+@@ -58,7 +58,7 @@ public function index(){
+
+ public function basket(){
+ $basket = $this->session->get("basket");
+- if(is_array($basket) && sizeof($basket) > 0){
++ if(is_array($basket) && (!empty($basket))){
+ $this->data->buildBasketStruct($basket,$this->view);
+ $this->template->page->basket_box = $this->add_view('basket_box');
+ $this->template->page->header->title = Kohana::lang('common.page-basket');
+diff --git a/share/pnp/application/controllers/pdf.php b/share/pnp/application/controllers/pdf.php
+index 15f2ab4..d590859 100644
+--- a/share/pnp/application/controllers/pdf.php
++++ b/share/pnp/application/controllers/pdf.php
+@@ -202,7 +202,7 @@ public function basket(){
+ }
+ $this->data->getTimeRange($this->start,$this->end,$this->view);
+ $basket = $this->session->get("basket");
+- if(is_array($basket) && sizeof($basket) > 0){
++ if(is_array($basket) && (!empty($basket))){
+ $this->data->buildBasketStruct($basket,$this->view);
+ }
+ //echo Kohana::debug($this->data->STRUCT);
+diff --git a/share/pnp/application/helpers/rrd.php b/share/pnp/application/helpers/rrd.php
+index 81bb257..ea9f99b 100644
+--- a/share/pnp/application/helpers/rrd.php
++++ b/share/pnp/application/helpers/rrd.php
+@@ -207,7 +207,7 @@ public static function gprint($vname=FALSE, $cf="AVERAGE", $text="%6.2lf %s"){
+ if(is_array($cf)){
+ foreach($cf as $key => $val){
+ $line .= sprintf("GPRINT:%s:%s:",$vname,$val);
+- if($key == sizeof($cf)-1){
++ if($key == count($cf)-1){
+ $line .= '"'.$text.' '.ucfirst(strtolower($val)).'\\l" ';
+ }else{
+ $line .= '"'.$text.' '.ucfirst(strtolower($val)).'" ';
+@@ -234,7 +234,7 @@ public static function gprinta($vname=FALSE, $cf="AVERAGE", $text="%6.2lf %s", $
+ if(is_array($cf)){
+ foreach($cf as $key => $val){
+ $line .= sprintf("GPRINT:%s:%s:",$vname,$val);
+- if(($key == sizeof($cf)-1)and($align != "")){
++ if(($key == count($cf)-1)and($align != "")){
+ $line .= '"'.$text.' '.ucfirst(strtolower($val)).$align.'" ';
+ }else{
+ $line .= '"'.$text.' '.ucfirst(strtolower($val)).'" ';
+diff --git a/share/pnp/application/lib/json.php b/share/pnp/application/lib/json.php
+index 0cddbdd..d0e3171 100644
+--- a/share/pnp/application/lib/json.php
++++ b/share/pnp/application/lib/json.php
+@@ -375,7 +375,7 @@ function encode($var)
+ */
+
+ // treat as a JSON object
+- if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
++ if (is_array($var) && count($var) && (array_keys($var) !== range(0, count($var) - 1))) {
+ $properties = array_map(array($this, 'name_value'),
+ array_keys($var),
+ array_values($var));
+diff --git a/share/pnp/application/models/auth.php b/share/pnp/application/models/auth.php
+index 77f28d2..11d785a 100644
+--- a/share/pnp/application/models/auth.php
++++ b/share/pnp/application/models/auth.php
+@@ -116,11 +116,7 @@ public function is_authorized($host = FALSE, $service = NULL){
+ $result = $this->queryLivestatus($query);
+ }
+
+- if(sizeof($result) > 0){
+- return TRUE;
+- }else{
+- return FALSE;
+- }
++ return (!empty($result));
+ }
+
+
+diff --git a/share/pnp/application/models/config.php b/share/pnp/application/models/config.php
+index 44e3d12..7a6b8e0 100644
+--- a/share/pnp/application/models/config.php
++++ b/share/pnp/application/models/config.php
+@@ -68,7 +68,7 @@ public function read_config(){
+ $views = array();
+ include ($config_file);
+ $array_b = $views;
+- if(sizeof($views) == 0 ){
++ if(empty($views)){
+ $views = $array_a;
+ }
+ }
+diff --git a/share/pnp/application/models/data.php b/share/pnp/application/models/data.php
+index 63b0e24..74e8821 100644
+--- a/share/pnp/application/models/data.php
++++ b/share/pnp/application/models/data.php
+@@ -45,11 +45,11 @@ public function getSpecialTemplates(){
+ }
+ }
+ }
+- if(sizeof($templates) > 0){
++ if(empty($templates)){
++ return FALSE;
++ }else{
+ sort($templates);
+ return $templates;
+- }else{
+- return FALSE;
+ }
+ }
+
+@@ -97,7 +97,9 @@ public function getHosts() {
+ throw new Kohana_User_Exception('Perfdata Dir', "Can not open $path");
+ }
+ }
+- if(sizeof($hosts)>0){
++ if(empty($hosts)){
++ throw new Kohana_Exception('error.perfdata-dir-empty', $conf['rrdbase'] );
++ }else{
+ # Obtain a list of columns
+ foreach ($hosts as $key => $row) {
+ $sort[$key] = $row['sort'];
+@@ -105,8 +107,6 @@ public function getHosts() {
+ # Sort the data with volume descending, edition ascending
+ # Add $data as the last parameter, to sort by the common key
+ array_multisort($sort, SORT_ASC, $hosts);
+- }else{
+- throw new Kohana_Exception('error.perfdata-dir-empty', $conf['rrdbase'] );
+ }
+ return $hosts;
+ }
+@@ -147,7 +147,7 @@ function getRawServices($hostname) {
+ }else{
+ throw new Kohana_Exception('error.perfdata-dir-for-host', $path, $hostname );
+ }
+- if( is_array($services) && sizeof($services) > 0){
++ if( is_array($services) && (!empty($services))){
+ # Obtain a list of columns
+ foreach ($services as $key => $row) {
+ $sort[$key] = $row['name'];
+@@ -205,7 +205,7 @@ function getServices($hostname) {
+ $i++;
+ }
+ #print Kohana::debug($services);
+- if( is_array($services) && sizeof($services) > 0){
++ if( is_array($services) && (!empty($services))){
+ # Obtain a list of columns
+ foreach ($services as $key => $row) {
+ $sort[$key] = $row['sort'];
+@@ -214,7 +214,7 @@ function getServices($hostname) {
+ # Add $data as the last parameter, to sort by the common key
+ array_multisort($sort, SORT_STRING, $services);
+ }
+- if(is_array($host) && sizeof($host) > 0 ){
++ if(is_array($host) && (!empty($host))){
+ array_unshift($services, $host[0]);
+ }
+ return $services;
+@@ -232,7 +232,7 @@ public function getFirstService($hostname) {
+ break;
+ }
+ }
+- if(sizeof($srv) == 0){
++ if(empty($srv)){
+ throw new Kohana_Exception('error.get-first-service', $hostname );
+ }
+ return $srv['name'];
+@@ -250,7 +250,7 @@ public function getFirstHost() {
+ break;
+ }
+ }
+- if(sizeof($host) == 0){
++ if(empty($host)){
+ throw new Kohana_Exception('error.get-first-host');
+ }
+ return $host['name'];
+@@ -693,7 +693,7 @@ public function getTimeRange($start=FALSE ,$end=FALSE ,$view="") {
+ }
+
+ $view=intval( pnp::clean($view) );
+- if($view >= sizeof($this->config->views)){
++ if($view >= count($this->config->views)){
+ $view = 1;
+ }
+
+@@ -735,7 +735,7 @@ public function getTimeRange($start=FALSE ,$end=FALSE ,$view="") {
+ $timerange['f_end'] = date($this->config->conf['date_fmt'],$end);
+ $timerange['cmd'] = " --start $start --end $end ";
+ $timerange['type'] = "views";
+- for ($i = 0; $i < sizeof($this->config->views); $i++) {
++ for ($i = 0; $i < count($this->config->views); $i++) {
+ $timerange[$i]['title'] = $this->config->views[$i]['title'];
+ $timerange[$i]['start'] = $end - $this->config->views[$i]['start'];
+ $timerange[$i]['f_start'] = date($this->config->conf['date_fmt'],$end - $this->config->views[$i]['start']);
+@@ -747,7 +747,7 @@ public function getTimeRange($start=FALSE ,$end=FALSE ,$view="") {
+ }
+
+ public function buildBasketStruct($basket,$view = NULL){
+- if(is_array($basket) && sizeof($basket) > 0){
++ if(is_array($basket) && (!empty($basket))){
+ if($view == ""){
+ $views = array_keys($this->config->views);
+ }else{
+@@ -757,9 +757,9 @@ public function buildBasketStruct($basket,$view = NULL){
+ foreach($basket as $item){
+ # explode host::service::source
+ $slices = explode("::",$item);
+- if(sizeof($slices) == 2)
++ if(count($slices) == 2)
+ $this->buildDataStruct($slices[0], $slices[1], $view);
+- if(sizeof($slices) == 3)
++ if(count($slices) == 3)
+ $this->buildDataStruct($slices[0], $slices[1], $view, $slices[2]);
+ }
+ # break on custom time ranges
+@@ -806,12 +806,12 @@ public function buildPageStruct($page,$view){
+ }
+ }
+ #print Kohana::debug($servicelist);
+- if(sizeof($servicelist) > 0 ){
++ if(empty($servicelist)){
++ $this->ERROR = "ERROR: ". Kohana::lang('error.no-data-for-page', $page.".cfg" );
++ }else{
+ foreach($servicelist as $s){
+ $this->buildDataStruct($s['host'],$s['service'],$view,$s['source']);
+ }
+- }else{
+- $this->ERROR = "ERROR: ". Kohana::lang('error.no-data-for-page', $page.".cfg" );
+ }
+ }
+
+@@ -962,11 +962,11 @@ public function getPages() {
+ die("Cannot open directory: $path");
+ }
+ }
+- if(sizeof($pages)>0){
++ if(empty($pages)){
++ return FALSE;
++ }else{
+
+ natsort($pages);
+- }else{
+- return FALSE;
+ }
+ return $pages;
+ }
+@@ -976,10 +976,10 @@ public function getPages() {
+ */
+ public function getFirstPage(){
+ $pages = $this->getPages();
+- if(sizeof($pages) > 0 ){
+- return urldecode($pages[0]);
+- }else{
++ if(empty($pages)){
+ return FALSE;
++ }else{
++ return urldecode($pages[0]);
+ }
+ }
+
+@@ -1093,7 +1093,7 @@ public function tplGetServices ($hostregex=FALSE, $serviceregex = ''){
+ }
+ }
+
+- if(sizeof($new_hosts) == 0){
++ if(empty($new_hosts)){
+ throw new Kohana_Exception('error.tpl-no-hosts-found', $hostregex);
+ }
+
+@@ -1101,7 +1101,7 @@ public function tplGetServices ($hostregex=FALSE, $serviceregex = ''){
+ $new_services = array();
+ foreach($new_hosts as $host){
+ $services = $this->getRawServices($host);
+- if(sizeof($services) == 0){
++ if(empty($services)){
+ throw new Kohana_Exception('error.tpl-no-services-found', $serviceregex);
+ }
+ foreach($services as $service){
+@@ -1115,7 +1115,7 @@ public function tplGetServices ($hostregex=FALSE, $serviceregex = ''){
+ }
+ }
+
+- if(sizeof($new_services) == 0){
++ if(empty($new_services)){
+ throw new Kohana_Exception('error.tpl-no-services-found', $serviceregex);
+ }
+
+diff --git a/share/pnp/application/views/basket_box.php b/share/pnp/application/views/basket_box.php
+index ea8a72c..2a4e0e6 100644
+--- a/share/pnp/application/views/basket_box.php
++++ b/share/pnp/application/views/basket_box.php
+@@ -6,7 +6,7 @@
+ echo Kohana::lang('common.basket-box-header')."</div>\n";
+ echo "<div class=\"p4 ui-widget-content ui-corner-bottom\">\n";
+ echo "<div id=\"basket_items\">\n";
+-if(is_array($basket) && sizeof($basket) > 0 ){
++if(is_array($basket) && !empty($basket)){
+ foreach($basket as $key=>$item){
+ echo "<li class=\"ui-state-default basket_action_remove\" id=\"".
+ $item."\"><a title=\"".Kohana::lang('common.basket-remove', $item)."\"".
+@@ -16,7 +16,7 @@
+ pnp::shorten($item)."</li>\n";
+ }
+ }
+-if(is_array($basket) && sizeof($basket) > 0 ){
++if(is_array($basket) && !empty($basket)){
+ echo "<div align=\"center\" class=\"p2\">\n";
+ echo "<button id=\"basket-show\">".Kohana::lang('common.basket-show')."</button>\n";
+ echo "<button id=\"basket-clear\">".Kohana::lang('common.basket-clear')."</button>\n";
+diff --git a/share/pnp/templates.dist/pnp-runtime.php b/share/pnp/templates.dist/pnp-runtime.php
+index 21c4ae3..a668fdc 100644
+--- a/share/pnp/templates.dist/pnp-runtime.php
++++ b/share/pnp/templates.dist/pnp-runtime.php
+@@ -34,7 +34,7 @@
+ #
+ $ds_name[2] = "Errors and updates";
+ $def[2] = '';
+-for($i=2; $i <= sizeof($DS); $i++) {
++for($i=2; $i <= count($DS); $i++) {
+ $def[2] .= rrd::def("var$i", $RRDFILE[$i], $DS[$i] , "AVERAGE") ;
+ $def[2] .= rrd::line1("var$i", rrd::color($i), rrd::cut(ucfirst($LABEL[$i]),12) );
+ $def[2] .= rrd::gprint("var$i", array('LAST', 'MAX', 'AVERAGE'), "%4.0lf$UNIT[$i]");
diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r11.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r11.ebuild
new file mode 100644
index 000000000000..2d9d334da161
--- /dev/null
+++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r11.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A performance data analyzer for nagios"
+HOMEPAGE="http://www.pnp4nagios.org/"
+SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="apache2 icinga +nagios"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="^^ ( icinga nagios )"
+
+# Some things (sync mode, for one) are broken with nagios-4.x, but since
+# nagios-3.x has been end-of-life'd, we don't have much choice here but
+# to accept it.
+DEPEND="
+ dev-lang/php:*[filter,gd,json(+),simplexml,xml,zlib]
+ net-analyzer/rrdtool[graph,perl]
+ icinga? ( net-analyzer/icinga2 )
+ nagios? ( net-analyzer/nagios-core )"
+
+# A list of modules used in our Apache config file.
+APACHE_MODS="apache2_modules_alias," # "Alias" directive
+APACHE_MODS+="apache2_modules_authz_core," # "Require" directive
+APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends
+
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-HiRes
+ media-fonts/dejavu
+ apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.6.14-makefile.patch"
+ "${FILESDIR}/${PN}-0.6.26-magic-quotes.patch"
+ "${FILESDIR}/${PN}-0.6.26-sizeof.patch"
+)
+
+src_configure() {
+ local user_group=nagios
+ use icinga && user_group=icinga
+
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/pnp \
+ --datarootdir="${EPREFIX}"/usr/share/pnp \
+ --localstatedir="${EPREFIX}"/var/lib/pnp \
+ --with-nagios-user="${user_group}" \
+ --with-nagios-group="${user_group}" \
+ --with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log
+}
+
+src_compile() {
+ # The default target just shows a help
+ emake all
+}
+
+src_install() {
+ # Don't use INSTALL_OPTS because they set insecure permissions on
+ # all of /etc/pnp (https://github.com/lingej/pnp4nagios/issues/140).
+ emake INSTALL_OPTS="" DESTDIR="${D}" install install-config
+ einstalldocs
+ newinitd "${FILESDIR}"/npcd.initd npcd
+ rm "${ED%/}/usr/share/pnp/install.php" || \
+ die "unable to remove ${ED%/}/usr/share/pnp/install.php"
+
+ # Fix CVE-2012-3457 (Gentoo bug 430358)
+ fperms o-rwx /etc/pnp/process_perfdata.cfg
+
+ if use apache2 ; then
+ insinto /etc/apache2/modules.d
+ newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
+ fi
+
+ # The nagios or icinga user needs to write performance data to the
+ # perfdata-dir...
+ local user_group=nagios
+ use icinga && user_group=icinga
+ fowners ":${user_group}" /var/lib/pnp/{,perfdata,spool}
+ fperms g+rwx /var/lib/pnp/{,perfdata,spool}
+
+ # and likewise for its logs...
+ dodir /var/log/pnp
+ fowners ":${user_group}" /var/log/pnp
+ fperms g+rwx /var/log/pnp
+
+ # and its statistics. This one is arguably the responsibility of the
+ # build system, since process_perfdata.cfg refers to this location.
+ dodir /var/lib/pnp/stats
+ fowners ":${user_group}" /var/lib/pnp/stats
+ fperms g+rwx /var/lib/pnp/stats
+}
+
+pkg_postinst() {
+ elog "To enable the pnp4nagios web front-end, please visit"
+ elog "${EROOT%/}/etc/conf.d/apache2 and add \"-D PNP -D PHP\""
+ elog "to APACHE2_OPTS. Then pnp4nagios will be available at,"
+ elog
+ elog " http://localhost/pnp4nagios"
+ elog
+}
diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest
index 15e2141da543..5c8ddb074ad5 100644
--- a/net-analyzer/suricata/Manifest
+++ b/net-analyzer/suricata/Manifest
@@ -8,6 +8,6 @@ AUX suricata.service 501 BLAKE2B 00631ada0d2993eae97a028ef950b031b91bb3af346ee35
AUX suricata.tmpfiles 24 BLAKE2B 150b74a6775137704915015871ab4455b8d0b9204a75c398ea746e9194b0c0a787904f9015b98f36a685fac0dbb0fcb43746096dd403bf882afa5dfef12af94d SHA512 1530aed4efb35f988e2f0134388ea11ffc3ba1f217845a2c5dd47f947983ed4d343126e49d66a86ca7894ff60b5134464ddbe07509dcc80c001131f09cb7e2dd
DIST suricata-5.0.6.tar.gz 29136659 BLAKE2B 97d95cadd54d44bd82424322c08ad04be2122cdae5763995f7aefe4a75872091dd7d289e89e47a5ad9fbce570964f11331d848db7fe7ec4c2be9a0f8b62fadff SHA512 73580721683f929a90b6b59673842c051fe44ee7b8d8d890106aad09952d5b8a8f3716f168c41b33feb5c32e0106f5926125313cc11b27bc5a9c65e90b21888f
DIST suricata-6.0.2.tar.gz 30514801 BLAKE2B 20604fa3332a9d99a1a30db55a0ccd689af0e08e686cd6739d6c4390456acc28d34702704f7e25537463b0c23600d123de361a227f9ef2420ee5c2b11df2866a SHA512 230a74a5442cfa066c56528036b64c173702238c5075161119eaad08d320e528d3510c51095297f120030177fed9c84076d00f567f7a3a4cbdb23d382966cf00
-EBUILD suricata-5.0.6.ebuild 6381 BLAKE2B 43c6b0727584760a1b51ab0023a976e4718bf559c5b98e995efbe65c3138ab9ad8757f316aa383bd8d1ccad185d763406fb361d5becea219d9d95e31f5711de5 SHA512 215ac551bed8822bfdfe941e1bf3bb1b04df6e97c0c9d3c463c60d09a616f32bb5d210160a4a718bf5bdfb667a59bdc2356a0a241b076aba54739686265057c1
-EBUILD suricata-6.0.2.ebuild 6657 BLAKE2B b2443f1fe93ac7025e8b8fd436c49669348e59185b8bf281f8feb057e0207fd89f212b9be5a919454c8cfd769e0e8c66413d2ca8dc23f985a015f766a9d1369e SHA512 447cce2d3bd2790417301ac03609da246b84954aa9ffe733995485c1e1b572746689203c1a0a259669f34f726d167ef443f21fb7b2b35594a3b377d0ef0631bb
+EBUILD suricata-5.0.6.ebuild 6376 BLAKE2B 1a09526148d42ac4dc2ee5bfa2369e559a07bd7294d1d68898ec875c24f18bf47237bd8cad796978b3487e543629fcd66e87db7cb2561f4605639c415ffa491a SHA512 7162a2f55fca1dd955d94267402280813154fae22f0ccbf1733fca1eb25953e224e03f4b3ccc393b70d51f33eb7ad061b1aad8aa0ccc46b335d6826b58610c29
+EBUILD suricata-6.0.2.ebuild 7403 BLAKE2B 1848215678ca352e3e9e76bb1a2f30b3fa3b6f4c8d1496305a501e9555eaddc62353542952dfe834d833ecf3e6c65d9ce4e0459dc663297a60581ddfa2e9fcad SHA512 c36259246eb69503ab60cbb16d3ea539ca51424e71cb2f44db331bbfd28933d44a999c268cd5e3e08450f7140694201d800b924dd3d8a87547865a30c447a7c3
MISC metadata.xml 1015 BLAKE2B 355c550ad2fe7a37d69b92f0bd710824d68a3353be687876449ad5b7d8e2c98b06b833e59ebcf479410aff09dce71e1f7f64be860c348f3d6c3519cd8fe2acf2 SHA512 0837e07a0130baff435e684b47a6b463991aec73b4f570672d0091a70adf163c5e83d19887e1575f12db783d6246050777011d25dc658fe4767cd3fe8fc1d4a5
diff --git a/net-analyzer/suricata/suricata-5.0.6.ebuild b/net-analyzer/suricata/suricata-5.0.6.ebuild
index ac0387dc3152..a48eacb1a1ed 100644
--- a/net-analyzer/suricata/suricata-5.0.6.ebuild
+++ b/net-analyzer/suricata/suricata-5.0.6.ebuild
@@ -9,7 +9,7 @@ PYTHON_COMPAT=( python3_{7..10} )
inherit autotools linux-info lua-single python-single-r1 systemd tmpfiles
DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
+HOMEPAGE="https://suricata.io/"
SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
LICENSE="GPL-2"
diff --git a/net-analyzer/suricata/suricata-6.0.2.ebuild b/net-analyzer/suricata/suricata-6.0.2.ebuild
index ac72587b971d..5a9b9a7ab1a8 100644
--- a/net-analyzer/suricata/suricata-6.0.2.ebuild
+++ b/net-analyzer/suricata/suricata-6.0.2.ebuild
@@ -9,7 +9,7 @@ PYTHON_COMPAT=( python3_{7..10} )
inherit autotools linux-info lua-single python-single-r1 systemd tmpfiles
DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine"
-HOMEPAGE="https://suricata-ids.org/"
+HOMEPAGE="https://suricata.io/"
SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz"
LICENSE="GPL-2"
@@ -51,7 +51,7 @@ RDEPEND="${PYTHON_DEPS}
redis? ( dev-libs/hiredis )"
DEPEND="${RDEPEND}
>=sys-devel/autoconf-2.69-r5
- virtual/rust"
+ <virtual/rust-1.53.0" # Bug #797370 part one. Hopefully to be fixed come next release.
PATCHES=(
"${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch"
@@ -60,6 +60,18 @@ PATCHES=(
)
pkg_pretend() {
+ # Bug #797370 part deux, needed to address the edge case of both rust and rust-bin being present
+ # - in which case the version limit set on virtual/rust only affects one of them.
+ # Version-checking code shamelessly stolen from www-client/firefox.
+ local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }')
+ [[ -z ${version_rust} ]] && die "Failed to read version from rustc!"
+ if ver_test "${version_rust}" -ge "1.53.0"; then
+ eerror "This version of ${PN} does not support Rust 1.53.0+. Please switch to an older version using"
+ eerror " eselect rust"
+ eerror "before emerging ${PN}."
+ die "Unsupported version of Rust selected"
+ fi
+
if use bpf && use kernel_linux; then
if kernel_is -lt 4 15; then
ewarn "Kernel 4.15 or newer is necessary to use all XDP features like the CPU redirect map"