1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

- Fix a few incorrect file permissions after install.

- Check for invalid hostname and set IGNORE, since we know the build
  will fail in this case.
- Ensure pkg-install is called with correct environment.
This commit is contained in:
Shaun Amott 2006-08-03 14:39:44 +00:00
parent 7648ca6921
commit d6e813c37c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=169564
2 changed files with 20 additions and 2 deletions

View File

@ -45,6 +45,18 @@ CONFIGURE_ARGS+= --mandir=${PREFIX}/man \
--enable-ipv6 \
--with-etc-dir=${ETC_DIR}
# Attempt to avoid failures later on, when
# makedbz is executed: we need a valid hostname.
.if exists(/bin/echo) && exists(/bin/hostname)
HOSTNAME!= `/bin/echo /bin/hostname`
HOSTNAME:= ${HOSTNAME:C/[^\.]//g}
. if ${HOSTNAME} == ""
IGNORE= requires a fully-qualified hostname in order to build
. endif
.endif
.if defined(WITH_BERKELEYDB)
CONFIGURE_ARGS+= --with-berkeleydb
. if !defined(WITH_BDB_VER)
@ -149,7 +161,7 @@ post-patch:
.endif
pre-install:
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
.if !defined(WITHOUT_STRIP)
@ -184,6 +196,6 @@ post-install:
${MV} history.n.$${s} history.$${s} ; \
done ; \
fi)
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL PORTMODE
@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL PORTMODE
.include <bsd.port.post.mk>

View File

@ -55,6 +55,12 @@ case $2 in
touch ${NEWSBASE}/db.dist/${f##*/}
done
fi
# Fix permissions
for f in ${NEWSBASE}/etc/*.ctl ${NEWSBASE}/etc/readers.conf; do
chmod 640 ${f}
done
else
fc=`ls ${NEWSBASE}/db/* 2>/dev/null | wc -l`