Bug 548758 - Frinika deposits a solib in my homedir when I create a project.
Summary: Frinika deposits a solib in my homedir when I create a project.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: flexdock
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: D Haley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-18 14:27 UTC by Gwyn Ciesla
Modified: 2010-02-06 00:05 UTC (History)
2 users (show)

Fixed In Version: 0.5.1-15.fc11
Clone Of:
Environment:
Last Closed: 2010-02-06 00:05:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gwyn Ciesla 2009-12-18 14:27:01 UTC
Description of problem:
Mystery solib with macro names in path appears after I open Frinika and create a new project.

~/%{_libdir}/%{_name}/RubberBand-linux-x86.so

Version-Release number of selected component (if applicable):
frinika-0.6.0-1.fc12.noarch

How reproducible:
Open Frinika.  Start new project.  ls ~.

Steps to Reproduce:
1. See above.
2.
3.
  
Actual results:
See above.

Expected results:
No mystery solib in homedir.

Additional info:

Comment 1 Orcan Ogetbil 2009-12-19 07:59:16 UTC
Thanks for the report. I also found a %{_libdir} directory somewhere inside my home directory a while ago but I couldn't figure out what package generated it. Actually the %{_libdir} directory is created where you invoke the "frinika" executable.

The bug is in the flexdock package and I am assigning it to its maintainer.

The flexdock-jni.patch is wrong. It contains the line:
+        File file = new File("%{_libdir}/%{name}");
but java does not know about the spec file macros! We shouldn't use these macros in java source files.

Comment 2 Orcan Ogetbil 2009-12-19 08:11:15 UTC
D Haley,
A possible solution is to replace that line with 
+   File file = new File(System.getProperty("library.directory") + "/flexdock");
and pass a -Dlibrary.directory=%{_libdir} flag to ant.

Comment 3 D Haley 2009-12-19 08:33:41 UTC
The patch is correct, what is incorrect is the sed line that modifies the patch in the spec file. I have rebuilt the SRPMs and confirmed that it is working. I will upload to updates shortly.

Comment 4 D Haley 2009-12-19 08:35:56 UTC
Just to keep things rolling, here is the patch:

--- flexdock.spec	24 Jul 2009 22:53:25 -0000	1.3
+++ flexdock.spec	19 Dec 2009 08:35:10 -0000
@@ -1,6 +1,6 @@
 Name:		flexdock
 Version:	0.5.1
-Release:	14%{?dist}
+Release:	15%{?dist}
 Summary:	Docking framework for Java Swing GUI apps
 
 Group:		Development/Libraries
@@ -55,18 +55,17 @@
 %setup -qc
 
 #Modify the jni dir that is hardcoded in the patch
-cp -pf %{PATCH0} %{PATCH0}.tmp
-sed -i 's!%%{_libdir}/%%{name}/!%{_libdir}/%{name}/!' %{PATCH0}
+cp %{PATCH0} ./tmpJniPatch
+sed -i 's!%%{_libdir}/%%{name}!%{_libdir}/%{name}!' tmpJniPatch
+
 #Apply patches
-%patch0
+#Apply patch0
+patch -p 1 --fuzz=0 < tmpJniPatch
 %patch1
 %patch2
 %patch3
 %patch4
 
-#restore patch0
-mv %{PATCH0}.tmp %{PATCH0}
-
 #Override the build file's default hard-coded paths
 echo "sdk.home=%{_jvmdir}/java" > workingcopy.properties
 
@@ -160,9 +159,11 @@
 
 
 %changelog
+* Sat Dec 19 2009 <mycae(a!t)yahoo.com> 0.5.1-15
+- Fix patch to match sed expression
+- Don't modify jni patch in-place
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng.org> - 0.5.1-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
 * Sat Mar 28 2009 <mycae(a!t)yahoo.com> 0.5.1-13
 - Version bump due to tag mess
 * Thu Mar 26 2009 <mycae(a!t)yahoo.com> 0.5.1-12

Comment 5 Orcan Ogetbil 2009-12-19 08:45:54 UTC
Thanks for the ultra quick fix.

Sorry I didn't check the spec file for a sed. One possible trick you could use is to use something fancy like LIBDIRNAME in the patch and sed that string in the spec file. That way you don't have to worry about %'s and /'s.

Or one can do the trick in comment #2, which is a quite clean solution without the need to sed the patch.

Comment 6 Fedora Update System 2009-12-22 04:47:41 UTC
flexdock-0.5.1-15.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update flexdock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-13462

Comment 7 Fedora Update System 2010-02-06 00:05:40 UTC
flexdock-0.5.1-15.fc11 has been pushed to the Fedora 11 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.