Skip to contentSkip to conversation

libxenstore should be executable

PATCH In review Jeremy Katz 4 participants 5 messages Jul 4, 2006 – Jul 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxenstore should be executable

Shared libraries are supposed to be installed +x

Jeremy

tools/xenstore/Makefile +1 -1
diff -r fd6d12935b56 tools/xenstore/Makefile
@@ -171,7 +171,7 @@ install: all
 	$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
 	$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
-	$(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
+	$(INSTALL_PROG) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
 	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
 	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Jeremy Katz

Shared libraries are supposed to be installed +x

No. Most of them can't be executed.

Bastian

Signature · 2 lines
Many Myths are based on truth
		-- Spock, "The Way to Eden",  stardate 5832.3
#2 lore raw
In reply to Jeremy Katz
Quoted 10 lines · Jeremy Katz

Shared libraries are supposed to be installed +x

Jeremy

diff -r fd6d12935b56 tools/xenstore/Makefile

tools/xenstore/Makefile install: all · line 176

Quoted 7 lines
tools/xenstore/Makefile +1 -1
@@ -171,7 +171,7 @@ install: all
 	$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
 	$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
-	$(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
+	$(INSTALL_PROG) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
 	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
 	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include

I don't think that needed (almost all libraries in my /usr/lib are -x). Even then you shouldn't call INSTALL_**PROG** but just create an INSTALL_LIB or somethign similar..

Signature · 1 line
Vincent Hanquez
#3 lore raw
Quoted 6 lines · Vincent Hanquez
Quoted 1 line · Jeremy Katz

Shared libraries are supposed to be installed +x

I don't think that needed (almost all libraries in my /usr/lib are -x). Even then you shouldn't call INSTALL_**PROG** but just create an INSTALL_LIB or somethign similar..

Shared libs have traditionally been installed as executables due to some long ago accidents of implementation in historical Unixes. And there are various tools which "expect" it (... and this is why they get created as executable by default by ld).

Switching to INSTALL_LIB here although I think the whole "define all the ways you're going to use install" in this makefile a _smidge_ overkill

Jeremy

tools/xenstore/Makefile +2 -1
diff -r fd6d12935b56 tools/xenstore/Makefile
@@ -5,6 +5,7 @@ INSTALL         = install
 INSTALL         = install
 INSTALL_DATA	= $(INSTALL) -m0644
 INSTALL_PROG    = $(INSTALL) -m0755
+INSTALL_LIBS    = $(INSTALL) -m0755
 INSTALL_DIR     = $(INSTALL) -d -m0755
 
 PROFILE=#-pg
@@ -171,7 +172,7 @@ install: all
 	$(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
 	$(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
-	$(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
+	$(INSTALL_LIBS) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
 	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
 	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
Quoted 15 lines · Jeremy Katz

[-- text/plain, encoding 7bit, charset: ISO-8859-1, 20 lines --]

Quoted 6 lines · Vincent Hanquez
Quoted 1 line · Jeremy Katz

Shared libraries are supposed to be installed +x

I don't think that needed (almost all libraries in my /usr/lib are -x). Even then you shouldn't call INSTALL_**PROG** but just create an INSTALL_LIB or somethign similar..

Shared libs have traditionally been installed as executables due to some long ago accidents of implementation in historical Unixes. And there are various tools which "expect" it (... and this is why they get created as executable by default by ld).

Quoted 4 lines

Switching to INSTALL_LIB here although I think the whole "define all the ways you're going to use install" in this makefile a _smidge_ overkill

I think that this patch is corret (well, perhaps execpt for the _smidge_ bit). I believe that it is general practice for make install and the like to install shared libraries as executables for the reason that you give above. Though it is common practice for distros to remove the executable bit as part of their packaging process - which explains why many people won't see it when they go and check /usr/lib, but is of little concern to this patch.

Acked: Horms <[email protected]>

Signature · 3 lines
Horms                                           
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/