infrastructure:distfiles
This is an old revision of the document!
Distfiles
PLD distfiles handles storing external sources in distfiles.
The files are stored under /distfiles/by-md5/X/Y/HASH/FILENAME,
for example: /distfiles/by-md5/8/1/81348932d5da294953e15d4814c74dd1/bash-4.3.tar.gz. files in distfiles itself are accessible by http and ftp protocols.
Manually forcing distfiles fetch
use make-request -df paramter:
$ ./make-request.sh -n bash:master -df Distfiles Request: bash:master via /usr/sbin/sendmail
Dropin
- Uploading to dropin can be done using
scpto either dropin@dropin.pld-linux.org or distfiles@dropin.pld-linux.org.- SSH keys are copied from the git@
authorized_keysto the dropin@authorized_keysusing a gitolite hook (~git/.gitolite/hooks/gitolite-admin/post-update.secondary), therefore it has to be writable by git user.
- Openssh is configured to chroot both accounts into
/var/lib/dropinand then runrsshwhich is configured to only allowscptransfers.- There's a minimal env in
/var/lib/dropinthat containsrsshandscp.
- Uploaded files end up in
/var/lib/dropin/dropin.- Stale files get deleted after 30 days by tmpwatch.
- The scripts responsible for sending the files from dropin to distfiles (and then deleting them from dropin) are in
~dfadm/distfiles.run-ff.shis run from dfadm's crontab every minute.chmodd.shis a simple inotifywait-based script that always runs in the background (started fromrc.localon system boot) and does a proper chmod on all uploaded files.
infrastructure/distfiles.1396985174.txt.gz · Last modified: 2014-04-08 21:26 by glen