Bug 728706 - Unowned /usr/share/systemtap dirs
Summary: Unowned /usr/share/systemtap dirs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Deepak Bhole
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-06 15:42 UTC by Ville Skyttä
Modified: 2011-09-07 03:44 UTC (History)
9 users (show)

Fixed In Version: java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of: 681637
Environment:
Last Closed: 2011-09-07 03:44:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ville Skyttä 2011-08-06 15:42:18 UTC
java-1.7.0-openjdk has the same problem as java-1.6.0-openjdk.


+++ This bug was initially created as a clone of Bug #681637 +++

mock-chroot> rpm -qf /usr/share/systemtap
file /usr/share/systemtap is not owned by any package
mock-chroot> rpm -qf /usr/share/systemtap/tapset/
file /usr/share/systemtap/tapset is not owned by any package
mock-chroot> rpm -qf /usr/share/systemtap/tapset/x86_64/
file /usr/share/systemtap/tapset/x86_64 is not owned by any package
mock-chroot> rpm -qf /usr/share/systemtap/tapset/x86_64/*
java-1.6.0-openjdk-devel-1.6.0.0-53.1.9.6.fc15.x86_64
java-1.6.0-openjdk-devel-1.6.0.0-53.1.9.6.fc15.x86_64
java-1.6.0-openjdk-devel-1.6.0.0-53.1.9.6.fc15.x86_64

java-1.6.0-openjdk-devel should either own the /usr/share/systemtap, /usr/share/systemtap/tapset, and /usr/share/systemtap/tapset/$arch dirs or depend on a package that owns them.

--- Additional comment from mjw on 2011-03-02 15:02:38 EST ---

We discussed this a bit on systemtap irc. The consensus seemed to be
that if a package has a tapset then it should be put under the appropriate
/usr/share/systemtap/tapset/ directory, but the package doesn't need
to depend on systemtap because it can function without it just fine.
So the package needs to own (%dir) those directories.

This seems to be what https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership says under "The directory is owned by a package which is not required for your package to function".

--- Additional comment from ville.skytta on 2011-03-02 15:09:57 EST ---

Agreed.

--- Additional comment from jvanek on 2011-06-14 04:08:34 EDT ---

openjdk dvel already owns /usr/share/systemtap/tapset/%{_build_cpu}/*.stp

Isn't that enough?

--- Additional comment from jvanek on 2011-06-14 04:21:47 EDT ---

Created attachment 504620 [details]
proposed aptch to openjdk specfile

--- Additional comment from jvanek on 2011-06-14 04:24:56 EDT ---

For what purpose we need to own systemtap directory at all?

--- Additional comment from ville.skytta on 2011-06-14 17:20:33 EDT ---

(In reply to comment #4)
> Created attachment 504620 [details]
> proposed aptch to openjdk specfile

If I read the patch correctly, it's not enough - it'd still leave /usr/share/systemtap and %tapsetdir (e.g. /usr/share/systemtap/tapset/x86_64) unowned.

(In reply to comment #5)
> For what purpose we need to own systemtap directory at all?

http://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership

--- Additional comment from mjw on 2011-06-15 04:00:34 EDT ---

(In reply to comment #6)
> (In reply to comment #5)
> > For what purpose we need to own systemtap directory at all?
> 
> http://fedoraproject.org/wiki/Packaging/Guidelines#File_and_Directory_Ownership

AHA. Thanks. Indeed. systemtap would normally own /usr/share/systemtap
and subdirectories. But systemtap isn't a hard dependency for this package.
Those tapsets are just placed there in case a user wants to use them
so systemtap, if installed, can easily find them. So the -devel package
should also own the directories.

--- Additional comment from jvanek on 2011-06-15 05:54:52 EDT ---

Created attachment 504835 [details]
patch based on comment 6 and 7

--- Additional comment from ville.skytta on 2011-06-15 17:01:59 EDT ---

(In reply to comment #8)
> Created attachment 504835 [details]
> patch based on comment 6 and 7

That would leave /usr/share/systemtap and /usr/share/systemtap/tapset unowned.  Something like this should fix it properly (untested):

diff --git a/java-1.6.0-openjdk.spec b/java-1.6.0-openjdk.spec
index 3b2612b..7985376 100644
--- a/java-1.6.0-openjdk.spec
+++ b/java-1.6.0-openjdk.spec
@@ -133,3 +133,4 @@
 #%define tapsetdir	/usr/share/systemtap/tapset/%{sdkdir}
-%define tapsetdir	/usr/share/systemtap/tapset/%{_build_cpu}
+%define tapsetroot	/usr/share/systemtap
+%define tapsetdir	%{tapsetroot}/tapset/%{_build_cpu}
 %endif
@@ -865,3 +866,3 @@ exit 0
 %ifarch %{jit_arches}
-%{tapsetdir}/*.stp
+%{tapsetroot}
 %endif

Comment 1 Ville Skyttä 2011-08-06 15:44:40 UTC
Fix for java-1.7.0-openjdk (still untested):

diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index e85a0dc..4693e75 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -154,3 +154,4 @@
 # aka build_cpu as architecture specific directory name.
-%global tapsetdir /usr/share/systemtap/tapset/%{_build_cpu}
+%global tapsetroot	/usr/share/systemtap
+%global tapsetdir	%{tapsetroot}/tapset/%{_build_cpu}
 %endif
@@ -1350,3 +1351,3 @@ exit 0
 %ifarch %{jit_arches}
-%{tapsetdir}/*.stp
+%{tapsetroot}
 %endif

Comment 2 Fedora Update System 2011-08-29 18:44:45 UTC
java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16

Comment 3 Fedora Update System 2011-08-30 20:36:23 UTC
Package java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-09-07 03:44:27 UTC
java-1.7.0-openjdk-1.7.0.0-0.1.20110803.1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.