linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Create libdir directory before installing libperf-jvmti.so
@ 2017-01-06 22:18 Laura Abbott
  2017-01-08 14:24 ` Jiri Olsa
  2017-01-12  8:28 ` [tip:perf/core] perf jvmti: " tip-bot for Laura Abbott
  0 siblings, 2 replies; 3+ messages in thread
From: Laura Abbott @ 2017-01-06 22:18 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Laura Abbott, Alexander Shishkin, linux-kernel

The install command for libperf-jvmti.so does not check if libdir exists
before installing. This means that when the install command is run:

install libperf-jvmti.so '/tmp/test_root/usr/lib64';

libperf-jvmti.so will get installed to /usr/lib64 as a file and break further
installation. Fix this by ensuring the directory gets created first.

See https://bugzilla.redhat.com/show_bug.cgi?id=1410296

Fixes: d4dfdf00d43e ("perf jvmti: Plug compilation into perf build")
Signed-off-by: Laura Abbott <labbott@redhat.com>
---
For full disclosure, Fedora is setting NO_JVMTI but this should still be fixed
to allow it to be turned on in the future.
---
 tools/perf/Makefile.perf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 8fc2482..7db8ff0 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -661,6 +661,7 @@ ifndef NO_PERF_READ_VDSOX32
 endif
 ifndef NO_JVMTI
 	$(call QUIET_INSTALL, $(LIBJVMTI)) \
+		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \
 		$(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)';
 endif
 	$(call QUIET_INSTALL, libexec) \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf tools: Create libdir directory before installing libperf-jvmti.so
  2017-01-06 22:18 [PATCH] perf tools: Create libdir directory before installing libperf-jvmti.so Laura Abbott
@ 2017-01-08 14:24 ` Jiri Olsa
  2017-01-12  8:28 ` [tip:perf/core] perf jvmti: " tip-bot for Laura Abbott
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2017-01-08 14:24 UTC (permalink / raw)
  To: Laura Abbott
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Jiri Olsa,
	Alexander Shishkin, linux-kernel

On Fri, Jan 06, 2017 at 02:18:08PM -0800, Laura Abbott wrote:
> The install command for libperf-jvmti.so does not check if libdir exists
> before installing. This means that when the install command is run:
> 
> install libperf-jvmti.so '/tmp/test_root/usr/lib64';
> 
> libperf-jvmti.so will get installed to /usr/lib64 as a file and break further
> installation. Fix this by ensuring the directory gets created first.
> 
> See https://bugzilla.redhat.com/show_bug.cgi?id=1410296
> 
> Fixes: d4dfdf00d43e ("perf jvmti: Plug compilation into perf build")
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
> For full disclosure, Fedora is setting NO_JVMTI but this should still be fixed
> to allow it to be turned on in the future.

Acked-by: Jiri Olsa <jolsa@redhat.com>

I have patches for fedora to install that, looks like you guys
are not planning to enable it, so I'll post it soon ;-)

thanks,
jirka

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf jvmti: Create libdir directory before installing libperf-jvmti.so
  2017-01-06 22:18 [PATCH] perf tools: Create libdir directory before installing libperf-jvmti.so Laura Abbott
  2017-01-08 14:24 ` Jiri Olsa
@ 2017-01-12  8:28 ` tip-bot for Laura Abbott
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Laura Abbott @ 2017-01-12  8:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, acme, peterz, labbott, linux-kernel, tglx,
	alexander.shishkin, jolsa, mingo

Commit-ID:  cd7f355ac4067177e0a45e7331d11472bd7fd7ca
Gitweb:     http://git.kernel.org/tip/cd7f355ac4067177e0a45e7331d11472bd7fd7ca
Author:     Laura Abbott <labbott@redhat.com>
AuthorDate: Fri, 6 Jan 2017 14:18:08 -0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 11 Jan 2017 16:48:00 -0300

perf jvmti: Create libdir directory before installing libperf-jvmti.so

The install command for libperf-jvmti.so does not check if libdir exists
before installing. This means that when the install command is run:

install libperf-jvmti.so '/tmp/test_root/usr/lib64';

libperf-jvmti.so will get installed to /usr/lib64 as a file and break
further installation. Fix this by ensuring the directory gets created
first.

See https://bugzilla.redhat.com/show_bug.cgi?id=1410296

Signed-off-by: Laura Abbott <labbott@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: d4dfdf00d43e ("perf jvmti: Plug compilation into perf build")
Link: http://lkml.kernel.org/r/1483741088-13543-1-git-send-email-labbott@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 8bb16aa..4da19b6 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -661,6 +661,7 @@ ifndef NO_PERF_READ_VDSOX32
 endif
 ifndef NO_JVMTI
 	$(call QUIET_INSTALL, $(LIBJVMTI)) \
+		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \
 		$(INSTALL) $(OUTPUT)$(LIBJVMTI) '$(DESTDIR_SQ)$(libdir_SQ)';
 endif
 	$(call QUIET_INSTALL, libexec) \

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-12  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 22:18 [PATCH] perf tools: Create libdir directory before installing libperf-jvmti.so Laura Abbott
2017-01-08 14:24 ` Jiri Olsa
2017-01-12  8:28 ` [tip:perf/core] perf jvmti: " tip-bot for Laura Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).