Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
wget -A deb -r -np -nH --cut-dirs=1

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

deb precise main
deb precise dependencies

then I get

W: Failed to fetch  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
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
gpg: key 4BD6EC30: public key "Puppet Labs Release Key (Puppet Labs Release Key) <>" 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 --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 .

I really suggest you to sync all the repository with:

rsync -av --copy-links --del rsync:// /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.