Bug 742396

Summary: Is mispackaged
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: freemedformsAssignee: Ankur Sinha (FranciscoD) <sanjay.ankur>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: lakshminaras2002, mrceresa, sanjay.ankur, thinklinux.ssh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.7.5-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-19 08:53:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Schwendt 2011-09-29 23:46:36 UTC
Review request: bug 707002

You've put all the .so libs into a freemedforms-devel package, not noticing that these are stored in a private path and are plugins/modules and not development symlinks.

As a result, there even is an automatic circular dependency between the -devel package and its base package. Trying to install "freemedforms" pulls in "freemedforms-devel" due to automatic SONAME dependencies and vice versa.

Comment 1 Narasimhan 2011-09-30 03:23:25 UTC
Hi Michael,
I noticed this during the review. But  because of this item in the review list

[] If a package contains library files with a suffix (e.g.libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.

I thought that it was necessary to put those libs in the devel package. Is that item applicable only to libraries under /usr/lib or /usr/lib64?

Comment 2 Michael Schwendt 2011-09-30 10:44:11 UTC
No, the MUST is applicable only to files which are needed for _development_ only, such as when compiling/building software.

The ReviewGuidelines entry is too brief to give the rationale. The linked page in the PackagingGuidelines is this:

https://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages


For every installed shared library (whether a softlink or not and whether versioned or not), you need to distinguish between library files needed at run-time (such as plug-ins or modules loaded by the program) and library files needed only when compiling/linking software.

It doesn't matter _where_ you find the library files and _what_ file names they have. There cannot be a hard rule to put all .so files into -devel packages. That won't work. All that matters is _how_ the files are used at run-time and build-time. A program may load its private plug-ins via either a libfoo.so softlink or directly via a versioned libfoo.so.1 file.

For ordinary library packages, typically the .so file is just the softlink needed during development only. For application packages, which contain libraries, you need to decide carefully whether to handle the libraries as in ordinary library packages or whether some or all of them are just plug-ins.

Comment 3 Michael Schwendt 2011-10-02 11:36:04 UTC
A fruitful discussion of how to filter the Provides/Requires can be found in bug 652971 comment 38 and onwards.

Comment 4 Ankur Sinha (FranciscoD) 2011-10-02 11:51:47 UTC
Hi Michael, 

Thank you for bringing this to our notice. I shall make the required changes whenever I can get time. 

Regards,
Ankur

Comment 5 Ankur Sinha (FranciscoD) 2012-06-26 20:27:42 UTC
Hi Michael,

Sorry for the delay. I've removed the devel package and filtered the provides. Does this look okay?:

http://pkgs.fedoraproject.org/gitweb/?p=freemedforms.git;a=blob;f=freemedforms.spec;h=0ad257118de3115926a6c3f2677c2b778bf8836a;hb=4f8baa93c703e6f021deed650e449b2afb3c051e

koji build for rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=4198605

Thanks,
Ankur

Comment 6 Michael Schwendt 2012-06-26 21:00:57 UTC
Have you tried to install it?

Comment 7 Ankur Sinha (FranciscoD) 2012-06-27 05:00:42 UTC
Well, no point apparently. Builds and installs, and crashes.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4199141

I'll update to latest upstream and see how that goes. If the filtering is correct, please close this bug. 

Thanks,
Ankur

Comment 8 Ankur Sinha (FranciscoD) 2012-06-27 05:31:20 UTC
On looking at http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering

I probably need to remove the versioned so files it generates from requires and provides too, since they're private and shouldn't be advertised as global. I'll put all these fixes in the new spec for the new upstream release.

Comment 9 Michael Schwendt 2012-06-27 09:40:58 UTC
> Builds and installs, …

Really? The reason I asked that *sneaky* question in comment 6 is because I saw lots of Requires for those private/local .so files.

;)

Comment 10 Ankur Sinha (FranciscoD) 2012-06-27 10:09:00 UTC
(In reply to comment #9)
> > Builds and installs, …
> 
> Really? The reason I asked that *sneaky* question in comment 6 is because I
> saw lots of Requires for those private/local .so files.
> 
> ;)

