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

softhsm: init -> 2.1.0 #12071

Closed
wants to merge 1 commit into from
Closed

softhsm: init -> 2.1.0 #12071

wants to merge 1 commit into from

Conversation

leenaars
Copy link
Contributor

@leenaars leenaars commented Jan 1, 2016

SoftHSM is an implementation of a cryptographic store accessible through a PKCS #11 interface. You can use it to explore PKCS #11 without having a Hardware Security Module. It is being developed as a part of the OpenDNSSEC project. SoftHSM uses Botan for its cryptographic operations.

meta = {
homepage = https://www.opendnssec.org/softhsm/;
description = "cryptographic store accessible through a PKCS #11 interface";
license = stdenv.lib.licenses.bsd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no stdenv.lib.licenses.bsd license

@exi
Copy link
Contributor

exi commented Jan 1, 2016

@leenaars Why close the pull request? More packages are always welcome. If my tone was too strict, i sincerely apologize.

@leenaars
Copy link
Contributor Author

leenaars commented Jan 1, 2016

Hi there, Github automatically closed it when I send a forced updated of my branch on the server. I was trying to fix the commit while looking at the output of the continuous build, so I somehow missed your comments. I will resubmit, because it is really useful software.

@exi
Copy link
Contributor

exi commented Jan 1, 2016

@leenaars strange, i always force-push my branches and github never closes it.

@leenaars
Copy link
Contributor Author

leenaars commented Jan 1, 2016

I don't know what triggered it. I guess the fact that I removed the commits referenced in the pull request caused it. The whole juggling of branches has quite a learning curve anyway...

I've fixed the space before the ], I'll research your comment on the /etc. Any suggestion?

@exi
Copy link
Contributor

exi commented Jan 1, 2016

@leenaars Thanks. Sadly i'm not that familiar with that part myself (not enough to know how it should be done properly). Best course of action would be to ask in the nixos irc channel.
@ip1981 @devhell @globin any ideas?

@leenaars leenaars reopened this Jan 1, 2016
@leenaars
Copy link
Contributor Author

leenaars commented Jan 1, 2016

Searching through the repo it seems there are many packages that similarly use $out/etc. Any suggestions very welcome.

@ip1981
Copy link
Contributor

ip1981 commented Jan 2, 2016

It usually requires runtime configuration by systemd services.

@leenaars
Copy link
Contributor Author

leenaars commented Jan 4, 2016

Softhsm is intended to be used mainly as a library [1], I'm told it in the typical usage scenario it is not actually necessary to configure it with systemd or the likes - if any configuration is needed at all, system variables will do. I've moved softhsm to development/libraries.

I've also removed the unnecessary dependency on unzip, and checked that it still builds.

[1] https://wiki.opendnssec.org/display/SoftHSMDOCS/SoftHSM+Documentation+v2.0

@@ -3090,7 +3090,7 @@ let
};

snort = callPackage ../applications/networking/ids/snort { };

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove that trailing whitespace. :)

@leenaars
Copy link
Contributor Author

leenaars commented Jan 6, 2016

I have rebased the patch, and removed the extra spaces.

"--with-crypto-backend=botan"
"--with-botan=${botan}"
"--sysconfdir=$out/etc"
"--localstatedir=$out/var"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it expect to write things to $out/var ... because that would fail since it's not possible to write to the store. I'm not sure what the correct path would be, is there a suitable default?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually we just use /var in the other recipes

@zimbatm
Copy link
Member

zimbatm commented Feb 26, 2016

@leenaars almost there ! Can you rebase and squash your commits ?

@leenaars
Copy link
Contributor Author

@zimbatm: I've rebased and squashed, and pointed localstatedir to /var. Anything else I should do?

@zimbatm
Copy link
Member

zimbatm commented Feb 27, 2016

@leenaars /var/lib/softhsm/tokens is now part of the package but I suppose it needs to be writable right ?

@leenaars
Copy link
Contributor Author

@zimbatm: you are right, that is exactly where I got stuck. As you can see, I tried creating /var/lib/softhsm/tokens during preInstall, but even as root that action is not allowed. When localstatedir is set to /var, install-data-hook fails with "No such file or directory" ...

@fpletz
Copy link
Member

fpletz commented Feb 28, 2016

It looks like you will have to patch the Makefile so it doesn't create these files/directories, or if they are needed let the Makefile install them into $out somewhere and make sure softhsm can find it.

@zimbatm
Copy link
Member

zimbatm commented Feb 28, 2016

@leenaars either patch the Makefile or remove it after install: postInstall = "rm -rf $out/var";. The issue is that the /nix/store is mounter read-only and you are never supposed to write to it (only the nix-daemon can do such thing).
After install if the binary complains that /var/lib/softhsm/tokens doesn't exist, you could make a wrapper that mkdir -p /var/lib/softhsm/tokens before executing the program.

@leenaars leenaars force-pushed the shsm branch 2 times, most recently from 76096bf to e73d2e4 Compare April 18, 2016 08:51
@leenaars leenaars changed the title softhsm: init -> 2.0.0 softhsm: init -> 2.1.0 Apr 18, 2016
@leenaars
Copy link
Contributor Author

Meanwhile a new release has been made, v. 2.1.0. I've included that release with the suggestion from @zimbatm. Apologies for the long delay.

@zimbatm
Copy link
Member

zimbatm commented Apr 18, 2016

👍 it looks like some of the earlier fixes has been lost so I fixed them and pushed 38c5319 to master. Thanks !

@zimbatm zimbatm closed this Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants