Subject: Re: Installation problems with useradd
To: None <tech-pkg@netbsd.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 08/05/2005 09:39:20
This is a multi-part message in MIME format.
--------------080609070108070207090509
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Roland Illig wrote:
> I reverted my change. But I think the line
> PKG_USERS?= postfix:postfix::Postfix\\ User:${POSTFIX_QUEUE_DIR}
> should rather look like
> PKG_USERS?= postfix:postfix::Postfix\ User:${POSTFIX_QUEUE_DIR:Q}
> which I find far more intuitive. PKG_USERS is then a normal "external
> list", as defined by the pkgsrc guide.
This patch fixes the quoting. Does anyone want to keep that
double-backslash quoting?
Packages that use the old quoting style will then fail with an
appropriate error message.
Roland
--------------080609070108070207090509
Content-Type: text/plain;
name="bsd.pkginstall.mk.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="bsd.pkginstall.mk.patch"
? bsd.pkginstall.mk.patch
Index: bsd.pkginstall.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/install/bsd.pkginstall.mk,v
retrieving revision 1.9
diff -u -p -r1.9 bsd.pkginstall.mk
--- bsd.pkginstall.mk 5 Aug 2005 07:06:47 -0000 1.9
+++ bsd.pkginstall.mk 5 Aug 2005 07:36:51 -0000
@@ -101,9 +101,9 @@ FILES_SUBST+= PKG_INSTALLATION_TYPE=${P
# Only the user and group are required; everything else is optional,
# but the colons must be in the right places when specifying optional
# bits. Note that if the description contains spaces, then spaces
-# should be double backslash-escaped, e.g.
+# must be backslash-escaped, e.g.
#
-# foo:foogrp::The\\ Foomister
+# foo:foogrp::The\ Foomister
#
# PKG_GROUPS represents the groups to create for the package. It is a
# space-separated list of elements of the form
@@ -126,7 +126,7 @@ FILES_SUBST+= PKG_USER_SHELL=${_PKG_USE
# compile without changing something.
#
.if !empty(OPSYS:MInterix)
-. for user in ${PKG_USERS:C/\\\\//g:C/:.*//}
+. for user in ${PKG_USERS:C/\\//g:C/:.*//}
. if !empty(PKG_GROUPS:M${user})
PKG_FAIL_REASON+= "User and group '${user}' cannot have the same name on Interix"
. endif
@@ -155,15 +155,16 @@ ${INSTALL_USERGROUP_FILE}: ../../mk/inst
${SED} ${FILES_SUBST_SED} ../../mk/install/usergroup; \
${ECHO} ""; \
if ${TEST} x${PKG_GROUPS:M*:Q} != x; then \
- eval set -- ${PKG_GROUPS} ; \
+ set -- ${PKG_GROUPS} ; \
while ${TEST} $$# -gt 0; do \
i=$$1; shift; \
${ECHO} "# GROUP: $$i"; \
done; \
fi; \
if ${TEST} x${PKG_USERS:M*:Q} != x; then \
- eval set -- ${PKG_USERS} ; \
+ set -- ${PKG_USERS} ; \
while ${TEST} $$# -gt 0; do \
+ case $$1 in *\\) ${ECHO} "[2005Q2] Deprecation error: PKG_USERS must not contain double backslashes. Please fix your Makefile." 1>&2; exit 1;; esac; \
i=$$1; shift; \
${ECHO} "# USER: $$i"; \
done; \
@@ -174,7 +175,7 @@ ${INSTALL_USERGROUP_FILE}: ../../mk/inst
${ECHO} "esac"; \
${ECHO} ""; \
${ECHO} "# end of install-usergroup"; \
- ) > ${.TARGET}.tmp; \
+ ) > ${.TARGET}.tmp || exit 1; \
${MV} -f ${.TARGET}.tmp ${.TARGET}
# SPECIAL_PERMS are lists that look like:
@@ -213,7 +214,7 @@ ${INSTALL_PERMS_FILE}: ../../mk/install/
${ECHO} " \$${CAT} > ./+PERMS << 'EOF_PERMS'"; \
${SED} ${FILES_SUBST_SED} ../../mk/install/perms; \
${ECHO} ""; \
- eval set -- ${SPECIAL_PERMS} ; \
+ set -- ${SPECIAL_PERMS} ; \
while ${TEST} $$# -gt 0; do \
file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
@@ -287,7 +288,7 @@ ${INSTALL_FILES_FILE}: ../../mk/install/
${SED} ${FILES_SUBST_SED} ../../mk/install/files; \
${ECHO} ""; \
if ${TEST} x${CONF_FILES:M*:Q} != x; then \
- eval set -- ${CONF_FILES} ; \
+ set -- ${CONF_FILES} ; \
while ${TEST} $$# -gt 0; do \
egfile="$$1"; file="$$2"; \
shift; shift; \
@@ -297,7 +298,7 @@ ${INSTALL_FILES_FILE}: ../../mk/install/
done; \
fi; \
if ${TEST} x${SUPPORT_FILES:M*:Q} != x; then \
- eval set -- ${SUPPORT_FILES} ; \
+ set -- ${SUPPORT_FILES} ; \
while ${TEST} $$# -gt 0; do \
egfile="$$1"; file="$$2"; \
shift; shift; \
@@ -307,7 +308,7 @@ ${INSTALL_FILES_FILE}: ../../mk/install/
done; \
fi; \
if ${TEST} x${CONF_FILES_PERMS:M*:Q}${SUPPORT_FILES_PERMS:M*:Q} != x; then \
- eval set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} ; \
+ set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} ; \
while ${TEST} $$# -gt 0; do \
egfile="$$1"; file="$$2"; \
owner="$$3"; group="$$4"; mode="$$5"; \
@@ -343,7 +344,7 @@ ${INSTALL_RCD_SCRIPTS_FILE}: ../../mk/in
${ECHO} " \$${CAT} > ./+RCD_SCRIPTS << 'EOF_RCD_SCRIPTS'"; \
${SED} ${FILES_SUBST_SED} ../../mk/install/files; \
${ECHO} ""; \
- eval set -- ${RCD_SCRIPTS} ; \
+ set -- ${RCD_SCRIPTS} ; \
while ${TEST} $$# -gt 0; do \
script="$$1"; shift; \
file="${RCD_SCRIPTS_DIR:S/^${PREFIX}\///}/$$script"; \
@@ -418,7 +419,7 @@ ${INSTALL_DIRS_FILE}: ../../mk/install/d
done; \
fi; \
if ${TEST} x${MAKE_DIRS_PERMS:M*:Q} != x; then \
- eval set -- ${MAKE_DIRS_PERMS} ; \
+ set -- ${MAKE_DIRS_PERMS} ; \
while ${TEST} $$# -gt 0; do \
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
@@ -427,7 +428,7 @@ ${INSTALL_DIRS_FILE}: ../../mk/install/d
done; \
fi; \
if ${TEST} x${OWN_DIRS_PERMS:M*:Q} != x; then \
- eval set -- ${OWN_DIRS_PERMS} ; \
+ set -- ${OWN_DIRS_PERMS} ; \
while ${TEST} $$# -gt 0; do \
dir="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \
shift; shift; shift; shift; \
--------------080609070108070207090509--