-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New feature adds the ability to add gpg utility and public keys to the image and the ability to verify file signatures at certain pipeline steps. Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
- Loading branch information
Showing
8 changed files
with
91 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Feature: gpg | ||
|
||
Feature adds GnuPG (The Universal Crypto Engine) and public keys to the image to | ||
verify image signatures. | ||
|
||
https://www.gnupg.org/software/index.html | ||
|
||
## Parameters | ||
|
||
- **GPG_PUBKEYS** -- List of files with public gpg keys. | ||
- **GPG_PROG** -- The name of the gpg utility. This may be necessary if gpg is | ||
gpg-1.x and not gpg-2.x or higher. |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
GPG_PROG ?= gpg2 | ||
GPG_PUBKEYS ?= |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
ifeq ($(GPG_PROG),) | ||
$(error gpg utility must be specified in the "GPG_PROG" variable.) | ||
endif | ||
|
||
ifeq ($(GPG_PUBKEYS),) | ||
$(error one or more public gpg keys must be specified in the "GPG_PUBKEYS" variable.) | ||
endif | ||
|
||
PUT_FEATURE_PROGS += $(GPG_PROG) | ||
|
||
PHONY += gpg | ||
|
||
gpg: create | ||
@$(VMSG) "Putting gpg keyring ..." | ||
@mkdir -m700 -p -- "$(ROOTDIR)/etc/initrd/gnupg" | ||
@$(GPG_PROG) --quiet --homedir "$(ROOTDIR)/etc/initrd/gnupg" --import $(GPG_PUBKEYS) | ||
@[ -e "$(ROOTDIR)"/bin/gpg ] || \ | ||
ln -s -- "`type -P $(GPG_PROG)`" "$(ROOTDIR)"/bin/gpg | ||
@rm -f -- "$(ROOTDIR)/etc/initrd/gnupg"/*~ | ||
|
||
pack: gpg |
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
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
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