Unison File Synchronizer (and Ocaml)

274 views
Skip to first unread message

Joao Cardoso

unread,
Feb 27, 2013, 9:14:48 AM2/27/13
to al...@googlegroups.com
[Moved from "SCP to copy from one NAS to another" topic.]

[PLEASE open new topics for new subjects]

Hi Joao,

I am using unison all the time for my backups. However, I can't find one under alt-f. So I have to do a remote NFS to export my nas-323 share to a Debian machine and run unison on Debian. However, this is really slow since unison has to transfer the files over the network just to check if it has been modified. I have a lot of huge files which seldom change, and it just waste time to transfer them over the network for modification checking.

Is it possible to have a version of unison running on alt-f? I have unison v2.32.52-1 on Debian. Is it possible that I can compile my version of unison on alt-f?

Thanks,
Jason
---------------------------------------------------------

On Wednesday, February 20, 2013 8:30:34 PM UTC, Jason Zhang wrote:
Hi Joao,

I am using unison all the time for my backups. However, I can't find one under alt-f.

ah, unison, excellent program, I used it for years,and I found no replacement for it.
 
So I have to do a remote NFS to export my nas-323 share to a Debian machine and run unison on Debian. However, this is really slow since unison has to transfer the files over the network just to check if it has been modified. I have a lot of huge files which seldom change, and it just waste time to transfer them over the network for modification checking.

Is it possible to have a version of unison running on alt-f?

Not currently.

Unison is written in Caml and needs the camlc compiler. As most compilers, ocamlc compiles itself, so cross-compiling is generally a pain (you have to compile a compiler that runs on the host cpu but that generates code to be executed in the target cpu)
The best is for you to fill in an issue request, so I will not forget it. You can help if you research for cross-compiling patches.
 
I have unison v2.32.52-1 on Debian. Is it possible that I can compile my version of unison on alt-f?

Yes, but it is a pain, as you have to compile it in the box -- you need to install the dev-bundle and make packages in the box, then recursively compile everything that unison needs (Caml is the first and most important dependency)

Someone who wanted eMule (that I think that also needs Ocaml) did that.
 
Thanks,
Jason

---------------------------------------------------------

Where can I fill an issue request?

I have found this guy using a Ocaml patch and cross compile successfully.
http://www.cs.cmu.edu/~ecc/ocaml-cross-compiler.html

I have no experience of cross compiling. I was trying to use this wiki for the toolchain:
http://dns323.kood.org/howto:crosscompile

But I failed to compile ocaml with armv5l-gcc errors.

There is another one compile unison natively on dns-323:
http://forum.dsmg600.info/viewtopic.php?id=2813

I followed the instruction, but could not even get the configure running correctly. 

Jason

---------------------------------------------------------

On Thursday, February 21, 2013 3:32:02 AM UTC, Jason Zhang wrote:
Where can I fill an issue request?

 
This issue is not high in my priority list (as if I had one)...


I have found this guy using a Ocaml patch and cross compile successfully.
http://www.cs.cmu.edu/~ecc/ocaml-cross-compiler.html

Thanks for this. Please add the link in the issue request.
 
I have no experience of cross compiling. I was trying to use this wiki for the toolchain:
http://dns323.kood.org/howto:crosscompile

But I failed to compile ocaml with armv5l-gcc errors.

There is another one compile unison natively on dns-323:
http://forum.dsmg600.info/viewtopic.php?id=2813

I followed the instruction, but could not even get the configure running correctly. 

Logs are necessary when reporting, "does not works" is useless... :-)

Have you installed the "dev-bundle" (binutils, gcc and base system header files) and the "make" Alt-F packages?

---------------------------------------------------------

Since it is hard to compile unison locally. Is there any alternative way to use already built unison package under Alt-f?

The way I can think of:
(1) Can we just use Debian's Armel package and install inside of Alt-f?

(2) I was trying to install Debian Squeeze under Alt-f but could not find any instructions. The information that I can find was two years ago posted by dhub, however, his site which hosted his packages was down, so I don't know where to find a proper Debian package to install.

(3) I also have tried to put Debian Squeeze package that was posted for NAS-320, unzip to /mnt/sda2/, 
export debdir=/mnt/sda2/squeeze
and then run 
/usr/sbin/debian -chroot
I can get into debian environment, using apt-get to install packages. However, I could not get the sshd running under debian.
I guess there is already running sshd under alt-f, so I can't start another service?

Thanks,
Jason
 

Joao Cardoso

unread,
Feb 27, 2013, 9:29:06 AM2/27/13
to al...@googlegroups.com

Since it is hard to compile unison locally.

I have started compiling ocaml/unison. I was able to cross-compile both, but there are still issues, more time is needed, even if success is uncertain.
 
Is there any alternative way to use already built unison package under Alt-f?

Unlikely. Alt-F uClibc library is customized, it is very unlikely that binaries build for a other distribution will run OK under Alt-F.
 

The way I can think of:
(1) Can we just use Debian's Armel package and install inside of Alt-f?

(2) I was trying to install Debian Squeeze under Alt-f but could not find any instructions.

Have you browsed over Alt-F menus? Something like Setup->Debian?
 
The information that I can find was two years ago posted by dhub, however, his site which hosted his packages was down, so I don't know where to find a proper Debian package to install.

(3) I also have tried to put Debian Squeeze package that was posted for NAS-320, unzip to /mnt/sda2/, 
export debdir=/mnt/sda2/squeeze
and then run 
/usr/sbin/debian -chroot
I can get into debian environment, using apt-get to install packages. However, I could not get the sshd running under debian.

This is a chroot specific question. You have to start Debian sshd on another port.

 
I guess there is already running sshd under alt-f, so I can't start another service?

This is a Debian specific question.
 

Thanks,
Jason
 

Jason Zhang

unread,
Feb 27, 2013, 5:38:32 PM2/27/13
to al...@googlegroups.com
Thank you Joao for your support and quick answer. If possible, I can do a test on my device once it is available.

You are right. After I installed Debian (after replace the debian_proc.cgi file from this topic https://groups.google.com/forum/#!topic/alt-f/0Fo2ipS7c7w) from the webadmin Setup->Debian, run #debian -chroot, I can install unison from within the Debian environment. However, I could not run the executable under Alt-f. It always shows "-sh: unison not found", although I have made the file executable.

However, I found that I can only run "#debian -chroot" successfully. Once I tried to run "#debian -kexec", the device stuck at reboot. Very much like this discuss:
https://groups.google.com/forum/?fromgroups=#!topic/alt-f/rOzLukFNlSw

Basically, I have a dns-323 version C1, flashed Alt-f. If I run "#debian -kexec" (or just press the "execute" button from the Setup Debian page), then the device starts to reboot, I can see the power button flashing fast, the network icon off and back on again. But the rebooting never ends, I have waited for over an hour and the power button still flashing fast. Pressing on power button does not have any response. I have to unplug the power cord to shutdown the device and restart it back to Alt-f.

Thanks,
Jason

Joao Cardoso

unread,
Mar 6, 2013, 9:58:25 AM3/6/13
to al...@googlegroups.com


On Wednesday, February 27, 2013 10:38:32 PM UTC, Jason Zhang wrote:
Thank you Joao for your support and quick answer. If possible, I can do a test on my device once it is available.

You are right. After I installed Debian (after replace the debian_proc.cgi file from this topic https://groups.google.com/forum/#!topic/alt-f/0Fo2ipS7c7w) from the webadmin Setup->Debian, run #debian -chroot, I can install unison from within the Debian environment. However, I could not run the executable under Alt-f. It always shows "-sh: unison not found", although I have made the file executable.

I don't see this issue, but I'm using RC3:

/ # debian -chroot unison -doc topics
Documentation topics:
          about About Unison
         people People
          lists Mailing Lists and Bug Reporting
         status Development Status
        copying Copying
            ack Acknowledgements
        install Installation
       tutorial Tutorial
         basics Basic Concepts
       failures Invariants
        running Running Unison
            ssh Installing Ssh
           news Changes in Version 2.32.52

Type "unison -doc <topic>" for detailed information about <topic>
or "unison -doc all" for the whole manual

The "debian" command setup a minimal chroot environment, as the Debian motd says (message of the day): "You leaved Alt-F, you are now on your own."

If you have to modify or improve the command, please let me know your changes.
 

However, I found that I can only run "#debian -chroot" successfully. Once I tried to run "#debian -kexec", the device stuck at reboot. Very much like this discuss:
https://groups.google.com/forum/?fromgroups=#!topic/alt-f/rOzLukFNlSw


Again I don't see this. But again this is not related with the topic subject.

Jason Zhang

unread,
Mar 10, 2014, 4:23:25 PM3/10/14
to al...@googlegroups.com
Dear Joao,

It's been a year from my past post regarding the unison running on Alt-f.
Recently I found the following website for the requirement of compiling unison:
http://www.crutzi.info/unison/binary/armel
I have tried that in my dlink-320 and the compiled binary works on dlink323 with Alt-f. The static binary I downloaded from that website also seems working fine.

Hope anyone else who wish to use unison on Alt-f enjoy this program.

Thanks,
Jason
Reply all
Reply to author
Forward
0 new messages