Comment 8 for bug 2003669

Revision history for this message
Frank Heimes (fheimes) wrote :

Hmm, the situation was a bit weird, with all the different shared object files and their various links in the opencryptoki packages.
I have to correct myself a bit, the libopencryptoki0 package should only have numbered so (ref. the ABI), and libopencryptoki-dev had the so w/o number, but just as indicator and hint for the linker.
There should usually no so w/o number in the opencryptoki or libopencryptoki0 (according to the Debian Policy).

So the opencryptoki-$(target_cpu).conf' file is an approach to address this.
Interestingly, all files in etc/ld.so.conf.d generated by make were explicitly removed (in debian/rules) before the installation.
And that has been already for a long time.
Means so far everyone (incl. me) has probably used the PKCSLIB environment variable.

While spending some time on this package I guess I've found a way to avoid the need of installing the -dev package.
I reactivated the conf, set it accordingly, changed some of the .install and -link files - and did some update on the package on top (to compact 13).

I tried it out on one of my systems and it seems to work:

ubuntu@hwe0009:~$ p11sak list-key all --slot 1
-bash: /usr/sbin/p11sak: No such file or directory
ubuntu@hwe0009:~$ sudo apt install ./opencryptoki_3.20.0+dfsg-0ubuntu1.1_s390x.deb ./libopencryptoki0_3.20.0+dfsg-0ubuntu1.1_s390x.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'opencryptoki' instead of './opencryptoki_3.20.0+dfsg-0ubuntu1.1_s390x.deb'
Note, selecting 'libopencryptoki0' instead of './libopencryptoki0_3.20.0+dfsg-0ubuntu1.1_s390x.deb'
The following NEW packages will be installed:
  libopencryptoki0 opencryptoki
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/992 kB of archives.
After this operation, 4,173 kB of additional disk space will be used.
Get:1 /home/ubuntu/libopencryptoki0_3.20.0+dfsg-0ubuntu1.1_s390x.deb libopencryptoki0 s390x 3.20.0+dfsg-0ubuntu1.1 [819 kB]
Get:2 /home/ubuntu/opencryptoki_3.20.0+dfsg-0ubuntu1.1_s390x.deb opencryptoki s390x 3.20.0+dfsg-0ubuntu1.1 [174 kB]
Selecting previously unselected package libopencryptoki0:s390x.
(Reading database ... 166368 files and directories currently installed.)
Preparing to unpack .../libopencryptoki0_3.20.0+dfsg-0ubuntu1.1_s390x.deb ...
Unpacking libopencryptoki0:s390x (3.20.0+dfsg-0ubuntu1.1) ...
Selecting previously unselected package opencryptoki.
Preparing to unpack .../opencryptoki_3.20.0+dfsg-0ubuntu1.1_s390x.deb ...
Unpacking opencryptoki (3.20.0+dfsg-0ubuntu1.1) ...
Setting up libopencryptoki0:s390x (3.20.0+dfsg-0ubuntu1.1) ...
Setting up opencryptoki (3.20.0+dfsg-0ubuntu1.1) ...
addgroup: The group `pkcs11' already exists as a system group. Exiting.
adduser: The user `root' is already a member of `pkcs11'.
Created symlink /etc/systemd/system/multi-user.target.wants/pkcsslotd.service → /lib/systemd/system/pkcsslotd.service.
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for libc-bin (2.37-0ubuntu2) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date (ABI upgrades are not detected).

Failed to check for processor microcode upgrades.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
N: Download is performed unsandboxed as root as file '/home/ubuntu/libopencryptoki0_3.20.0+dfsg-0ubuntu1.1_s390x.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
ubuntu@hwe0009:~$ dpkg -l | grep opencryptoki
ii libopencryptoki0:s390x 3.20.0+dfsg-0ubuntu1.1 s390x PKCS#11 implementation (library)
ii opencryptoki 3.20.0+dfsg-0ubuntu1.1 s390x PKCS#11 implementation (daemon)
ubuntu@hwe0009:~$ p11sak list-key all --slot 1
Please enter user PIN:
ubuntu@hwe0009:~$

Since this is not directly related to this LP bug (and since this bug is already closed), I need to open a separate LP bug and will reference it here...