Skip to content

Commit 62b9d78

Browse files
committedSep 16, 2017
fetchRepoProject: Fix the GnuPG verification
The verification was failing with the following error: gpg: keyblock resource '/tmp/nix-build-XYZ.drv-0/.repo/repo/./.repoconfig/gnupg/pubring.kbx': No such file or directory Using an absolute path for $HOME fixes this. And since 175ecba the dependencies on "git" and "gnupg" aren't required anymore as "gitRepo" already covers them.
1 parent 50ce8ab commit 62b9d78

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎pkgs/build-support/fetchrepoproject/default.nix

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, git, gitRepo, gnupg ? null, cacert, copyPathsToStore }:
1+
{ stdenv, gitRepo, cacert, copyPathsToStore }:
22

33
{ name, manifest, rev ? "HEAD", sha256
44
, repoRepoURL ? "", repoRepoRev ? "", referenceDir ? ""
@@ -45,11 +45,14 @@ in stdenv.mkDerivation {
4545
"GIT_PROXY_COMMAND" "SOCKS_SERVER"
4646
];
4747

48-
buildInputs = [ git gitRepo cacert ] ++ optional (gnupg != null) [ gnupg ];
48+
buildInputs = [ gitRepo cacert ];
4949

5050
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
5151

5252
buildCommand = ''
53+
# Path must be absolute (e.g. for GnuPG: ~/.repoconfig/gnupg/pubring.kbx)
54+
export HOME="$(pwd)"
55+
5356
mkdir .repo
5457
${optionalString (local_manifests != []) ''
5558
mkdir .repo/local_manifests
@@ -58,7 +61,6 @@ in stdenv.mkDerivation {
5861
done
5962
''}
6063
61-
export HOME=.repo
6264
repo init ${concatStringsSep " " repoInitFlags}
6365
repo sync --jobs=$NIX_BUILD_CORES --current-branch
6466
${optionalString (!createMirror) "rm -rf $out/.repo"}

0 commit comments

Comments
 (0)
Please sign in to comment.