Page 1 of 2

Work in progress - Package for Synology NAS

PostPosted: Mon Aug 22, 2011 3:00 pm
by patters
Trying to integrate it as cleanly as possible. :)
I'll be taking the same approach as the QNAP packagers have taken - have the user download the Java tar.gz from Oracle to the public folder on the NAS then the package scoops it up from there.

Image

Re: Work in progress - Synology package

PostPosted: Mon Aug 22, 2011 7:19 pm
by Cerberus
the NAS genie does it again :D rub his lamp and off he goes :P

Re: Work in progress - Synology package

PostPosted: Tue Aug 23, 2011 9:48 am
by mcjeff2002
If you need some testers .. I m on DS710 + with Sony BDP 470.

Jeff

Re: Work in progress - Synology package

PostPosted: Tue Aug 23, 2011 5:00 pm
by patters
It's taken ages, but here is the Java package for Synology (Intel and ARM). Feedback welcome :)
It includes the Linux locale stuff too so unicode filenames should just work. From what I understand, there is no need to set it to a particular language, en_US.UTF-8 should be fine (that will need testing on a non-English syno).
http://pcloadletter.co.uk/2011/08/23/ja ... -synology/

Up next - Serviio...

Re: Work in progress - Synology package

PostPosted: Tue Aug 23, 2011 7:18 pm
by LeonJ69
Wow, this is what I'm waiting for! :)
I just bought my DS111 (Dutch version) last week, so if I can test something for you I will be glad to do that.

I have been running Serviio on my PC streaming to my TV (Samsung 3D LED) for a while and that was wonderfull. Now I moved my movies to the NAS, but while Serviio running on my Windows PC trying to connect the new folders, they only show empty folders on my TV.
When I looked into your blog to install Serviio on my NAS the only thing slapped my mind was: OMG, how am I gonna do that...
So when it becomes easier for a noob like me, I will be glad to help you by testing if nessecary.

Cheers,
Leon (The Netherlands)

Re: Work in progress - Synology package

PostPosted: Wed Aug 24, 2011 11:16 am
by patters
OK, I've hit a really strange issue. I completely reset my NAS by corrupting a system file then reloading DSM so I could verify my Java package can be installed on a stock firmware (with no optware install). The problem is that now I can't get the Linux to show me unicode characters at all. Even after adding optware, and despite that I now have the system locale defined. At first I thought it was just the ls binary that was the issue but now even the tab auto-complete (so the shell itself) can't deal with non-ASCII characters.

Can someone with an unmodified NAS (Leon perhaps?) use a computer to create a file on the 'public' shared folder on the NAS with an accent character in the name. Then telnet into your NAS (you may need to enable telnet in the DSM 'Terminal' control panel. Then type:
  Code:
ls /volume1/public


and see if it displays the accent properly.

The problem I have is that I don't think the Synology Assistant firmware reinstaller util actually wipes and reinstalls a DSM install - it only seems to fix it (so some things do persist).

Re: Work in progress - Synology package

PostPosted: Wed Aug 24, 2011 1:21 pm
by LeonJ69
Okay, I tried what you asked.
When I Telnet to the Public map (tried with and without Capital P), it doesn't show any file, while I saved one .docx as 'Léon' and one as 'test' in the Public-directory. I also tried to Telnet to my video-map. As you can see it DOES see the file whats in that map, also the file I placed in the video-map 'Léon.doxc'. But as you can see it displays the file, but with strange characters.
But it doesn't show my public-map at all, even not when I deleted the file with the é.

Anything else I can try?

This is what the DOS-box shows me:

Synology login: admin
Password:
login: can't chdir to home directory '/var/services/homes/admin'

BusyBox v1.16.1 (2011-06-29 11:49:19 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Synology> ls /volume1/public
ls: /volume1/public: No such file or directory
Synology> ls /volume1/video
00000.MTS L[-on.docx
Synology>

Re: Work in progress - Synology package

PostPosted: Wed Aug 24, 2011 2:04 pm
by patters
Cool thanks. That's very helpful. The reason you couldn't see /volume1/public was probably because you logged in as 'admin' and not 'root' (which has access to all areas). The root account has the same password as the admin one.

So now you have confirmed that a stock Synology cannot read unicode filenames. I did have it working on mine, but the problem is that I tried so many different things on my unit when I was trying to get it working with Java that I have very little idea what I did!

Re: Work in progress - Synology package

PostPosted: Wed Aug 24, 2011 7:30 pm
by patters
Finally figured it all out, very frustrating. It transpired that there were two typos in my scripts, firstly I had tried to use a character set called UTF8 in my localedef command (instead of UTF-8). Then, less critically although the locale was being created as 'en_US.UTF-8', the part after the period gets adjusted down to lower case and loses the hypen. You can check this by running locale -a which will list the available locales. The Chinese blog where this information first appeared in fact has it noted correctly, but I had wrongly assumed that difference to be a typo on their part, also because it has appeared online incorrectly elsewhere. It's less confusing to call the locale en_US.utf8 from the outset. So:
  Code:
localedef -c -f UTF-8 -i en_US en_US.utf8
locale -a
export LANG=en_US.utf8
locale


Despite that the language is set to en_US, you can still use any unicode characters fine. I just tried successfully with Chinese. They render correctly in the filesystem (viewed from remote machines), in the SSH session, and Java can parse them too.

The final thing that was driving me mad was wondering how I had previously seen accents in SSH, but no longer could. I finally worked out that I needed to define the 'remote character set' in PuTTY as UTF-8. When I had been working on this earlier in the week I was using my Macbook whereas the last few days I was on my PC, which might explain the difference. :roll: Anyhow, I have updated the Synology Java packages on my blog. I also added a sanity check to the uninstaller (before running a recursive delete against a variable name :oops: ). Now I can get going on the Serviio package.

Image

Re: Work in progress - Synology package

PostPosted: Wed Aug 24, 2011 11:33 pm
by patters
Just checked on the Mac and ssh does indeed default to UTF-8, but PuTTY doesn't. Aargh! I wasted sooo much time over this wondering what was wrong because I thought ssh would generally be consistent! Image

Re: Work in progress - Synology package

PostPosted: Thu Aug 25, 2011 12:31 am
by Cerberus
patters wrote:Just checked on the Mac and ssh does indeed default to UTF-8, but PuTTY doesn't. Aargh! I wasted sooo much time over this wondering what was wrong because I thought ssh would generally be consistent! Image


lololol @ computers and consistant lololol

Re: Work in progress - Synology package

PostPosted: Sun Sep 04, 2011 3:14 pm
by LeonJ69
@Patters,
How are you getting along?

Cheers, Leon

Re: Work in progress - Synology package

PostPosted: Sun Sep 04, 2011 10:33 pm
by patters
Hi, I've got the package done. I'm just waiting for Serviio 0.6 to be released so I can release it (I used the beta to build it). Since the package has a dependency on Java 7 I can't make one for Serviio 0.5.2 since that's Java 6 only.

Re: Work in progress - Synology package

PostPosted: Mon Sep 05, 2011 8:41 am
by LeonJ69
Okay, thanks for your update!
Leon

Re: Work in progress - Synology package

PostPosted: Tue Sep 06, 2011 7:37 pm
by romeop
great news patters :)

i have now 0.5.2 following your guide on pcloadletter... will you give also instructions for newbies for removing this one before installing the new package?

Re: Work in progress - Synology package

PostPosted: Thu Sep 08, 2011 12:20 am
by patters
There is an Uninstalling chapter right at the bottom of the guide, so you will just need to follow that before installing the package.

Re: Work in progress - Synology package

PostPosted: Fri Sep 09, 2011 12:37 pm
by LeonJ69
Hi,
Is there any ETA for the next release perhaps?

Cheers, Leon

Re: Work in progress - Synology package

PostPosted: Fri Sep 09, 2011 5:03 pm
by patters
It's whenever Zip is ready really. Weeks not months...
http://www.facebook.com/serviio

Re: Work in progress - Synology package

PostPosted: Fri Sep 23, 2011 5:17 am
by LeonJ69
Great, I saw version 0.6 was released yesterday.
Will you release the Syn Package one of these days also?

Thanks in advance.
Cheers, Leon

Re: Work in progress - Synology package

PostPosted: Fri Sep 23, 2011 7:48 am
by patters
It's done!
http://pcloadletter.co.uk/2011/09/23/se ... y-package/

You'll need to run the console from a computer though - good luck trying to get the files...
viewtopic.php?f=4&t=3290