Skip to content

fix: Adapt libkeyringctl/verify.py to sq CLI changes

keyringctl verify is broken with the latest sq version (0.34.0) due to changes in the command-line interface:

$ ./keyringctl verify gromit
Verify F00B96D15228013FFC9C9D0393B11DAA4C197E3D owned by gromit
error: unrecognized subcommand 'dearmor'

Usage: sq <COMMAND>

For more information, try '--help'.
hokey (hopenpgp-tools) 0.23.7
Copyright (C) 2012-2021  Clint Adams
hokey comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
hokey: expected more input, encountered end of input
CallStack (from HasCallStack):
  error, called at ./Codec/Encryption/OpenPGP/KeyringParser.hs:75:43 in hOpenPGP-2.9.8-5zNIxYhl5Oe7SrkNK2K1g:Codec.Encryption.OpenPGP.KeyringParser
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/./keyringctl", line 8, in <module>
    main()
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/cli.py", line 207, in main
    verify(
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/verify.py", line 72, in verify
    print(system(["hokey", "lint"], _stdin=keyring_fd.stdout), end="")
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/util.py", line 132, in system
    print_stack()
Traceback (most recent call last):
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/./keyringctl", line 8, in <module>
    main()
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/cli.py", line 207, in main
    verify(
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/verify.py", line 72, in verify
    print(system(["hokey", "lint"], _stdin=keyring_fd.stdout), end="")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/util.py", line 135, in system
    raise e
  File "/home/carsme/repos/gitlab.archlinux.org/archlinux/archlinux-keyring/libkeyringctl/util.py", line 129, in system
    return check_output(cmd, stderr=STDOUT, stdin=_stdin, env=env).decode()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['hokey', 'lint']' returned non-zero exit status 1.

Fix this by adapting to the following changes:

Edited by Carl Smedstad

Merge request reports

Loading