WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Make sure that installed files have sensible permissions

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Make sure that installed files have sensible permissions and are owned by the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Mar 2006 12:16:51 +0000
Delivery-date: Thu, 02 Mar 2006 12:23:21 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e639d53330ba6d8376b296d091f3c69152d77002
# Parent  d9f980fabc18d0e133d72bc58aa968dadfa33f8a
Make sure that installed files have sensible permissions and are owned by the
user running install. Also clean up the install script a little.

Signed-off-by: Horms <horms@xxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r d9f980fabc18 -r e639d53330ba install.sh
--- a/install.sh        Thu Mar  2 10:03:34 2006
+++ b/install.sh        Thu Mar  2 10:41:48 2006
@@ -22,19 +22,29 @@
   exit 1
 fi
 
+tmp="`mktemp -d`"
+
 echo "Installing Xen from '$src' to '$dst'..."
-(cd $src; tar -cf - --exclude etc/init.d --exclude etc/hotplug --exclude 
etc/udev * ) | tar -C $dst -xf -
-cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
-echo "All done."
+(cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
 
 [ -x "$(which udevinfo)" ] && \
   UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* 
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
 
 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
-  cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
+  echo " - installing for udev-based system"
+  rm -rf "$tmp/etc/hotplug"
 else
-  cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
+  echo " - installing for hotplug-based system"
+  rm -rf "$tmp/etc/udev"
 fi
+
+echo " - modifying permissions"
+chmod -R a+rX "$tmp"
+
+(cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
+rm -rf "$tmp"
+
+echo "All done."
 
 echo "Checking to see whether prerequisite tools are installed..."
 cd $src/../check

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Make sure that installed files have sensible permissions and are owned by the, Xen patchbot -unstable <=