apt 无法在所有架构存储库上找到 binary-amd64 树

apt 无法在所有架构存储库上找到 binary-amd64 树

我一直在使用 aptly 整合我自己的 deb 存储库。我使用 vagrant/ansible 脚本创建存储库,并从 Jenkins 实例向其发布内容。aptly 配置文件如下所示:

{
  "rootDir" : "/home/repoman",
  "ppaDistributorID" : "Ubuntu",
  "ppaCodename" : "trusty"
}

还有一个用于 wheezy 的。我有以下的小 ansible 循环:

- command: aptly repo create -comment="bigsense repository" -component={{ item[1] }} -config=/home/repoman/{{ item[0].version }}.aptly {{ item[0].version }}-{{ item[1] }} creates={{ repo_init }}

它基本上运行以下命令集:

apt repo create -comment="bigsense repository" -component=stable -config=/home/repoman/wheezy.aptly wheezy-stable
apt repo create -comment="bigsense repository" -component=testing -config=/home/repoman/wheezy.aptly wheezy-testing
apt repo create -comment="bigsense repository" -component=nightly -config=/home/repoman/wheezy.aptly wheezy-nightly
apt repo create -comment="bigsense repository" -component=stable -config=/home/repoman/trusty.aptly trusty-stable
apt repo create -comment="bigsense repository" -component=testing -config=/home/repoman/trusty.aptly trusty-testing 
apt repo create -comment="bigsense repository" -component=nightly -config=/home/repoman/trusty.aptly trusty-nightly

然后我添加 deb 并发布我的存储库。我的所有 deb 都是自定义 scala 和 python 应用程序,因此它们的架构就是全部。我使用以下命令更新存储库:

aptly -passphrase=**removed** -config=/home/repoman/trusty.aptly publish update trusty
aptly -passphrase=**removed** -config=/home/repoman/wheezy.aptly publish update trusty

我有一个 nginx 实例在路径上为 repo 提供服务/debs。问题是,我尝试将此 repo 添加到另一个 VM。我让 ansible 安装了 PGP 密钥并添加了 repo /etc/apt/sources.list.d/repo_internal_debs.list,它看起来像这样:

deb http://repo.internal/debs trusty testing

但是 apt-get update 给出了以下错误

...
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en           
Ign http://archive.ubuntu.com trusty/main Translation-en_US                    
Ign http://archive.ubuntu.com trusty/universe Translation-en_US                
W: Failed to fetch http://repo.internal/debs/dists/trusty/InRelease  Unable to find expected entry 'testing/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

我实际上没有任何 amd64 软件包。我的 InRelease 如下所示

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Origin: . trusty
Label: . trusty
Codename: trusty
Date: Thu, 1 Jan 2015 01:27:14 UTC
Architectures: all
Components: nightly stable testing
Description: Generated by aptly
MD5Sum:
 bd33f9ae7125fa18f8fcec8ead7f8d03     1131 nightly/binary-all/Packages
 a3d35ef481761603874e4d50ef98d0ee      724 nightly/binary-all/Packages.bz2
 a3176483be01b05f902c7e0eabef0523       86 nightly/binary-all/Release
 d41d8cd98f00b204e9800998ecf8427e        0 stable/binary-all/Packages
 4059d198768f9f8dc9372dc1c54bc3c3       14 stable/binary-all/Packages.bz2
 0dccce9164a425560b4718a80d7fadf9       85 stable/binary-all/Release
 f41c10a4b35cd3e1ec8abb9c2ab676ed       23 testing/binary-all/Packages.gz
 90e91e785ecb7c0790d99543a9911169       86 testing/binary-all/Release
 aeb2d4289e3f64c5458f9e5baeea3680      649 nightly/binary-all/Packages.gz
 f41c10a4b35cd3e1ec8abb9c2ab676ed       23 stable/binary-all/Packages.gz
 d41d8cd98f00b204e9800998ecf8427e        0 testing/binary-all/Packages
 4059d198768f9f8dc9372dc1c54bc3c3       14 testing/binary-all/Packages.bz2