Aye, I fixed that, hence the new build :P

Comment 11 Michael Schwendt 2012-06-27 11:05:59 UTC
$ rpm -q freemedforms
freemedforms-0.5.9-0.6.alpha1.fc17.x86_64

$ rpm -q --provides freemedforms|grep ^lib
libAggregation.so.1()(64bit)  
libExtensionSystem.so.1()(64bit)  
libMedicalUtils.so.1()(64bit)  
libTranslationUtils.so.1()(64bit)  

Those are from private libs stored in %_libdir/freemedforms/ and since they are versioned, they are much more dangerous than non-versioned SONAME Provides.

Interestingly, qt-creator also provides them:

# repoquery --whatprovides 'libAggregation.so.1()(64bit)' 
qt-creator-0:2.4.1-2.fc17.x86_64
freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
# repoquery --whatprovides 'libUtils.so.1()(64bit)'
qt-creator-0:2.4.1-2.fc17.x86_64
freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
# repoquery --whatprovides 'libExtensionSystem.so.1()(64bit)'
qt-creator-0:2.4.1-2.fc17.x86_64
freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
# repoquery --whatprovides 'libMedicalUtils.so.1()(64bit)'
freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
# repoquery --whatprovides 'libTranslationUtils.so.1()(64bit)'
freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
#



> If the filtering is correct, please close this bug. 

Please add this ticket number to the update you submit in bodhi.

