Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate prefix in installation of tests directory in v1.2.2. #389

Closed
darkshram opened this issue May 8, 2018 · 3 comments
Closed

Duplicate prefix in installation of tests directory in v1.2.2. #389

darkshram opened this issue May 8, 2018 · 3 comments

Comments

@darkshram
Copy link

@darkshram darkshram commented May 8, 2018

If built with PREFIX=/usr, then the tests directory installs as /usr/usr/lib64/qt5/tests/qtpass. If PREFIX is ommited, then tests install in /usr/lib64/qt5/tests/qtpass, but qtpass installs as /usr/local/bin/qtpass.

Also, the qtpass.spec file to create rpm package sets PREFIX=%{buildroot}/%{_bindir}, which does not make sense, because everything will install under /builddir/build/BUILDROOT/qtpass-1.2.2-1.fc14.al.x86_64/usr/bin. Example: /builddir/build/BUILDROOT/qtpass-1.2.2-1.fc14.al.x86_64/usr/bin/usr/bin/qtpass.

@darkshram
Copy link
Author

@darkshram darkshram commented May 8, 2018

Fixed this issue to create a clean RPM package doing a roll-back to #345 using the following patch:

diff -Naur QtPass-1.2.2.orig/tests/tests.pri QtPass-1.2.2/tests/tests.pri
--- QtPass-1.2.2.orig/tests/tests.pri	2018-05-07 09:24:20.000000000 -0500
+++ QtPass-1.2.2/tests/tests.pri	2018-05-08 10:04:31.915824868 -0500
@@ -3,5 +3,5 @@
 CONFIG += testcase qt warn_on depend_includepath testcase
 QT += testlib widgets
 
-target.path = $$PREFIX$$[QT_INSTALL_TESTS]/qtpass/$$TARGET
+target.path = $$[QT_INSTALL_TESTS]/qtpass/$$TARGET
 INSTALLS += target

The spec file used the following:

%build
%qmake_qt5 PREFIX=%{_prefix}
%make_build V=1

%install
%make_install INSTALL_ROOT=%{buildroot}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications qtpass.desktop
install -Dpm 644 artwork/icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/qtpass-icon.svg
install -Dpm 644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
@annejan
Copy link
Member

@annejan annejan commented May 9, 2018

Same issue in FreeBSD

===>   Registering installation for qtpass-1.2.2
pkg-static: Unable to access file /usr/ports/sysutils/qtpass/work/stage/usr/local/share/qt5/tests/qtpass/util/tst_util:No such file or directory
*** Error code 74
@annejan
Copy link
Member

@annejan annejan commented May 9, 2018

Perhaps we should exclude the tests from the install target all-together . .

@annejan annejan closed this in 9ec78e1 May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants