aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/Build_for_Synology_DSM
diff options
context:
space:
mode:
Diffstat (limited to 'doc/todo/Build_for_Synology_DSM')
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_10_e351084d9a83db3fd6d9d983227a6410._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_11_cc67a584f5c460a6fb63cf099c20e573._comment9
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_12_94023593d294b9cf69090fcfd6ca0e5a._comment9
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_13_314255fd503d125b5aeae2f62acfd592._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_15_9525cd0d75ff4c15182d10a855774b69._comment30
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_1_4059016fa8da6af7a3eba8966821e8eb._comment10
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_2_8900c2985ab68b3b566c9f5d326471d6._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_3_f2b77368473d42b7f21e9d51d6415b58._comment10
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_4_a55fea734044c270ceb10adf9c8d9a76._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_5_59865ada057c640ac29855c65cf45dd9._comment23
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_6_6d860b1ad8816077b5fa596a71b12d5c._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_7_19ef2d293ba3bc7ece443d7278371c3f._comment8
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_8_609b7ad87dfbba49ec1f8c6fc2739ccd._comment12
-rw-r--r--doc/todo/Build_for_Synology_DSM/comment_9_d94a73b9a07c5cadf191005f817fd59a._comment29
14 files changed, 180 insertions, 0 deletions
diff --git a/doc/todo/Build_for_Synology_DSM/comment_10_e351084d9a83db3fd6d9d983227a6410._comment b/doc/todo/Build_for_Synology_DSM/comment_10_e351084d9a83db3fd6d9d983227a6410._comment
new file mode 100644
index 000000000..b62a929d7
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_10_e351084d9a83db3fd6d9d983227a6410._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 10"
+ date="2013-06-02T17:23:43Z"
+ content="""
+I updated the C program to simplify it so it uses a static path for `_chrooter`. In the previous version, I suspect that one can play with symlinks and use it to get a root shell. So, if `_chrooter` is not installed in `/opt/bin` this file has to be edited too before compilation.
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_11_cc67a584f5c460a6fb63cf099c20e573._comment b/doc/todo/Build_for_Synology_DSM/comment_11_cc67a584f5c460a6fb63cf099c20e573._comment
new file mode 100644
index 000000000..324fa8423
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_11_cc67a584f5c460a6fb63cf099c20e573._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 11"
+ date="2013-06-03T09:55:54Z"
+ content="""
+A last update and I stop spamming this thread: I've implemented access control and simplified customisation. All this has been moved to https://bitbucket.org/franckp/gasp
+
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_12_94023593d294b9cf69090fcfd6ca0e5a._comment b/doc/todo/Build_for_Synology_DSM/comment_12_94023593d294b9cf69090fcfd6ca0e5a._comment
new file mode 100644
index 000000000..39c243ec4
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_12_94023593d294b9cf69090fcfd6ca0e5a._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlJEI45rGczFAnuM7gRSj4C6s9AS9yPZDc"
+ nickname="Kevin"
+ subject="SynoCommunity"
+ date="2013-06-26T18:12:39Z"
+ content="""
+Creating an installable git-annex package available via [SynoCommunity](http://www.synocommunity.com/) would be awesome. They have created [cross-compilation tools](https://github.com/SynoCommunity/spksrc) to help build the packages and integrate the start/stop scripts with the package manager.
+
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_13_314255fd503d125b5aeae2f62acfd592._comment b/doc/todo/Build_for_Synology_DSM/comment_13_314255fd503d125b5aeae2f62acfd592._comment
new file mode 100644
index 000000000..3c54a9271
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_13_314255fd503d125b5aeae2f62acfd592._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnrP-0DGtHDJbWSXeiyk0swNkK1aejoN3c"
+ nickname="sebastien"
+ subject="comment 13"
+ date="2013-08-06T12:18:35Z"
+ content="""
+I post an issue to github synocommunity for that, i hope somenone have some time to package this great features.
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_15_9525cd0d75ff4c15182d10a855774b69._comment b/doc/todo/Build_for_Synology_DSM/comment_15_9525cd0d75ff4c15182d10a855774b69._comment
new file mode 100644
index 000000000..c3edf99e2
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_15_9525cd0d75ff4c15182d10a855774b69._comment
@@ -0,0 +1,30 @@
+[[!comment format=mdwn
+ username="lorenzo"
+ ip="84.75.27.69"
+ subject="Running Debian squeeze binaries on libc 2.5 based NAS"
+ date="2013-10-27T23:56:26Z"
+ content="""
+Following the suggestions in this page I tried to run the binaries that debian provides on my Lacie NetworkSpace which is another one of these NAS devices with old libc. After uploading the binaries and required libraries and using `LD_LIBRARY_PATH` to force the loader to use the version I uploaded of the libraries I was still having a segfault (similar to what Franck was experiencing) while running git-annex in a chroot was working.
+
+It turns out that it is possible to solve the problem without having to use chroot by not loading the binary directly but by substituting it with a script that calls the correct `ld-linux.so.3`. Assume you have uncompressed the files from the deb packages in `/opt/git-annex`.
+
+First create a directory `/opt/git-annex/usr/bin/git-annex.exec` and copy the executable `/opt/git-annex/usr/bin/git-annex` there.
+
+Then create script `/opt/git-annex/usr/bin/git-annex` with the following contents:
+
+ #!/bin/bash
+
+ PREFIX=/opt/git-annex
+
+ export GCONV_PATH=$PREFIX/usr/lib/gconv
+
+ exec $PREFIX/lib/ld-linux.so.3 --library-path $PREFIX/lib/:$PREFIX/usr/lib/ $PREFIX/usr/bin/git-annex.exec/git-annex \"$@\"
+
+The `GCONV_PATH` setting is important to prevent the app from failing with the message:
+
+ git-annex.exec: mkTextEncoding: invalid argument (Invalid argument)
+
+The original executable is moved to a different directory instead of being simply renamed to make sure that `$0` is correct when the executable starts. The parameter for the linker `--library-path` is used instead of the environment variable `LD_LIBRARY_PATH` to make sure that the programs exec'ed by git-annex do not have the variable set.
+
+Some more info about the approach: [[http://www.novell.com/coolsolutions/feature/11775.html]]
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_1_4059016fa8da6af7a3eba8966821e8eb._comment b/doc/todo/Build_for_Synology_DSM/comment_1_4059016fa8da6af7a3eba8966821e8eb._comment
new file mode 100644
index 000000000..074ba998c
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_1_4059016fa8da6af7a3eba8966821e8eb._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ nickname="joey"
+ subject="comment 1"
+ date="2013-05-24T15:55:42Z"
+ content="""
+There are already git-annex builds for arm available from eg, Debian. There's a good chance that, assuming you match up the arm variant (armel, armhf, etc) and that the NAS uses glibc and does not have too old a version, that the binary could just be copied in, possibly with some other libraries, and work. This is what's done for the existing Linux standalone builds.
+
+So, I look at this bug report as \"please add a standalone build for arm\", not as a request to support a specific NAS which I don't have ;)
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_2_8900c2985ab68b3b566c9f5d326471d6._comment b/doc/todo/Build_for_Synology_DSM/comment_2_8900c2985ab68b3b566c9f5d326471d6._comment
new file mode 100644
index 000000000..40e6398f0
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_2_8900c2985ab68b3b566c9f5d326471d6._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 2"
+ date="2013-05-24T21:31:44Z"
+ content="""
+I tried to run the binary from the Debian package, unfortunately, after installing tons of libraries, git-annex fails complaining that GLIBC is not recent enough. Perhaps a static build for ARM (armel) can solve the problem? Thanks again for your help!
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_3_f2b77368473d42b7f21e9d51d6415b58._comment b/doc/todo/Build_for_Synology_DSM/comment_3_f2b77368473d42b7f21e9d51d6415b58._comment
new file mode 100644
index 000000000..651edacd7
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_3_f2b77368473d42b7f21e9d51d6415b58._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ nickname="joey"
+ subject="comment 3"
+ date="2013-05-25T04:42:22Z"
+ content="""
+Which Debian package? Different ones link to different libcs.
+
+(It's not really possible to statically link something with as many dependencies as git-annex on linux anymore, unfortunately.)
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_4_a55fea734044c270ceb10adf9c8d9a76._comment b/doc/todo/Build_for_Synology_DSM/comment_4_a55fea734044c270ceb10adf9c8d9a76._comment
new file mode 100644
index 000000000..50ae82ca0
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_4_a55fea734044c270ceb10adf9c8d9a76._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 4"
+ date="2013-05-25T07:40:13Z"
+ content="""
+I've actually tried several ones: 4.20130521 on sid, 3.20120629~bpo60+2 on squeeze-backports, 3.20120629 on wheezy and jessie, plus a package for Ubuntu 11.02. All of them try to load GLIBC 2.6/2.7 while my system has 2.5 only... I'll try a different approach: install Debian in a chroot on the NAS and extract all the required files, including all libraries.
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_5_59865ada057c640ac29855c65cf45dd9._comment b/doc/todo/Build_for_Synology_DSM/comment_5_59865ada057c640ac29855c65cf45dd9._comment
new file mode 100644
index 000000000..725025283
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_5_59865ada057c640ac29855c65cf45dd9._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 5"
+ date="2013-05-25T10:03:24Z"
+ content="""
+Unfortunately, chroot approach does not work either. While git-annex works fine when I'm in the chroot, it doesn't work any more outside. If I don't copy libc, I get a version error (just like before so this is normal):
+
+ git-annex: /lib/libc.so.6: version `GLIBC_2.7' not found (required by /opt/share/git-annex/bin/git-annex)
+ git-annex: /lib/libc.so.6: version `GLIBC_2.6' not found (required by /opt/share/git-annex/bin/git-annex)
+ git-annex: /lib/libc.so.6: version `GLIBC_2.7' not found (required by /opt/share/git-annex/lib/libgmp.so.10)
+
+When I copy libc from the Debian chroot, then, it complains about libpthread:
+
+ git-annex: relocation error: /lib/libpthread.so.0: symbol __default_rt_sa_restorer, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
+
+If then I copy libpthread also, I get:
+
+ Illegal instruction (core dumped)
+
+So, I'm stuck... :-(
+I'll try to find a way using the version in the chroot instead of trying to export it to the host system...
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_6_6d860b1ad8816077b5fa596a71b12d5c._comment b/doc/todo/Build_for_Synology_DSM/comment_6_6d860b1ad8816077b5fa596a71b12d5c._comment
new file mode 100644
index 000000000..417293db3
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_6_6d860b1ad8816077b5fa596a71b12d5c._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawln3ckqKx0x_xDZMYwa9Q1bn4I06oWjkog"
+ nickname="Michael"
+ subject="bind mount"
+ date="2013-05-25T15:55:52Z"
+ content="""
+You could bind-mount (e.g. mount -o bind /data /chroot/data ) your main Synology fs into the chroot for git-annex to use.
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_7_19ef2d293ba3bc7ece443d7278371c3f._comment b/doc/todo/Build_for_Synology_DSM/comment_7_19ef2d293ba3bc7ece443d7278371c3f._comment
new file mode 100644
index 000000000..47d092331
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_7_19ef2d293ba3bc7ece443d7278371c3f._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 7"
+ date="2013-05-25T19:01:29Z"
+ content="""
+This is indeed what I'm doing. But I need to make a wrapper that will call the command in the chroot. Thanks for the tip anyway. :-)
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_8_609b7ad87dfbba49ec1f8c6fc2739ccd._comment b/doc/todo/Build_for_Synology_DSM/comment_8_609b7ad87dfbba49ec1f8c6fc2739ccd._comment
new file mode 100644
index 000000000..8a3490956
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_8_609b7ad87dfbba49ec1f8c6fc2739ccd._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawmqz6wCn-Q1vzrsHGvEJHOt_T5ZESilxhc"
+ nickname="Sören"
+ subject="comment 8"
+ date="2013-05-26T13:50:31Z"
+ content="""
+I have a Synology NAS too, so I thought I could try to run git-annex in a Debian chroot.
+As it [turns out](http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have), my model (DS213+) runs on a PowerPC CPU instead of ARM. Unfortunately, it isn't compatible with PPC in Debian either because it is a different PowerPC variant.
+There is an unofficial Debian port called [powerpcspe](http://wiki.debian.org/PowerPCSPEPort), but ghc doesn't build there yet for [some reason](http://buildd.debian-ports.org/status/package.php?p=git-annex&suite=sid).
+
+Any chance that there will be a build for this architecture at some point in the future or should I better look for another NAS? ;-)
+"""]]
diff --git a/doc/todo/Build_for_Synology_DSM/comment_9_d94a73b9a07c5cadf191005f817fd59a._comment b/doc/todo/Build_for_Synology_DSM/comment_9_d94a73b9a07c5cadf191005f817fd59a._comment
new file mode 100644
index 000000000..c8b45fc60
--- /dev/null
+++ b/doc/todo/Build_for_Synology_DSM/comment_9_d94a73b9a07c5cadf191005f817fd59a._comment
@@ -0,0 +1,29 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwjBDXkP9HAQKhjTgThGOxUa1B99y_WRA"
+ nickname="Franck"
+ subject="comment 9"
+ date="2013-06-02T13:14:56Z"
+ content="""
+Hi, I finally succeeded! :-)
+
+Here are the main steps:
+
+ 1. install `debian-chroot` on the NAS
+ 2. create an account `gitannex` in Debian
+ 3. configure git on this account (this is important otherwise git complains and fails) `git config --global user.email YOUR_EMAIL` and `git config --global user.name YOUR_NAME`
+ 4. install `gcc` on the NAS (using `ipkg`)
+ 5. download the files here: https://www.dropbox.com/sh/b7z68a730aj3mnm/95nFOzE1QP
+ 6. edit `_chrooter` to fit your settings (probably there is nothing to change if your Debian is freshly installed)
+ 7. run `make install`, everything goes to `/opt/bin`, if you change this, you should also edit line 17 in file `gasp`
+ 8. create an account `gitannex` on the NAS (doesn't need to be the same name as in Debian, but I feel it is easier)
+ 9. edit its `.ssh/authorized_keys` to prefix lines as follows `command=\"gasp\" THE_PUBLIC_KEY_AS_USUAL`
+ 10. it should work
+ 11. the repositories will be in the Debian account, but it's easy to symlink them in the NAS account if you wish
+
+The principle is as follows: `command=\"gasp\"` allows to launch `gasp` on SSH connexion instead of the original command given to `ssh`. This command is retrieved by `gasp` and prefixed with `chrooter-` (so, eg, running `ssh git` on the client results in running `chrooter-git` on the NAS). `chrooter-*` commands are symlinks to `chrooter`, this is a setuid root binary that launches `_chrooter`. (This intermediary binary is necessary because `_chrooter` is a script which cannot be setuid, and setuid is required for the chroot and identity change.) Finally, `_chrooter` starts the `debian-chroot` service, chroot to the target dir, changes identity and eventually launches the original command as if it was lauched directly by `gitannex` user in Debian. `_chrooter` and `gasp` are Python scripts, I did not use shell in order to avoid error-prone issues with spaces in arguments (that need to be passed around several times in the process).
+
+I'll try now to add command-line parameters to `gasp` in order to restrict the commands that can be run through SSH and the repositories allowed.
+
+Cheers,
+Franck
+"""]]