bin/remote: Rename list-gpg-keys to gpg-list-keys

As pointed out in the original review, `gpg-list-keys` fits better
alongside the existing `gpg-import`.

Changes were done with:

```
git grep -l list-gpg-keys | xargs sed -i 's/list-gpg-keys/gpg-list-keys/'
for src in $(git ls-files '*list-gpg-keys*'); do
  dst=${src/list-gpg-keys/gpg-list-keys}
  git mv "$src" "$dst"
done
```
This commit is contained in:
Dan Nicholson 2021-08-23 11:09:24 -06:00
parent 452611e4a8
commit 58a683f8f0
7 changed files with 13 additions and 13 deletions

View File

@ -105,7 +105,7 @@ ostree_SOURCES += \
if USE_GPGME if USE_GPGME
ostree_SOURCES += \ ostree_SOURCES += \
src/ostree/ot-remote-builtin-gpg-import.c \ src/ostree/ot-remote-builtin-gpg-import.c \
src/ostree/ot-remote-builtin-list-gpg-keys.c \ src/ostree/ot-remote-builtin-gpg-list-keys.c \
$(NULL) $(NULL)
endif endif

View File

@ -152,7 +152,7 @@ _installed_or_uninstalled_test_scripts = \
if USE_GPGME if USE_GPGME
_installed_or_uninstalled_test_scripts += \ _installed_or_uninstalled_test_scripts += \
tests/test-remote-gpg-import.sh \ tests/test-remote-gpg-import.sh \
tests/test-remote-list-gpg-keys.sh \ tests/test-remote-gpg-list-keys.sh \
tests/test-gpg-signed-commit.sh \ tests/test-gpg-signed-commit.sh \
tests/test-admin-gpg.sh \ tests/test-admin-gpg.sh \
$(NULL) $(NULL)

View File