SHA1:
 ae6d9d59f1e3565ae99686bd90765e70363a647d     1131 nightly/binary-all/Packages
 46886da84561557300f278c0004558dae2034d10      724 nightly/binary-all/Packages.bz2
 f4f2807eae71e13c2b69668afadc82638a10987e       86 nightly/binary-all/Release
 da39a3ee5e6b4b0d3255bfef95601890afd80709        0 stable/binary-all/Packages
 64a543afbb5f4bf728636bdcbbe7a2ed0804adc2       14 stable/binary-all/Packages.bz2
 be0f8beda9a624babbc808e4008fcb85557c9f42       85 stable/binary-all/Release
 92c6cff562771f64540523a54baaa0b2afe54b3f       23 testing/binary-all/Packages.gz
 3566dda0d7ceaa26890d3fc7cb38f8ff912c5cdb       86 testing/binary-all/Release
 a97c8e7c79443dca890e7d671c4c0dd1a0082532      649 nightly/binary-all/Packages.gz
 92c6cff562771f64540523a54baaa0b2afe54b3f       23 stable/binary-all/Packages.gz
 da39a3ee5e6b4b0d3255bfef95601890afd80709        0 testing/binary-all/Packages
 64a543afbb5f4bf728636bdcbbe7a2ed0804adc2       14 testing/binary-all/Packages.bz2
SHA256:
 a885326830bae893f5c66b99d63de98033a48fa915157c0b1ab47483ad69b138     1131 nightly/binary-all/Packages
 1466a000537d7edeef2635653f183a35aa20ebe920bc88cd7fd335a447e7882b      724 nightly/binary-all/Packages.bz2
 a8aeb6d3ce66e9c0b18ad7925fdf758af1573cef68e6be31aa35a44036560f2f       86 nightly/binary-all/Release
 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855        0 stable/binary-all/Packages
 d3dda84eb03b9738d118eb2be78e246106900493c0ae07819ad60815134a8058       14 stable/binary-all/Packages.bz2
 2e36c9915ea16d062d9171edf67e4c33229c4b4248baa019ea61702bce822420       85 stable/binary-all/Release
 1775fca35fb6a4d31c541746eaea63c5cb3c00280c8b5a351d4e944cdca7489d       23 testing/binary-all/Packages.gz
 4d7afa395c5189b81bfc64768a05fab07291944ab1405744185e3e4db6550fe9       86 testing/binary-all/Release
 b5d352519e6d5f21678b170d97544b537a9d7b22e0783d748ea9dcbf86cdb263      649 nightly/binary-all/Packages.gz
 1775fca35fb6a4d31c541746eaea63c5cb3c00280c8b5a351d4e944cdca7489d       23 stable/binary-all/Packages.gz
 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855        0 testing/binary-all/Packages
 d3dda84eb03b9738d118eb2be78e246106900493c0ae07819ad60815134a8058       14 testing/binary-all/Packages.bz2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlSkonIACgkQVBiqPYJQQlNaswCglHPqUiqpB9WUbQakRRTFstQI
52kAn24XVVnRAvOmB3nBxj7p4vVXvc2p
=D2ch
-----END PGP SIGNATURE-----

为什么 apt 抱怨它找不到 amd64 二叉树?

答案1

找到了解决方案。我更改了我的适当配置以包含其他架构。

{
  "rootDir" : "/home/repoman",
  "ppaDistributorID" : "Ubuntu",
  "ppaCodename" : "trusty"
  "architectures" : ["amd64","i386","all"]   
}

然后我从其他命令中删除了 -architecture。这些软件包在 amd64 存储库中列出,其 arch 为 all。这让我想知道我是否想在将来开始支持 arm;如果我需要在配置文件中明确说明这一点(或在 arm debian 主机上,添加deb [arch=all] http://repo...)。

我觉得奇怪的是,默认情况下,apt 实际上并不搜索所有内容,而且对于非处理器特定的包(python、java 等),你实际上无法拥有一个无 arch 的 repo。

相关内容