ocaml-opam / opam-publish

A tool to ease contributions to opam repositories
https://opam.ocaml.org
Other
40 stars 21 forks source link

Remove the need for valid SSH keys linked to your github when using opam-publish #154

Closed kit-ty-kate closed 1 year ago

kit-ty-kate commented 1 year ago

Fixes https://github.com/ocaml/opam/issues/5620

cc @johnwhitington if you haven't added SSH keys to your profile yet, could you try if this fixes your issue?

johnwhitington commented 1 year ago

Thanks.

I downloaded the master of opam-publish and substituted your new publishSubmit.ml. Then I ran make. Then, make install failed, so I ran dune build @install as suggested.

It still doesn't work - same error as before.

Can you suggest a way to check that the new opam publish plugin was actually installed, as a first step?

kit-ty-kate commented 1 year ago

Then, make install failed

what did it fail with? Does it work with the latest commit?

Can you suggest a way to check that the new opam publish plugin was actually installed, as a first step?

opam plugins are simple executables with the opam- prefix, so you can simply run ./opam-publish it should work all the same.

The way opam <plugin name> works is, when opam doesn't know a subcommand name, it looks at binaries installed in $OPAMROOT/plugins/bin (by default: ~/.opam/plugins/bin), usually those will be symlinks to binaries installed in a specific switch. These symlinks are added for any packages that have the plugin flag and have a binary prefixed with opam-

kit-ty-kate commented 1 year ago

Does it work with the latest commit?

oops i forgot to push said commit. It's done now.

johnwhitington commented 1 year ago

Sadly, it has gone from bad to worse, though not your fault. I can't even build opam_publish now:

$ make
dune build @install
File "src/dune", line 4, characters 7-18:
4 |  (name publishMain)
           ^^^^^^^^^^^
ld: warning: directory not found for option '-L/opt/homebrew/Cellar/openssl@3/3.1.1_1/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "caml_startup", line 1:
Error: Error during linking (exit code 1)

I have OpenSSL 3.1.2 installed, so I have no idea where dune is picking up -L/opt/homebrew/Cellar/openssl@3/3.1.1_1/lib from. I suppose there has been a recent upgrade.

I started with a fresh checkout of opam_publish and substituted the two patched files. So it's not left over from the last attempt.

kit-ty-kate commented 1 year ago

Does opam reinstall conf-libssl fix this issue for you?

kit-ty-kate commented 1 year ago

@johnwhitington i deleted your comment due to it containing an <elided> token (you forgot one). I'd recommend you remove access to this token in case some bot got access to it while it was still up (i tried to edit it out but edition history still exists)

Anyway, this seems to show that this PR is quite dangerous and does not work. I'll close this then, sorry for the bother.

Let's continue the discussion in https://github.com/ocaml-opam/opam-publish/issues/155 (the original opam issue is not the right place as opam-publish is a separate plugin)

johnwhitington commented 1 year ago

Thanks. Github auto-revoked the key, happily!