mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] acl and attr: make install.sh script accept spaces in user and group names
@ 2018-03-26 12:54 Jens.Breitenstein
  2018-03-27  7:31 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Jens.Breitenstein @ 2018-03-26 12:54 UTC (permalink / raw)
  To: ptxdist; +Cc: Jens.Breitenstein

---
 ...-sh-accept-spaces-in-user-and-group-names.patch | 108 +++++++++++++++++++++
 patches/acl-2.2.52/series                          |   1 +
 ...-sh-accept-spaces-in-user-and-group-names.patch | 108 +++++++++++++++++++++
 patches/attr-2.4.47/series                         |   1 +
 4 files changed, 218 insertions(+)
 create mode 100644 patches/acl-2.2.52/0004-make-install-sh-accept-spaces-in-user-and-group-names.patch
 create mode 100644 patches/attr-2.4.47/0003-make-install-sh-accept-spaces-in-user-and-group-names.patch

diff --git a/patches/acl-2.2.52/0004-make-install-sh-accept-spaces-in-user-and-group-names.patch b/patches/acl-2.2.52/0004-make-install-sh-accept-spaces-in-user-and-group-names.patch
new file mode 100644
index 0000000..183a353
--- /dev/null
+++ b/patches/acl-2.2.52/0004-make-install-sh-accept-spaces-in-user-and-group-names.patch
@@ -0,0 +1,108 @@
+Index: acl-2.2.52/include/install-sh
+===================================================================
+--- acl-2.2.52.orig/include/install-sh
++++ acl-2.2.52/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
+@@ -93,7 +93,7 @@ DIRMODE=755
+ FILEMODE=644
+ OWNER=`id -u`
+ GROUP=`id -g`
+-REAL_UID=$OWNER
++REAL_UID="$OWNER"
+
+ # default is to install and don't append manifest
+ INSTALL=true
+@@ -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/acl-2.2.52/series b/patches/acl-2.2.52/series
index d073142..519a1b4 100644
--- a/patches/acl-2.2.52/series
+++ b/patches/acl-2.2.52/series
@@ -4,3 +4,4 @@
 0002-buildmacros-add-tag-CC-to-libtool-invocation.patch
 0003-buildmacros-fix-install-with-user-domain.patch
 # 7f7779678dde859863b19dcae5e93fb1  - git-ptx-patches magic
+0004-make-install-sh-accept-spaces-in-user-and-group-names.patch
diff --git a/patches/attr-2.4.47/0003-make-install-sh-accept-spaces-in-user-and-group-names.patch b/patches/attr-2.4.47/0003-make-install-sh-accept-spaces-in-user-and-group-names.patch
new file mode 100644
index 0000000..f9591c9
--- /dev/null
+++ b/patches/attr-2.4.47/0003-make-install-sh-accept-spaces-in-user-and-group-names.patch
@@ -0,0 +1,108 @@
+Index: attr-2.4.47/include/install-sh
+===================================================================
+--- attr-2.4.47.orig/include/install-sh
++++ attr-2.4.47/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
+@@ -93,7 +93,7 @@ DIRMODE=755
+ FILEMODE=644
+ OWNER=`id -u`
+ GROUP=`id -g`
+-REAL_UID=$OWNER
++REAL_UID="$OWNER"
+
+ # default is to install and don't append manifest
+ INSTALL=true
+@@ -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/series b/patches/attr-2.4.47/series
index 883e463..c043be4 100644
--- a/patches/attr-2.4.47/series
+++ b/patches/attr-2.4.47/series
@@ -1,2 +1,3 @@
 0001-fix-install-with-domain-user.patch
 0002-build-translations-only-if-gettext-is-enabled.patch
+0003-make-install-sh-accept-spaces-in-user-and-group-names.patch
--
2.7.4



________________________________________________________________________________________
Diese E-Mail einschließlich ihrer Anhänge ist vertraulich und daher allein für den Gebrauch durch den vorgesehenen Empfänger bestimmt. Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail sowie jedwedes Vertrauen auf deren Inhalt untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzüglich vollständig zu löschen und uns eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and/or privileged for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

WAGO Kontakttechnik GmbH (nach Schweizer Recht) & Co. KG; Rechtsform: Kommanditgesellschaft; Sitz: Minden; Registergericht: Bad Oeynhausen, HRA 6218; Persönlich haftender Gesellschafter: WAGO Kontakttechnik Beteiligungs GmbH; Sitz: Belmont-Broye (Schweiz); Handelsregisteramt CHE-112.342.525; Geschäftsführung: Dipl.-Wirtsch. Ing. (FH) Sven Michael Hohorst; Dipl. Betriebsw. Axel Christian Börner; Dipl.-Ing. (FH) Ulrich Bohling.

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-27  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 12:54 [ptxdist] [PATCH] acl and attr: make install.sh script accept spaces in user and group names Jens.Breitenstein
2018-03-27  7:31 ` Michael Olbrich

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