mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: <Jens.Breitenstein@wago.com>
To: ptxdist@pengutronix.de
Cc: Jens.Breitenstein@wago.com
Subject: [ptxdist] [PATCH] acl and attr: make install.sh script accept spaces in user and group names
Date: Mon, 26 Mar 2018 12:54:59 +0000	[thread overview]
Message-ID: <1522068878-3964-1-git-send-email-jens.breitenstein@wago.com> (raw)

---
 ...-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

             reply	other threads:[~2018-03-26 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 12:54 Jens.Breitenstein [this message]
2018-03-27  7:31 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522068878-3964-1-git-send-email-jens.breitenstein@wago.com \
    --to=jens.breitenstein@wago.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox