The darcsden package

[Tags: gpl, program]

A web application and SSH server for browsing and hosting darcs repositories and collaborating with others.

Installation: http:hub.darcs.netsimondarcsden/README.md

Release notes: http:hub.darcs.netsimondarcsden/ANNOUNCE.md


[Skip to ReadMe]

Properties

Versions0.4, 0.5, 1.0, 1.0.1, 1.1, 1.1.1
Change logCHANGES.md
Dependenciesaeson, base (==4.*), base64-string, blaze-builder, blaze-html (>=0.5 && <0.7), blaze-markup, bytestring, containers, CouchDB, darcs (>=2.8.4 && <2.10), directory, filepath, harp, hashed-storage, highlighter, highlighting-kate, HsOpenSSL, hsp (>=0.7.3 && <0.8), http-conduit, HUnit, json, mime-mail, mtl (>=2 && <2.2), old-locale, old-time, pandoc (>=1.10 && <1.12), pcre-light, process, pureMD5, random, redis, safe, SHA, snap-core (>=0.8 && <0.10), snap-server (>=0.8 && <0.10), split, ssh (>=0.3), system-uuid, text, time, utf8-string, webdriver, Win32-services-wrapper (==0.1.*), xhtml, xml [details]
LicenseGPL
AuthorAlex Suraci <suraci.alex@gmail.com>
MaintainerAlex Suraci <suraci.alex@gmail.com>, Simon Michael <simon@joyful.com>
CategoryDevelopment, Distribution, Web
Home pagehttp://hackage.haskell.org/package/darcsden
Source repositoryhead: darcs get http://hub.darcs.net/simon/darcsden
Executablesdarcsden-test, darcsden-post-hook, darcsden-ssh, darcsden
UploadedWed Apr 22 18:28:30 UTC 2015 by SimonMichael
DistributionsNixOS:1.1.1
Downloads852 total (37 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
All reported builds failed as of 2015-05-18 [all 2 reports]

Flags

NameDescriptionDefault
darcs28Build with the released darcs 2.8.x, not the unreleased 2.9.x.Enabled
highlightingkateEnable source code highlighting, using highlighting-kate (faster).Enabled
highlighterEnable source code highlighting, using highlighter.Disabled
closingEnable closing of bugs in the post-hookEnabled
sshEnable ssh server for remote pushesEnabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for darcsden-1.1.1

darcsden is a darcs repository hosting platform, providing a web application for browsing and managing repos, users, and issues, and a SSH server for push/pull and quick repository creation.

Home: http://hackage.haskell.org/package/darcsden

To install:

"cabal install darcsden" will install darcsden and darcsden-ssh executables with generic settings. In particular, the web app's base url will be "http://localhost:8900", and multi-user features will be enabled.

For more control, get the darcsden source, adjust src/DarcsDen/Settings.hs, and run "cabal install" in the top source directory. There are also several optional build flags in darcsden.cabal, mainly to assist with building on windows.

To run darcsden you also need:

Both should be running on their default port, or you can change that in Settings.hs. You should configure them by running:

darcsden --install

You should have a "darcsden" user account (for running the app and owning the files), with a ssh key:

adduser --system --home /home/darcsden --shell /bin/bash --group --gecos DarcsDen darcsden
sudo -u darcsden ssh-keygen

To avoid obscure errors due to mixed file ownership in ~/.darcs/cache, always run darcsden as the darcsden user, with $HOME set properly. So if using sudo, include the -H flag, like this:

sudo -Hu darcsden COMMAND...

The directory where you start the web app should contain darcsden's public/ directory. Or you can run it behind a web server that'll serve /public/* requests from that directory.

Some features require extra configuration to work:

To start:

For a quick test, run:

sudo -Hu darcsden darcsden

and visit http://localhost:8900 (or other url configured in Settings.hs) in your web browser.

This package provides separate executables for the web and SSH servers, darcsden and darcsden-ssh respectively. You could run them manually while logged in as the darcsden user via screen or dtach. Or, configure them as daemons. See darcsden.god, or these sample supervisord.conf entries:

[program:darcsden]
command=sudo -EHu darcsden /path/to/darcsden --port 8900
directory=/home/darcsden
priority=3
redirect_stderr=true
autostart=true
autorestart=true
environment=LANG="en_US.UTF-8"

[program:darcsden-ssh]
command=sudo -EHu darcsden /path/to/darcsden-ssh 22
directory=/home/darcsden
priority=3
redirect_stderr=true
autostart=true
autorestart=true
environment=LANG="en_US.UTF-8"

Here's a sample apache vhost config:

<VirtualHost *:80>
ServerName my.host.name
RewriteEngine on
ProxyPreserveHost On
ProxyErrorOverride On
RewriteRule ^/(.*) http://127.0.0.1:8900/$1 [P]
</VirtualHost>

Windows:

darcsden indirectly depends on two external libraries: OpenSSL and pcre.

The -f-ssh flag can be used to disable the ssh server and remove the dependency on OpenSSL.

The -f-closing flag disables the ability for checkins to automatically close issues, removing the dependency on pcre.

OpenSSL can be installed from http://slproweb.com/products/Win32OpenSSL.html - download "Win32 OpenSSL v1.0.1e" or whatever similar version is current. [At the time of writing, darcs doesn't work with 64 bit Windows, but if this changes then a 64 bit version can be downloaded from the same location.]

Pick a directory to install it to, e.g. c:/OpenSSL-Win32 - and install HsOpenSSL with cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win32/include" --extra-lib-dirs="c:/Win32OpenSSL"

Running as a Windows service:

darcsden depends on having CouchDB and redis running, so it also makes sense to install these as services, though it's not essential.

redis can be setup as a Windows service using https://github.com/kcherenkov/redis-windows-service

The redis service name is redis-instance.

CouchDB comes as a service already.

The CouchDB service name is something like "Apache CouchDB01cd861ad1dbd850", look for "CouchDB" in the output of "sc query" to get the exact name.

To install darcsden as a Windows service given the above names for the redis and CouchDB services, identify the path to darcsden.exe and to the darcsden source tree. Then alter the following command appropriately and run it all on one line:

sc create DarcsDen binPath= "c:\path\to\darcsden.exe --root c:\path\to\source\of\darcsden --service" start= auto depend= redis-instance/"Apache CouchDB01cd861ad1dbd850"

To uninstall the service, use "sc delete DarcsDen".

Contributing:

darcsden is a small, clean codebase that is fun to hack on. Discussion takes place on the #darcs IRC channel, and useful changes will quickly be deployed at hub.darcs.net, providing a tight dogfooding/feedback loop. Here's how to contribute a patch there:

  1. register at hub.darcs.net
  2. add your ssh key in settings so you can push
  3. fork your own branch: http://hub.darcs.net/simon/darcsden , fork
  4. copy to your machine: darcs get http://hub.darcs.net/yourname/darcsden
  5. make changes, darcs record
  6. push to hub: darcs push yourname@hub.darcs.net:darcsden --set-default
  7. your change will appear at http://hub.darcs.net/simon/darcsden/patches
  8. discuss on #darcs, or ping me (sm, simon@joyful.com) to merge it

Credits:

Alex Suraci created darcsden. Simon Michael led this release, which includes contributions from Alp Mestanogullari, Jeffrey Chu, Ganesh Sittampalam, and BSRK Aditya (sponsored by Google's Summer of Code). And last time I forgot to mention two 1.0 contributors: Bertram Felgenhauer and Alex Suraci.

darcsden depends on Darcs, Snap, GHC, and other fine projects from the Haskell ecosystem, as well as Twitter Bootstrap, JQuery, and many more.