canmove, Confirmed users
1,394
edits
Line 263: | Line 263: | ||
Now, build a custom repository (or possibly two, one for each architecture) on the distinguished master for the purpose. For example, if you're updating openssh, create a new {{PuppetAgain Repo|repos/apt/custom/openssh}}. If the appropriate repo already exists, use it. | Now, build a custom repository (or possibly two, one for each architecture) on the distinguished master for the purpose. For example, if you're updating openssh, create a new {{PuppetAgain Repo|repos/apt/custom/openssh}}. If the appropriate repo already exists, use it. | ||
To build a custom repository, | To build a custom repository, start by laying out your package pool. The best plan is to divide the packages by dist. For example: | ||
<pre> | |||
[root@releng-puppet2.srv.releng.scl3.mozilla.com openssl]# find pool/ | |||
pool/ | |||
pool/trusty | |||
pool/trusty/openssl_1.0.1f-1ubuntu2.5_i386.deb | |||
pool/trusty/openssl_1.0.1.orig.tar.gz | |||
pool/trusty/libssl1.0.0-dbg_1.0.1f-1ubuntu2.5_i386.deb | |||
... | |||
pool/precise | |||
pool/precise/libssl1.0.0_1.0.1-4ubuntu5.17_i386.deb | |||
... | |||
</pre> | |||
Then edit an update.sh in the root of the repository with something along the lines of | |||
<pre> | <pre> | ||
for arch in i386 amd64; do | for arch in i386 amd64; do | ||
for dist in precise trusty; do | for dist in precise trusty; do | ||
mkdir -p dists/${dist} | mkdir -p dists/${dist}/all/binary-$arch | ||
dpkg-scanpackages --arch $arch pool/$dist > dists/${dist}/all/binary-$arch/Packages | |||
bzip2 < dists/${dist} | bzip2 < dists/${dist}/all/binary-$arch/Packages > dists/${dist}/all/binary-$arch/Packages.bz2 | ||
done | done | ||
done | done | ||
</pre> | </pre> | ||
This script will update the apt indexes. | |||
Don't forget to run ''puppetmaster-fixperms'' afterward to make sure permissions are correct. | Don't forget to run ''puppetmaster-fixperms'' afterward to make sure permissions are correct. |