User Tools

Site Tools


pld-gitolite

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pld-gitolite [2011-09-13 13:28]
draenog [slug.py]
pld-gitolite [2016-03-21 10:20] (current)
glen [Authentication]
Line 7: Line 7:
 ===== Motivation===== ===== Motivation=====
  
-In comparison with [[pld-git|github option]], it would+In comparison with [[pld-github|github option]], it would
 give us full control over our repository. Also github does provide only [[http://​support.github.com/​discussions/​repos/​899-pre-receive-hooks|post-receive hooks]]. Therefore some tasks are difficult. For example restricting who can delete ''​auto-xxx''​ tags is problematic. give us full control over our repository. Also github does provide only [[http://​support.github.com/​discussions/​repos/​899-pre-receive-hooks|post-receive hooks]]. Therefore some tasks are difficult. For example restricting who can delete ''​auto-xxx''​ tags is problematic.
  
Line 18: Line 18:
 Authentication is based on ssh keys. People whose keys are in SSH-keys in PLD repository should have access. Authentication is based on ssh keys. People whose keys are in SSH-keys in PLD repository should have access.
  
 +[[howto-git#​rw_access_ussing_ssh_public_keys|Manage your keys]]
 +===== Changes to Developer =====
 +
 +Changes to developer can be seen from [[cvs2git]] page.
 ===== Access control===== ===== Access control=====
 ==== Assumptions:​ ==== ==== Assumptions:​ ====
Line 52: Line 56:
  
 ===== New package creation ===== ===== New package creation =====
-In upstream version of gitolite, new package is created by cloning of no existing repo (if the access rules allow for it). However I think that it is too error prone. So [[https://​github.com/​draenog/​gitolite|gitolite was forked]] and an option to disable creation of wildcard repositories was added. Instead an [[http://​sitaramc.github.com/​gitolite/​doc/​admin-defined-commands.html|admin defined command]] was created for this task:+In upstream version of gitolite, new package is created by cloning of no existing repo (if the access rules allow for it). However I think that it is too error prone. So [[https://​github.com/​draenog/​gitolite|gitolite was forked]] and an option to disable creation of wildcard repositories was added. Instead an [[http://​sitaramc.github.com/​gitolite/​ADCs.html|admin defined command]] was created for this task:
   ssh draenog@carme.pld-linux.org create <​new_repo>​   ssh draenog@carme.pld-linux.org create <​new_repo>​
 +
 +=====Package deletion=====
 +People with write access to gitolite-admin repository can use [[http://​sitaramc.github.com/​gitolite/​ADCs.html|admin defined command]] to move obsoleted packages to attic space:
 +  ssh draenog@carme.pld-linux.org ​ trash <​repo>​
   ​   ​
-=====Restrictions on commited ​files====+=====Restrictions on committed ​files====
 It is possible to prevent the commits of large files or archives. Currently every file must pass the following tests: It is possible to prevent the commits of large files or archives. Currently every file must pass the following tests:
-  * its size is smaller then 1 MB or its name matches one of patterns: *.spec, *.patch, *.diff+  * its size is smaller then 200kb or it is a text file smaller then 2Mb or its name matches one of patterns: *.spec, *.patch, *.diff
   * it is not a zip or compressed file   * it is not a zip or compressed file
   * it is not a tar archive   * it is not a tar archive
Line 63: Line 71:
 Post-receive hook can be used to send email notifications about any changes in repositories. The [[http://​repo.or.cz/​w/​git.git/​blob/​HEAD:/​contrib/​hooks/​post-receive-email|example script]] can be found in git repository. Post-receive hook can be used to send email notifications about any changes in repositories. The [[http://​repo.or.cz/​w/​git.git/​blob/​HEAD:/​contrib/​hooks/​post-receive-email|example script]] can be found in git repository.
  
-The example ​emai:+The example ​email:
 <​file>​ <​file>​
-Subject: ​[SCM] packages/branch master ​createda575a0acd8e7d9fdfdffbfe3f78b5f33cc819f7a+Subject: packages/amanda ​branch master ​updated29fa1ceae8ca943f79d842b8229d713556a22342
  
-This is an automated email from the git hooks/​post-receive script. It was +The branch, master has been updated 
-generated because a ref change was pushed to the repository containing +       via  29fa1ceae8ca943f79d842b8229d713556a22342 (commit) 
-the project "​packages/​a"​.+      ​from ​ a1d49d8d532329dad9e246d0671c5367d620561c (commit)
  
-The branch, master has been created +Those revisions listed above that are new to this repository have 
-        ​at ​ a575a0acd8e7d9fdfdffbfe3f78b5f33cc819f7a (commit)+not appeared on any other notification email; so we list those 
 +revisions in full, below.
  
 - Log ----------------------------------------------------------------- - Log -----------------------------------------------------------------
-commit ​a575a0acd8e7d9fdfdffbfe3f78b5f33cc819f7a +commit ​29fa1ceae8ca943f79d842b8229d713556a22342 
-Author: ​Kacper Kornet ​<draenog@pld-linux.org>​ +Author: ​Arkadiusz MiĹ\233kiewicz ​<arekm@pld-linux.org>​ 
-Date:   Thu May 26 16:19:28 2011 +0100+Date:   Fri Mar 30 15:28:53 2012 +0000
  
-    ​Second commit+    ​- release 3
  
-diff --git a/f b/f +    Changed files: 
-index 7898192..422c2b7 100644 +        ​amanda.spec -1.221
---- a/f +
-+++ b/f +
-@@ -1 +1,2 @@ +
- a +
-+b+
  
-commit 3a9172e6deb87fa536a356e2a703d334e63cb6dd +diff --git a/​amanda.spec b/​amanda.spec 
-Author: Kacper Kornet <draenog@pld-linux.org> +index a27eb99..a98e6e6 100644 
-Date  Thu May 26 16:19:13 2011 +0100+--- a/​amanda.spec 
 ++++ b/​amanda.spec 
 +@-10,7 +10,7 @@ Summary: ​     A network-capable tape backup solution 
 + ​Summary(pl.UTF-8): ​    ​Sieciowo zorientowany system tworzenia kopii zapasowych 
 + Name         ​amanda 
 + ​Version      3.2.3 
 +-Release      2 
 ++Release: ​      3 
 + ​License: ​      BSD 
 + ​Group: ​        ​Networking/​Utilities 
 + ​Source0: ​      ​http://​downloads.sourceforge.net/​amanda/​%{name}-%{version}.tar.gz
  
-    First commit+-----------------------------------------------------------------------
  
-diff --git a/f b/f +Summary of changes: 
-new file mode 100644 + amanda.spec |    2 +
-index 0000000..7898192 + 1 file changed, 1 insertion(+), 1 deletion(-)
---/dev/null +
-+++ b/f +
-@@ -0,0 +@@ +
-+a +
- +
------------------------------------------------------------------------+
  
  
 hooks/​post-receive hooks/​post-receive
 -- --
-packages/+packages/amanda
 </​file>​ </​file>​
  
Line 116: Line 123:
   git clone git://​carme.pld-linux.org/​packages/​glibc   git clone git://​carme.pld-linux.org/​packages/​glibc
  
 +=====Web interface=====
 +A web interface for browsing git repositories can be provided by gitweb. You can see trial setup
 +[[http://​carme.pld-linux.org:​1234|here]].
 =====User tools===== =====User tools=====
 ==== Modified builder script ==== ==== Modified builder script ====
-At http://​github.com/​draenog/​PLDbuilder ​is a modified builder script. On ''​gitolite''​ branch there is a version that works with the gitolite repo on carme. To download it:+At  http://​github.com/​draenog/​rpm-build-tools ​is a modified builder script. On ''​gitolite''​ branch there is a version that works with the gitolite repo on carme. To download it:
   git clone -b gitolite git://​github.com/​draenog/​PLDbuilder   git clone -b gitolite git://​github.com/​draenog/​PLDbuilder
  
Line 127: Line 137:
   ​   ​
 or or
-  builder --depth <​n> ​ -g kernel+  builder.sh --depth <​n> ​ -g kernel
  
 ==== slug.py ===== ==== slug.py =====
Line 137: Line 147:
 ==Create new repository== ==Create new repository==
   slug.py init name   slug.py init name
 +  ​
 +==Clone new repositories==
 +  slug.py clone pattern
   ​   ​
 ==Fetch/​update packages including new ones== ==Fetch/​update packages including new ones==
-  slug.py ​fetch -n pattern+  slug.py ​update ​-n pattern
   ​   ​
 If pattern is omitted, it fetches all repositories known to the upstream If pattern is omitted, it fetches all repositories known to the upstream
   ​   ​
 ==Update packages that were downloaded earlier, but do not fetch new ones== ==Update packages that were downloaded earlier, but do not fetch new ones==
-  slug.py ​fetch pattern+  slug.py ​update ​pattern
   ​   ​
 ==Alternative syntax== ==Alternative syntax==
-The following ​commands ​also work+You can also use 'git pld' prefix to call the commands. For example:  
-  git pld fetch +  git pld clone 
-and +
-  git pld init+
 === === === ===
 Description of more advanced options can be obtained by: Description of more advanced options can be obtained by:
-  slug.py ​fetch --help; slug.py init --help+  slug.py ​<​command> ​--help
 =====PLD builder infrastructure===== ​ =====PLD builder infrastructure===== ​
 Only source builder needs to be modified. The changes are minimal so it would be possible to adapt the existing builder with small effort. The modified version of PLD builder automation can be found at https://​github.com/​draenog/​pld-builder.new Only source builder needs to be modified. The changes are minimal so it would be possible to adapt the existing builder with small effort. The modified version of PLD builder automation can be found at https://​github.com/​draenog/​pld-builder.new
pld-gitolite.1315913324.txt.gz · Last modified: 2011-09-13 13:28 by draenog