-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changed code example as suggested in https://forums.gentoo.org/viewtopic-t-1129590.html * Added installation instructions
- Loading branch information
1 parent
4639127
commit d74cdc9
Showing
2 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# Vladimir Timofeenko <[email protected]> | ||
# @AUTHOR: | ||
# Vladimir Timofeenko <[email protected]> | ||
# @BLURB: Allows verifying signature on top commit | ||
# @BLURB: Allows verifying signature on top commit of a git repository | ||
# @DESCRIPTION: | ||
# This eclass provides the ability to verify the signature on the | ||
# top commit of repository checked out by git-r3. | ||
|
@@ -19,8 +19,9 @@ | |
# Example use: | ||
# @CODE | ||
# inherit git-verify-signature | ||
# SRC_URI="https://example.org/${P}.tar.gz | ||
# verify-sig? ( https://example.org/${P}.tar.gz.sig )" | ||
# EGIT_REPO_URI="https://example.org/author/repository.git" | ||
# EGIT_BRANCH="some-non-default-branch" | ||
# EGIT_COMMIT="some-commit-or-tag" | ||
# BDEPEND=" | ||
# verify-sig? ( app-crypt/openpgp-keys-example )" | ||
# | ||
|
@@ -33,7 +34,11 @@ | |
# specifying the directory where to verify the commit. | ||
# | ||
# Some notes: | ||
# inherit verify-sig is used to properly add the dependencies | ||
# * inherit verify-sig is used to properly add the DEPENDs | ||
# * At the time of writing (Feb 12, 2021) there are no usages of git-r3 | ||
# with verify-sig eclasses in the same ebuild in the main tree. | ||
# In case the interface this class provides collides with verify-sig | ||
# behavior, send the author a note. | ||
|
||
if [[ ! ${_GIT_VERIFY_SIG_ECLASS} ]]; then | ||
|
||
|
@@ -52,8 +57,35 @@ EXPORT_FUNCTIONS src_unpack | |
|
||
inherit git-r3 verify-sig | ||
|
||
# @FUNCTION: git-verify-signature_src_unpack | ||
# Variables from verify-sig.eclass | ||
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_PATH | ||
# @DEFAULT_UNSET | ||
# @DESCRIPTION: | ||
# Path to key bundle used to perform the verification. This is required | ||
# when using default src_unpack. Alternatively, the key path can be | ||
# passed directly to the verification functions. | ||
|
||
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEYSERVER | ||
# @DEFAULT_UNSET | ||
# @DESCRIPTION: | ||
# Keyserver used to refresh keys. If not specified, the keyserver | ||
# preference from the key will be respected. If no preference | ||
# is specified by the key, the GnuPG default will be used. | ||
|
||
# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_REFRESH | ||
# @USER_VARIABLE | ||
# @DESCRIPTION: | ||
# Attempt to refresh keys via WKD/keyserver. Set it to "yes" | ||
# in make.conf to enable. Note that this requires working Internet | ||
# connection. | ||
# end of variables from verify-sig.eclass | ||
|
||
# @FUNCTION: git-verify-signature_src_unpack | ||
# @DESCRIPTION: provides the default src_unpack modeled after git-r3's src_unpack | ||
# If the verify-sig useflag is enabled, verifies the checked out code. | ||
# If you would like to use a different src_unpack - inherit this eclass before | ||
# a different eclass. To verify the commit then - use the | ||
# git-verify-signature_verify_commit function separately | ||
git-verify-signature_src_unpack() { | ||
git-r3_src_unpack | ||
if use verify-sig; then | ||
|