Hello community, here is the log from the commit of package cacti for openSUSE:Factory checked in at 2015-11-26 17:01:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cacti (Old) and /work/SRC/openSUSE:Factory/.cacti.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cacti" Changes: -------- --- /work/SRC/openSUSE:Factory/cacti/cacti.changes 2015-08-01 11:38:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cacti.new/cacti.changes 2015-11-26 17:02:15.000000000 +0100 @@ -1,0 +2,14 @@ +Mon Nov 16 16:21:14 UTC 2015 - [email protected] + +- Spec cleanup, split -doc package +- Universal "Requires:" for httpd and mod_php_any [boo#867607] +- Dropped cacti.cron.new +- Updated cacti.cron +- Dropped cacti-httpd.conf.vhost +- Dropped cacti-httpd.conf.nonsuse +- Updated cacti-httpd.conf (for openSUSE <= 1210 and other) +- Updated cacti-httpd.conf.default (for openSUSE > 1210) +- Dropped cacti-script.patch (applies to a non-packaged file) +- Updated cacti.logrotate + +------------------------------------------------------------------- Old: ---- cacti-httpd.conf.nonsuse cacti-httpd.conf.vhost cacti-script.patch cacti.cron.new ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cacti.spec ++++++ --- /var/tmp/diff_new_pack.VtfcQ6/_old 2015-11-26 17:02:16.000000000 +0100 +++ /var/tmp/diff_new_pack.VtfcQ6/_new 2015-11-26 17:02:16.000000000 +0100 @@ -18,80 +18,55 @@ Name: cacti Version: 0.8.8f -Release: 0.0 +Release: 0 Summary: Web Front-End to Monitor System Data via RRDtool License: GPL-2.0+ Group: System/Monitoring + Url: http://www.cacti.net/ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz Source1: %{name}.cron Source2: %{name}-httpd.conf Source3: %{name}.logrotate Source4: %{name}-httpd.conf.default -Source5: %{name}-httpd.conf.vhost -Source6: %{name}-httpd.conf.nonsuse -Source7: %{name}.cron.new # PATCH-FIX-OPENSUSE cacti-0.8.8-cacti-log-path.patch Patch0: cacti-log-path.patch -# PATCH-FIX-OPENSUSE cacti-0.8.8-cacti-script.patch -Patch1: cacti-script.patch -Provides: cacti-system + +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +BuildRequires: apache-rpm-macros %if 0%{?suse_version} BuildRequires: apache2-devel -Requires: apache2 -Requires: cron -Requires: mod_php_any >= 5.1 -Requires: php-mysql >= 5.1 -Requires: php-snmp >= 5.1 -Requires: php-sockets >= 5.1 -Requires: rrdtool -%endif -%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} +%else BuildRequires: httpd-devel +%endif + Requires: httpd +Requires: logrotate +Requires: net-snmp +Requires: php-snmp >= 5.1 Requires: rrdtool -%endif -%if 0%{?centos_version} -Requires: php-mysql -Requires: php-snmp -%endif -%if 0%{?rhel_version} -Requires: php-mysql -#Requires: php-snmp + +%if 0%{?suse_version} +Requires: cron +Requires: mod_php_any >= 5.1 +Requires: php-sockets >= 5.1 %endif %if 0%{?fedora_version} -Requires: php-mysqlnd -Requires: php-snmp -%endif -%if 0%{?mandriva_version} -BuildRequires: apache-devel -Requires: apache -Requires: apache-mod_php -Requires: php-mysql -Requires: php-snmp -Requires: php-sockets -Requires: rrdtool +Requires: php-mysqlnd >= 5.1 +%else +Requires: php-mysql >= 5.1 %endif -Requires: logrotate -Requires: net-snmp + +Provides: cacti-system + Obsoletes: cacti-PA Provides: cacti-PA -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch -%if 0%{?suse_version} -%define apxs /usr/sbin/apxs2 -%else -%if 0%{?rhel_version} >= 700 || 0%{?centos_version} >= 700 || 0%{?fedora_version} >= 20 -%define apxs /bin/apxs -%else -%define apxs /usr/sbin/apxs -%endif -%endif -%define apache2_sysconfdir %(%{apxs} -q SYSCONFDIR) + %if 0%{?suse_version} <= 1210 -%define prefix %{_datadir}/cacti +%define cacti_dir %{_datadir}/cacti %else -%define prefix /srv/www/cacti +%define cacti_dir %{apache_datadir}/cacti %endif %description @@ -103,95 +78,116 @@ support for those accustomed to creating traffic graphs with MRTG as well. + +%package doc +Summary: Documentation for Cacti +Group: Documentation/HTML +Requires: %{name} = %{version} + +%description doc +Cacti is a complete front-end to RRDtool: it stores all necessary +information for creating graphs and populates them with data from a +MySQL database. The front-end is completely PHP driven. Along with +being ableto maintain graphs, data sources, and round robin archives +ina database, Cacti also handles data gathering. There exists an SNMP +support for those accustomed to creating traffic graphs with MRTG as +well. + +This package contains the HTML documentation for Cacti. + + %prep %setup -q %patch0 -p1 -%patch1 -p1 + +#delete the *.orig files +find . -type f -name "*\.orig" -exec rm {} \; %build #nothing to build %install -#delete the *.orig files -find . -type f -name "*\.orig" -exec rm {} \; -install -d -m 755 %{buildroot}%{prefix} -install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name} -install -d -m 755 %{buildroot}%{_localstatedir}/log/%{name} -cp *.php %{buildroot}%{prefix} -cp -pr lib %{buildroot}%{prefix} -cp -pr include %{buildroot}%{prefix} -cp -pr images %{buildroot}%{prefix} -cp -pr install %{buildroot}%{prefix} -cp -pr resource %{buildroot}%{prefix} -cp -pr rra %{buildroot}%{prefix} -#cp -pr scripts %{buildroot}%{prefix} -#cp -pr cli %{buildroot}%{prefix} -install -d -m 755 scripts %{buildroot}%{prefix}/scripts -install -m 755 scripts/* %{buildroot}%{prefix}/scripts -install -d -m 755 cli %{buildroot}%{prefix}/cli -install -m 755 cli/* %{buildroot}%{prefix}/cli -install -m 644 *.sql %{buildroot}%{prefix} +install -d -m 0755 %{buildroot}%{cacti_dir} +install -d -m 0755 %{buildroot}%{_localstatedir}/lib/%{name} +install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name} + +cp *.php %{buildroot}%{cacti_dir} +cp -pr lib %{buildroot}%{cacti_dir} +cp -pr include %{buildroot}%{cacti_dir} +cp -pr images %{buildroot}%{cacti_dir} +cp -pr install %{buildroot}%{cacti_dir} +cp -pr resource %{buildroot}%{cacti_dir} +cp -pr rra %{buildroot}%{cacti_dir} + +install -d -m 0755 scripts %{buildroot}%{cacti_dir}/scripts +install -m 0755 scripts/* %{buildroot}%{cacti_dir}/scripts +install -d -m 0755 cli %{buildroot}%{cacti_dir}/cli +install -m 0755 cli/* %{buildroot}%{cacti_dir}/cli +install -m 0644 *.sql %{buildroot}%{cacti_dir} + # cron task -install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d -%if 0%{?suse_version} > 1210 -install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/cron.d/cacti -%endif -%if 0%{?suse_version} <= 1210 -install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.d/cacti -%endif -%if ! 0%{?suse_version} -install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.d/cacti -%endif +install -d -m 0755 %{buildroot}%{_sysconfdir}/cron.d +sed -e "s;__CACTIDIR__;%{cacti_dir};g" -e "s;__APACHEUSER__;%{apache_user};g" \ + %{SOURCE1} > %{buildroot}%{_sysconfdir}/cron.d/%{name} + # apache2 config +%if 0%{?suse_version} %if 0%{?suse_version} > 1210 -mkdir -p %{buildroot}/%{apache2_sysconfdir}/conf.d -cp -avL %{SOURCE4} %{buildroot}/%{apache2_sysconfdir}/conf.d/%{name}.conf -mkdir -p %{buildroot}/%{apache2_sysconfdir}/vhosts.d/conf.d -cp -avL %{SOURCE5} %{buildroot}/%{apache2_sysconfdir}/vhosts.d/conf.d/%{name}.conf +install -d -m 0755 %{buildroot}%{apache_sysconfdir}/conf.d +sed -e "s;__CACTIDIR__;%{cacti_dir};g" %{SOURCE4} > %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf +install -d -m 0755 %{buildroot}%{apache_sysconfdir}/vhosts.d/conf.d +sed -e "s;__CACTIDIR__;%{cacti_dir};g" -e "s;<IfDefine CACTI>;<IfDefine CACTIVHOST>;g" \ + %{SOURCE4} > %{buildroot}%{apache_sysconfdir}/vhosts.d/conf.d/%{name}.conf %endif %if 0%{?suse_version} <= 1210 -install -d -m 755 %{buildroot}%{apache2_sysconfdir}/conf.d -install -m 644 %{SOURCE2} %{buildroot}%{apache2_sysconfdir}/conf.d/cacti.conf +install -d -m 0755 %{buildroot}%{apache_sysconfdir}/conf.d +sed -e "s;__CACTIDIR__;%{cacti_dir};g" %{SOURCE2} > %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf %endif -%if ! 0%{?suse_version} -mkdir -p %{buildroot}/%{apache2_sysconfdir}/../conf.d -cp -avL %{SOURCE6} %{buildroot}/%{apache2_sysconfdir}/../conf.d/%{name}.conf +%else +%{__install} -d -m 0755 %{buildroot}%{apache_sysconfdir}/../conf.d +sed -e "s;__CACTIDIR__;%{cacti_dir};g" %{SOURCE2} > %{buildroot}%{apache_sysconfdir}/../conf.d/%{name}.conf %endif + # logrotate config mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/ -install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +sed -e "s;__APACHEUSER__;%{apache_user};g" -e "s;__APACHEGROUP__;%{apache_group};g" \ + %{SOURCE3} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} + # Set the correct permissions for pl and sh files -#find %{buildroot}%{prefix} -type f -name "*.sh" -o -name "*.pl" -exec chmod ugo+x {} \; +#find %%{buildroot}%%{cacti_dir} -type f -name "*.sh" -o -name "*.pl" -exec chmod ugo+x {} \; # compute files list without config file -find %{buildroot}%{prefix} -type d | sed -e 's|'%{buildroot}'|%dir |' >> %{name}.list -find %{buildroot}%{prefix} -type f ! -name config.php | sed -e 's|'%{buildroot}'||' >> %{name}.list +find %{buildroot}%{cacti_dir} -type d | sed -e 's|'%{buildroot}'|%dir |' >> %{name}.list +find %{buildroot}%{cacti_dir} -type f ! -name config.php | sed -e 's|'%{buildroot}'||' >> %{name}.list + +%post +chown -R %{apache_user}:%{apache_group} %{cacti_dir}/rra %files -f %{name}.list %defattr(-,root,root) -%doc LICENSE docs/* -%attr(-,wwwrun,www) %dir %{_localstatedir}/lib/cacti -%attr(-,wwwrun,www) %dir %{_localstatedir}/log/cacti -%config(noreplace) %{prefix}/include/config.php +%doc LICENSE README docs/txt +%attr(-,%{apache_user},%{apache_group}) %dir %{_localstatedir}/lib/%{name} +%attr(-,%{apache_user},%{apache_group}) %dir %{_localstatedir}/log/%{name} +%config(noreplace) %{cacti_dir}/include/config.php %config(noreplace) %{_sysconfdir}/cron.d/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%if 0%{?suse_version} %if 0%{?suse_version} <= 1210 -%dir %{apache2_sysconfdir}/conf.d -%config(noreplace) %{apache2_sysconfdir}/conf.d/cacti.conf +%dir %{apache_sysconfdir}/conf.d +%config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf %endif %if 0%{?suse_version} > 1210 -%dir %{apache2_sysconfdir}/conf.d -%config (noreplace) %{apache2_sysconfdir}/conf.d/%{name}.conf -%dir %{apache2_sysconfdir}/vhosts.d/conf.d -%config (noreplace) %{apache2_sysconfdir}/vhosts.d/conf.d/%{name}.conf -%endif -%if ! 0%{?suse_version} -%dir %{apache2_sysconfdir}/../conf.d -%config (noreplace) %{apache2_sysconfdir}/../conf.d/%{name}.conf +%dir %{apache_sysconfdir}/conf.d +%config(noreplace) %{apache_sysconfdir}/conf.d/%{name}.conf +%dir %{apache_sysconfdir}/vhosts.d/conf.d +%config(noreplace) %{apache_sysconfdir}/vhosts.d/conf.d/%{name}.conf %endif - -%post -%if 0%{?suse_version} -chown -R wwwrun.www %{prefix}/rra +%else +%dir %{apache_sysconfdir}/../conf.d +%config(noreplace) %{apache_sysconfdir}/../conf.d/%{name}.conf %endif +%files doc +%defattr(-,root,root) +%doc docs/html docs/pdf + %changelog ++++++ cacti-httpd.conf ++++++ --- /var/tmp/diff_new_pack.VtfcQ6/_old 2015-11-26 17:02:16.000000000 +0100 +++ /var/tmp/diff_new_pack.VtfcQ6/_new 2015-11-26 17:02:16.000000000 +0100 @@ -1,23 +1,23 @@ -Alias /cacti/ /usr/share/cacti/ -<Directory /usr/share/cacti/> +Alias /cacti __CACTIDIR__ +<Directory __CACTIDIR__> Options None - order deny,allow - deny from all - allow from 127.0.0.1 + Order deny,allow + Deny from all + Allow from localhost </Directory> # For SSL-servers -#Alias /cacti/ /usr/share/nagat/ -#<Directory /usr/share/cacti/> +#Alias /cacti __CACTIDIR__ +#<Directory __CACTIDIR__> # Options None # SSLRequireSSL -# order deny,allow -# deny from all +# Order deny,allow +# Deny from all # AuthType Basic # AuthUserFile /site/cfg/passwd # AuthGroupFile /site/cfg/group # AuthName "cacti" -# require group cacti -# Satisfy Any +# Require group cacti +# Satisfy any #</Directory> ++++++ cacti-httpd.conf.default ++++++ --- /var/tmp/diff_new_pack.VtfcQ6/_old 2015-11-26 17:02:16.000000000 +0100 +++ /var/tmp/diff_new_pack.VtfcQ6/_new 2015-11-26 17:02:16.000000000 +0100 @@ -1,40 +1,115 @@ # Example configuration for a cacti repository # -# As default server -# put the string CACTI in /etc/sysconfig/apache2 APACHE_SERVER_FLAGS -# to enable the URL -# http://localhost/cacti +# ::As default server:: +# Put the string CACTI in /etc/sysconfig/apache2 APACHE_SERVER_FLAGS +# to enable the URL http://localhost/cacti # -# As vhost -# If you want to use cacti in one vhost add -# Include /etc/apache2/vhosts.d/conf.d/cacti.conf +# ::As Virtual Host:: +# If you want to use cacti in one Virtual Host, add +# Include /etc/apache2/vhosts.d/conf.d/cacti.conf # to the vhost in the vhost.conf file -# put the string CACTIVHOST in /etc/sysconfig/apache2 APACHE_SERVER_FLAGS -# to enable the URL -# http://vhost/cacti +# Put the string CACTIVHOST in /etc/sysconfig/apache2 +# APACHE_SERVER_FLAGS to enable the URL http://vhost/cacti +# + <IfDefine CACTI> + <IfModule mod_alias.c> + Alias /cacti __CACTIDIR__ + </IfModule> + + <Directory __CACTIDIR__> + Options None + + # Access Control + # Default to only allow connections from localhost + <IfModule mod_version.c> + <IfVersion < 2.4> + Order deny,allow + Deny from all + Allow from localhost + </IfVersion> + <IfVersion >= 2.4> + <IfModule mod_authz_core.c> + Require all denied + Require local + </IfModule> + <IfModule mod_access_compat.c> + Order deny,allow + Deny from all + Allow from localhost + </IfModule> + </IfVersion> + </IfModule> + <IfModule !mod_version.c> + Order deny,allow + Deny from all + Allow from localhost + </IfModule> + + # Authentication Settings + # Uncomment and apply to add Basic Authentication +# AuthType Basic +# AuthName "cacti" +# AuthBasicProvider file +# AuthUserFile /site/cfg/passwd +# AuthGroupFile /site/cfg/group +# Require group cacti +# Satisfy any + + # SSL Configuration + # Uncomment to always require SSL when SSL is enabled + <IfDefine SSL> + <IfDefine !NOSSL> + <IfModule mod_ssl.c> +# SSLRequireSSL + </IfModule> + </IfDefine> + </IfDefine> + </Directory> - Alias /cacti/ /srv/www/cacti/ - <Directory /srv/www/cacti/> - Options None - order deny,allow - deny from all - allow from localhost - </Directory> - -# For SSL-servers -# Alias /cacti/ /srv/www/nagat/ -# <Directory /srv/www/cacti/> -# Options None -# SSLRequireSSL -# order deny,allow -# deny from all -# AuthType Basic -# AuthUserFile /site/cfg/passwd -# AuthGroupFile /site/cfg/group -# AuthName "cacti" -# require group cacti -# Satisfy Any -# </Directory> + <Directory __CACTIDIR__/cli> + AllowOverride none + <IfModule mod_version.c> + <IfVersion < 2.4> + Order deny,allow + Deny from all + </IfVersion> + <IfVersion >= 2.4> + <IfModule mod_authz_core.c> + Require all denied + </IfModule> + <IfModule mod_access_compat.c> + Order deny,allow + Deny from all + </IfModule> + </IfVersion> + </IfModule> + <IfModule !mod_version.c> + Order deny,allow + Deny from all + </IfModule> + </Directory> + <Directory __CACTIDIR__/rra> + AllowOverride none + <IfModule mod_version.c> + <IfVersion < 2.4> + Order deny,allow + Deny from all + </IfVersion> + <IfVersion >= 2.4> + <IfModule mod_authz_core.c> + Require all denied + </IfModule> + <IfModule mod_access_compat.c> + Order deny,allow + Deny from all + </IfModule> + </IfVersion> + </IfModule> + <IfModule !mod_version.c> + Order deny,allow + Deny from all + </IfModule> + </Directory> </IfDefine> ++++++ cacti.cron ++++++ --- /var/tmp/diff_new_pack.VtfcQ6/_old 2015-11-26 17:02:16.000000000 +0100 +++ /var/tmp/diff_new_pack.VtfcQ6/_new 2015-11-26 17:02:16.000000000 +0100 @@ -1 +1 @@ -*/5 * * * * wwwrun php /usr/share/cacti/poller.php > /dev/null 2>&1 +*/5 * * * * __APACHEUSER__ php __CACTIDIR__/poller.php > /dev/null 2>&1 ++++++ cacti.logrotate ++++++ --- /var/tmp/diff_new_pack.VtfcQ6/_old 2015-11-26 17:02:16.000000000 +0100 +++ /var/tmp/diff_new_pack.VtfcQ6/_new 2015-11-26 17:02:16.000000000 +0100 @@ -1,5 +1,8 @@ /var/log/cacti/cacti.log { missingok compress + notifempty + size 30k + su __APACHEUSER__ __APACHEGROUP__ + create 0660 __APACHEUSER__ __APACHEGROUP__ } -
