This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 210544 - qt4-qsa: uses/installs-to invalid paths
qt4-qsa: uses/installs-to invalid paths
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: qt4-qsa (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Frank Büttner
Fedora Extras Quality Assurance
: Reopened
Depends On: 213382
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-12 15:50 EDT by Rex Dieter
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-14 07:01:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
workaround hard-coded uses of $QTDIR (4.13 KB, patch)
2006-10-12 15:51 EDT, Rex Dieter
no flags Details | Diff
specfile patch to use QT_INSTALL patch and fix remaining path issues (2.59 KB, patch)
2006-10-12 15:52 EDT, Rex Dieter
no flags Details | Diff
The build log (101.86 KB, text/plain)
2006-10-13 05:07 EDT, Frank Büttner
no flags Details
The spec file for the problem. (4.60 KB, text/plain)
2006-10-19 12:37 EDT, Frank Büttner
no flags Details
PAATCH: fix qsa.pro to allow FHS compliant build (777 bytes, patch)
2007-02-12 09:34 EST, Hans de Goede
no flags Details | Diff
spec file with mods needed together with patch to fix this (4.88 KB, text/plain)
2007-02-12 09:36 EST, Hans de Goede
no flags Details

  None (edit)
Description Rex Dieter 2006-10-12 15:50:22 EDT
As-is, qt4-qsa installs files into the following invalid locations:

%_libdir/qt4/%{_lib}
%_libdir/qt4/mkspecs/

When it *should* be using
%_libdir
%_datadir/qt4/mkspecs
respectively

patches forthcoming.
Comment 1 Rex Dieter 2006-10-12 15:51:37 EDT
Created attachment 138365 [details]
workaround hard-coded uses of $QTDIR
Comment 2 Rex Dieter 2006-10-12 15:52:34 EDT
Created attachment 138366 [details]
specfile patch to use QT_INSTALL patch and fix remaining path issues
Comment 3 Frank Büttner 2006-10-12 16:29:12 EDT
fixed
Comment 4 Frank Büttner 2006-10-13 05:07:26 EDT
Created attachment 138411 [details]
The build log
Comment 5 Frank Büttner 2006-10-13 05:08:36 EDT
The patch will not work, because the lib file and the mkspec file get lost.
Comment 6 Rex Dieter 2006-10-19 10:23:06 EDT
While not perfect, the patch indeed WORKSFORME, and nothing appears to "get
lost", unless your idea/definition of "get lost" is different than mine. (:  

Here's the file list output of my mock build (on fc6/i386) using the patch: 
$ rpm -qlp qt4-qsa-1*.rpm
/usr/lib/libqsa.so.1
/usr/lib/libqsa.so.1.2
/usr/share/doc/qt4-qsa-1.2.1
/usr/share/doc/qt4-qsa-1.2.1/LICENSE.GPL
/usr/share/doc/qt4-qsa-1.2.1/README
/usr/share/doc/qt4-qsa-1.2.1/changes-1.2.1

$ rpm -qlp qt4-qsa-devel-1*.rpm
/usr/include/qsaglobal.h
/usr/include/qsconfig.h
/usr/include/qseditor.h
/usr/include/qsinputdialogfactory.h
/usr/include/qsinterpreter.h
/usr/include/qsobjectfactory.h
/usr/include/qsproject.h
/usr/include/qsscript.h
/usr/include/qsutilfactory.h
/usr/include/qsworkbench.h
/usr/include/qswrapperfactory.h
/usr/lib/libqsa.so
/usr/share/qt4/mkspecs/features/qsa.prf
/usr/share/doc/qt4-qsa-devel-1.2.1
...
Comment 7 Frank Büttner 2006-10-19 10:36:23 EDT
take a look in the build log, you fill find, that package don't contains the
libs:( using mock will will get an rpm package without the lib.
Comment 8 Rex Dieter 2006-10-19 10:41:08 EDT
(BTW, I did use mock on comment #6 and it did include the lib)

Further, if it your build in comment #4 indeed didn't include the libs, then the
build would have *failed* because the following bits in %files would have been
missing/not-found:

%files
...
%{qtlib}/libqsa.so.*

%files devel
...
%{qtlib}/libqsa.so
Comment 9 Frank Büttner 2006-10-19 11:28:00 EDT
I have try it 6 timses. The rpm files don't have any libs:( It only contains the
doc files, the include files and the links. but not the binary lib:(
And when look in the log file you will find the problem.
cp: cannot create regular file `/usr/share/qt4/mkspecs/features/qsa.prf':
Permission denied
chmod: cannot access `/usr/share/qt4/mkspecs/features/qsa.prf': No such file or
directory
ln: creating symbolic link `/usr/include/qsaglobal.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsaglobal.h': Permission
denied
ln: creating symbolic link `/usr/include/qsobjectfactory.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsobjectfactory.h':
Permission denied
ln: creating symbolic link `/usr/include/qswrapperfactory.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qswrapperfactory.h':
Permission denied
ln: creating symbolic link `/usr/include/qseditor.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qseditor.h': Permission
denied
ln: creating symbolic link `/usr/include/qsproject.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsproject.h': Permission
denied
ln: creating symbolic link `/usr/include/qsinterpreter.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsinterpreter.h':
Permission denied
ln: creating symbolic link `/usr/include/qsinputdialogfactory.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsinputdialogfactory.h':
Permission denied
ln: creating symbolic link `/usr/include/qsutilfactory.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsutilfactory.h':
Permission denied
ln: creating symbolic link `/usr/include/qsscript.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsscript.h': Permission
denied
ln: creating symbolic link `/usr/include/qsconfig.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/qsa/qsconfig.h': Permission
denied
ln: creating symbolic link `/usr/include/qsworkbench.h' to
`/builddir/build/BUILD/qsa-x11-opensource-1.2.1/src/ide/qsworkbench.h':
Permission denied
mv: cannot move `libqsa.so.1.2.1' to `/usr/lib/libqsa.so.1.2.1': Permission denied
mv: cannot move `libqsa.so' to `/usr/lib/libqsa.so': Permission denied
mv: cannot move `libqsa.so.1' to `/usr/lib/libqsa.so.1': Permission denied
mv: cannot move `libqsa.so.1.2' to `/usr/lib/libqsa.so.1.2': Permission denied
make[3]: [/usr/lib/libqsa.so.1.2.1] Error 1 (ignored)
install: cannot stat `/usr/lib/libqsa.so.1.2.1': No such file or directory
make[3]: [install_target] Error 1 (ignored)
Comment 10 Rex Dieter 2006-10-19 11:38:19 EDT
You sure you weren't still trying to use
./configure -release -prefix %{qtdir}
instead of 
./configure -release
?
Comment 11 Rex Dieter 2006-10-19 11:41:52 EDT
OK, we may have hit an rpm bug here, because despite that
rpm -qlp qt4-qsa-1*.rpm
returns
/usr/lib/libqsa.so.1
/usr/lib/libqsa.so.1.2

After installing it, I get
$ rpm -V qt4-qsa
missing     /usr/lib/libqsa.so.1
missing     /usr/lib/libqsa.so.1.2

??
Comment 12 Frank Büttner 2006-10-19 12:31:26 EDT
Very interesting. Now we need someone with internal rpm knowledge.
I try to find the used spec file, witch generates the buggy file.
Comment 13 Frank Büttner 2006-10-19 12:37:19 EDT
Created attachment 138882 [details]
The spec file for the problem.
Comment 14 Rex Dieter 2006-10-19 12:44:17 EDT
I have verified, at least, that all files to get installed, *except* for
libqsa.so.1.2.1
(arguably, the most important one).  Clearly, the patch is insufficient as-is.
Comment 15 Laurent Rineau 2006-11-08 09:11:24 EST
Can this bug be corrected in the fc5 branch too, please?

It seems that the package for FC-5 is quite out-of-sync with FC-6 and devel.
Comment 16 Frank Büttner 2006-11-08 09:19:42 EST
This is not an bug of QSA. It is an Bug in the qt4 package, because the
maintainer breaks the Qt rules for placing files. But he won't fix it. So there
is no chance  that QSA can place the files correct. The correct path file Qt
files are /usr/lib/qt/lib,/usr/lib/qt/bin and /usr/lib/qt/include.
Comment 17 Laurent Rineau 2006-11-08 09:41:35 EST
<sigh>

Please, Rex and Frank, try to find an agreement on that.

As is, the qt4-qsa package is broken. Just try to build an example provided in 
the package qt4-qsa-devel, and you will have such compile errors:

main.cpp:42:23: error: qsaglobal.h: No such file or directory
main.cpp:44:22: error: qseditor.h: No such file or directory

The reason is that qmake-qt4 assumes that headers are in /usr/include/.
Comment 18 Rex Dieter 2006-11-08 09:52:46 EST
Frank and I clearly disagree here, as highlighted by his counter bug #213382
claiming this to be qt4's fault.  Per my suggestion in bug #213382c#2:

"Seriously, the problems with qt4-qsa are of it's own making.  I'd suggest
contacting upstream(1) about it, and offerring the partial patch we have as a
starting point.
(1) qsa-interest on http://lists.trolltech.com/
"
NOTE: I've been watching the qsa-interest ml, nothing has been mentioned there
about this (yet).

Frank, please stop pointing fingers and engage upstream on this, especially if
you're unable/unwilling to fixup the last deficiency in the patch(es) I've provided.
Comment 19 Frank Büttner 2006-11-08 09:59:19 EST
I have tell you many times to add symlinks to your package, to correct your path
break. But until you do it I an do nothing.
Comment 20 Rex Dieter 2006-11-08 10:07:46 EST
Packaging files that follow symlinks is a *bad idea*.  Besides, symlinks would
only be a bandaid to the real problem, and wouldn't be anywhere near a
proper/acceptable fix here.
Comment 21 Rex Dieter 2006-11-08 10:33:25 EST
For completeness, this issue was raised in the package review, see bug #191589
comment #27 in particular.  Further, I had warned/threatened that qt_includedir
and qt_libdir would likely change, see qt4 review (bug #188180) and bug #196901
"qt4: make FHS-friendly".
Comment 22 Laurent Rineau 2006-12-05 10:35:22 EST
Rex and Frank, do you accept that we write mail to fedora-extras-devel, to get 
new opinion on that bug? Eventually, Fesco could decide.

The situation seems stuck.
Comment 23 Rex Dieter 2006-12-05 11:16:59 EST
I'm open to the idea of further discussion and the possibility of FESCo
intervention, if need.  Laurent, would you mind making the post to fedora-extras
to expedite things? (I'm biased/tainted).  

To be completely forthright, I've already discussed this with some folks at the
FedoraSummit, and the consensus was that qt4-qsa really does need to be fixed. 
Comment 24 Frank Büttner 2006-12-05 12:23:02 EST
This can be an option.
Comment 25 Laurent Rineau 2006-12-06 09:30:50 EST
I am pleased to see that you are both accepting the idea of a mail to the 
list.

(In reply to comment #23)
> Laurent, would you mind making the post to fedora-extras
> to expedite things? (I'm biased/tainted).  

I understand. My proposal was actually to write the mail myself. I will try to 
find the time to write a nice email today or tomorrow.
Comment 26 Dennis Gilmore 2007-01-04 10:41:29 EST
OK,  As the person trying to work out the best way to handle this.
What has upstream said on this subject?
Comment 27 Rex Dieter 2007-01-04 14:12:16 EST
FYI, looks like qt4-qsa will have a short lifespan, anyway:
http://www.trolltech.com/products/qt/lifecyclestatement/
to be incorporated (in some form) into qt-4.3
Comment 28 Frank Büttner 2007-01-04 14:28:25 EST
Yes and the 1.2.2 will contains a warning about it.
I hope TT will include the script engine in Qt 4.3 for all releases and not only
in the commercial one.
Comment 29 Laurent Rineau 2007-02-08 08:52:50 EST
Please make that bug fixed! QSA is actually unusable under FC-6. :-(
Comment 30 Rex Dieter 2007-02-08 09:06:20 EST
I'd have to say the best (short-term anyway) solution would be to do something
like:  fake the existence of %qtdir/lib during build, and manually move the
resulting files to the proper location (%_libdir) afterward.
Comment 31 Laurent Rineau 2007-02-08 09:29:59 EST
What about the qsa.prf file, which tells qmake how to compile with qsa?
Comment 32 Rex Dieter 2007-02-08 09:36:43 EST
Shouldn't qsa.prf go in %_datadir/qt4/mkspecs/features ?
Comment 33 Laurent Rineau 2007-02-08 09:43:02 EST
Yes. But it should also be coherent with the installation.

For the moment, I have a qsa.prf file which contains a line
  INCLUDEPATH += /usr/lib/qt4
We should make sure that this file is updated if QSA headers move to another 
place.
Comment 34 Frank Büttner 2007-02-08 09:48:47 EST
Until the Qt package is not changed no chance to fix it.
Comment 35 Dennis Gilmore 2007-02-08 10:01:26 EST
Frank i have look at this  and the qt4  package is doing the right think by 
being FHS compliant.  in turn this means the qsa also must be FHS compliant.  

it can be fixed with a small amount of work.  Even less work if you work with 
upstream  to make it do the right thing there?

Frank as i have asked previously  What does upstream say on the issue?  have 
you engaged them at all?  Fedora's moto is to work upstream and have the fixes 
done there and naturally flow back to us.  Have you done this?
Comment 36 Frank Büttner 2007-02-08 10:31:13 EST
No, the first qt4 package was ok, then the maintainer of it change the place of
the files and the trouble begins. So he must placed the files back to first
solution, like it is done in the Qt3 package.
Comment 37 Dennis Gilmore 2007-02-08 10:38:50 EST
Frank,  What was done to qt4  was advertised and is perfectly fine.  
qsa must meet the FHS guidelines

What has upstream said about this?  Have you even spoken with them?  
Comment 38 Hans de Goede 2007-02-09 03:34:26 EST
Frank, Dennis has asked me as your sponsor to intervene here, so here I am.

Frank please listen to Dennis and Rex, they are right it was decided in a 122
(?!) comment review that qt4 should not follow trolltech's broken dir layout but
instead should be FHS compliant. Yes this choice causes pain for qt4-qsa and
will probably also cause pain for some other packages but it is the right choice!

So the next step would be to go and fix qt4-qsa. If you lack the technical
autoxxx / autohell skills to fix this, then that is perfectly understandable and
not a problem. Just say so and ask for help, then I or someone else can help you
and fix things for you.

I've taken a quick look and here is a hint: configure2/configutils.cpp is one of
the big offenders here. It uses qtdir with xxx/xxx and xxx/xxx appended insstead
of using things like qtinc/xxx and qtlib/xxx. That needs fixing for starters.

Comment 39 Frank Büttner 2007-02-09 10:08:52 EST
I can't spend time at now for an complete modify of the package.
When some one has some time, then please append an fix.
Comment 40 Rex Dieter 2007-02-09 15:09:54 EST
That "some one" to help could be upstream.  Suggestion: Ask *them*.

Have I mentioned you should ask upstream? (see comment #18)  Please, please?  
I promise to buy you a beer (or your prefered adult beverage of choice) at the
next FUDCon/FUDPub. (:
Comment 41 Frank Büttner 2007-02-10 03:54:35 EST
The QSA mailing list is dead. I will try to find some time but that can be
needed some time, because I have to do much work.
Comment 42 Rex Dieter 2007-02-12 09:26:28 EST
> The QSA mailing list is dead.  

OK, consider
1.  supposedly upstream ml is dead (though I've seen quite a few posts over the
past few months)
2.  This pkg is broken as-is, with no time-frame for fixing
3.  this will be obsoleted by qt-4.3 anyway
4.  Do any existing fedora packages use qt4-qsa?

would it not be wise to simply orphan this package?
Comment 43 Hans de Goede 2007-02-12 09:34:23 EST
Created attachment 147892 [details]
PAATCH: fix qsa.pro to allow FHS compliant build

(In reply to comment #42)
> > The QSA mailing list is dead.  
> 
> OK, consider
> 1.  supposedly upstream ml is dead (though I've seen quite a few posts over
the
> past few months)
> 2.  This pkg is broken as-is, with no time-frame for fixing
> 3.  this will be obsoleted by qt-4.3 anyway
> 4.  Do any existing fedora packages use qt4-qsa?
> 
> would it not be wise to simply orphan this package?

Concedering the fact that I've put about an hour into this to write a fix this
weekend, I would rather not see this orphaned :)

This patch combined with the modified specfile I'm about to attach fixes this.
Notice this does need testing, it compiles fine and puts everything in the
right  place, but thats as far as I've tested it.
Comment 44 Hans de Goede 2007-02-12 09:36:19 EST
Created attachment 147893 [details]
spec file with mods needed together with patch to fix this

All thats needed now is for you (Frank) to bump the release and write a
changelog entry and then your set.
Comment 45 Rex Dieter 2007-02-12 09:40:06 EST
Thanks Hans, you rock.
Comment 46 Frank Büttner 2007-02-13 05:55:23 EST
Thanks for help, but it will fails, because the doc files are installed in teh
wrong directory. Under /usr/share/qt4/ and not /usr/share/qt4-qsa.
Comment 47 Hans de Goede 2007-02-14 02:20:25 EST
Actually the .spec does a "rm -fr /usr/share/qt4/doc" after make install and
then add then adds the docs to %doc where they belong. What is the problem here?
Comment 48 Frank Büttner 2007-02-14 05:36:57 EST
When I try to build the new package I will get error's about installed but not
packaged files. And this one are all the doc files under /usr/share/qt4/docs/html/
Comment 49 Hans de Goede 2007-02-14 05:58:58 EST
<sigh>, thats why the spec file I attached contains:
rm -rf $RPM_BUILD_ROOT/%{qtdata}/doc

Notice doc not docS, I just tried building it (again) and it works fine.

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