/[smecontribs]/rpms/smeserver-cacti/contribs10/smeserver-cacti-1.1.19-sme10.patch
ViewVC logotype

Diff of /rpms/smeserver-cacti/contribs10/smeserver-cacti-1.1.19-sme10.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Tue Jul 26 04:09:02 2022 UTC Revision 1.3 by jpp, Tue Jul 26 04:53:30 2022 UTC
# Line 1  Line 1 
1  diff -Nur --no-dereference smeserver-cacti-1.1.19.old/createlinks smeserver-cacti-1.1.19/createlinks  diff -Nur --no-dereference smeserver-cacti-1.1.19.old/createlinks smeserver-cacti-1.1.19/createlinks
2  --- smeserver-cacti-1.1.19.old/createlinks      2014-06-16 11:53:01.000000000 -0400  --- smeserver-cacti-1.1.19.old/createlinks      2014-06-16 11:53:01.000000000 -0400
3  +++ smeserver-cacti-1.1.19/createlinks  2022-07-26 00:03:16.700000000 -0400  +++ smeserver-cacti-1.1.19/createlinks  2022-07-26 00:15:21.267000000 -0400
4  @@ -5,6 +5,7 @@  @@ -5,6 +5,7 @@
5   for my $event (qw(   for my $event (qw(
6       post-upgrade       post-upgrade
# Line 23  diff -Nur --no-dereference smeserver-cac Line 23  diff -Nur --no-dereference smeserver-cac
23  +  /etc/e-smith/sql/init/80cacti  +  /etc/e-smith/sql/init/80cacti
24  +));  +));
25  +  +
26  +event_services($event, qw(  +event_services($event,
27  +  crond restart  +  'crond' => 'restart',
28  +  mysql.init restart  +  'mysql.init' => 'restart',
29  +  httpd-e-smith sigusr1  +  'httpd-e-smith' => 'sigusr1',
30  +  php74-php-fpm reload-or-restart  +  'php74-php-fpm' => 'reload-or-restart'
31  +));  +);
32  +  +
33  +#backup ?  +#backup ?
34  +#use esmith::Build::Backup qw(:all);  +#use esmith::Build::Backup qw(:all);
# Line 36  diff -Nur --no-dereference smeserver-cac Line 36  diff -Nur --no-dereference smeserver-cac
36  +#  +#
37  +#));  +#));
38  +  +
39    diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/db/configuration/migrate/80cacti smeserver-cacti-1.1.19/root/etc/e-smith/db/configuration/migrate/80cacti
40    --- smeserver-cacti-1.1.19.old/root/etc/e-smith/db/configuration/migrate/80cacti        1969-12-31 19:00:00.000000000 -0500
41    +++ smeserver-cacti-1.1.19/root/etc/e-smith/db/configuration/migrate/80cacti    2022-07-26 00:51:52.311000000 -0400
42    @@ -0,0 +1,45 @@
43    +{
44    +    use MIME::Base64 qw(encode_base64);
45    +
46    +    my $service;
47    +    my $rec;
48    +    my $pw;
49    +
50    +    # Store the cacti password in the configuration database (if not already there)
51    +    $service = 'cacti';
52    +
53    +    $rec = $DB->get($service) || $DB->new_record($service, {type => 'service'});
54    +
55    +    $pw = $rec->prop('DbPassword');
56    +    
57    +
58    +       if (! $pw)
59    +       {
60    +              
61    +               if ( open( RANDOM, "/dev/urandom" ) )
62    +               {
63    +                       my $buf;
64    +                       # 57 bytes is a full line of Base64 coding, and contains
65    +                       # 456 bits of randomness - given a perfectly random /dev/random
66    +                       if ( read( RANDOM, $buf, 57 ) != 57 )
67    +                       {
68    +                           warn("Short read from /dev/random: $!");
69    +                       }
70    +                       else
71    +                       {
72    +                               $pw = encode_base64($buf);
73    +                           chomp $pw;
74    +                       }
75    +                       close RANDOM;
76    +               }
77    +               else
78    +               {
79    +                   warn "Could not open /dev/urandom: $!";
80    +               }
81    +              
82    +               $rec->set_prop('DbPassword', $pw);
83    +       }
84    +
85    +
86    +
87    +}
88    diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80cacti smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/e-smith/sql/init/80cacti
89    --- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80cacti  2019-12-11 14:46:28.000000000 -0500
90    +++ smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/e-smith/sql/init/80cacti      2022-07-26 00:48:18.028000000 -0400
91    @@ -1,9 +1,9 @@
92     {
93    -    my $db = $cacti{DbName} || 'cacti_sme';
94    +    my $db = $cacti{DbDatabase} || 'cacti_sme';
95         my $user = $cacti{DbUser} || 'cacti';
96         my $pass = $cacti{DbPassword} || 'changeme';
97         $OUT .= <<END
98    -#! /bin/sh
99    +#!/bin/bash
100         if [ -d /var/lib/mysql/$db ]; then
101           exit
102         fi
103    @@ -13,10 +13,10 @@
104         use mysql;
105         GRANT ALL PRIVILEGES ON $db.* TO $user\@localhost
106                 IDENTIFIED BY '$pass';
107    -    GRANT SELECT ON `mysql`.`time_zone_name` TO '$user'@'localhost';
108    +    GRANT SELECT ON mysql.time_zone_name TO '$user'@'localhost';
109         flush privileges;
110     EOF
111         /usr/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo/ 2>/dev/null |/usr/bin/mysql mysql
112         /usr/bin/mysql $db < /etc/e-smith/db/configuration/migrate/80cacti_sme.sql
113     END
114    -}
115    \ Pas de fin de ligne à la fin du fichier
116    +}
117  diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti  diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti
118  --- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti     2014-06-16 11:53:00.000000000 -0400  --- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti     2014-06-16 11:53:00.000000000 -0400
119  +++ smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti 2022-07-26 00:04:03.542000000 -0400  +++ smeserver-cacti-1.1.19/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Cacti 2022-07-26 00:30:15.300000000 -0400
120  @@ -5,32 +5,19 @@  @@ -5,32 +5,19 @@
121       SSLRequireSSL       SSLRequireSSL
122       Options -Indexes       Options -Indexes
# Line 61  diff -Nur --no-dereference smeserver-cac Line 139  diff -Nur --no-dereference smeserver-cac
139  -    php_flag  track_vars        on  -    php_flag  track_vars        on
140  +    Require { (($cacti{'access'} ||"private") eq "public") ? "all granted" : "ip $localAccess $externalSSLAccess"; }  +    Require { (($cacti{'access'} ||"private") eq "public") ? "all granted" : "ip $localAccess $externalSSLAccess"; }
141  +    AddType application/x-httpd-php .php  +    AddType application/x-httpd-php .php
142  +    <FilesMatch \.php$\>  +    <FilesMatch \.php$ >
143  +      SetHandler "proxy:unix:/var/run/php-fpm/php74-cacti.sock|fcgi://localhost"  +      SetHandler "proxy:unix:/var/run/php-fpm/php74-cacti.sock|fcgi://localhost"
144  +    </FilesMatch>  +    </FilesMatch>
145   </Directory>   </Directory>
# Line 151  diff -Nur --no-dereference smeserver-cac Line 229  diff -Nur --no-dereference smeserver-cac
229  +  +
230  +  +
231  +  +
232    diff -Nur --no-dereference smeserver-cacti-1.1.19.old/root/etc/e-smith/templates.metadata/etc/cacti/db.php smeserver-cacti-1.1.19/root/etc/e-smith/templates.metadata/etc/cacti/db.php
233    --- smeserver-cacti-1.1.19.old/root/etc/e-smith/templates.metadata/etc/cacti/db.php     2014-06-16 11:53:01.000000000 -0400
234    +++ smeserver-cacti-1.1.19/root/etc/e-smith/templates.metadata/etc/cacti/db.php 2022-07-26 00:44:20.988000000 -0400
235    @@ -1,3 +1,3 @@
236    -UID="cacti"
237    +UID="root"
238     GID="www"
239     PERMS=0640


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed