Hi.

If i do the sequence "./configure make make install" for host side tools, and 
if i'am not root, the install fail.

I think we should not need to be root for succedd the install.

So i suggest this patch.

I'am not sure it is the good solution.

Regards.
Index: packages/devs/eth/synth/ecosynth/current/host/Makefile.am
===================================================================
RCS file: 
/cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am,v
retrieving revision 1.4
diff -u -5 -r1.4 Makefile.am
--- packages/devs/eth/synth/ecosynth/current/host/Makefile.am   29 Jan 2009 
17:48:16 -0000      1.4
+++ packages/devs/eth/synth/ecosynth/current/host/Makefile.am   25 Sep 2009 
18:10:53 -0000
@@ -80,12 +80,12 @@
 rawether.$(OBJEXT)     : Makefile ../src/protocol.h
 
 ## The rawether program needs to run with root privileges, or it will
 ## be unable to access the ethernet hardware.
 install-data-hook:
-       chown root $(etherdir)/rawether
-       chmod u+s $(etherdir)/rawether
+       if [ `id -u` = 0 ] ; then chown root $(etherdir)/rawether ; fi
+       if [ `id -u` = 0 ] ; then chmod u+s $(etherdir)/rawether  ; fi
 
 else
 ## When automake scans for hooks it does not take conditionals fully
 ## into account. If the conditional is not satisfied the generated
 ## makefile will still try to invoke the hook, so dummy hooks are needed.
Index: packages/devs/eth/synth/ecosynth/current/host/Makefile.in
===================================================================
RCS file: 
/cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.in,v
retrieving revision 1.6
diff -u -5 -r1.6 Makefile.in
--- packages/devs/eth/synth/ecosynth/current/host/Makefile.in   23 Aug 2009 
13:07:45 -0000      1.6
+++ packages/devs/eth/synth/ecosynth/current/host/Makefile.in   25 Sep 2009 
18:10:53 -0000
@@ -708,12 +708,12 @@
 
 
 @supported_t...@rawether.$(OBJEXT)     : Makefile ../src/protocol.h
 
 @supported_t...@install-data-hook:
-...@supported_true@    chown root $(etherdir)/rawether
-...@supported_true@    chmod u+s $(etherdir)/rawether
+...@supported_true@    if [ `id -u` = 0 ] ; then chown root 
$(etherdir)/rawether ; fi
+...@supported_true@    if [ `id -u` = 0 ] ; then chmod u+s 
$(etherdir)/rawether  ; fi
 
 @supported_fa...@install-data-hook:
 @SUPPORTED_FALSE@      echo Nothing to be done for this platform
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: packages/io/usb/slave/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/host/Makefile.am,v
retrieving revision 1.5
diff -u -5 -r1.5 Makefile.am
--- packages/io/usb/slave/current/host/Makefile.am      29 Jan 2009 17:49:49 
-0000      1.5
+++ packages/io/usb/slave/current/host/Makefile.am      25 Sep 2009 18:11:03 
-0000
@@ -95,12 +95,12 @@
        $(INSTALL_PROGRAM) usbhost $(bindir)/usbho...@package_version@
        rm -f $(bindir)/usbhost
        $(LN_S) $(bindir)/usbho...@package_version@ $(bindir)/usbhost
 
 install-data-hook:
-       chown root $(usbauxdir)/usbchmod
-       chmod u+s $(usbauxdir)/usbchmod
+       if [ `id -u` = 0 ] ; then chown root $(usbauxdir)/usbchmod ; fi
+       if [ `id -u` = 0 ] ; then chmod u+s $(usbauxdir)/usbchmod  ; fi
 
 else
 
 ## When automake scans for hooks it does not take conditionals fully
 ## into account. If the conditional is not satisfied the generated
Index: packages/io/usb/slave/current/host/Makefile.in
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/host/Makefile.in,v
retrieving revision 1.6
diff -u -5 -r1.6 Makefile.in
--- packages/io/usb/slave/current/host/Makefile.in      18 Aug 2008 13:34:29 
-0000      1.6
+++ packages/io/usb/slave/current/host/Makefile.in      25 Sep 2009 18:11:03 
-0000
@@ -658,12 +658,12 @@
 @SUPPORTED_TRUE@       $(INSTALL_PROGRAM) usbhost 
$(bindir)/usbho...@package_version@
 @SUPPORTED_TRUE@       rm -f $(bindir)/usbhost
 @SUPPORTED_TRUE@       $(LN_S) $(bindir)/usbho...@package_version@ 
$(bindir)/usbhost
 
 @supported_t...@install-data-hook:
-...@supported_true@    chown root $(usbauxdir)/usbchmod
-...@supported_true@    chmod u+s $(usbauxdir)/usbchmod
+...@supported_true@    if [ `id -u` = 0 ] ; then chown root 
$(usbauxdir)/usbchmod ; fi
+...@supported_true@    if [ `id -u` = 0 ] ; then chmod u+s 
$(usbauxdir)/usbchmod  ; fi
 
 @supported_fa...@install-exec-hook:
 @SUPPORTED_FALSE@      echo Nothing to be done for this platform
 
 @supported_fa...@install-data-hook:

Reply via email to