lkml.org 
[lkml]   [2013]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH trace-cmd 2/5] build: Install data files without execute permissions
On Fri, Oct 25, 2013 at 04:31:33AM -0400, Steven Rostedt wrote:
> On Thu, 2013-10-24 at 14:14 -0500, Seth Forshee wrote:
> > diff --git a/Makefile b/Makefile
> > index 1964949..2423038 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -86,7 +86,8 @@ ifeq ($(shell sh -c "python-config --includes > /dev/null 2>&1 && echo y"), y)
> > PYTHON_PLUGINS := plugin_python.so
> > BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
> > PYTHON_SO_INSTALL := ctracecmd.install
> > - PYTHON_PY_INSTALL := event-viewer.install tracecmd.install tracecmdgui.install
> > + PYTHON_PY_PROGS := event-viewer.install
> > + PYTHON_PY_LIBS := tracecmd.install tracecmdgui.install
> > endif
> > endif # NO_PYTHON
> >
> > @@ -506,21 +507,32 @@ define do_install
> > $(INSTALL) $1 '$(DESTDIR_SQ)$2'
> > endef
> >
> > +define do_install_data
> > + $(print_install) \
> > + if [ ! -d '$(DESTDIR_SQ)$2' ]; then \
> > + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \
> > + fi; \
> > + $(INSTALL) -m 644 $1 '$(DESTDIR_SQ)$2'
> > +endef
> > +
> > $(PLUGINS_INSTALL): %.install : %.so force
> > - $(Q)$(call do_install,$<,$(plugin_dir_SQ))
> > + $(Q)$(call do_install_data,$<,$(plugin_dir_SQ))
> >
> > install_plugins: $(PLUGINS_INSTALL)
> >
> > $(PYTHON_SO_INSTALL): %.install : %.so force
> > - $(Q)$(call do_install,$<,$(python_dir_SQ))
> > + $(Q)$(call do_install_data,$<,$(python_dir_SQ))
>
> Hmm, I never realized that shared libraries are not suppose to be
> executable. At first I thought this was a mistake, but looking at other
> shared libraries on my system, it seems a lot are not executable
> (although many are, but those may also be made by people like myself who
> thought there were suppose to be).

I don't know that it's a hard and fast rule, but what guidance I found
from searching online was in favor of them not being executable. That
kind of makes sense, since they can't be executed directly (at least not
the ones that trace-cmd installs).

If you disagree, it won't hurt my feelings if you drop those changes, so
long as you keep the ones which makes sure things like .png files aren't
executable ;-)

Thanks,
Seth


\
 
 \ /
  Last update: 2013-10-25 15:21    [W:0.053 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site