1 |
Include a repo.postsync.d hook to verify the rsync checkout using |
2 |
gemato. Given that not all people will want to have it enabled |
3 |
unconditionally, no setup.py rules are included -- instead, the file |
4 |
would be installed conditionally by the ebuild. |
5 |
|
6 |
[v2: included link to the wiki page] |
7 |
--- |
8 |
MANIFEST.in | 2 +- |
9 |
misc/repo.postsync.d/00gemato | 18 ++++++++++++++++++ |
10 |
2 files changed, 19 insertions(+), 1 deletion(-) |
11 |
create mode 100644 misc/repo.postsync.d/00gemato |
12 |
|
13 |
diff --git a/MANIFEST.in b/MANIFEST.in |
14 |
index 4f6cac162..edc6704e7 100644 |
15 |
--- a/MANIFEST.in |
16 |
+++ b/MANIFEST.in |
17 |
@@ -14,4 +14,4 @@ include cnf/make.conf.example.* |
18 |
include .portage_not_installed |
19 |
|
20 |
# extra scripts |
21 |
-include misc/* |
22 |
+graft misc |
23 |
diff --git a/misc/repo.postsync.d/00gemato b/misc/repo.postsync.d/00gemato |
24 |
new file mode 100644 |
25 |
index 000000000..f2af50925 |
26 |
--- /dev/null |
27 |
+++ b/misc/repo.postsync.d/00gemato |
28 |
@@ -0,0 +1,18 @@ |
29 |
+#!/bin/bash |
30 |
+# repo.postsync.d hook to verify ::gentoo checkout using gemato |
31 |
+ |
32 |
+name=${1} |
33 |
+url=${2} |
34 |
+path=${3} |
35 |
+ |
36 |
+# keyring installed by gentoo-keys |
37 |
+openpgp_key=/var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg |
38 |
+ |
39 |
+# apply only to ::gentoo, when synced over rsync. |
40 |
+if [[ ${name} == gentoo && ${url} == rsync://* ]]; then |
41 |
+ if ! gemato verify -K "${openpgp_key}" -s "${path}"; then |
42 |
+ eerror "For troubleshooting the verification failures, please see:" |
43 |
+ eerror " https://wiki.gentoo.org/wiki/Project:Portage/Repository_Verification" |
44 |
+ return 1 |
45 |
+ fi |
46 |
+fi |
47 |
-- |
48 |
2.16.0.rc2 |