0

我正在使用Gitian Builder为在我的本地主机上运行的我自己的区块链(来自 Peershare 的模板)构建我的二进制文件。当我为 Gitian Builder 执行命令git pull时,它给出了一个超时错误。我不知道为什么(我已经代理在后面工作)。当我执行命令时

cd ~/gitian-builder
./bin/gbuild --commit abc=v${VERSION} ../abc/contrib/gitian-descriptors/gitian-linux.yml

其中“abc”是区块链名称,它给了我这样的错误:

 remote: Counting objects: 1, done.
 remote: Total 1 (delta 0), reused 0 (delta 0)
 Unpacking objects: 100% (1/1), done.
 From https://bitbucket.org/abc/abc
    1eed3dd..8316d74  master     -> master
 fatal: ambiguous argument 'v': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
    ./bin/gbuild:272:in `block in <main>': error looking up commit for    tag v (RuntimeError)
    from ./bin/gbuild:256:in `each'
     from ./bin/gbuild:256:in `<main>'

我的./bin/gbuild文件来自 https://github.com/devrandom/gitian-builder/blob/master/bin/gbuild,我的gitian-linux.yml文件如下所示:

 name: "abc"
 suites:
 - "precise"
 architectures:
 - "i386"
 - "amd64"
  packages:
  - "g++"
  - "git-core"
  - "unzip"
   - "pkg-config"
   - "faketime"
   - "zlib1g-dev"
   - "qt4-qmake"
   - "libqt4-dev"
   reference_datetime: "2011-01-30 00:00:00"
   remotes:
  - "url": "https://bitbucket.org/abc/abc.git"
      "dir": "abc"
      files:
          - "abc-deps-linux32-gitian-r5.zip"
          - "abc-deps-linux64-gitian-r5.zip"
          - "boost-linux32-1.55.0-gitian-r1.zip"
         - "boost-linux64-1.55.0-gitian-r1.zip"
        script: |
         STAGING="$HOME/install"
         OPTFLAGS='-O2'
         BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
        TEMPDIR="$HOME/tempdir"
        export TZ=UTC
        export LIBRARY_PATH="$STAGING/lib"
        export PATH="$STAGING/bin:$PATH"
        mkdir -p ${BINDIR}
                            .... and more

如何解决错误并摆脱它?

4

1 回答 1

0

Gitian 仅针对有效的 Git 标签进行构建。比特币存储库使用格式的标签

v0.13.1

注意前导v。由于您没有共享存储库,因此我无法告诉您正确的版本字符串是什么。但是您可以使用存储库中的git命令abc列出正确的标签名称,例如,

git tag

0.0.1
0.0.2
0.0.3
0.0.4
0.1.0

如果像上面的例子一样,你标记了没有前导的版本v,从你的 Gitian Builder 命令中删除它,即,

$ ./bin/gbuild --commit abc=${VERSION} ../abc/contrib/gitian-descriptors/gitian-linux.yml

如果您的abc存储库中还没有任何标签,请在此处阅读有关Git 标签的更多信息。

于 2016-11-02T09:04:57.320 回答