Comment 12 Ankur Sinha (FranciscoD) 2012-06-27 11:42:35 UTC
(In reply to comment #11)
> $ rpm -q freemedforms
> freemedforms-0.5.9-0.6.alpha1.fc17.x86_64
> 
> $ rpm -q --provides freemedforms|grep ^lib
> libAggregation.so.1()(64bit)  
> libExtensionSystem.so.1()(64bit)  
> libMedicalUtils.so.1()(64bit)  
> libTranslationUtils.so.1()(64bit)  


> 
> Those are from private libs stored in %_libdir/freemedforms/ and since they
> are versioned, they are much more dangerous than non-versioned SONAME
> Provides.

Corrected this in the latest commit. Build underway.

> 
> Interestingly, qt-creator also provides them:
> 
> # repoquery --whatprovides 'libAggregation.so.1()(64bit)' 
> qt-creator-0:2.4.1-2.fc17.x86_64
> freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
> # repoquery --whatprovides 'libUtils.so.1()(64bit)'
> qt-creator-0:2.4.1-2.fc17.x86_64
> freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
> # repoquery --whatprovides 'libExtensionSystem.so.1()(64bit)'
> qt-creator-0:2.4.1-2.fc17.x86_64
> freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
> # repoquery --whatprovides 'libMedicalUtils.so.1()(64bit)'
> freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
> # repoquery --whatprovides 'libTranslationUtils.so.1()(64bit)'
> freemedforms-0:0.5.9-0.2.alpha1.fc17.x86_64
> #
> 

Aye, I remember having a talk with upstream about this during the initial packaging. Maybe it's time to talk again.

> 
> 
> > If the filtering is correct, please close this bug. 
> 
> Please add this ticket number to the update you submit in bodhi.

Sure. 

This is the current requires, provides scenario (which has the above mentioned errors corrected)

== freemedforms-0.7.5-2.fc18.src.rpm ==
Provides:

Requires:
qt-devel  
libXext-devel  
qt-mysql  
desktop-file-utils  
quazip-devel  
libzip-devel  
minizip-devel  
zlib-devel  

== freemedforms-0.7.5-2.fc18.x86_64.rpm ==
Provides:
freemedforms = 0.7.5-2.fc18
freemedforms(x86-64) = 0.7.5-2.fc18

Requires:
freemedforms-emr(x86-64) >= 0.7.5-2.fc18

== freemedforms-common-libs-0.7.5-2.fc18.x86_64.rpm ==
Provides:
freemedforms-common-libs = 0.7.5-2.fc18
freemedforms-common-libs(x86-64) = 0.7.5-2.fc18

Requires:

== freemedforms-debuginfo-0.7.5-2.fc18.x86_64.rpm ==
Provides:
freemedforms-debuginfo = 0.7.5-2.fc18
freemedforms-debuginfo(x86-64) = 0.7.5-2.fc18

Requires:

== freemedforms-emr-0.7.5-2.fc18.x86_64.rpm ==
Provides:
freemedforms-emr = 0.7.5-2.fc18
freemedforms-emr(x86-64) = 0.7.5-2.fc18

Requires:
freemedforms-emr-data >= 0.7.5-2.fc18
freemedforms-common-libs(x86-64) >= 0.7.5-2.fc18
libc.so.6()(64bit)  
libc.so.6(GLIBC_2.14)(64bit)  
libc.so.6(GLIBC_2.2.5)(64bit)  
libgcc_s.so.1()(64bit)  
libgcc_s.so.1(GCC_3.0)(64bit)  
libm.so.6()(64bit)  
libpthread.so.0()(64bit)  
libQtCore.so.4()(64bit)  
libQtGui.so.4()(64bit)  
libQtNetwork.so.4()(64bit)  
libQtSql.so.4()(64bit)  
libQtSvg.so.4()(64bit)  
libQtXml.so.4()(64bit)  
libstdc++.so.6()(64bit)  
libstdc++.so.6(CXXABI_1.3)(64bit)  
libstdc++.so.6(GLIBCXX_3.4)(64bit)  
libX11.so.6()(64bit)  
libXext.so.6()(64bit)  
rtld(GNU_HASH)  

== freemedforms-emr-data-0.7.5-2.fc18.noarch.rpm ==
Provides:
freemedforms-emr-data = 0.7.5-2.fc18

Requires:

== freemedforms-emr-docs-en-0.7.5-2.fc18.noarch.rpm ==
Provides:
freemedforms-emr-docs-en = 0.7.5-2.fc18

Requires:

== freemedforms-emr-docs-fr-0.7.5-2.fc18.noarch.rpm ==
Provides:
freemedforms-emr-docs-fr = 0.7.5-2.fc18

Requires:

== freemedforms-emr-translations-0.7.5-2.fc18.noarch.rpm ==
Provides:
freemedforms-emr-translations = 0.7.5-2.fc18

Requires:



Inspite of the package building beautifully, it still segfaults. I've asked on the freemedforms-dev google group. I won't build for the stables until we figure this error out.

Comment 13 Ankur Sinha (FranciscoD) 2012-06-28 05:31:34 UTC
Upstream suggested a tiny patch. Now it works!

Rawhide build:
http://koji.fedoraproject.org/koji/buildinfo?buildID=328071

I've pushed builds for F17 and F16 too. Will push updates as soon as they're done. 

Thanks,
Ankur

Comment 14 Fedora Update System 2012-06-28 13:16:42 UTC
freemedforms-0.7.5-6.fc16,freediams-0.7.5-5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/freemedforms-0.7.5-6.fc16,freediams-0.7.5-5.fc16

Comment 15 Fedora Update System 2012-06-28 13:17:07 UTC
freemedforms-0.7.5-6.fc17,freediams-0.7.5-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/freemedforms-0.7.5-6.fc17,freediams-0.7.5-5.fc17

Comment 16 Fedora Update System 2012-06-30 22:01:26 UTC
freediams-0.7.5-6.fc17, freemedforms-0.7.5-6.fc17 has been pushed to the Fedora 17 testing repository.

Comment 17 Fedora Update System 2012-07-19 08:53:14 UTC
freediams-0.7.5-6.fc16, freemedforms-0.7.5-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2012-07-19 08:59:50 UTC
freediams-0.7.5-6.fc17, freemedforms-0.7.5-6.fc17 has been pushed to the Fedora 17 stable repository.