Skip to content

bug: softhsm package should be softhsm2? #3916

@polarathene

Description

@polarathene

Preflight checklist

Ory Network Project

No response

Describe the bug

The Github Actions CI and Dockerfiles seem to rely on softhsm as a package for the HSM tests.

In a PR I recently opened this was a failure as the package could not be found. The version of Ubuntu is not pinned, although I'm not sure why the failure wasn't caught prior to my PR as my PR has nothing to do with that CI workflow AFAIK?

The Docker images use Debian as a base where softhsm is still a valid package name, there's also softhsm2 there and the softhsm debian package does bring in softhsm2 implicitly.

The last version of Ubuntu with the softhsm package appears to be 16.04. Github Actions test runner is using ubuntu-latest. All newer versions of Ubuntu pacakge that binary in the softhsm2 package.

Reproducing the bug

Both Ubuntu and Debian have a softhsm2 package, only Debian has the softhsm pacakge (brings in softhsm2). Should be resolved and consistent with all package installs preferring the softhsm2 package instead.


Ubuntu failure:

$ docker run --rm -it -e DEBIAN_FRONTEND=noninteractive ubuntu:24.04 bash -c 'apt-get -qq update && apt-get -qq install -y softhsm'

E: Unable to locate package softhsm

Ubuntu success by using softhsm2 instead of softhsm:

$ docker run --rm -it -e DEBIAN_FRONTEND=noninteractive ubuntu:24.04 bash -c 'apt-get -qq update && apt-get -qq install -y softhsm2'

Creating config file /etc/softhsm/softhsm2.conf with new version
Setting up libsofthsm2 (2.6.1-2.2ubuntu3) ...
Setting up softhsm2 (2.6.1-2.2ubuntu3) ...

Debian success with softhsm or softhsm2:

$ docker run --rm -it -e DEBIAN_FRONTEND=noninteractive debian:bookworm-slim bash -c 'apt-get -qq update && apt-get -qq install -y softhsm'

# ...

Creating config file /etc/softhsm/softhsm2.conf with new version
Setting up libsofthsm2 (2.6.1-2.1) ...
Setting up softhsm2 (2.6.1-2.1) ...
Setting up softhsm (2.6.1-2.1) ...
$ docker run --rm -it -e DEBIAN_FRONTEND=noninteractive debian:bookworm-slim bash -c 'apt-get -qq update && apt-get -qq install -y softhsm2'

# ...

Creating config file /etc/softhsm/softhsm2.conf with new version
Setting up libsofthsm2 (2.6.1-2.1) ...
Setting up softhsm2 (2.6.1-2.1) ...

Relevant log output

See above reproduction output or while available, [this CI run failure](https://github.com/ory/hydra/actions/runs/12523819546/job/34933781514?pr=3914).

Relevant configuration

No response

Version

2.2.0

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

Originally investigated in this PR due to CI failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions