Changeset 122044


Ignore:
Timestamp:
Jul 13, 2014, 1:19:37 PM (6 years ago)
Author:
cal@…
Message:

base: Makefiles: Quote DSTUSR/DSTGRP/DSTMODE, INSTALLDIR and RUNUSR in an attempt to fix #43875

Location:
trunk/base
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/Makefile.in

    r119709 r122044  
    3737install::
    3838        [ ! -f "$(DESTDIR)${sysconfdir}/macports/mp_version" ] || rm -vf "$(DESTDIR)${sysconfdir}/macports/mp_version"
    39         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "$(DESTDIR)${datadir}/macports/"
    40         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.bash  "$(DESTDIR)${datadir}/macports/"
    41         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/macports-pubkey.pem  "$(DESTDIR)${datadir}/macports/"
     39        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "$(DESTDIR)${datadir}/macports/"
     40        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 setupenv.bash  "$(DESTDIR)${datadir}/macports/"
     41        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 $(srcdir)/macports-pubkey.pem  "$(DESTDIR)${datadir}/macports/"
    4242# Only run these scripts when not building in a destroot
    4343ifeq ($(DESTDIR),)
    4444# create run user if it doesn't exist
    4545        @if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
    46         if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
     46        if ! ${DSCL} -q . -read "/Groups/${RUNUSR}" > /dev/null 2>&1 ; then \
    4747            if test `id -u` -eq 0; then \
    4848                echo "Creating group \"${RUNUSR}\"" ; \
    49                 ${DSEDITGROUP} -q -o create ${RUNUSR} ; \
     49                ${DSEDITGROUP} -q -o create "${RUNUSR}" ; \
    5050            else \
    5151                echo "Not creating group \"${RUNUSR}\" (not root)" ; \
    5252            fi ; \
    5353        fi ; \
    54         if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
     54        if ! ${DSCL} -q . -list "/Users/${RUNUSR}" > /dev/null 2>&1 ; then \
    5555            if test `id -u` -eq 0; then \
    5656                echo "Creating user \"${RUNUSR}\"" ; \
     
    5959                    let "NEXTUID=NEXTUID+1"; \
    6060                done; \
    61                 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$NEXTUID ; \
     61                ${DSCL} -q . -create "/Users/${RUNUSR}" UniqueID $$NEXTUID ; \
    6262                \
    63                 ${DSCL} -q . -delete /Users/${RUNUSR} AuthenticationAuthority ; \
    64                 ${DSCL} -q . -delete /Users/${RUNUSR} PasswordPolicyOptions ; \
    65                 ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:KerberosKeys ; \
    66                 ${DSCL} -q . -delete /Users/${RUNUSR} dsAttrTypeNative:ShadowHashData ; \
     63                ${DSCL} -q . -delete "/Users/${RUNUSR}" AuthenticationAuthority ; \
     64                ${DSCL} -q . -delete "/Users/${RUNUSR}" PasswordPolicyOptions ; \
     65                ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:KerberosKeys ; \
     66                ${DSCL} -q . -delete "/Users/${RUNUSR}" dsAttrTypeNative:ShadowHashData ; \
    6767                \
    68                 ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
    69                 ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
    70                 ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
    71                 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
    72                 ${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
     68                ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
     69                ${DSCL} -q . -create "/Users/${RUNUSR}" Password \* ; \
     70                ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$(${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
     71                ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
     72                ${DSCL} -q . -create "/Users/${RUNUSR}" UserShell /usr/bin/false ; \
    7373            else \
    7474                echo "Not creating user \"${RUNUSR}\" (not root)" ; \
    7575            fi ; \
    7676        fi ; \
    77         if test "$$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
     77        if test "$$(${DSCL} -q . -read "/Users/${RUNUSR}" NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
    7878            if test `id -u` -eq 0; then \
    7979                echo "Updating home directory location for user \"${RUNUSR}\"" ; \
    80                 ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory "${localstatedir}/macports/home" ; \
     80                ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${localstatedir}/macports/home" ; \
    8181            else \
    8282                echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
     
    8484        fi ; \
    8585        if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
    86             GID=`${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
    87             if test "`${DSCL} -q . -read /Users/${RUNUSR} PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
     86            GID=`${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
     87            if test "`${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
    8888                echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
    89                 ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$GID ; \
    90                 ${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
     89                ${DSCL} -q . -create "/Users/${RUNUSR}" PrimaryGroupID $$GID ; \
     90                ${DSCL} -q . -create "/Users/${RUNUSR}" RealName MacPorts ; \
    9191            fi ; \
    9292        fi ; \
  • trunk/base/doc/Makefile.in

    r120142 r122044  
    3434
    3535install: all
    36         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${INSTALLDIR}"
    37         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${DESTDIR}${mpconfigdir}"
     36        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
     37        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${DESTDIR}${mpconfigdir}"
    3838
    3939        < prefix.mtree $(MTREE) -U -e -p "${INSTALLDIR}" > /dev/null
     
    4343# Tiger's chmod doesn't accept -h
    4444# mtree with umask 0077 doesn't get the permissions of the symlink right
    45         chmod -h 755 ${INSTALLDIR}/man
     45        chmod -h 755 "${INSTALLDIR}/man"
    4646endif
    4747endif
    4848
    4949        for f in ${CONF}; do \
    50                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$f "${DESTDIR}${mpconfigdir}/$${f}.default"; \
     50                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$f" "${DESTDIR}${mpconfigdir}/$${f}.default"; \
    5151                if test ! -e "${DESTDIR}${mpconfigdir}/$$f" ; then \
    5252                        set -x; \
    53                         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 $$f "${DESTDIR}${mpconfigdir}"; \
     53                        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 644 "$$f" "${DESTDIR}${mpconfigdir}"; \
    5454                fi; \
    5555        done
     
    6060        for m in ${MAN7}; do rm -f "${INSTALLDIR}/share/man/man7/$$m" ; done
    6161
    62         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${INSTALLDIR}/share/macports/install"
    63         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 base.mtree "${INSTALLDIR}/share/macports/install/"
    64         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree "${INSTALLDIR}/share/macports/install/"
    65         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 macosx.mtree "${INSTALLDIR}/share/macports/install/"
    66         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 port.1.gz "${INSTALLDIR}/share/man/man1"
    67         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 macports.conf.5.gz "${INSTALLDIR}/share/man/man5"
    68         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portfile.7.gz "${INSTALLDIR}/share/man/man7"
    69         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portstyle.7.gz "${INSTALLDIR}/share/man/man7"
    70         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 porthier.7.gz "${INSTALLDIR}/share/man/man7"
    71         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 portgroup.7.gz "${INSTALLDIR}/share/man/man7"
     62        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/share/macports/install"
     63        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 644 base.mtree "${INSTALLDIR}/share/macports/install/"
     64        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 644 prefix.mtree "${INSTALLDIR}/share/macports/install/"
     65        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 644 macosx.mtree "${INSTALLDIR}/share/macports/install/"
     66        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 port.1.gz "${INSTALLDIR}/share/man/man1"
     67        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 macports.conf.5.gz "${INSTALLDIR}/share/man/man5"
     68        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 portfile.7.gz "${INSTALLDIR}/share/man/man7"
     69        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 portstyle.7.gz "${INSTALLDIR}/share/man/man7"
     70        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 porthier.7.gz "${INSTALLDIR}/share/man/man7"
     71        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 portgroup.7.gz "${INSTALLDIR}/share/man/man7"
  • trunk/base/src/darwintracelib1.0/Makefile.in

    r118562 r122044  
    2929
    3030install:: all
    31         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
    32         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
     31        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
     32        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${INSTALLDIR}"
    3333
    3434test::
  • trunk/base/src/macports1.0/Makefile.in

    r118568 r122044  
    3333        if test -L "${INSTALLDIR}"; then rm -rf "${INSTALLDIR}"; fi
    3434
    35         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
     35        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
    3636
    3737        $(SILENT) set -x; for file in ${SRCS}; do \
    38                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
     38                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
    3939        done
    4040
    41         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     41        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
    4242
    4343
  • trunk/base/src/package1.0/Makefile.in

    r118562 r122044  
    2727
    2828install:: all
    29         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
     29        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
    3030        $(SILENT)set -x; for file in ${SRCS}; do \
    31                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/$$file ${INSTALLDIR}; \
     31                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
    3232        done
    33         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     33        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
  • trunk/base/src/port/Makefile.in

    r119297 r122044  
    3636
    3737install: all mkdirs
    38         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/bin
    39         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}/var/macports
    40         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 555 port portindex portmirror ${INSTALLDIR}/bin/
    41         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/port-help.tcl  ${INSTALLDIR}/var/macports/
    42         cd ${INSTALLDIR}/bin && $(LN_S) -f port portf
    43         cd ${INSTALLDIR}/bin && $(LN_S) -f ${TCLSH} port-tclsh
     38        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/bin"
     39        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}/var/macports"
     40        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 555 port portindex portmirror "${INSTALLDIR}/bin/"
     41        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/port-help.tcl" "${INSTALLDIR}/var/macports/"
     42        cd "${INSTALLDIR}/bin" && $(LN_S) -f port portf
     43        cd "${INSTALLDIR}/bin" && $(LN_S) -f "${TCLSH}" port-tclsh
    4444ifneq (,$(findstring darwin,@build_os@))
    4545ifneq (8,@OS_MAJOR@)
    46         chmod -h 555 ${INSTALLDIR}/bin/portf ${INSTALLDIR}/bin/port-tclsh
     46        chmod -h 555 "${INSTALLDIR}/bin/portf" "${INSTALLDIR}/bin/port-tclsh"
    4747endif
    4848endif
  • trunk/base/src/port1.0/Makefile.in

    r118562 r122044  
    3232
    3333install:: all
    34         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
     34        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
    3535        $(SILENT)set -x; for file in ${SRCS}; do \
    36                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/$$file ${INSTALLDIR}; \
     36                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}"; \
    3737        done
    3838        $(SILENT)set -x; for file in ${SRCS_AUTOCONF}; do \
    39                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
     39                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}"; \
    4040        done
    41         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     41        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
    4242
    4343test::
  • trunk/base/src/programs/daemondo/Makefile.in

    r117619 r122044  
    3636
    3737install: daemondo
    38         ${INSTALL} -o ${DSTUSR} -g ${DSTGRP} -m 555 ${PROGRAM} ${DESTDIR}${bindir}
     38        ${INSTALL} -o "${DSTUSR}" -g "${DSTGRP}" -m 555 "${PROGRAM}" "${DESTDIR}${bindir}"
    3939
    4040test:
  • trunk/base/src/registry2.0/Makefile.in

    r120069 r122044  
    4242
    4343install:: all $(SHLIB_NAME)
    44         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
    45         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 ${SHLIB_NAME} ${INSTALLDIR}
     44        $(INSTALL) -d -o "${DSTUSR}" -g "${DSTGRP}" -m "${DSTMODE}" "${INSTALLDIR}"
     45        $(INSTALL)    -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "${SHLIB_NAME}" "${INSTALLDIR}"
    4646        $(SILENT) set -x; for file in ${SRCS}; do \
    47                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $(srcdir)/$$file ${INSTALLDIR}/$$file; \
     47                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$(srcdir)/$$file" "${INSTALLDIR}/$$file"; \
    4848        done
    4949        $(SILENT) set -x; for file in ${SRCS_AUTOCONF}; do \
    50                 $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}/$$file; \
     50                $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${INSTALLDIR}/$$file"; \
    5151        done
    52         $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 pkgIndex.tcl ${INSTALLDIR}
     52        $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${INSTALLDIR}"
Note: See TracChangeset for help on using the changeset viewer.