ports/118338: patch: ports/www/apache22 (2.2.6-2) installation from tbz package fails
Dimitry Andric
dimitry at andric.com
Thu Nov 29 21:30:03 UTC 2007
>Number: 118338
>Category: ports
>Synopsis: patch: ports/www/apache22 (2.2.6-2) installation from tbz package fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 29 21:30:02 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Dimitry Andric
>Release: FreeBSD 7.0-BETA3 i386
>Organization:
n/a
>Environment:
System: FreeBSD vfbsd7.lan.dim 7.0-BETA3 FreeBSD 7.0-BETA3 #0: Thu Nov 29 13:31:50 CET 2007 dim at vfbsd7.lan.dim:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Hi,
I recently upgraded some boxes with fresh ports, and I noticed the
following, which only occurs if you make a binary package from
ports/www/apache22, AND there is no /usr/local/www/apache22/data
directory before installing it:
cp: /usr/local/share/examples/apache22/www/apache22/data/index.html: No such file or directory
pkg_add: command '[ -f /usr/local/www/apache22/data/index.html ] || cp /usr/local/share/examples/apache22/www/apache22/data/index.html /usr/local/www/apache22/data/index.html' failed
There are two issues in the pkg-plist:
- it doesn't create the %D/www/apache22/data directory if it doesn't
exist yet
- if index.html doesn't exist, the cp tries to copy from (nonexisting)
%D/share/examples/apache22/www/apache22/data/index.html instead of
%D/share/examples/apache22/index.html.
Here is a patch that solves these two issues; it creates the
%D/www/apache22/data dir if needed, and corrects the cp source path.
Note I also added a @dirrmtry, since we probably don't want to complain
if the user customized his index.html, and we therefore can't remove
the directory.
>How-To-Repeat:
Build apache-2.2.6_2.tbz (make -C /usr/ports/www/apache22 package)
Copy apache-2.2.6_2.tbz to clean machine
pkg_add apache-2.2.6_2.tbz
Observe installation error message
>Fix:
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/www/apache22/pkg-plist,v
retrieving revision 1.85
diff -u -r1.85 pkg-plist
--- pkg-plist 20 Sep 2007 07:57:35 -0000 1.85
+++ pkg-plist 21 Oct 2007 17:45:30 -0000
@@ -276,8 +276,10 @@
www/apache22/cgi-bin/printenv
www/apache22/cgi-bin/test-cgi
@unexec if cmp -s %D/www/apache22/data/index.html %D/%%EXAMPLESDIR%%/index.html; then rm -f %D/www/apache22/data/index.html; fi
+ at dirrmtry %D/www/apache22/data
%%EXAMPLESDIR%%/index.html
- at exec [ -f %D/www/apache22/data/index.html ] || cp %D/%%EXAMPLESDIR%%/www/apache22/data/index.html %D/www/apache22/data/index.html
+ at exec mkdir -p %D/www/apache22/data
+ at exec [ -f %D/www/apache22/data/index.html ] || cp %D/%%EXAMPLESDIR%%/index.html %D/www/apache22/data/index.html
www/apache22/error/HTTP_BAD_GATEWAY.html.var
www/apache22/error/HTTP_BAD_REQUEST.html.var
www/apache22/error/HTTP_FORBIDDEN.html.var
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list