我可以使用 Debian 包构建环境来构建 Ubuntu 包吗?

我可以使用 Debian 包构建环境来构建 Ubuntu 包吗?

我有一个 Debian wheezy 服务器,用于使用pbuilder和构建软件包。我目前可以为 Debian 、和git-buildpackage构建软件包。sidwheezysqueeze

我想使用同一台服务器为 Ubuntu 发行版构建软件包。我曾尝试通过在 中创建一个可信任的配置文件来执行此操作/etc/pbuilder/trusty,但我从 debootstrap 收到错误:

 -> Invoking pbuilder
  forking: pbuilder create --configfile /etc/pbuilder/trusty --buildplace /var/cache/pbuilder/base-trusty.cow --mirror http://debian.stanford.edu/ubuntu --distribution trusty --no-targz --extrapackages cowdancer 
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: Distribution is trusty.
I: Current time: Thu Oct  2 14:24:21 PDT 2014
I: pbuilder-time-stamp: 1412285061
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
E: Release signed by unknown key (key id 3B4FE6ACC0B21F32)
E: debootstrap failed
W: Aborting with an error
pbuilder create failed
  forking: rm -rf /var/cache/pbuilder/base-trusty.cow 

以下是输出apt-key list

/etc/apt/trusted.gpg
--------------------
pub   4096R/C0B21F32 2012-05-11
uid                  Ubuntu Archive Automatic Signing Key (2012) <[email protected]>

/etc/apt/trusted.gpg.d//debian-archive-squeeze-automatic.gpg
------------------------------------------------------------
pub   4096R/473041FA 2010-08-27 [expires: 2018-03-05]
uid                  Debian Archive Automatic Signing Key (6.0/squeeze) <[email protected]>

/etc/apt/trusted.gpg.d//debian-archive-squeeze-stable.gpg
---------------------------------------------------------
pub   4096R/B98321F9 2010-08-07 [expires: 2017-08-05]
uid                  Squeeze Stable Release Key <[email protected]>

/etc/apt/trusted.gpg.d//debian-archive-wheezy-automatic.gpg
-----------------------------------------------------------
pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>

/etc/apt/trusted.gpg.d//debian-archive-wheezy-stable.gpg
--------------------------------------------------------
pub   4096R/65FFB764 2012-05-08 [expires: 2019-05-07]
uid                  Wheezy Stable Release Key <[email protected]>

也许有人知道正确的配置可以让我做到这一点。或者我应该放弃并基于 Ubuntu 本身构建一个单独的构建服务器?

答案1

问题是 debootstrap 不使用/etc/apt/trusted.gpg或中的本地密钥环/etc/apt/trusted.gpg.d/,而仅使用 下的密钥环/usr/share/keyrings/

从 Debian 8 Jessie 开始,你可以简单地安装(官方 Debian)软件包ubuntu-存档-密钥环它应该可以解决你的问题。

在早期的 Debian 版本中,您可以让 pbuilder 传递--keyring=/etc/apt/trusted.gpg给 debootstrap,因为该文件中已经有正确的密钥。--debootstrapopts --keyring=/etc/apt/trusted.gpg根据其手册页,添加到 pbuilder 调用应该可以做到这一点。

相关内容