Subject: pkg/6758: PostgreSQL (6.4.2) package install doesn't work very well
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@proven.weird.com>
List: netbsd-bugs
Date: 01/07/1999 12:12:33
>Number: 6758
>Category: pkg
>Synopsis: PostgreSQL (6.4.2) package install doesn't work very well
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 7 09:20:00 1999
>Last-Modified:
>Originator: Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release: pkgsrc sup Wed Jan 6 08:05:41 EST 1999
>Environment:
System: NetBSD proven 1.3I NetBSD 1.3I (GENERIC) #1: Thu Dec 3 16:23:20 EST 1998 root@woffi.planix.com:/local1/netbsd/netbsd-current/src/sys/arch/i386/compile/GENERIC i386
>Description:
The PostgreSQL package fails to detect TK, fails to install
manual pages, and the PLIST mentions one file that's not
installed.
The warning about editing /etc/ld.so.conf is displayed long
before installation ends and will scroll off even a 45 line
window.
Re-installation will break because "mkdir" errors are not
ignored as they always should be.
>How-To-Repeat:
cd /usr/pkgsrc/databases/postgresql
make install
>Fix:
apply the following patch:
Index: pkgsrc/databases/postgresql/Makefile
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/databases/postgresql/Makefile,v
retrieving revision 1.1.1.13
diff -c -r1.1.1.13 pkgsrc/databases/postgresql/Makefile
*** pkgsrc/databases/postgresql/Makefile 1999/01/07 04:57:22 1.1.1.13
--- pkgsrc/databases/postgresql/Makefile 1999/01/07 17:02:16
***************
*** 33,44 ****
CONFIGURE_ARGS= --prefix=${PREFIX}/${PGUSER} \
--enable-locale \
--with-tcl \
! --with-tclconfig=${PREFIX}/lib/tcl8.0 \
--with-includes=${PREFIX}/include \
--with-libs=${PREFIX}/lib \
--with-template=`${ECHO} ${OPSYS} | ${TR} '[A-Z]' '[a-z]'`
CONFIGURE_ENV+= CPPFLAGS="-I${PREFIX}/include/tcl8.0 -I${PREFIX}/include/tk8.0"
.include "../../mk/bsd.prefs.mk"
pre-extract:
--- 33,46 ----
CONFIGURE_ARGS= --prefix=${PREFIX}/${PGUSER} \
--enable-locale \
--with-tcl \
! --with-tclconfig="${PREFIX}/lib/tcl8.0 ${PREFIX}/lib/tk8.0 " \
--with-includes=${PREFIX}/include \
--with-libs=${PREFIX}/lib \
--with-template=`${ECHO} ${OPSYS} | ${TR} '[A-Z]' '[a-z]'`
CONFIGURE_ENV+= CPPFLAGS="-I${PREFIX}/include/tcl8.0 -I${PREFIX}/include/tk8.0"
+ INSTALL_TARGET= install install-man
+
.include "../../mk/bsd.prefs.mk"
pre-extract:
***************
*** 70,76 ****
.if defined(PACKAGE_BUILDING)
${RM} -rf ${PREFIX}/${PGUSER}
.endif
! @${MKDIR} ${PREFIX}/${PGUSER}
@${SETENV} ${MAKE_ENV} addnerd -h ${PREFIX} -g ${PGGROUP} ${PGUSER}
@${SED} -e 's|@PGUSER@|${PGUSER}|g' ${PKGDIR}/PLIST > ${PLIST_SRC}
--- 72,78 ----
.if defined(PACKAGE_BUILDING)
${RM} -rf ${PREFIX}/${PGUSER}
.endif
! -@${MKDIR} ${PREFIX}/${PGUSER}
@${SETENV} ${MAKE_ENV} addnerd -h ${PREFIX} -g ${PGGROUP} ${PGUSER}
@${SED} -e 's|@PGUSER@|${PGUSER}|g' ${PKGDIR}/PLIST > ${PLIST_SRC}
***************
*** 99,112 ****
fi
@/usr/sbin/chown -R ${PGUSER}:${PGGROUP} ${PREFIX}/${PGUSER}
@${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'
- @case `${GREP} -c '^${PREFIX}/${PGUSER}/lib$$' /etc/ld.so.conf` in \
- 0) \
- ${ECHO} "************** WARNING ********************"; \
- ${ECHO} "Please add ${PREFIX}/${PGUSER}/lib to /etc/ld.so.conf";\
- ${ECHO} "so that this package is usable after any reboot"; \
- ${ECHO} "************** WARNING ********************"; \
- ;; \
- esac
${LDCONFIG} ${PREFIX}/${PGUSER}/lib || ${TRUE}
@${ECHO} '${SETENV} PATH=${PREFIX}/${PGUSER}/bin:$$PATH ${PREFIX}/${PGUSER}/bin/initdb --pglib=${PREFIX}/${PGUSER}/lib --pgdata=${PREFIX}/${PGUSER}/data' | su -l ${PGUSER}
@${SED} -e "s=!!PREFIX!!=${PREFIX}=g" -e "s=!!PGUSER!!=${PGUSER}=g" \
--- 101,106 ----
***************
*** 116,122 ****
@${INSTALL} -c -o ${PGUSER} -g ${PGGROUP} -m 444 \
${FILESDIR}/post-install-notes ${PREFIX}/${PGUSER}
.if !defined(NOPORTDOCS)
! ${MKDIR} ${PREFIX}/share/doc/pgsql
${CP} -R ${WRKDIR}/${DISTNAME}/doc/* ${PREFIX}/share/doc/pgsql
${RM} -rf ${PREFIX}/share/doc/pgsql/src/CVS \
${PREFIX}/share/doc/pgsql/src/graphics/CVS \
--- 110,116 ----
@${INSTALL} -c -o ${PGUSER} -g ${PGGROUP} -m 444 \
${FILESDIR}/post-install-notes ${PREFIX}/${PGUSER}
.if !defined(NOPORTDOCS)
! -${MKDIR} ${PREFIX}/share/doc/pgsql
${CP} -R ${WRKDIR}/${DISTNAME}/doc/* ${PREFIX}/share/doc/pgsql
${RM} -rf ${PREFIX}/share/doc/pgsql/src/CVS \
${PREFIX}/share/doc/pgsql/src/graphics/CVS \
***************
*** 127,131 ****
--- 121,133 ----
.if !defined(BATCH)
@${CAT} ${FILESDIR}/post-install-notes
.endif
+ @case `${GREP} -c '^${PREFIX}/${PGUSER}/lib$$' /etc/ld.so.conf` in \
+ 0) \
+ ${ECHO} "************** WARNING ********************"; \
+ ${ECHO} "Please add ${PREFIX}/${PGUSER}/lib to /etc/ld.so.conf";\
+ ${ECHO} "so that this package is usable after any reboot"; \
+ ${ECHO} "************** WARNING ********************"; \
+ ;; \
+ esac
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/databases/postgresql/pkg/PLIST
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/databases/postgresql/pkg/PLIST,v
retrieving revision 1.1.1.6
diff -c -r1.1.1.6 pkgsrc/databases/postgresql/pkg/PLIST
*** pkgsrc/databases/postgresql/pkg/PLIST 1999/01/07 04:57:25 1.1.1.6
--- pkgsrc/databases/postgresql/pkg/PLIST 1999/01/07 17:03:20
***************
*** 204,210 ****
@PGUSER@/lib/libpgtcl.so.2
@PGUSER@/lib/libpgtcl.so
@PGUSER@/lib/plpgsql.so
- @PGUSER@/lib/pltcl.so
@PGUSER@/bin/postgres
@PGUSER@/bin/postmaster
@PGUSER@/bin/ecpg
--- 204,209 ----
>Audit-Trail:
>Unformatted: