ReleaseEngineering/PuppetAgain/Packages: Difference between revisions

Line 313: Line 313:
= Ubuntu: Landing Custom Repository Changes =
= Ubuntu: Landing Custom Repository Changes =


{{note|be careful with this not-yet-ready-to-production version.}}
{{note|This is currently Mozilla-only, since Mozilla is the upstream for all packages.  Be careful, as this can easily wipe out the existing releng repository!}}


We use [http://mirrorer.alioth.debian.org/ reprepro] to manage packages.
We use [http://mirrorer.alioth.debian.org/ reprepro] to manage packages.  Nobody's quite sure how to pronounce it.


ATM, the repo lives in /data/repos/apt on releng-puppet2.srv.releng.scl3.
The repo lives in /data/repos/apt on releng-puppet2.srv.releng.scl3, so you'll need to begin by rsync'ing it to ubuntu64packager1:
 
  rsync -av releng-puppet2.srv.releng.use1.mozilla.com:/data/repos/apt/releng/ /data/repos/apt/releng/
  rsync -av releng-puppet2.srv.releng.use1.mozilla.com:/data/repos/apt/conf/ /data/repos/apt/conf/
  rsync -av releng-puppet2.srv.releng.use1.mozilla.com:/data/repos/apt/db/ /data/repos/apt/db/
 
The <tt>conf/</tt> directory contains config files pointing to the releng/ repository only -- this won't (shouldn't!) mess with the Ubuntu mirrors.
 
Next, import your files into the repo


There are 2 important files under <tt>conf</tt> directory:
* options
<pre>
<pre>
verbose
cd /data/repos/apt
outdir +b/releng
reprepro -V --basedir . include precise /tmp/somepackage-precise-amd64/*.changes
logdir +b/logs
dbdir +b/db
morguedir +b/morgue
keepunreferencedfiles
keepunusednewfiles
</pre>
</pre>
* distributions
if you're installing two architectures, then the second one will complain that the debian tarball's signature doesn't match.  That's OK.  Just import the debs from that architecture:
<pre>
<pre>
Origin: mozilla
reprepro -V --basedir . includedeb precise /tmp/somepackage-precise-i386/*.deb
Label: Mozilla
Codename: precise
Version: 12.04
Architectures: amd64 i386 source
Components: main
Description: Releng repos
DebIndices: Packages Release . .bz2
</pre>
</pre>


Until we have a shared location (an Ubuntu machine) for package building and repo updates (using incoming directory) you need to sync that directory to your machine.
This will copy packages to releng/, generate indices and update the database. Make sure to not get into a race condition with other people on the same host.
 
When you are done with the repo, first check that any previous versions of the packages you're updating are pinned in puppet.  Then rsync the repo and db back to the distinguished master:


Example import:
  rsync -av /data/repos/apt/releng/ releng-puppet2.srv.releng.use1.mozilla.com:/data/repos/apt/releng/
<pre>
  rsync -av /data/repos/apt/db/ releng-puppet2.srv.releng.use1.mozilla.com:/data/repos/apt/db/
cd repo
reprepro -V --basedir . include precise ~/debs/puppet/build-area/puppet_2.7.17-1mozilla1_amd64.changes
</pre>


It will copy packages to releng/, generate indices and update the database. Make sure to not get into a race condition with other people.
and run this on the master:


When you are done with the repo rsync it back, then publish:
  puppetmaster-fixperms
sudo chown puppetsync:puppetsync -R .
sudo rsync -av ./ /data/repos/apt/


= Darwin =
= Darwin =
canmove, Confirmed users
1,394

edits