Installing gitolite on Synology DiskStation

444 views
Skip to first unread message

Lars Gullik Bjønnes

unread,
Jul 5, 2014, 2:45:18 PM7/5/14
to gito...@googlegroups.com
Hi,

I have just installed (successfully) gitolite on my Synology DiskStation.
There is a couple of gotchas, but nothing major.

- mktemp(1) does not exist

As Sitaram might remember I created some bad patches for that a while back;
I ended up with finding the source for mktemp and compiling that myself for
the DiskStatiion.[1]

This was basically it, except when I turned on the "upstream" feature.
The DiskStation
uses /bin/sh as provided by busybox. "upstream" uses /bin/bash. No
BASHisms seems
to be used in the upstream script so a quick change to /bin/sh did the trick.

This is something that perhaps should be changed in upstream gitolite as well.

Everything so far seems to be working fine, but I'll do some more testing.

NB. The setup required on the DiskStation is a bit more involved that
what the above might seem, it is needed to create a git user, give it
ssh access, setup the environment etc.

[1]
http://ftp.cc.uoc.gr/mirrors/OpenBSD/src/usr.bin/mktemp/mktemp.c
edited out some BSDism and made it compile on my linux box.
$ gcc -O3 -static -march=atom mktemp.c -o mktemp
copied that to /usr/local/bin on the DiskStation.

--
Lgb

Lars Gullik Bjønnes

unread,
Jul 5, 2014, 9:03:35 PM7/5/14
to gito...@googlegroups.com
Lars Gullik Bjønnes <lar...@gullik.org> writes:

[...]
| This was basically it, except when I turned on the "upstream" feature.
| The DiskStation
| uses /bin/sh as provided by busybox. "upstream" uses /bin/bash. No
| BASHisms seems
| to be used in the upstream script so a quick change to /bin/sh did the trick.

This paragraph really is about the "create" feature. Not "upstream".

Apart from some tests the only other scripts that use /bin/bash in
addition to "upstream" is the triggers "bg" and "ssh-authkeys-split".

(and one contrib script + mentioned in Shell.pm)

--
Lgb

Sitaram Chamarty

unread,
Jul 16, 2014, 9:29:07 PM7/16/14
to Lars Gullik Bjønnes, gito...@googlegroups.com
On 07/06/2014 06:33 AM, Lars Gullik Bjønnes wrote:

> "upstream" uses /bin/bash. No
> BASHisms seems
> to be used in the upstream script so a quick change to /bin/sh did the trick.
>
> This is something that perhaps should be changed in upstream gitolite as well.

src/triggers/upstream has been "/bin/sh" since Oct 2012.

Lars Gullik Bjønnes

unread,
Jul 28, 2014, 2:16:57 AM7/28/14
to gito...@googlegroups.com
Pretty sure that I mentioned my mistake in a follow up and that
"triggers/upstream" should have been "commands/create".

These are all the matches I get for bin/bash:

git grep bin/bash
contrib/utils/ldap_groups.sh:#!/bin/bash
src/commands/create:#!/bin/bash
src/lib/Gitolite/Triggers/Shell.pm: $shell =~ s/.*\//-/; # change "/bin/bash" to "-bash"
src/triggers/bg:#!/bin/bash
src/triggers/post-compile/ssh-authkeys-split:#!/bin/bash
t/mirror-test-setup.sh:#!/bin/bash
t/refex-expr-test-1:#!/bin/bash
t/refex-expr-test-2:#!/bin/bash
t/refex-expr-test-3:#!/bin/bash
t/refex-expr-test-9:#!/bin/bash
t/smart-http:#!/bin/bash
t/smart-http.root-setup:#!/bin/bash


--
Lgb

Reply all
Reply to author
Forward
0 new messages