@ -1381,9 +1381,9 @@ _ostree_remote() {
delete delete
delete-cookie delete-cookie
gpg-import gpg-import
gpg-list-keys
list list
list-cookies list-cookies
list-gpg-keys
refs refs
show-url show-url
summary summary

View File

@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA.
<command>ostree remote gpg-import</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">NAME</arg> <arg choice="opt" rep="repeat">KEY-ID</arg> <command>ostree remote gpg-import</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">NAME</arg> <arg choice="opt" rep="repeat">KEY-ID</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>ostree remote list-gpg-keys</command> <arg choice="req">NAME</arg> <command>ostree remote gpg-list-keys</command> <arg choice="req">NAME</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>ostree remote refs</command> <arg choice="req">NAME</arg> <command>ostree remote refs</command> <arg choice="req">NAME</arg>
@ -112,7 +112,7 @@ Boston, MA 02111-1307, USA.
The <command>gpg-import</command> subcommand can associate GPG The <command>gpg-import</command> subcommand can associate GPG
keys to a specific remote repository for use when pulling signed keys to a specific remote repository for use when pulling signed
commits from that repository (if GPG verification is enabled). The commits from that repository (if GPG verification is enabled). The
<command>list-gpg-keys</command> subcommand can be used to see the <command>gpg-list-keys</command> subcommand can be used to see the
GPG keys currently associated with a remote repository. GPG keys currently associated with a remote repository.
</para> </para>
<para> <para>

View File

@ -44,7 +44,7 @@ static OstreeCommand remote_subcommands[] = {
{ "gpg-import", OSTREE_BUILTIN_FLAG_NONE, { "gpg-import", OSTREE_BUILTIN_FLAG_NONE,
ot_remote_builtin_gpg_import, ot_remote_builtin_gpg_import,
"Import GPG keys" }, "Import GPG keys" },
{ "list-gpg-keys", OSTREE_BUILTIN_FLAG_NONE, { "gpg-list-keys", OSTREE_BUILTIN_FLAG_NONE,
ot_remote_builtin_list_gpg_keys, ot_remote_builtin_list_gpg_keys,
"Show remote GPG keys" }, "Show remote GPG keys" },
#endif /* OSTREE_DISABLE_GPGME */ #endif /* OSTREE_DISABLE_GPGME */

View File

@ -46,7 +46,7 @@ cd ${test_tmpdir}
${OSTREE} remote add R1 http://example.com/repo ${OSTREE} remote add R1 http://example.com/repo
# No remote keyring should list no keys. # No remote keyring should list no keys.
${OSTREE} remote list-gpg-keys R1 > result ${OSTREE} remote gpg-list-keys R1 > result
assert_file_empty result assert_file_empty result
echo "ok remote no keyring" echo "ok remote no keyring"
@ -54,7 +54,7 @@ echo "ok remote no keyring"
# Make the global keyring available and make sure there are still no # Make the global keyring available and make sure there are still no
# keys found for a specified remote. # keys found for a specified remote.
OSTREE_GPG_HOME=${trusteddir} OSTREE_GPG_HOME=${trusteddir}
${OSTREE} remote list-gpg-keys R1 > result ${OSTREE} remote gpg-list-keys R1 > result
OSTREE_GPG_HOME=${emptydir} OSTREE_GPG_HOME=${emptydir}
assert_file_empty result assert_file_empty result
@ -62,7 +62,7 @@ echo "ok remote with global keyring"
# Import a key and check that it's listed # Import a key and check that it's listed
${OSTREE} remote gpg-import --keyring ${TEST_GPG_KEYHOME}/key1.asc R1 ${OSTREE} remote gpg-import --keyring ${TEST_GPG_KEYHOME}/key1.asc R1
${OSTREE} remote list-gpg-keys R1 > result ${OSTREE} remote gpg-list-keys R1 > result
cat > expected <<"EOF" cat > expected <<"EOF"
Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA
Created: Tue Sep 10 02:29:42 2013 Created: Tue Sep 10 02:29:42 2013
@ -78,14 +78,14 @@ echo "ok remote with keyring"
# Check the global keys with no keyring # Check the global keys with no keyring
OSTREE_GPG_HOME=${emptydir} OSTREE_GPG_HOME=${emptydir}
${OSTREE} remote list-gpg-keys > result ${OSTREE} remote gpg-list-keys > result
assert_file_empty result assert_file_empty result
echo "ok global no keyring" echo "ok global no keyring"
# Now check the global keys with a keyring # Now check the global keys with a keyring
OSTREE_GPG_HOME=${trusteddir} OSTREE_GPG_HOME=${trusteddir}
${OSTREE} remote list-gpg-keys > result ${OSTREE} remote gpg-list-keys > result
OSTREE_GPG_HOME=${emptydir} OSTREE_GPG_HOME=${emptydir}
cat > expected <<"EOF" cat > expected <<"EOF"
Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA
@ -134,7 +134,7 @@ else
sleep 2 sleep 2
${GPG} --homedir=${test_tmpdir}/gpghome --armor --export ${TEST_GPG_KEYID_1} > ${test_tmpdir}/key1expired.asc ${GPG} --homedir=${test_tmpdir}/gpghome --armor --export ${TEST_GPG_KEYID_1} > ${test_tmpdir}/key1expired.asc
${OSTREE} remote gpg-import --keyring ${test_tmpdir}/key1expired.asc R1 ${OSTREE} remote gpg-import --keyring ${test_tmpdir}/key1expired.asc R1
${OSTREE} remote list-gpg-keys R1 > result ${OSTREE} remote gpg-list-keys R1 > result
assert_file_has_content result "^ Expired:" assert_file_has_content result "^ Expired:"
echo "ok remote expired key" echo "ok remote expired key"
@ -143,7 +143,7 @@ else
${GPG} --homedir=${TEST_GPG_KEYHOME} --import ${TEST_GPG_KEYHOME}/revocations/key1.rev ${GPG} --homedir=${TEST_GPG_KEYHOME} --import ${TEST_GPG_KEYHOME}/revocations/key1.rev
${GPG} --homedir=${test_tmpdir}/gpghome --armor --export ${TEST_GPG_KEYID_1} > ${test_tmpdir}/key1revoked.asc ${GPG} --homedir=${test_tmpdir}/gpghome --armor --export ${TEST_GPG_KEYID_1} > ${test_tmpdir}/key1revoked.asc
${OSTREE} remote gpg-import --keyring ${test_tmpdir}/key1revoked.asc R1 ${OSTREE} remote gpg-import --keyring ${test_tmpdir}/key1revoked.asc R1
${OSTREE} remote list-gpg-keys R1 > result ${OSTREE} remote gpg-list-keys R1 > result
assert_file_has_content result "^Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA (revoked)" assert_file_has_content result "^Key: 5E65DE75AB1C501862D476347FCA23D8472CDAFA (revoked)"
assert_file_has_content result "^ UID: Ostree Tester <test@test.com> (revoked)" assert_file_has_content result "^ UID: Ostree Tester <test@test.com> (revoked)"
assert_file_has_content result "^ Subkey: CC47B2DFB520AEF231180725DF20F58B408DEA49 (revoked)" assert_file_has_content result "^ Subkey: CC47B2DFB520AEF231180725DF20F58B408DEA49 (revoked)"