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

log-id not passed to post-build-hook #19

Closed
raboof opened this issue Jun 21, 2021 · 0 comments
Closed

log-id not passed to post-build-hook #19

raboof opened this issue Jun 21, 2021 · 0 comments

Comments

@raboof
Copy link
Contributor

raboof commented Jun 21, 2021

When I configure a publisher using the module, it automatically registers the post-build-hook, calling trustix-nix without a log-id parameter:

https://github.com/tweag/trustix/blob/9bf6f32ab9b28c49fdc12c6e7a847a2b6dc1aa00/packages/trustix-nix/nixos/post-build-hook.nix#L32

However, this parameter is mandatory:

https://github.com/tweag/trustix/blob/9bf6f32ab9b28c49fdc12c6e7a847a2b6dc1aa00/packages/trustix-nix/cmd/post-build-hook.go#L33-L35

It seems the LogID can be derived from the key type and public key, which are also present in the publisher config. Perhaps post-build-hook.nix should by default get those two fields from the publisher config, and pass them to post-build-hook.go so it can derive the LogID from them? Or am I misunderstanding how this is meant to hang together?

raboof added a commit to raboof/trustix that referenced this issue Jun 21, 2021
It seems the post-build-hook configuration option, at least on my nix
version (2.3.12), accepts only the path to an executable, not a complete
command line. Without this change I got:

```
post-build-hook: error: executing '/nix/store/g48w1vfxbl1p7rbsmd1y999g45c61r7z-trustix-dev/bin/trustix-nix post-build-hook --address /run/trustix-daemon.socket': No such file or directory
```

(even with this change it doesn't work yet because the address path needs
a `unix://` prefix to make the dialer accept it, and there's nix-community#19 and nix-community#20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant