Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to make a mirror of just the puppet client and its dependencies for Ubuntu Precise, but hosted on my CentOS 6 host.

If I do

cd /var/ftp
wget -A deb -r -np -nH --cut-dirs=1 http://apt.puppetlabs.com/pool/precise/dependencies/
wget -A deb -r -np -nH --cut-dirs=1 http://apt.puppetlabs.com/pool/precise/main/

and then on an Ubuntu Precise add the following to /etc/yum.repos.d/mypuppet.repo

deb ftp://puppet.example.com precise main
deb ftp://puppet.example.com precise dependencies

then I get

W: Failed to fetch ftp://puppet.example.com/dists/precise/dependencies/binary-amd64/Packages  Unable to fetch file, server said 'Failed to open file.  '


Is there a tool or howto on how to host a deb/apt repo on CentOS?

share|improve this question
Out of curiousity...does that file actually exist? Can you fetch it manually? If it does exist, is your ftp server logging any errors? –  larsks Aug 6 '13 at 16:04

2 Answers 2

up vote 6 down vote accepted

I'd say the appropriate tool for this task is debmirror(1), which is available in the CentOS repositories.

Make sure you import the GPG keys of the puppetlabs repository from a keyserver:

# gpg --recv-keys 1054B7A24BD6EC30
gpg: requesting key 4BD6EC30 from hkp server pool.sks-keyservers.net
gpg: key 4BD6EC30: public key "Puppet Labs Release Key (Puppet Labs Release Key) <info@puppetlabs.com>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
gpg: depth: 0  valid:   3  signed:   4  trust: 0-, 0q, 0n, 0m, 0f, 3u
gpg: depth: 1  valid:   4  signed:   6  trust: 3-, 0q, 0n, 0m, 1f, 0u
gpg: depth: 2  valid:   1  signed:   1  trust: 1-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2014-05-11
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Then, grab the packages from their repository:

# debmirror --check-gpg --keyring=/path/to/keyring.gpg --method=http \ 
  --root=/ --arch amd64 --dist precise --section main,dependencies   \
  --nosource --host apt.puppetlabs.com --progress /path/to/local/repo

This way you ensure the directory structure is correct and all the expected files are present.

share|improve this answer

You synced only the deb files , you forgot to retrieve package list definition, you can have it at http://apt.puppetlabs.com/dists/precise/ .

I really suggest you to sync all the repository with:

rsync -av --copy-links --del rsync://apt.puppetlabs.com/packages/apt/ /var/ftp/

With Rsync it will easier to keep up to date your files. I'm pretty sure if you have deb files AND the package definition it will work .


have a nice day.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.