On Sun, Sep 18, 2016 at 12:32:17AM +0200, Martin Natano wrote:
> Next round of wrestling with install permissions. This diff adjusts the
> file owner/group for installed files of cvs(1). Ok?
The diff doesn't apply because mkinstalldirs has an odd revision:
> Index: mkinstalldirs
> ===================================================================
> RCS file: /cvs/src/gnu/usr.bin/cvs/mkinstalldirs,v
> retrieving revision 1.1.1.3
> diff -u -p -r1.1.1.3 mkinstalldirs
> --- mkinstalldirs 28 Sep 2001 22:45:35 -0000 1.1.1.3
> +++ mkinstalldirs 17 Sep 2016 22:25:09 -0000
> @@ -24,7 +24,7 @@ do
> if test ! -d "$pathcomp"; then
> echo "mkdir $pathcomp"
>
> - mkdir "$pathcomp" || lasterr=$?
> + install -d -o root -g wheel "$pathcomp" || lasterr=$?
>
> if test ! -d "$pathcomp"; then
> errstatus=$lasterr
I think you wanted to send the diff below.
ok for this
Index: Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/src/gnu/usr.bin/cvs/Makefile.bsd-wrapper,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile.bsd-wrapper
--- Makefile.bsd-wrapper 20 Sep 2016 18:36:57 -0000 1.54
+++ Makefile.bsd-wrapper 24 Sep 2016 20:54:19 -0000
@@ -28,21 +28,23 @@ CF=
config: .FORCE
-rm -f config.cache
PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
- INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
- INSTALL_SCRIPT="${INSTALL} ${INSTALL_COPY}" \
- ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \
- MAKEINFO='makeinfo --no-split' \
- sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \
- --datadir=/usr/libdata ${CF}
+ INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o
${BINOWN} -g ${BINGRP} -m ${BINMODE}" \
+ INSTALL_SCRIPT="${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m
${BINMODE}" \
+ INSTALL_DATA="${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m
${DOCMODE}" \
+ ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \
+ MAKEINFO='makeinfo --no-split' \
+ sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \
+ --datadir=/usr/libdata ${CF}
config.status:
PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
- INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
- INSTALL_SCRIPT="${INSTALL} ${INSTALL_COPY}" \
- ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \
- MAKEINFO='makeinfo --no-split' \
- sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \
- --datadir=/usr/libdata ${CF}
+ INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o
${BINOWN} -g ${BINGRP} -m ${BINMODE}" \
+ INSTALL_SCRIPT="${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m
${BINMODE}" \
+ INSTALL_DATA="${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m
${DOCMODE}" \
+ ACLOCAL=true AUTOCONF=true AUTOMAKE=true AUTOHEADER=true \
+ MAKEINFO='makeinfo --no-split' \
+ sh ${.CURDIR}/configure --prefix=/usr --mandir=/usr/share/man \
+ --datadir=/usr/libdata ${CF}
.ifdef NOMAN
maninstall:
Index: mkinstalldirs
===================================================================
RCS file: /cvs/src/gnu/usr.bin/cvs/mkinstalldirs,v
retrieving revision 1.3
diff -u -p -r1.3 mkinstalldirs
--- mkinstalldirs 20 Sep 2016 18:36:57 -0000 1.3
+++ mkinstalldirs 24 Sep 2016 20:54:19 -0000
@@ -20,7 +20,7 @@ for file in ${1+"$@"} ; do
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
- mkdir "$pathcomp" || errstatus=$?
+ install -d -o root -g wheel "$pathcomp" || errstatus=$?
fi
pathcomp="$pathcomp/"
Index: contrib/Makefile.in
===================================================================
RCS file: /cvs/src/gnu/usr.bin/cvs/contrib/Makefile.in,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile.in
--- contrib/Makefile.in 20 Sep 2016 18:36:57 -0000 1.15
+++ contrib/Makefile.in 24 Sep 2016 20:54:19 -0000
@@ -363,7 +363,8 @@ install-data-local:
echo "test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`";
\
echo " && cd $(DESTDIR)$(bindir) && $(LN_S)
$(contribscriptdir)/`echo $$p|sed '$(transform)'` ."; \
(test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'` \
- && cd $(DESTDIR)$(bindir) && $(LN_S) $(contribscriptdir)/`echo
$$p|sed '$(transform)'` .) \
+ && cd $(DESTDIR)$(bindir) && $(LN_S) $(contribscriptdir)/`echo
$$p|sed '$(transform)'` . \
+ && chown root:bin `echo $$p|sed '$(transform)'`) \
|| (echo "Link creation failed" && if test -f $$p; then \
echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo
$$p|sed '$(transform)'`"; \
$(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed
'$(transform)'`; \