diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-01-07 22:46:32 -0500 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-01-26 09:01:26 +0200 |
commit | 7c2c68df692b8a4ab5ede02bef3e9af7256581aa (patch) | |
tree | 7671ee1175a58a6de31dc7f41954148ea6e9fbd8 | |
parent | f3412acb853ddbd330c5fe6da93e052a40c0a3d4 (diff) | |
download | apk-tools-7c2c68df692b8a4ab5ede02bef3e9af7256581aa.tar.gz apk-tools-7c2c68df692b8a4ab5ede02bef3e9af7256581aa.tar.bz2 apk-tools-7c2c68df692b8a4ab5ede02bef3e9af7256581aa.tar.xz apk-tools-7c2c68df692b8a4ab5ede02bef3e9af7256581aa.zip |
add apk-manifest(8)
-rw-r--r-- | doc/Makefile | 1 | ||||
-rw-r--r-- | doc/apk-manifest.8.scd | 33 | ||||
-rw-r--r-- | src/manifest.c | 3 |
3 files changed, 36 insertions, 1 deletions
diff --git a/doc/Makefile b/doc/Makefile index c990e8d..bf74f2a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,7 @@ docs: $(obj)/apk.8 \ $(obj)/apk-index.8 \ $(obj)/apk-info.8 \ $(obj)/apk-list.8 \ + $(obj)/apk-manifest.8 \ $(obj)/apk-policy.8 \ $(obj)/apk-update.8 \ $(obj)/apk-upgrade.8 \ diff --git a/doc/apk-manifest.8.scd b/doc/apk-manifest.8.scd new file mode 100644 index 0000000..37c1508 --- /dev/null +++ b/doc/apk-manifest.8.scd @@ -0,0 +1,33 @@ +apk-manifest(8) + +# NAME + +apk manifest - Show checksums of package contents + +# SYNOPSIS + +*apk manifest* [<_options_>...] _packages_... + +# DESCRIPTION + +*apk manifest* prints the checksums of files in the listed packages. One file +is printed per line, the checksum first, followed by a space, and then the path +to the file. + +The checksum itself is printed in the format _algorithm_:_hash_. Supported +algorithms are: + +- *md5* +- *sha1* + +*sha1* is used for new packages. + +# OPTIONS + +*apk manifest* does not support any specific options. See *apk*(8) for global +options. + +# AUTHORS + +Natanael Copa <ncopa@alpinelinux.org>++ +Timo Teräs <_timo.teras@iki.fi_> diff --git a/src/manifest.c b/src/manifest.c index 8a6d9e8..a75f771 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -5,7 +5,7 @@ * Copyright (C) 2017 William Pitcock <nenolod@dereferenced.org> * All rights reserved. * - * This program is free software; you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. See http://www.gnu.org/ for details. */ @@ -21,6 +21,7 @@ /* TODO: support package files as well as generating manifest from the installed DB. */ static char *csum_types[APK_CHECKSUM_SHA1 + 1] = { + /* Note: if adding new algorithms, update apk-manifest(8) */ [APK_CHECKSUM_MD5] = "md5", [APK_CHECKSUM_SHA1] = "sha1", }; |