A new way to install 3th party zypkgs, like FFP, Dropbear, .

Marvell Kirkwood based
Post Reply
Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

A new way to install 3th party zypkgs, like FFP, Dropbear, .

Post by Mijzelf » Mon Mar 24, 2014 7:29 pm

Wiki entry


MetaRepository
After reading about problems with FFP on an NSA325v2 fw 4.70, and questions about how to host/test your own packages, I thought there should be a better way.

And now I proudly present: MetaRepository

What it is
Basically it's an CGI script which runs locally on the NAS. Using the web_prefix file the package manager is pointed to it. The script downloads the ZYPKG_INFO.tgz or ZYPKGS file from several repositories, and combines that to a single file, on base of (alphabetically) sorting the packages. Further it keeps a database of origin of all those packages, and when requested it downloads and offers them.

How to install
Enter the url http://downloads.zyxel.nas-central.org/ ... ypkg-repo/ in web_prefix, or download it here. This file (web_prefix) should be put in \\NAS\admin\zy-pkgs\. Then in the package menu press on the 'Retreive List From Internet' button. Only the MetaRepository package should show up. Install it, and re-request the list. You should see the official Taiwanese repository, merged with mine (ffp, btsync, anyterm, MetaRepository, MidnightCommander, Dropbear). If you still see only MetaRepository, disable it, enable it again, and retry.

How to configure
In the package menu you can see the configuration page of MetaRepositoy. Here you can enter the source repositories. Further you can blacklist packages, and 'pushlist' them.
A word on 'pushlisting': As said, the packages are sorted alphabetically, and then the 'highest value' is chosen. Now the official repository contains a nzbget 9.x, while the beta repository contains a nzbget 11.x. Unfortunately 11 has a lower alphabetically value than 9. You can push nzbget 11, which actually means it's exchange by nzbget z11, restoring the wanted sequence.

How to create your own (local) repository
Just put the package(s) in a share, in combination with a describing ZYPKGS file (case sensitive). Add the full path to the 'Repositories' list. Done.
You can also supply a ZYPKG_INFO.tgz if you like. The script first tries to download/copy the ZYPKG_INFO.tgz file, and if that fails it tries ZYPKGS.

After you installed MetaRepository, you get access to this additional packages:

Dropbear
Dropbear is a lightweight SSH/SCP server.

MidnightCommander
Midnight commander is a powerful text-based visual file manager, running in a shell. So you can use it in a telnet, ssh or anyterm session.

Anyterm
Anyterm is a shell in a browser. Using this package you can simply open a shell by clicking a link in the packages menu.

FFP
Of course.

Tweaks
Firmware tweaks.
Currently:
  • Telnet; Enable telnet daemon, specifiy port, possibly loginless.
  • Cron; add own jobs, including @reboot and @shutdown
  • Ftp; specify server address, enable force ftps.
  • Misc; Change homedir of root and/or admin
btsync
Some torrent base directory sync program.

thesappho
Posts: 4
Joined: Sun Jan 26, 2014 7:27 pm

Re: Some 3th party zypkgs

Post by thesappho » Tue Mar 25, 2014 11:01 am

is this only for NSA-325?
i added http://downloads.zyxel.nas-central.org/ ... ypkg-repo/ to my web_prefix but no additional repo.
I use NSA320 firmware 4.62

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Some 3th party zypkgs

Post by Mijzelf » Tue Mar 25, 2014 11:40 am

No. It's supposed to work for all devices running fw 4.40 and newer. ('210, '221, '310(S), '320(S) '325(v2)). I tested it only on a 325v1 (the only box I have), but here I have feedback that it actually works on a 320.

You cannot create the web_prefix file with something like notepad. It should contain one line, ended with a linefeed LF. Notepad will add a CR LF. Try to use the provided web_prefix on the download page.

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: Some 3th party zypkgs

Post by barmalej2 » Tue Mar 25, 2014 5:37 pm

Nice job, BTW, M.
Maybe it is worth to add additionally something like FFP-zypkgs metarepository to the title of this topic?
And make it sticky?

