Subject: pkg/13673: apache-current hard codes /usr/pkg
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hiramatu@boreas.dti.ne.jp>
List: netbsd-bugs
Date: 08/09/2001 16:26:43
>Number: 13673
>Category: pkg
>Synopsis: apache-current hard codes /usr/pkg
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 09 16:23:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Hiramatsu Yoshifumi
>Release: -current(1.5W)
>Organization:
>Environment:
NetBSD river.my.domain 1.5W NetBSD 1.5W (HiraKern) #62: Wed Aug 8 04:07:04 JST 2001 hiramatsu@river.my.domain:/usr/src/sys/arch/i386/compile/HiraKern i386
>Description:
Because patches of apache-current hard codes /usr/pkg, "make install" puts
files to /usr/pkg even if LOCALBASE is set different path.
>How-To-Repeat:
In /etc/mk.conf, set
LOCALBASE=/packages
and
cd /usr/pkgsrc/www/apache-current
make install
>Fix:
My environment needs patch-ah to execute apache.
diff -Nru apache-current.orig/Makefile apache-current/Makefile
--- apache-current.orig/Makefile Fri Aug 10 08:10:51 2001
+++ apache-current/Makefile Fri Aug 10 15:15:42 2001
@@ -48,6 +48,13 @@
${RM} ${WRKSRC}/docs/conf/*.orig
(cd ${WRKSRC}; ${LN} -s ${LOCALBASE}/bin/libtool)
+pre-configure:
+ ${CP} ${WRKSRC}/config.layout ${WRKSRC}/config.layout.bak
+ ${SED} -e 's:PKG_PREFIX:${PREFIX}:g' ${WRKSRC}/config.layout.bak > ${WRKSRC}/config.layout
+ ${CP} ${WRKSRC}/docs/conf/httpd-std.conf ${WRKSRC}/docs/conf/httpd-std.conf.bak
+ ${SED} -e 's:PKG_PREFIX:${PREFIX}:g' ${WRKSRC}/docs/conf/httpd-std.conf.bak > ${WRKSRC}/docs/conf/httpd-std.conf
+ ${RM} ${WRKSRC}/docs/conf/httpd-std.conf.bak
+
pre-install:
for i in ${AP_LIBS}; do \
${SH} ${WRKSRC}/libtool ${INSTALL_DATA} \
diff -Nru apache-current.orig/distinfo apache-current/distinfo
--- apache-current.orig/distinfo Fri Aug 10 08:10:51 2001
+++ apache-current/distinfo Fri Aug 10 08:12:22 2001
@@ -2,9 +2,10 @@
SHA1 (httpd-2_0_16-beta.tar.Z) = 388ba6e11f9dbb39f52512a2354ec20706049c2a
Size (httpd-2_0_16-beta.tar.Z) = 4950623 bytes
-SHA1 (patch-aa) = b43cd6a31b5c0f318b0cd9e9fbe08938dd7cfda0
+SHA1 (patch-aa) = 4f48e25cc6c84f10d90af699f7eed80e9eaa5a76
SHA1 (patch-ac) = bf100d182752ad94fbb3d1fb3c9d59edef0425f0
SHA1 (patch-ad) = 56d3bc6023cd3457cbd96268f43fe2ce505caaa6
-SHA1 (patch-ae) = 5747317d24d8fa09bbd99b170983e59ff38647a4
+SHA1 (patch-ae) = 5dcfc2bb6e007e5f36040d0b5ff85a30a3a31ffc
SHA1 (patch-af) = fed6d9e6eabeb10bf8d5f9b60c5f8d61306f6b10
SHA1 (patch-ag) = a6b3e8dc948a90c03dabe4b8b2dc8f43d90f66e2
+SHA1 (patch-ah) = 9759ecb8f2abaf54d00814edc6b346e3757721d8
diff -Nru apache-current.orig/patches/patch-aa apache-current/patches/patch-aa
--- apache-current.orig/patches/patch-aa Fri Aug 10 08:10:51 2001
+++ apache-current/patches/patch-aa Fri Aug 10 15:06:22 2001
@@ -9,7 +9,7 @@
+
+# NetBSD Layout
+<Layout NetBSD>
-+ prefix: /usr/pkg
++ prefix: PKG_PREFIX
+ exec_prefix: $prefix
+ bindir: $prefix/bin
+ sbindir: $prefix/sbin
diff -Nru apache-current.orig/patches/patch-ae apache-current/patches/patch-ae
--- apache-current.orig/patches/patch-ae Fri Aug 10 08:10:51 2001
+++ apache-current/patches/patch-ae Fri Aug 10 15:06:52 2001
@@ -42,7 +42,7 @@
# to be found.
#
-TypesConfig conf/mime.types
-+TypesConfig /usr/pkg/etc/httpd/mime.types
++TypesConfig PKG_PREFIX/etc/httpd/mime.types
#
# DefaultType is the default MIME type the server will use for a document
@@ -51,7 +51,7 @@
#
<IfModule mod_mime_magic.c>
- MIMEMagicFile conf/magic
-+ MIMEMagicFile /usr/pkg/etc/httpd/magic
++ MIMEMagicFile PKG_PREFIX/etc/httpd/magic
</IfModule>
#
diff -Nru apache-current.orig/patches/patch-ah apache-current/patches/patch-ah
--- apache-current.orig/patches/patch-ah Thu Jan 1 09:00:00 1970
+++ apache-current/patches/patch-ah Fri Aug 10 16:23:43 2001
@@ -0,0 +1,11 @@
+--- configure.bak Fri Aug 10 07:23:07 2001
++++ configure Fri Aug 10 07:23:08 2001
+@@ -9814,7 +9814,7 @@
+ EOF
+
+ cat >> confdefs.h <<EOF
+-#define SERVER_CONFIG_FILE "conf/$progname.conf"
++#define SERVER_CONFIG_FILE "etc/httpd/$progname.conf"
+ EOF
+
+ cat >> confdefs.h <<EOF
>Release-Note:
>Audit-Trail:
>Unformatted: