I've been rolling together my own deb repository using aptly. I've got my vagrant/ansible scripts to create a repository and I publish to it from a Jenkins instance. The aptly configuration files look like the following:
{
"rootDir" : "/home/repoman",
"ppaDistributorID" : "Ubuntu",
"ppaCodename" : "trusty"
}
There's also one for wheezy. I have the following little ansible loop:
- 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 }}
That basically runs the follow set of commands:
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
I then add my debs and publish my repository. All my debs are custom scala and python apps, so their architecture is just all. I update the repo using the following:
aptly -passphrase=**removed** -config=/home/repoman/trusty.aptly publish update trusty
aptly -passphrase=**removed** -config=/home/repoman/wheezy.aptly publish update trusty
I have an nginx instance serving the repo at the /debs
path. The trouble is, I try to add this repo to another VM. I had ansible install the PGP key and add the repo in /etc/apt/sources.list.d/repo_internal_debs.list
and it looks like so:
deb http://repo.internal/debs trusty testing
But an apt-get update gives me the following error
...
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.
I don't actually have any amd64 packages. My InRelease looks like the following
-----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-----
Why is apt complaining it can't find an amd64 binary tree?
Found a solution. I changed my aptly configuration to include the other architectures.
and then I removed -architecture from the other commands. The packages are listed in the amd64 repos with the arch of all. It makes me wonder if I want to start supporting arm in the future; if I need to explicitly state that in the config file (or on the arm debian host, add
deb [arch=all] http://repo...
).I find it odd that by default, apt doesn't actually search all and that you can't really have an arch-less repo for non-processor specific packages (python, java, etc.)