BigJArm
Posts: 11
Joined: Tue Jan 07, 2014 5:34 pm

Re: Some 3th party zypkgs

Post by BigJArm » Tue Mar 25, 2014 7:50 pm

Thanks for posting this. Worked great for me. Can't wait to see what gets added to the repo.

jiridrak
Posts: 2
Joined: Sun Mar 23, 2014 11:44 am

Re: Some 3th party zypkgs

Post by jiridrak » Tue Mar 25, 2014 8:26 pm

Nice work.
I can now finally install FFP on NSA320S 4.70

philippetev
Posts: 80
Joined: Tue Apr 17, 2012 7:45 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by philippetev » Fri Mar 28, 2014 6:27 am

One question: what would happen with the existing ffp package?
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by Mijzelf » Fri Mar 28, 2014 10:09 am

You mean, when installing zypkg004? Basically nothing. The script will detect that an existing ffp installation exists, and leave that alone. BTW, installing zypkg004 won't give you much added value. (Release notes)

philippetev
Posts: 80
Joined: Tue Apr 17, 2012 7:45 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by philippetev » Fri Mar 28, 2014 11:25 am

Mijzelf wrote:You mean, when installing zypkg004? Basically nothing. The script will detect that an existing ffp installation exists, and leave that alone. BTW, installing zypkg004 won't give you much added value. (Release notes)
I have already installed ffp zypkg004 (I've forgotten to update my signature). My question was what would happen if I install this new package with already installed ffp zypkg004? Do I have to disable/uninstall it first?
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by Mijzelf » Fri Mar 28, 2014 11:53 am

I think there is some misunderstanding in what MetaRepository actually is. It is just a package which dynamically merges several repositories, so nothing will happen to your current packages. You will only have a longer package list in the packages menu.

Webb
Posts: 10
Joined: Sat Jan 18, 2014 3:03 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by Webb » Sun Mar 30, 2014 12:16 am

I gave it a shot on my nsa320 just for kicks. Swapped out my web prefix for yours and it doesnt give me any error messages, just says I need to hit the download from internet button. Upon putting the initial web prefix back, all is good again. Did I miss something obvire.ous he

thomastcat1
Posts: 1
Joined: Sun Mar 30, 2014 10:42 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by thomastcat1 » Sun Mar 30, 2014 10:54 am

^^^^ Same as! Sounds like a great addition though Mijzelf! Any ideas on what may be going wrong with this? Trying to load it to an NSA310 here myself but just get the following message when I click the 'Retrieve List from Internet' button -

Currently, there are no packages. Please use "Retrieve List From Internet" to update package list.

Package list remains blank unless I restore my original web_prefix file.

I tried adding it both under windows and linux in case that was the problem but still not working.

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by Mijzelf » Sun Mar 30, 2014 1:25 pm

Two fails on the same morning? Have you checked if downloads.zyxel.nas-central.org was available on that very moment? And also, did you download the web_prefix file, or did you create your own?

Webb
Posts: 10
Joined: Sat Jan 18, 2014 3:03 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by Webb » Sun Mar 30, 2014 2:58 pm

I tried both last night, but I never tried to see the link was working though.

dexhain
Posts: 27
Joined: Tue Apr 02, 2013 11:50 am

Re: A new way to install 3th party zypkgs, like FFP, Dropbea

Post by dexhain » Mon Mar 31, 2014 11:54 am

Does the script change the permissions for the folder /usr/local/zy-pkgs by any chance? I have SSH set up to only accept key authentication, and after installing MetaRepository, I couldn't ssh anymore. Finally got some debugging messages going, and the error being given was: "bad ownership or modes for directory /usr/local/zy-pkgs". Checked the permissions for that directory, and it was 777, owned by nobody. All the other directories in /usr/local/ were owned by root and had 755 permissions. Changed zy-pkgs to that, and SSH started working again.

If I click "Retrieve List from Internet" in the admin UI, the permissions are reset, so I'm locked out again until I can get access to the Telnet backdoor.

Post Reply