[aur-dev] [PATCH 1/2] Move documentation to a subdirectory
Create a new subdirectory doc/ that contains documentation. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- AUTHORS | 4 ++-- README | 5 ++++- HACKING => doc/CodingGuidelines | 10 ++++++---- TRANSLATING => doc/i18n.txt | 0 4 files changed, 12 insertions(+), 7 deletions(-) rename HACKING => doc/CodingGuidelines (96%) rename TRANSLATING => doc/i18n.txt (100%) diff --git a/AUTHORS b/AUTHORS index a21fef7..4462cab 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,8 +23,8 @@ Use `git shortlog -s` for a list of aurweb contributors. Translations ------------ -Our translations are currently maintained in Transifex; please read TRANSLATING -for more details. +Our translations are currently maintained in Transifex; please read +doc/i18n.txt for more details. Below is a list of past translators before we switched to Transifex; more can be found by looking in the Git history. diff --git a/README b/README index 228358a..71e8481 100644 --- a/README +++ b/README @@ -24,6 +24,9 @@ Functionality Directory Layout ---------------- +doc:: + aurweb documentation. + po:: Translation files for strings in the aurweb interface. @@ -40,7 +43,7 @@ Links ----- * The repository is hosted at git://projects.archlinux.org/aurweb.git -- see - HACKING for information on submitting patches. + doc/CodingGuidelines for information on submitting patches. * Discovered bugs can be submitted to the aurweb bug tracker: https://bugs.archlinux.org/index.php?project=2 diff --git a/HACKING b/doc/CodingGuidelines similarity index 96% rename from HACKING rename to doc/CodingGuidelines index 291da1f..46537bb 100644 --- a/HACKING +++ b/doc/CodingGuidelines @@ -1,11 +1,13 @@ -HACKING +Coding Guidelines +================= DISCLAIMER: We realise the code doesn't necessarily follow all the rules. This is an attempt to establish a standard coding style for future development. -Coding style guidelines ------------------------ +Coding style +------------ + Column width: 79 columns or less within reason. Indentation: tabs (standard eight column width) @@ -28,6 +30,7 @@ MySQL queries should generally go into functions. Submitting patches ------------------ + !!! PLEASE TEST YOUR PATCHES BEFORE SUBMITTING !!! Submit uncompressed git-formatted patches to aur-dev@archlinux.org. @@ -49,4 +52,3 @@ Glossary git-formatted patch: A patch that is produced via `git format-patch` and is sent via `git send-email` or as an inline attachment of an email. - diff --git a/TRANSLATING b/doc/i18n.txt similarity index 100% rename from TRANSLATING rename to doc/i18n.txt -- 2.4.6
Add a document describing how the Git/SSH interface works internally. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> --- doc/git-interface.txt | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 doc/git-interface.txt diff --git a/doc/git-interface.txt b/doc/git-interface.txt new file mode 100644 index 0000000..b34e112 --- /dev/null +++ b/doc/git-interface.txt @@ -0,0 +1,81 @@ +The aurweb Git and SSH interface +================================ + +Git storage +----------- + +Since release 4.0.0, aurweb uses Git repositories to store packages. Git +namespaces (see gitnamespaces(7)) are used to share the object database, such +that delta compression can be applied across package base boundaries. + +Internally, all packages are stored in a single Git repository. Special refs, +so-called namespaced branches, are used to refer to the commits corresponding +to the actual package bases. For convenience, we also create a branch for each +package repository that carries the name of the corresponding package base, +such that one can easily access the history of a given package base by running +`git log <pkgbase>`. To the end-user, the individual namespaced branches are +presented as separate Git repositories. + +Authentication: git-auth +------------------------ + +Pushing to package repositories is possible via SSH. In order to access the SSH +interface, users first need to add an SSH public key to their account using the +web interface. Authentication is performed by the git-auth +AuthorizedKeysCommand script (see sshd_config(5) for details) that looks up the +public key in the AUR user table. Using this concept of "virtual users", there +is no need to create separate UNIX accounts for each registered AUR user. + +If the public key is found, the corresponding authorized_keys line is printed +to stdout. If the public key does not exist, the login is denied. The +authorized_keys line also contains a forced command such that authenticated +users cannot access anything on the server except for the aurweb SSH interface. +The forced command can be configured in the aurweb configuration file and +usually points to the git-serve program. + +The INSTALL file in the top-level directory contains detailed instructions on +how to configure sshd(8) to use git-auth for authentication. + +The Shell: git-serve +-------------------- + +The git-serve command, the "aurweb shell", provides different subcommands: + +* The help command shows a list of available commands. +* The list-repos command lists all repositories of the authenticated user. +* The setup-repo command can be used to create a new repository. +* The git-{receive,upload}-pack commands are redirected to git-shell(1). + +The requested command is extracted from the SSH_ORIGINAL_COMMAND environment +variable which is usually set by the SSH daemon. If no command is specified, +git-serve displays a message that aurweb does not provide an interactive shell. + +When invoking git-shell(1), the git-serve command also redirects all paths to +the shared Git repository and sets up the GIT_NAMESPACE environment variable +such that Git updates the right namespaced branch. + +The Update Hook: git-update +--------------------------- + +The Git update hook, called git-update, performs several subtasks: + +* Prevent from creating branches or tags other than master. +* Deny non-fast-forwards, except for Trusted Users and Developers. +* Check each new commit (validate meta data, impose file size limits, ...) +* Update package base information and package information in the database. +* Update the named branch and the namespaced HEAD ref of the package. + +It needs to be added to the shared Git repository, see INSTALL in the top-level +directory for further information. + +Accessing Git repositories via HTTP +----------------------------------- + +Git repositories can also be accessed via HTTP by configuring the web server to +forward specific requests to git-http-backend(1). Note that, since Git +namespaces are used internally, the web server also needs to rewrite URIs and +setup the GIT_NAMESPACE environment variable accordingly before forwarding a +request. + +An example configuration for nginx and fcgiwrap can be found in the INSTALL +instructions in the top-level directory. -- 2.4.6
On 24/07/15, Lukas Fleischer wrote:
Add a document describing how the Git/SSH interface works internally.
This is _really_ useful, thanks. Acked. --
participants (2)
-
Leonidas Spyropoulos
-
Lukas Fleischer