mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] attr: fix installation when user or group name contains a space
@ 2019-08-15 12:43 Marc Kleine-Budde
  0 siblings, 0 replies; only message in thread
From: Marc Kleine-Budde @ 2019-08-15 12:43 UTC (permalink / raw)
  To: ptxdist; +Cc: mol, Marc Kleine-Budde

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 ...tall-with-domain-user-or-domain-user.patch | 229 ++++++++++++++++++
 .../0001-fix-install-with-domain-user.patch   |  27 ---
 ...nslations-only-if-gettext-is-enabled.patch |   4 -
 patches/attr-2.4.47/series                    |   5 +-
 4 files changed, 233 insertions(+), 32 deletions(-)
 create mode 100644 patches/attr-2.4.47/0001-fix-install-with-domain-user-or-domain-user.patch
 delete mode 100644 patches/attr-2.4.47/0001-fix-install-with-domain-user.patch

diff --git a/patches/attr-2.4.47/0001-fix-install-with-domain-user-or-domain-user.patch b/patches/attr-2.4.47/0001-fix-install-with-domain-user-or-domain-user.patch
new file mode 100644
index 000000000000..5e12725d1664
--- /dev/null
+++ b/patches/attr-2.4.47/0001-fix-install-with-domain-user-or-domain-user.patch
@@ -0,0 +1,229 @@
+From: Jon Ringle <jon@ringle.org>
+Date: Mon, 23 May 2011 09:27:46 -0400
+Subject: [PATCH] fix install with domain\user or "domain user"
+
+If current user is domain\user the \ gets interpreted as an escape char
+resulting in user not found. This also breaks if the user or group contains a
+space.
+
+Enclose "$(PKG_USER)" and "$(PKG_GROUP)" in quotes to fix.
+
+Signed-off-by: Jon Ringle <jon@ringle.org>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+ include/buildmacros |  2 +-
+ include/install-sh  | 26 +++++++++++++-------------
+ install-sh          | 26 +++++++++++++-------------
+ 3 files changed, 27 insertions(+), 27 deletions(-)
+
+diff --git a/include/buildmacros b/include/buildmacros
+index 9e81bb83d609..939f39b80087 100644
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -40,7 +40,7 @@ OBJECTS = $(ASFILES:.s=.o) \
+ 	  $(LFILES:.l=.o) \
+ 	  $(YFILES:%.y=%.tab.o)
+ 
+-INSTALL	= $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
++INSTALL	= $(TOPDIR)/include/install-sh -o "$(PKG_USER)" -g "$(PKG_GROUP)"
+ 
+ IMAGES_DIR = $(TOPDIR)/all-images
+ DIST_DIR = $(TOPDIR)/dist
+diff --git a/include/install-sh b/include/install-sh
+index fb4997a3b013..3c70b31a3b2c 100755
+--- a/include/install-sh
++++ b/include/install-sh
+@@ -56,7 +56,7 @@ _chown ()
+ {
+     _st=255
+     if [ $# -eq 3 ] ; then
+-	chown $1:$2 $3
++	chown "$1":"$2" $3
+ 	_st=$?
+ 	if [ $_st -ne 0 ] ; then
+ 	    if [ $REAL_UID != '0' ] ; then
+@@ -115,7 +115,7 @@ fi
+ 
+ [ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
+ 
+-while getopts "Dcm:d:S:o:g:T:" c $*
++while getopts "Dcm:d:S:o:g:T:" c "$@"
+ do
+    case $c in
+    c)
+@@ -168,10 +168,10 @@ then
+     fi
+     if [ $status -eq 0 ]
+     then
+-	$CHOWN $OWNER $GROUP $dir
++	$CHOWN "$OWNER" "$GROUP" $dir
+ 	status=$?
+     fi
+-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
++    $MANIFEST d $DIRMODE "$OWNER" "$GROUP" ${dir#$DIST_ROOT}
+ elif $Sflag
+ then
+     #
+@@ -217,7 +217,7 @@ then
+ 			install_name=$target/$solib
+ 			$CP $solib $install_name
+ 			status=$?
+-			$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
++			$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$solib ${install_name#$DIST_ROOT}
+ 			break
+ 		fi
+ 	done
+@@ -268,7 +268,7 @@ then
+ 	install_name=$target/$old_library
+ 	$CP $old_library $install_name
+ 	status=$?
+-	$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
++	$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$old_library ${install_name#$DIST_ROOT}
+ 	;;
+     *)
+ 	echo "$prog: -T $lt_install invalid"
+@@ -281,7 +281,7 @@ then
+ 	if [ $status -eq 0 ]
+ 	then
+ 		$CHMOD $FILEMODE $install_name
+-		$CHOWN $OWNER $GROUP $install_name
++		$CHOWN "$OWNER" "$GROUP" $install_name
+ 	fi
+ 	;;
+     esac
+@@ -310,19 +310,19 @@ else
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir/$f
++		    $CHOWN "$OWNER" "$GROUP" $dir/$f
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$f ${dir#$DIST_ROOT}/$f
+ 	    else
+ 		$CHMOD $FILEMODE $dir
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir
++		    $CHOWN "$OWNER" "$GROUP" $dir
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$dir ${dir#$DIST_ROOT}
+ 	    fi
+ 	fi
+     else
+@@ -352,10 +352,10 @@ else
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir/$f
++		    $CHOWN "$OWNER" "$GROUP" $dir/$f
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$f ${dir#$DIST_ROOT}/$f
+ 	    fi
+ 	    [ $status -ne 0 ] && break
+ 	done
+diff --git a/install-sh b/install-sh
+index fb4997a3b013..3c70b31a3b2c 100755
+--- a/install-sh
++++ b/install-sh
+@@ -56,7 +56,7 @@ _chown ()
+ {
+     _st=255
+     if [ $# -eq 3 ] ; then
+-	chown $1:$2 $3
++	chown "$1":"$2" $3
+ 	_st=$?
+ 	if [ $_st -ne 0 ] ; then
+ 	    if [ $REAL_UID != '0' ] ; then
+@@ -115,7 +115,7 @@ fi
+ 
+ [ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
+ 
+-while getopts "Dcm:d:S:o:g:T:" c $*
++while getopts "Dcm:d:S:o:g:T:" c "$@"
+ do
+    case $c in
+    c)
+@@ -168,10 +168,10 @@ then
+     fi
+     if [ $status -eq 0 ]
+     then
+-	$CHOWN $OWNER $GROUP $dir
++	$CHOWN "$OWNER" "$GROUP" $dir
+ 	status=$?
+     fi
+-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
++    $MANIFEST d $DIRMODE "$OWNER" "$GROUP" ${dir#$DIST_ROOT}
+ elif $Sflag
+ then
+     #
+@@ -217,7 +217,7 @@ then
+ 			install_name=$target/$solib
+ 			$CP $solib $install_name
+ 			status=$?
+-			$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
++			$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$solib ${install_name#$DIST_ROOT}
+ 			break
+ 		fi
+ 	done
+@@ -268,7 +268,7 @@ then
+ 	install_name=$target/$old_library
+ 	$CP $old_library $install_name
+ 	status=$?
+-	$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
++	$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$old_library ${install_name#$DIST_ROOT}
+ 	;;
+     *)
+ 	echo "$prog: -T $lt_install invalid"
+@@ -281,7 +281,7 @@ then
+ 	if [ $status -eq 0 ]
+ 	then
+ 		$CHMOD $FILEMODE $install_name
+-		$CHOWN $OWNER $GROUP $install_name
++		$CHOWN "$OWNER" "$GROUP" $install_name
+ 	fi
+ 	;;
+     esac
+@@ -310,19 +310,19 @@ else
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir/$f
++		    $CHOWN "$OWNER" "$GROUP" $dir/$f
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$f ${dir#$DIST_ROOT}/$f
+ 	    else
+ 		$CHMOD $FILEMODE $dir
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir
++		    $CHOWN "$OWNER" "$GROUP" $dir
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$dir ${dir#$DIST_ROOT}
+ 	    fi
+ 	fi
+     else
+@@ -352,10 +352,10 @@ else
+ 		status=$?
+ 		if [ $status -eq 0 ]
+ 		then
+-		    $CHOWN $OWNER $GROUP $dir/$f
++		    $CHOWN "$OWNER" "$GROUP" $dir/$f
+ 		    status=$?
+ 		fi
+-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
++		$MANIFEST f $FILEMODE "$OWNER" "$GROUP" $HERE/$f ${dir#$DIST_ROOT}/$f
+ 	    fi
+ 	    [ $status -ne 0 ] && break
+ 	done
diff --git a/patches/attr-2.4.47/0001-fix-install-with-domain-user.patch b/patches/attr-2.4.47/0001-fix-install-with-domain-user.patch
deleted file mode 100644
index 893f766304d6..000000000000
--- a/patches/attr-2.4.47/0001-fix-install-with-domain-user.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Jon Ringle <jon@ringle.org>
-Date: Mon, 23 May 2011 09:27:46 -0400
-Subject: [PATCH] fix install with domain\user
-
-If current user is domain\user the \ gets interpreted as an escape char
-resulting in user not found.
-
-Enclose "$(PKG_USER)" and "$(PKG_GROUP)" in quotes to fix.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
----
- include/buildmacros | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/buildmacros b/include/buildmacros
-index 9e81bb8..939f39b 100644
---- a/include/buildmacros
-+++ b/include/buildmacros
-@@ -40,7 +40,7 @@ OBJECTS = $(ASFILES:.s=.o) \
- 	  $(LFILES:.l=.o) \
- 	  $(YFILES:%.y=%.tab.o)
- 
--INSTALL	= $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
-+INSTALL	= $(TOPDIR)/include/install-sh -o "$(PKG_USER)" -g "$(PKG_GROUP)"
- 
- IMAGES_DIR = $(TOPDIR)/all-images
- DIST_DIR = $(TOPDIR)/dist
diff --git a/patches/attr-2.4.47/0002-build-translations-only-if-gettext-is-enabled.patch b/patches/attr-2.4.47/0002-build-translations-only-if-gettext-is-enabled.patch
index c5125ef95fa1..af062437a665 100644
--- a/patches/attr-2.4.47/0002-build-translations-only-if-gettext-is-enabled.patch
+++ b/patches/attr-2.4.47/0002-build-translations-only-if-gettext-is-enabled.patch
@@ -1,4 +1,3 @@
-From 06d3c2ddb6ef0a9f53c36538ef018d6cca937e51 Mon Sep 17 00:00:00 2001
 From: Philipp Zabel <p.zabel@pengutronix.de>
 Date: Thu, 13 Jul 2017 11:25:35 +0200
 Subject: [PATCH] build translations only if gettext is enabled
@@ -31,6 +30,3 @@ index 4443fe092f37..896186e1e073 100644
  
  SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
  
--- 
-2.11.0
-
diff --git a/patches/attr-2.4.47/series b/patches/attr-2.4.47/series
index 883e46360f47..2dc7b2624805 100644
--- a/patches/attr-2.4.47/series
+++ b/patches/attr-2.4.47/series
@@ -1,2 +1,5 @@
-0001-fix-install-with-domain-user.patch
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-fix-install-with-domain-user-or-domain-user.patch
 0002-build-translations-only-if-gettext-is-enabled.patch
+# 871964aae99308a74a3b9e9146294e20  - git-ptx-patches magic
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-15 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 12:43 [ptxdist] [PATCH] attr: fix installation when user or group name contains a space Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox