Opened 9 years ago

Closed 9 years ago

#5781 closed enhancement (fixed)

qca-2.1.0

Reported by: Fernando de Oliveira Owned by: Fernando de Oliveira
Priority: normal Milestone: 7.7
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Change History (12)

comment:1 by Fernando de Oliveira, 9 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

comment:2 by Fernando de Oliveira, 9 years ago

Owner: changed from Fernando de Oliveira to blfs-book@…
Status: assignednew

I feel this is a new package.

Installs mozcerts and qcatool, instead of qcatool2

Build uses cmake and tries to install everything under qt4 tree. I had to use 12 switches (a couple, I'm not sure if correctly chosen by me).

Comes with plugins (durectory chosen by me)

/usr/share/qca-2.1.0/plugins/crypto/libqca-nss.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-gcrypt.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-cyrus-sasl.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-ossl.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-softstore.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-gnupg.so
/usr/share/qca-2.1.0/plugins/crypto/libqca-logger.so

I think it is not for kde4.

Giving back to the book, so people more knowlegeable of kde could make a final judgment/discussion.

comment:3 by bdubbs@…, 9 years ago

I'm not sure I understand the issue completely. Is the only thing the installation directories? I did:

cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
make DESTDIR=/tmp/qca install

And it did install in /tmp/qca/opt/qt-5.2.1/. I tried to run qcatool and mozcerts from /tmp and they both segfaulted on me. I'm not sure if that's because I ran from ssh without any qt apps (e.g. kde) or not.

After some experimentation, I found that the CMakeCache.txt is doing things I didn't want, so I deleted it.

Now I tried:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQCA_INSTALL_IN_QT_PREFIX=no ..

and got:

QCA prefix is /usr
Plugins will be installed to /usr/lib/qca
Binary will be installed to /usr/bin
Library will be installed to /usr/lib
Public headers will be installed to /usr/include
Private headers will be installed to /usr/include
Feature file will be installed to /usr/mkspecs/features
Documentation will be installed to /usr/share/doc/qca/html
Man page will be installed to /usr/share/man
Pkg-config file will be installed to /usr/lib/pkgconfig

The overrides needed then would be Feature file and Documentation (but there is no documentation to be installed. The examples directory appears to be the tests).

HOWEVER: The Feature file (mkspecs/features/crypto.prf) really needs to be in the /opt/qt/mkspecs/features directory, so that's a complication. It really indicates to me that this package should be reinstalled each time Qt is upgraded with QCA_INSTALL_IN_QT_PREFIX=yes (the default).

Finally, this seems to be right:

cmake -DCMAKE_INSTALL_PREFIX=$QT4DIR \
      -DQT4_BUILD:BOOL=ON            \
      ..
make
make test

If both qt4 and 5 are installed, it probably needs to be installed in both places.

Also the MANPATH will need to be adjusted:

pathappend $QT4DIR/share/man MANPATH

The qcatool.1 man page is identical to the old qcatool2.1 man page.

in reply to:  3 comment:4 by Fernando de Oliveira, 9 years ago

Replying to bdubbs@…:

I'm not sure I understand the issue completely. Is the only thing the installation directories? I did:

The older version uses autotools and is installed all in /usr.

It is in the book only for kdelibs 4. So, I supposed everything should be at /usr, in order to be found, because it was where the old one was. Or a new install of kdelibs seemed to be necessary.

cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
make DESTDIR=/tmp/qca install

And it did install in /tmp/qca/opt/qt-5.2.1/.

Almost the same with me, I instructed to use qt4, because it is what kde4 uses (am i right saying this?), as you, below, so, installation tried to be in /tmp/qca/opt/qt-4.something/.

After some experimentation, I found that the CMakeCache.txt is doing things I didn't want, so I deleted it.

Happened to me, too.

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DQCA_INSTALL_IN_QT_PREFIX=no ..

Think I missed that.

QCA prefix is /usr
Plugins will be installed to /usr/lib/qca
Binary will be installed to /usr/bin
Library will be installed to /usr/lib
Public headers will be installed to /usr/include
Private headers will be installed to /usr/include
Feature file will be installed to /usr/mkspecs/features
Documentation will be installed to /usr/share/doc/qca/html
Man page will be installed to /usr/share/man
Pkg-config file will be installed to /usr/lib/pkgconfig

That is very good!

The overrides needed then would be Feature file and Documentation (but there is no documentation to be installed. The examples directory appears to be the tests).

HOWEVER: The Feature file (mkspecs/features/crypto.prf) really needs to be in the /opt/qt/mkspecs/features directory, so that's a complication. It really indicates to me that this package should be reinstalled each time Qt is upgraded with QCA_INSTALL_IN_QT_PREFIX=yes (the default).

That was one of my concerns.

Finally, this seems to be right:

cmake -DCMAKE_INSTALL_PREFIX=$QT4DIR \
      -DQT4_BUILD:BOOL=ON            \
      ..
make
make test

If both qt4 and 5 are installed, it probably needs to be installed in both places.

Well, not now, I think, while only kdelibs 4 needs it.

Also the MANPATH will need to be adjusted:

pathappend $QT4DIR/share/man MANPATH

The qcatool.1 man page is identical to the old qcatool2.1 man page.

Problem really is: it is in the book just for kdelibs 4. Will it use this version of qca?

remember that it installs qcatool, not qcatool2.

comment:5 by Fernando de Oliveira, 9 years ago

What I had:

mkdir build &&
cd    build &&
cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release \
      -DPKGCONFIG_INSTALL_PREFIX=/usr/lib/pkgconfig \
      -DQCA_BINARY_INSTALL_DIR=/usr/bin \
      -DQCA_DOC_INSTALL_DIR=/usr/share/doc/qca-2.1.0/html \
      -DQCA_INCLUDE_INSTALL_DIR=/usr/include/ \
      -DQCA_LIBRARY_INSTALL_DIR=/usr/lib \
      -DQCA_MAN_INSTALL_DIR=/usr/share/man \
      -DQCA_PREFIX_INSTALL_DIR=/usr \
      -DQCA_FEATURE_INSTALL_DIR=/usr/share/qca-2.1.0/mkspecs/features \
      -DQCA_PLUGINS_INSTALL_DIR=/usr/share/qca-2.1.0/plugins \
      -DQCA_PRIVATE_INCLUDE_INSTALL_DIR=/usr/include \
      -DQT4_BUILD=ON \
      .. &&
$ tree
.
└── usr
    ├── bin
    │   ├── mozcerts
    │   └── qcatool
    ├── include
    │   └── QtCrypto
    │       ├── qca_basic.h
    │       ├── qca_cert.h
    │       ├── qca_core.h
    │       ├── qca_export.h
    │       ├── qca.h
    │       ├── qca_keystore.h
    │       ├── qcaprovider.h
    │       ├── qca_publickey.h
    │       ├── qca_safetimer.h
    │       ├── qca_securelayer.h
    │       ├── qca_securemessage.h
    │       ├── qca_support.h
    │       ├── qca_textfilter.h
    │       ├── qca_tools.h
    │       ├── qca_version.h
    │       ├── qpipe.h
    │       └── QtCrypto
    ├── lib
    │   ├── cmake
    │   │   └── Qca
    │   │       ├── QcaConfig.cmake
    │   │       ├── QcaConfigVersion.cmake
    │   │       ├── QcaTargets.cmake
    │   │       └── QcaTargets-release.cmake
    │   ├── libqca.so -> libqca.so.2
    │   ├── libqca.so.2 -> libqca.so.2.1.0
    │   ├── libqca.so.2.1.0
    │   └── pkgconfig
    │       └── qca2.pc
    └── share
        ├── man
        │   └── man1
        │       └── qcatool.1
        └── qca-2.1.0
            ├── mkspecs
            │   └── features
            │       └── crypto.prf
            └── plugins
                └── crypto
                    ├── libqca-cyrus-sasl.so
                    ├── libqca-gcrypt.so
                    ├── libqca-gnupg.so
                    ├── libqca-logger.so
                    ├── libqca-nss.so
                    ├── libqca-ossl.so
                    └── libqca-softstore.so
Last edited 9 years ago by Fernando de Oliveira (previous) (diff)

comment:6 by Fernando de Oliveira, 9 years ago

Sorry, I included the commands I was using to find the switches. Edited previous comment to put the actual commands used to obtain the tree following it.

comment:7 by bdubbs@…, 9 years ago

One thing to keep in mind is to look at mkspecs/features/crypto.prf. This file needs to be available to applications when running qmake and that is, by default, $QT?DIR/mkspecs/features.

"qmake lets you create your own features that can be included in project files by adding their names to the list of values specified by the CONFIG variable. Features are collections of custom functions and definitions in .prf files that can reside in one of many standard directories. The locations of these directories are defined in a number of places, and qmake checks each of them in the following order when it looks for .prf files:

In a directory listed in the QMAKEFEATURES environment variable; this contains a colon-separated list of directories."

http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html#adding-new-configuration-features

So if the crypto.prf is somewhere else, an environment variable QMAKEFEATURES must be set properly. The .prf file also describes the location of teh qca include and library files, but I suspect they would be found if in /usr/include or /usr/lib.

This package should really be put in the Qt directory tree.

comment:8 by Fernando de Oliveira, 9 years ago

Thanks. I am learning a lot with this, so I am glad to keep discussing.

OK. I showed what I did, but not as disagreeing with you. It is exactly because I noticed that it was trying get installed at Qt, while the version in the book is at /usr, that I consider not able to make the final decision.

If considering the package by itself, no problem, I would not have worried.

But it seems to be in the book just for kdelibs 4.

Do you think that there will be no problem updating this package?

Kdelibs 4 will not be broken?

Will be necessary a reinstall of kdelibs 4, Each Qt update ?

I am a little worried doing the tests and definitively breaking KDE, but I can do it later and update the package in Qt4, if you think there is no problem.

comment:9 by Fernando de Oliveira, 9 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

All seems OK.

Needed to reinstall akonadi-1.13.0, which was not working anymore, and just to be safe, kdelibs-4.14.2.

So, will update the book.

comment:10 by Fernando de Oliveira, 9 years ago

Interesting that in the older version in the book, we have

--prefix=/usr

and

Installed Directories: $QT4DIR/include/QtCrypto

when actually I had:

/usr/include/QtCrypto/

Only now I noticed that installed directory, different from what I have. What must have been wrong is prefix, that should have been $QT4DIR.

If I had that, I would not have been so confused!

Probably you have the correct values in your script.

Now, I undertand why it was so difficult for us to understand each other.

All will be fixed in the update.

comment:11 by Fernando de Oliveira, 9 years ago

Almost fixed at r14867.

Thanks for the discussion and patience, Bruce.

I am leaving open, because I am not sure if all dependencies are there nor if they are properly distributed.

Other ajustments might be necessary

If you prefer, please take it and, please, make the fixes.

comment:12 by Fernando de Oliveira, 9 years ago

Resolution: fixed
Status: assignedclosed

As I had no comments, will close it.

Bruce, thanks again.

Note: See TracTickets for help on using tickets.