ports/138306: databases/mysqlard - fix mysqlard.conf install with pkg_add

Alexey V.Degtyarev alexey at renatasystems.org
Sat Aug 29 11:00:10 UTC 2009


>Number:         138306
>Category:       ports
>Synopsis:       databases/mysqlard - fix mysqlard.conf install with pkg_add
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 29 11:00:07 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Alexey V. Degtyarev
>Release:        FreeBSD 7.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD renatasystems.org 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 08:58:24 UTC 2009 root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
databases/mysqlard package does not installs mysqlard.conf then installing
binary package.

$ pkg_add mysqlard-1.0.0_1.tbz
cp: /usr/local/www/mysqlard/mysqlard.cnf: No such file or directory
pkg_add: command '[ -f /usr/local/etc/mysqlard.cnf ] || cp /usr/local/www/mysqlard/mysqlard.cnf /usr/local/etc' failed
...

$ ls /usr/local/etc/mysqlard.cnf
ls: /usr/local/etc/mysqlard.cnf: No such file or directory

This is because of incorrect @exec command sequence in pkg-plist:

@unexec if cmp -s %D/etc/mysqlard.cnf %D/www/mysqlard/mysqlard.cnf; then rm -f %D/etc/mysqlard.cnf; fi
@exec [ -f %D/etc/mysqlard.cnf ] || cp %D/www/mysqlard/mysqlard.cnf %D/etc
...
www/mysqlard/mysqlard.cnf

Command cp(1) involved before config file is beeing installed.
>How-To-Repeat:
Install mysqlard as package - no config file will be installed at PREFIX/etc
>Fix:
Place @exec command after www/mysqlard/mysqlard.cnf defenition in pkg-plist:

	

--- mysqlard.patch begins here ---
diff -u -r mysqlard.orig/pkg-plist mysqlard/pkg-plist
--- mysqlard.orig/pkg-plist	2006-10-05 00:00:40.000000000 +0400
+++ mysqlard/pkg-plist	2009-08-29 14:45:00.000000000 +0400
@@ -1,4 +1,5 @@
 @unexec if cmp -s %D/etc/mysqlard.cnf %D/www/mysqlard/mysqlard.cnf; then rm -f %D/etc/mysqlard.cnf; fi
+www/mysqlard/mysqlard.cnf
 @exec [ -f %D/etc/mysqlard.cnf ] || cp %D/www/mysqlard/mysqlard.cnf %D/etc
 bin/mysqlar_graph
 sbin/mysqlard
@@ -7,7 +8,6 @@
 www/mysqlard/mysqlar.monthly
 www/mysqlard/mysqlar.php
 www/mysqlard/mysqlar.weekly
-www/mysqlard/mysqlard.cnf
 www/mysqlard/mysqlard.server
 www/mysqlard/rrdtool.gif
 www/mysqlard/sos.gif
--- mysqlard.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list