[Bug 192618] [stage] net-mgmt/cacti add stage support
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Aug 12 18:48:11 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192618
--- Comment #2 from Dennis Glatting <freebsd at pki2.com> ---
I ran most of the tests documented here. Output follows. I did not try
to make a package as a user as my installation (virtual instance) is root in
/usr/ports and there are no non-root accounts.
http://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html
I have never used poudriere or Redports.
root at Junker# make stage
/!\ WARNING /!\
DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=55
instead
===> License GPLv2 accepted by the user
===> cacti-0.8.8b_3 depends on file: /usr/local/sbin/pkg - found
cd /usr/ports/distfiles/;
_PATCH_SITES_DEFAULT="http://www.cacti.net/downloads/patches/0.8.8b/" ;
for _file in security.patch; do file=`echo $_file | /usr/bin/sed -E -e
's/:[^-:][^:]*$//'` ; select=`echo ${_file#${file}} | /usr/bin/sed -e
's/^://' -e 's/,/ /g'` ; file=`echo $file | /usr/bin/sed -E -e
's/:-[^:]+$//'` ; force_fetch=false; filebasename=${file##*/}; for
afile in ; do afile=${afile##*/}; if [ "x$afile" = "x$filebasename" ];
then force_fetch=true; fi; done; if [ ! -f $file -a ! -f
$filebasename -o "$force_fetch" = "true" ]; then if [ -L $file -o -L
${file##*/} ]; then echo "=> /usr/ports/distfiles//$file is a broken
symlink."; echo "=> Perhaps a filesystem (most likely a CD) isn't
mounted?"; echo "=> Please correct this problem and try again."; exit
1; fi; echo "=> $file doesn't seem to exist
in /usr/ports/distfiles/."; if [ ! -z "$select" ] ; then
__PATCH_SITES_TMP= ; for group in $select; do if [ ! -z \
${_PATCH_SITES_${group}} ] ; then eval ___PATCH_SITES_TMP="\
${_PATCH_SITES_${group}}" ; __PATCH_SITES_TMP="${__PATCH_SITES_TMP}
${___PATCH_SITES_TMP}" ; fi; done; ___PATCH_SITES_TMP= ;
SORTED_PATCH_SITES_CMD_TMP="echo `echo ${__PATCH_SITES_TMP}
| /usr/bin/awk 'BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl =
"://[^/]*/"; } /:\\/\\/[^\\/]*\\// { good["://[^/]*/"] =
good["://[^/]*/"] " " $0 ; next; } { rest = rest " " $0; } END
{ n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print
rest; }'` http://distcache.FreeBSD.org/ports-distfiles/" ; else
SORTED_PATCH_SITES_CMD_TMP="cd /root/cacti && make
patch-sites-DEFAULT" ; fi; sites_remaining=0; sites="`eval
$SORTED_PATCH_SITES_CMD_TMP`"; for site in ${sites}; do
sites_remaining=$((${sites_remaining} + 1)); done; for site in
${sites}; do sites_remaining=$((${sites_remaining} - 1)); echo "=>
Attempting to fetch ${site}${file}"; CKSIZE=`alg=SIZE; if [ \( -n "" -a
-n "" \) -o ! -f "/root/cacti/distinfo" ]; then exit; fi;
DIR=; /usr/bin/awk -v alg=$alg -v file=${DIR:+$DIR/}${file} '$1 == alg
&& $2 == "(" file ")" {print $4}' /root/cacti/distinfo`; case ${file}
in */*) /bin/mkdir -p ${file%/*}; args="-o ${file} ${site}${file}";;
*) args=${site}${file};; esac; if /usr/bin/env
SSL_NO_VERIFY_PEER=1
SSL_NO_VERIFY_HOSTNAME=1 /usr/bin/fetch -Fpr ${CKSIZE:+-S $CKSIZE}
${args} ; then actual_size=`stat -f %z "${file}"`; if [ -n "" ] ||
[ -z "${CKSIZE}" ] || [ ${actual_size} -eq ${CKSIZE} ]; then continue
2; else echo "=> Fetched file size mismatch (expected ${CKSIZE},
actual ${actual_size})"; if [ ${sites_remaining} -gt 1 ]; then echo
"=> Trying next site"; /bin/rm -f -f ${file}; fi; fi; fi; done;
echo "=> Couldn't fetch it - please try to retrieve this"; echo "=> port
manually into /usr/ports/distfiles/ and try again."; exit 1; fi; done
===> Fetching all distfiles required by cacti-0.8.8b_3 for building
===> Extracting for cacti-0.8.8b_3
=> SHA256 Checksum OK for cacti-0.8.8b.tar.gz.
=> SHA256 Checksum OK for security.patch.
===> Patching for cacti-0.8.8b_3
===> Applying distribution patches for cacti-0.8.8b_3
===> Applying FreeBSD patches for cacti-0.8.8b_3
/bin/rm -f
-r /root/cacti/work/cacti-0.8.8b/log /root/cacti/work/cacti-0.8.8b/rra
===> cacti-0.8.8b_3 depends on shared library: libmysqlclient.so.18 -
found (/usr/local/lib/mysql/libmysqlclient.so.18)
===> Configuring for cacti-0.8.8b_3
===> Staging for cacti-0.8.8b_3
===> cacti-0.8.8b_3 depends on executable: rrdtool - found
===> cacti-0.8.8b_3 depends on file: /usr/local/include/php/main/php.h
- found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/mysql.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/session.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/sockets.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/snmp.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/xml.so - found
===> Generating temporary packing list
===> Creating users and/or groups.
=======================================================================
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database, a cacti user, and initialize:
a) CREATE DATABASE cacti;
b) Create a mysql user/password for cacti:
CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
c) Add GRANTS:
GRANT ALL ON cacti.* TO 'cacti'@'localhost';
FLUSH PRIVILEGES;
d) Import the default cacti database:
mysql --database=cacti -ucacti -p
< /usr/local/share/cacti/cacti.sql
NOTE:
* Cacti does not LOCK TABLES.
2. Edit /usr/local/share/cacti/include/config.php from the template
config.php.orig.
PHP requires the time zone to be explicitly set rather that rely on
the system time zone, otherwise poller complains. I added the
following line to my config.php:
date_default_timezone_set('America/Los_Angeles');
3. Add the following line to cron for cacti:
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php
> /dev/null 2>&1
4. Example Apache 2.4 configuration:
LoadModule php5_module libexec/apache22/libphp5.so
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
DirectoryIndex index.php
DocumentRoot "/usr/local/share/cacti"
Alias /cacti "/usr/local/share/cacti/"
Alias /Cacti "/usr/local/share/cacti/"
<Directory "/usr/local/share/cacti">
Require all granted
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
5. Open a Cacti login page in your web browser and login with
admin/admin.
If you update cacti, open a login page and an updating process will
start automatically.
NOTEs as of 10Aug2014:
1) Cacti now better supports hier(7)
a) Cacti log files are now found under /var/log/cacti where you can
manage them using newsyslog.
b) Cacti RRD files are now found under /var/db/cacti/rra.
2) The PERL paths in the Cacti PERL scripts have been updated to
/usr/local/bin.
=======================================================================
====> Compressing man pages (compress-man)
root at Junker#
root at Junker# make check-orphans
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
root at Junker#
root at Junker# make package
===> Building package for cacti-0.8.8b_3
root at Junker#
root at Junker# make install
===> Installing for cacti-0.8.8b_3
===> cacti-0.8.8b_3 depends on executable: rrdtool - found
===> cacti-0.8.8b_3 depends on file: /usr/local/include/php/main/php.h
- found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/mysql.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/session.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/sockets.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/snmp.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/xml.so - found
===> cacti-0.8.8b_3 depends on shared library: libmysqlclient.so.18 -
found (/usr/local/lib/mysql/libmysqlclient.so.18)
===> Registering installation for cacti-0.8.8b_3
===> Creating users and/or groups.
Using existing group 'cacti'.
Using existing user 'cacti'.
=======================================================================
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database, a cacti user, and initialize:
a) CREATE DATABASE cacti;
b) Create a mysql user/password for cacti:
CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
c) Add GRANTS:
GRANT ALL ON cacti.* TO 'cacti'@'localhost';
FLUSH PRIVILEGES;
d) Import the default cacti database:
mysql --database=cacti -ucacti -p
< /usr/local/share/cacti/cacti.sql
NOTE:
* Cacti does not LOCK TABLES.
2. Edit /usr/local/share/cacti/include/config.php from the template
config.php.orig.
PHP requires the time zone to be explicitly set rather that rely on
the system time zone, otherwise poller complains. I added the
following line to my config.php:
date_default_timezone_set('America/Los_Angeles');
3. Add the following line to cron for cacti:
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php
> /dev/null 2>&1
4. Example Apache 2.4 configuration:
LoadModule php5_module libexec/apache22/libphp5.so
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
DirectoryIndex index.php
DocumentRoot "/usr/local/share/cacti"
Alias /cacti "/usr/local/share/cacti/"
Alias /Cacti "/usr/local/share/cacti/"
<Directory "/usr/local/share/cacti">
Require all granted
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
5. Open a Cacti login page in your web browser and login with
admin/admin.
If you update cacti, open a login page and an updating process will
start automatically.
NOTEs as of 10Aug2014:
1) Cacti now better supports hier(7)
a) Cacti log files are now found under /var/log/cacti where you can
manage them using newsyslog.
b) Cacti RRD files are now found under /var/db/cacti/rra.
2) The PERL paths in the Cacti PERL scripts have been updated to
/usr/local/bin.
=======================================================================
root at Junker#
root at Junker# make deinstall
===> Deinstalling for cacti
===> Deinstalling cacti-0.8.8b_3
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0
packages in the universe):
Installed packages to be REMOVED:
cacti-0.8.8b_3
The operation will free 5 MB
==> You should manually remove the "cacti" user.
[1/1] Deleting cacti-0.8.8b_3: 100%
root at Junker#
root at Junker# pkg add work/pkg/cacti-0.8.8b_3.txz
===> Creating users and/or groups.
Using existing group 'cacti'.
Using existing user 'cacti'.
Installing cacti-0.8.8b_3: 100%
Message for cacti-0.8.8b_3:
=======================================================================
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database, a cacti user, and initialize:
a) CREATE DATABASE cacti;
b) Create a mysql user/password for cacti:
CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
c) Add GRANTS:
GRANT ALL ON cacti.* TO 'cacti'@'localhost';
FLUSH PRIVILEGES;
d) Import the default cacti database:
mysql --database=cacti -ucacti -p
< /usr/local/share/cacti/cacti.sql
NOTE:
* Cacti does not LOCK TABLES.
2. Edit /usr/local/share/cacti/include/config.php from the template
config.php.orig.
PHP requires the time zone to be explicitly set rather that rely on
the system time zone, otherwise poller complains. I added the
following line to my config.php:
date_default_timezone_set('America/Los_Angeles');
3. Add the following line to cron for cacti:
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php
> /dev/null 2>&1
4. Example Apache 2.4 configuration:
LoadModule php5_module libexec/apache22/libphp5.so
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
DirectoryIndex index.php
DocumentRoot "/usr/local/share/cacti"
Alias /cacti "/usr/local/share/cacti/"
Alias /Cacti "/usr/local/share/cacti/"
<Directory "/usr/local/share/cacti">
Require all granted
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
5. Open a Cacti login page in your web browser and login with
admin/admin.
If you update cacti, open a login page and an updating process will
start automatically.
NOTEs as of 10Aug2014:
1) Cacti now better supports hier(7)
a) Cacti log files are now found under /var/log/cacti where you can
manage them using newsyslog.
b) Cacti RRD files are now found under /var/db/cacti/rra.
2) The PERL paths in the Cacti PERL scripts have been updated to
/usr/local/bin.
=======================================================================
root at Junker#
root at Junker# make check-plist
/!\ WARNING /!\
DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=55
instead
===> License GPLv2 accepted by the user
===> cacti-0.8.8b_3 depends on file: /usr/local/sbin/pkg - found
cd /usr/ports/distfiles/;
_PATCH_SITES_DEFAULT="http://www.cacti.net/downloads/patches/0.8.8b/" ;
for _file in security.patch; do file=`echo $_file | /usr/bin/sed -E -e
's/:[^-:][^:]*$//'` ; select=`echo ${_file#${file}} | /usr/bin/sed -e
's/^://' -e 's/,/ /g'` ; file=`echo $file | /usr/bin/sed -E -e
's/:-[^:]+$//'` ; force_fetch=false; filebasename=${file##*/}; for
afile in ; do afile=${afile##*/}; if [ "x$afile" = "x$filebasename" ];
then force_fetch=true; fi; done; if [ ! -f $file -a ! -f
$filebasename -o "$force_fetch" = "true" ]; then if [ -L $file -o -L
${file##*/} ]; then echo "=> /usr/ports/distfiles//$file is a broken
symlink."; echo "=> Perhaps a filesystem (most likely a CD) isn't
mounted?"; echo "=> Please correct this problem and try again."; exit
1; fi; echo "=> $file doesn't seem to exist
in /usr/ports/distfiles/."; if [ ! -z "$select" ] ; then
__PATCH_SITES_TMP= ; for group in $select; do if [ ! -z \
${_PATCH_SITES_${group}} ] ; then eval ___PATCH_SITES_TMP="\
${_PATCH_SITES_${group}}" ; __PATCH_SITES_TMP="${__PATCH_SITES_TMP}
${___PATCH_SITES_TMP}" ; fi; done; ___PATCH_SITES_TMP= ;
SORTED_PATCH_SITES_CMD_TMP="echo `echo ${__PATCH_SITES_TMP}
| /usr/bin/awk 'BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl =
"://[^/]*/"; } /:\\/\\/[^\\/]*\\// { good["://[^/]*/"] =
good["://[^/]*/"] " " $0 ; next; } { rest = rest " " $0; } END
{ n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print
rest; }'` http://distcache.FreeBSD.org/ports-distfiles/" ; else
SORTED_PATCH_SITES_CMD_TMP="cd /root/cacti && make
patch-sites-DEFAULT" ; fi; sites_remaining=0; sites="`eval
$SORTED_PATCH_SITES_CMD_TMP`"; for site in ${sites}; do
sites_remaining=$((${sites_remaining} + 1)); done; for site in
${sites}; do sites_remaining=$((${sites_remaining} - 1)); echo "=>
Attempting to fetch ${site}${file}"; CKSIZE=`alg=SIZE; if [ \( -n "" -a
-n "" \) -o ! -f "/root/cacti/distinfo" ]; then exit; fi;
DIR=; /usr/bin/awk -v alg=$alg -v file=${DIR:+$DIR/}${file} '$1 == alg
&& $2 == "(" file ")" {print $4}' /root/cacti/distinfo`; case ${file}
in */*) /bin/mkdir -p ${file%/*}; args="-o ${file} ${site}${file}";;
*) args=${site}${file};; esac; if /usr/bin/env
SSL_NO_VERIFY_PEER=1
SSL_NO_VERIFY_HOSTNAME=1 /usr/bin/fetch -Fpr ${CKSIZE:+-S $CKSIZE}
${args} ; then actual_size=`stat -f %z "${file}"`; if [ -n "" ] ||
[ -z "${CKSIZE}" ] || [ ${actual_size} -eq ${CKSIZE} ]; then continue
2; else echo "=> Fetched file size mismatch (expected ${CKSIZE},
actual ${actual_size})"; if [ ${sites_remaining} -gt 1 ]; then echo
"=> Trying next site"; /bin/rm -f -f ${file}; fi; fi; fi; done;
echo "=> Couldn't fetch it - please try to retrieve this"; echo "=> port
manually into /usr/ports/distfiles/ and try again."; exit 1; fi; done
===> Fetching all distfiles required by cacti-0.8.8b_3 for building
===> Extracting for cacti-0.8.8b_3
=> SHA256 Checksum OK for cacti-0.8.8b.tar.gz.
=> SHA256 Checksum OK for security.patch.
===> Patching for cacti-0.8.8b_3
===> Applying distribution patches for cacti-0.8.8b_3
===> Applying FreeBSD patches for cacti-0.8.8b_3
/bin/rm -f
-r /root/cacti/work/cacti-0.8.8b/log /root/cacti/work/cacti-0.8.8b/rra
===> cacti-0.8.8b_3 depends on shared library: libmysqlclient.so.18 -
found (/usr/local/lib/mysql/libmysqlclient.so.18)
===> Configuring for cacti-0.8.8b_3
===> Staging for cacti-0.8.8b_3
===> cacti-0.8.8b_3 depends on executable: rrdtool - found
===> cacti-0.8.8b_3 depends on file: /usr/local/include/php/main/php.h
- found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/mysql.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/session.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/sockets.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/snmp.so - found
===> cacti-0.8.8b_3 depends on
file: /usr/local/lib/php/20121212/xml.so - found
===> Generating temporary packing list
===> Creating users and/or groups.
=======================================================================
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
1. Create the MySQL database, a cacti user, and initialize:
a) CREATE DATABASE cacti;
b) Create a mysql user/password for cacti:
CREATE USER 'cacti'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
c) Add GRANTS:
GRANT ALL ON cacti.* TO 'cacti'@'localhost';
FLUSH PRIVILEGES;
d) Import the default cacti database:
mysql --database=cacti -ucacti -p
< /usr/local/share/cacti/cacti.sql
NOTE:
* Cacti does not LOCK TABLES.
2. Edit /usr/local/share/cacti/include/config.php from the template
config.php.orig.
PHP requires the time zone to be explicitly set rather that rely on
the system time zone, otherwise poller complains. I added the
following line to my config.php:
date_default_timezone_set('America/Los_Angeles');
3. Add the following line to cron for cacti:
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php
> /dev/null 2>&1
4. Example Apache 2.4 configuration:
LoadModule php5_module libexec/apache22/libphp5.so
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
DirectoryIndex index.php
DocumentRoot "/usr/local/share/cacti"
Alias /cacti "/usr/local/share/cacti/"
Alias /Cacti "/usr/local/share/cacti/"
<Directory "/usr/local/share/cacti">
Require all granted
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
5. Open a Cacti login page in your web browser and login with
admin/admin.
If you update cacti, open a login page and an updating process will
start automatically.
NOTEs as of 10Aug2014:
1) Cacti now better supports hier(7)
a) Cacti log files are now found under /var/log/cacti where you can
manage them using newsyslog.
b) Cacti RRD files are now found under /var/db/cacti/rra.
2) The PERL paths in the Cacti PERL scripts have been updated to
/usr/local/bin.
=======================================================================
====> Compressing man pages (compress-man)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
root at Junker#
portlint produced some minor output:
root at Junker# portlint
WARN: Makefile: [0]: possible direct use of command "file" found. use
${FILE} instead.
WARN: Makefile: DISTNAME is ${PORTNAME}-${PORTVERSION} by default, you
don't need to define DISTNAME.
0 fatal errors and 2 warnings found.
I don't know why portlint is complaining about "file."
DISTNAME was previously defined. I simply left it alone.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list