User Tools

Site Tools


infrastructure:distfiles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
infrastructure:distfiles [2014-03-19 22:29] – created mmazurinfrastructure:distfiles [2014-04-08 21:38] (current) – [Using sources file] glen
Line 1: Line 1:
 ====== Distfiles ====== ====== Distfiles ======
 +
 +PLD [[http://git.pld-linux.org/cgi-bin/cgit.cgi/projects/distfiles.git/|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.
 +
 +===== Using sources file =====
 +
 +Besides indicating with ''# SourceX-md5'' that source should be stored in distfiles,
 +a combination of distfiles handler and builder macros, allow to use ''sources'' file.
 +
 +''sources'' file format: ''MD5-HASH *FILENAME'', the asterisk is ignored. for example:
 +<code - sources>
 +bf8d53d227829d67235927689a03cc7a  bash43-004
 +c0c00935c8b8ffff76e8ab77e7be7d15 *bash43-005
 +</code>
 +
 +As you can see, there's no url in that file, to indicate where to fetch, You should have ''SourceX'' with same basename in your ''.spec'':
 +<code rpmspec>
 +Patch10004:     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-004
 +Patch10005:     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-005
 +</code>
 +
 +==== patchset macro ====
 +
 +Listing sources in ''.spec'' and ''sources'' file can be annoying and duplicate work.
 +
 +Therefore ''%patchset_source'' macro was created.
 +
 +in Preamble define ''%patchset_source'' to inject to ''.spec'' file extra ''SourceX'' definitions:
 +<code rpmspec>
 +%patchset_source -f http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-%03g 1 %{patchlevel}
 +</code>
 +
 +this would parse:
 +<code>
 +$ rpm -E '%patchset_source -f http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-%03g 1 3'
 +Patch10001:     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-001
 +Patch10002:     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-002
 +Patch10003:     http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-003 
 +</code>
 +===== Manually forcing distfiles fetch =====
 +
 +use ''make-request'' ''-df'' paramter:
 +
 +<code>
 +$ ./make-request.sh -n bash:master -df
 +Distfiles Request: bash:master via /usr/sbin/sendmail
 +</code>
 +
  
 ===== Dropin ===== ===== Dropin =====
  
   * Uploading to dropin can be done using ''scp'' to either dropin@dropin.pld-linux.org or distfiles@dropin.pld-linux.org.   * Uploading to dropin can be done using ''scp'' to either dropin@dropin.pld-linux.org or distfiles@dropin.pld-linux.org.
-    * SSH keys are copied from the git@ ''authorized_keys'' to the dropin@ ''authorized_keys'' using a gitolite hook (''~git/.gitolite/hooks/gitolite-admin/post-update.secondary'')+    * SSH keys are copied from the git@ ''authorized_keys'' to the dropin@ ''authorized_keys'' using 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/dropin'' and then run ''rssh'' which is configured to only allow ''scp'' transfers.   * Openssh is configured to chroot both accounts into ''/var/lib/dropin'' and then run ''rssh'' which is configured to only allow ''scp'' transfers.
     * There's a minimal env in ''/var/lib/dropin'' that contains ''rssh'' and ''scp''.     * There's a minimal env in ''/var/lib/dropin'' that contains ''rssh'' and ''scp''.
Line 12: Line 62:
     * ''run-ff.sh'' is run from dfadm's crontab every minute.     * ''run-ff.sh'' is run from dfadm's crontab every minute.
     * ''chmodd.sh'' is a simple inotifywait-based script that always runs in the background (started from ''rc.local'' on system boot) and does a proper chmod on all uploaded files.     * ''chmodd.sh'' is a simple inotifywait-based script that always runs in the background (started from ''rc.local'' on system boot) and does a proper chmod on all uploaded files.
- 
  
infrastructure/distfiles.1395264578.txt.gz · Last modified: 2014-03-19 22:29 by mmazur

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS PLD Linux Driven by DokuWiki