Bug 118338 - patch: ports/www/apache22 (2.2.6-2) installation from tbz package fails
Summary: patch: ports/www/apache22 (2.2.6-2) installation from tbz package fails
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Clement Laforet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-29 21:30 UTC by Dimitry Andric
Modified: 2007-12-11 20:30 UTC (History)
0 users

See Also:


Attachments
file.diff (964 bytes, patch)
2007-11-29 21:30 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2007-11-29 21:30:02 UTC
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-11-29 21:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Clement Laforet freebsd_committer freebsd_triage 2007-12-03 20:45:50 UTC
State Changed
From-To: open->analyzed

Added to the patch sent to portmgr@. 
Thanks !
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-12-11 20:22:21 UTC
clement     2007-12-11 20:22:16 UTC

  FreeBSD ports repository

  Modified files:
    www/apache22         Makefile pkg-plist 
    www/apache22/files   patch-Makefile.in 
  Log:
  - Fix slave ports [1]
  - Fix plist [2]
  - Fix CONFLICTS with devel/apr-svn [3]
  - Fix install when index.html is modified
  - Bump PORT_REVISION
  
  PR:             ports/118348 [1], ports/118338 [2],ports/117097 [2]
                  ports/90088 [3], ports/118349 [3]
  Submitted by:   Andrey Beresovsky <and at sfedu dot ru> [1],
                  Dimitry Andric <dimitry at andric dot com> [2],
                  YAMAMOTO Takao <yamamoto at computec dot co dot jp>
                  Melvyn Sopacua <melvyn atmelvyn dot homeunix dot org> [3],
                  Dominic Fandrey <lon_kamikaze at gmx dot de> [3]
  
  Revision  Changes    Path
  1.216     +10 -11    ports/www/apache22/Makefile
  1.23      +6 -5      ports/www/apache22/files/patch-Makefile.in
  1.86      +4 -3      ports/www/apache22/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Clement Laforet freebsd_committer freebsd_triage 2007-12-11 20:23:39 UTC
State Changed
From-To: analyzed->closed

Fix committed, thanks!