General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Dec 14, 2017 1:17 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Nov 10, 2017 9:57 pm 
Offline

Joined: Wed Sep 25, 2013 2:09 am
Posts: 4
OK, I need a little help here with my NAS221 and MetaRepository.

Installed MetaRepository (http://zyxel.nas-central.org/wiki/3rd_p ... to_install) and the only thing that works is the Mejzelf repo. The problem is mainly that I have now lost the Zyzel repo's and there were packages that I wanted to install from there. I've troubleshot this as much as I can (I have console access via a USB-Serial adapter as well as SSH access via ffp (From the Mejzelf repo) and of course the telnet back-door that works if you use the URL) but have not had much success understanding what MetaRepository is unhappy about with the Zyxel info.

Can anyone help me straighten out what MetaRepository is doing? Goal here is to get access to the Zyxel Repo's. Alternatively is there a CLI way to install the zpkgs manually? The core issue is probably the fact that this NSA221 is so old that something about the old zypkg info/format is causing problems for the MetaRepository software.

I can disassemble the package and manually install the control, data, etc tarballs file by file, but I'd really rather not have to go that far down the rabbit hole on each package.

I have log files available but the forum will not allow me to attach either log or zip files. Go figure. Sigh. tar and gz are not acceptable either.


Top
 Profile  
 
PostPosted: Fri Nov 10, 2017 10:04 pm 
Offline

Joined: Wed Sep 25, 2013 2:09 am
Posts: 4
This is what my Repository looks like now.

# Official repository
#ftp://ftp2.zyxel.com/+ ZyXEL
ftp://ftp2.zyxel.com/NSA221/4.40/zypkg/ ZyXel
# German mirror
ftp://ftp.zyxel-tech.de/2.new_mirror/+ Mirror
# German beta server
# ftp://ftp.zyxel-tech.de/+ Beta
# Medion server
ftp://nas-download:sEhtalr@download.medion.de/ Medion
# Mijzelf's repository
http://downloads.zyxel.nas-central.org/ ... ypkg-repo/ Mijzelf
# Local repository
/i-data/md0/admin/MyRepo/ Local

This is the first log file. I had manually downloaded the Zyxel packages and stuck them in my own Repo to see if I could get access to them that way.

Note the embedded "^M" in the lines below. I think the Zyxel ZYXEL_INFO.tgz file is in the wrong text format (windows vs unix) and MetaRepository may not like that (hey, this is how they did it back in 2013 which is when these files were last touched by Zyxel).

HandleZYPKG_INFO /NSA221/4.40/zypkg
FindApp md5sum found /sbin/md5sum
ReadConfig Repositories
Start of block
ftp://ftp2.zyxel.com/NSA221/4.40/zypkg/ ZyXel
ftp://ftp.zyxel-tech.de/2.new_mirror/+ Mirror
ftp://ftp.zyxel-tech.de/+ Beta
ftp://nas-download:sEhtalr@download.medion.de/ Medion
http://downloads.zyxel.nas-central.org/ ... ypkg-repo/ Mijzelf
/i-data/md0/admin/MyRepo/ Local
End of block
9 start: 09:02:07
8 start: 09:02:08
7 start: 09:02:08
6 start: 09:02:08
5 start: 09:02:08
9: FetchZYPKG_INFO ftp://ftp2.zyxel.com/NSA221/4.40/zypkg/ 9
4 start: 09:02:08
8: FetchZYPKG_INFO ftp://ftp.zyxel-tech.de/2.new_mirror/NSA221/4.40/zypkg/ 8
5: FetchZYPKG_INFO http://downloads.zyxel.nas-central.org/ ... ypkg-repo/ 5
9: FindApp curl found /usr/bin/curl
6: FetchZYPKG_INFO ftp://nas-download:sEhtalr@download.medion.de/ 6
7: FetchZYPKG_INFO ftp://ftp.zyxel-tech.de/NSA221/4.40/zypkg/ 7
4: FetchZYPKG_INFO /i-data/md0/admin/MyRepo/ 4
8: FindApp curl found /usr/bin/curl
7: FindApp curl found /usr/bin/curl
5: FindApp curl found /usr/bin/curl
6: FindApp curl found /usr/bin/curl
4: FindApp curl found /usr/bin/curl
4: Fetch /i-data/md0/admin/MyRepo/ZYPKG_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/_i-data_md0_admin_MyRepo_.tmp succeeded
9: Fetch ftp://ftp2.zyxel.com/NSA221/4.40/zypkg/ZYPKG_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/ftp___ftp2.zyxel.com_NSA221_4.40_zypkg_.tmp succeeded
5: Fetch http://downloads.zyxel.nas-central.org/ ... G_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/http___downloads.zyxel.nas-central.org_Users_Mijzelf_zypkg-repo_.tmp failed
7: Fetch ftp://ftp.zyxel-tech.de/NSA221/4.40/zyp ... G_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/ftp___ftp.zyxel-tech.de_NSA221_4.40_zypkg_.tmp failed
9 stop: 09:02:12
5: Fetch http://downloads.zyxel.nas-central.org/ ... epo/ZYPKGS /i-data/md0/admin/zy-pkgs/MetaRepository/http___downloads.zyxel.nas-central.org_Users_Mijzelf_zypkg-repo_.tmp succeeded
6: Fetch ftp://nas-download:sEhtalr@download.med ... G_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepositor ... .medion.de_.tmp failed
8: Fetch ftp://ftp.zyxel-tech.de/2.new_mirror/NS ... G_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/ftp___ftp.zyxel-tech.de_2.new_mirror_NSA221_4.40_zypkg_.tmp succeeded
7: Fetch ftp://ftp.zyxel-tech.de/NSA221/4.40/zypkg/ZYPKGS /i-data/md0/admin/zy-pkgs/MetaRepository/ftp___ftp.zyxel-tech.de_NSA221_4.40_zypkg_.tmp failed
7: Failed
5 stop: 09:02:13
7 stop: 09:02:13
8 stop: 09:02:13
6: Fetch ftp://nas-download:sEhtalr@download.medion.de/ZYPKGS /i-data/md0/admin/zy-pkgs/MetaRepositor ... .medion.de_.tmp failed
6: Failed
6 stop: 09:02:15
4: sh: DyDNS_001_arm_005.zpkg^M: unknown operand
4: mv: can't rename '/i-data/md0/admin/zy-pkgs/MetaRepository/_i-data_md0_admin_MyRepo_/tmp': No such file or directory
4: mv: can't rename '/i-data/md0/admin/zy-pkgs/MetaRepository/_i-data_md0_admin_MyRepo_/BackupPlanner_001_arm_008.zpkg^M': No such file or directory
4: mv: can't rename 'DyDNS_001_arm_005.zpkg^M': No such file or directory
4: mv: can't rename 'eMule_001_arm_006.zpkg^M': No such file or directory
4: mv: can't rename 'gallery_3.0.2_arm_005.zpkg^M': No such file or directory
4: mv: can't rename 'NFS_1.1.4_arm_004.zpkg^M': No such file or directory
4: mv: can't rename 'PHP-MySQL-phpMyAdmin_1.0_arm_005.zpkg^M': No such file or directory
4: mv: can't rename 'pyLoad_0.4.9_arm_002.zpkg^M': No such file or directory
4: mv: can't rename 'SMART_5.39_arm_005.zpkg^M': No such file or directory
4: mv: can't rename 'SqueezeCenter_7.7_arm_005.zpkg^M': No such file or directory
4: mv: can't rename 'Syslog_2.0.10_arm_003.zpkg^M': No such file or directory
4: mv: can't rename 'Tftp_0.7_arm_002.zpkg^M': No such file or directory
4: mv: can't rename 'WordPress_3.3.1_arm_005.zpkg^M': No such file or directory
4 stop: 09:02:20
Pushlist...
ReadConfig Pushlist
Start of block
End of block
Blacklist...
ReadConfig Blacklist
Start of block
YouNameIt
End of block
/bin/sed -i s/^YouNameIt/#YouNameIt/I /i-data/md0/admin/zy-pkgs/MetaRepository/NSA221/4.40/zypkg/List.13968
Sort...
Choose packages...
cat: can't open '/i-data/md0/admin/zy-pkgs/MetaRepository/eMule^M': No such file or directory
cat: can't open '/i-data/md0/admin/zy-pkgs/MetaRepository.url': No such file or directory
Choose DEPS...
Create ZYPKG_INFO.tgz
TarHeader
FindApp curl found /usr/bin/curl
Fetch /i-data/md0/admin/zy-pkgs/MetaRepository/NSA221/4.40/zypkg/ZYPKG_INFO.tgz - succeeded


Top
 Profile  
 
PostPosted: Wed Nov 15, 2017 9:15 pm 
Offline

Joined: Wed Sep 25, 2013 2:09 am
Posts: 4
OK, I was *semi* able to fix this myself. I suspected from looking in the log files and seeing the ^M (Cntl-M) characters that this was a windows text format vs linux txt format issue.

Core problem was the ZYPKG_INFO.tgz had been created for the NSA221 back in 2012 and had CR-LF instead of just LF's in it. When I looked at it with 'vi' I saw that extra CR (^M) character. The fix was to strip it off. Editing the already unpacked files in the MetaRepository directory didn't fix things. I had to unpack the ZYPKG_INFO.tgz file, edit the problem file, and then repack it so I could re-do the unpack using MetaRepository.

Here's how I did it.
Code:
# Make a work directory
root@NSA221-1:/i-data/md0/admin/MyRepo# mkdir ../work
# Get into work directory
root@NSA221-1:/i-data/md0/admin/MyRepo# cd ../work
# Let's look at what the file looks like before we *do* anything.
root@NSA221-1:/i-data/md0/admin/work# tar tvzf ../MyRepo/ZYPKG_INFO.tgz
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 i-data/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 i-data/md0/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 i-data/md0/admin/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 i-data/md0/admin/zy-pkgs/
-rwxrwxrwx admin/everyone 5904 2012-09-04 07:04 i-data/md0/admin/zy-pkgs/ZYPKGS
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/local/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/local/zy-pkgs/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/local/zy-pkgs/etc/
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/local/zy-pkgs/etc/init.d/
-rwxrwxrwx admin/everyone 1037 2012-05-04 02:18 usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS
drwxrwxrwx admin/everyone    0 2012-09-04 07:32 usr/local/zy-pkgs/gui/
-rwxrwxrwx admin/everyone 27184 2012-05-04 02:18 usr/local/zy-pkgs/gui/ZYPKG_LANG_LIST

# Meh, not too much, OK, let's unpack it now into our 'work' directory
root@NSA221-1:/i-data/md0/admin/work# tar xvzf ../MyRepo/ZYPKG_INFO.tgz
i-data/
i-data/md0/
i-data/md0/admin/
i-data/md0/admin/zy-pkgs/
i-data/md0/admin/zy-pkgs/ZYPKGS
usr/
usr/local/
usr/local/zy-pkgs/
usr/local/zy-pkgs/etc/
usr/local/zy-pkgs/etc/init.d/
usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS
usr/local/zy-pkgs/gui/
usr/local/zy-pkgs/gui/ZYPKG_LANG_LIST

# 'vi' each file to see which one has the ^M's in it
vi i-data/md0/admin/zy-pkgs/ZYPKGS
vi usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS
vi usr/local/zy-pkgs/gui/ZYPKG_LANG_LIST

# As expected, the ZYPKGS file is our 'problem child', let's fix it.
sed -e "s/\r//g" i-data/md0/admin/zy-pkgs/ZYPKGS > i-data/md0/admin/zy-pkgs/ZYPKGS.new
#check the new file....
vi i-data/md0/admin/zy-pkgs/ZYPKGS.new
# Clean!

# put the new file into place
mv i-data/md0/admin/zy-pkgs/ZYPKGS.new i-data/md0/admin/zy-pkgs/ZYPKGS
# check and adjust our permissions "just in case"
root@NSA221-1:/i-data/md0/admin/work# find . -exec ls -ald {} \;
drwxr-xr-x 4 root root 29 Nov 15 20:38 .
drwxrwxrwx 3 admin everyone 16 Sep  4  2012 ./i-data
drwxrwxrwx 3 admin everyone 18 Sep  4  2012 ./i-data/md0
drwxrwxrwx 3 admin everyone 20 Sep  4  2012 ./i-data/md0/admin
drwxrwxrwx 2 admin everyone 19 Nov 15 20:40 ./i-data/md0/admin/zy-pkgs
-rw-r--r-- 1 root root 5731 Nov 15 20:40 ./i-data/md0/admin/zy-pkgs/ZYPKGS
drwxrwxrwx 3 admin everyone 18 Sep  4  2012 ./usr
drwxrwxrwx 3 admin everyone 20 Sep  4  2012 ./usr/local
drwxrwxrwx 4 admin everyone 26 Sep  4  2012 ./usr/local/zy-pkgs
drwxrwxrwx 3 admin everyone 19 Sep  4  2012 ./usr/local/zy-pkgs/etc
drwxrwxrwx 2 admin everyone 23 Sep  4  2012 ./usr/local/zy-pkgs/etc/init.d
-rwxrwxrwx 1 admin everyone 1037 May  4  2012 ./usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS
drwxrwxrwx 2 admin everyone 28 Sep  4  2012 ./usr/local/zy-pkgs/gui
-rwxrwxrwx 1 admin everyone 27184 May  4  2012 ./usr/local/zy-pkgs/gui/ZYPKG_LANG_LIST
# Fix the perms and ownership
root@NSA221-1:/i-data/md0/admin/work# chown admin:everyone ./i-data/md0/admin/zy-pkgs/ZYPKGS
root@NSA221-1:/i-data/md0/admin/work# chmod 777 ./i-data/md0/admin/zy-pkgs/ZYPKGS
# Recheck...
root@NSA221-1:/i-data/md0/admin/work# find . -exec ls -ald {} \;
drwxr-xr-x 4 root root 29 Nov 15 20:38 .
drwxrwxrwx 3 admin everyone 16 Sep  4  2012 ./i-data
drwxrwxrwx 3 admin everyone 18 Sep  4  2012 ./i-data/md0
drwxrwxrwx 3 admin everyone 20 Sep  4  2012 ./i-data/md0/admin
drwxrwxrwx 2 admin everyone 19 Nov 15 20:40 ./i-data/md0/admin/zy-pkgs
-rwxrwxrwx 1 admin everyone 5731 Nov 15 20:40 ./i-data/md0/admin/zy-pkgs/ZYPKGS
drwxrwxrwx 3 admin everyone 18 Sep  4  2012 ./usr
drwxrwxrwx 3 admin everyone 20 Sep  4  2012 ./usr/local
drwxrwxrwx 4 admin everyone 26 Sep  4  2012 ./usr/local/zy-pkgs
drwxrwxrwx 3 admin everyone 19 Sep  4  2012 ./usr/local/zy-pkgs/etc
drwxrwxrwx 2 admin everyone 23 Sep  4  2012 ./usr/local/zy-pkgs/etc/init.d
-rwxrwxrwx 1 admin everyone 1037 May  4  2012 ./usr/local/zy-pkgs/etc/init.d/ZYPKG_DEPS
drwxrwxrwx 2 admin everyone 28 Sep  4  2012 ./usr/local/zy-pkgs/gui
-rwxrwxrwx 1 admin everyone 27184 May  4  2012 ./usr/local/zy-pkgs/gui/ZYPKG_LANG_LIST
# Sweet!   All good.
# Repack it
tar cvzf ../MyRepo/ZYPKG_INFO2.tgz *
# Move it into place and fix the perms...
cd ../MyRepo
mv ZYPKG_INFO2.tgz ZYPKG_INFO.tgz
chmod 777 ZYPKG*
chown admin:everyone ZYPKG*


At this point I went back to the admin page in my browser and did the "retrieve list from internet" again. This time it loaded all the Zyxel packages I had in the "MyRepo" folder as desired. eMule failed to load for some reason, but that's small potatoes. All the rest showed up and I can install the desired packages I still want that Zyxel's repo offered.

The correct solution here would be for Zyxel to update their ZYPKG_INFO.tgz to have the correct text format. (Like *THAT* is going to happen!) The next correct solution would be for Mijzelf's MetaRepository package to handle either text format, but that depends on when he can revisit the issue. My fix is simply to change what I could control and use it which works and gets me around the issue.

Hopefully this will help someone else.


Top
 Profile  
 
PostPosted: Sat Nov 18, 2017 9:48 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
Good catch!

I have some questions. You write you downloaded ZYPKG_INFO.tgz from the ZyXEL repo. I guess from the German mirror repo, as the Taiwanese original seems to have right line endings.
But I see in your log
Code:
4: Fetch /i-data/md0/admin/MyRepo/ZYPKG_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/_i-data_md0_admin_MyRepo_.tmp succeeded
8: Fetch ftp://ftp.zyxel-tech.de/2.new_mirror/NS ... G_INFO.tgz /i-data/md0/admin/zy-pkgs/MetaRepository/ftp___ftp.zyxel-tech.de_2.new_mirror_NSA221_4.40_zypkg_.tmp succeeded
4: sh: DyDNS_001_arm_005.zpkg^M: unknown operand
4: mv: can't rename '/i-data/md0/admin/zy-pkgs/MetaRepository/_i-data_md0_admin_MyRepo_/tmp': No such file or directory

If your file is from the German repo, then that file is handled twice. Once from your MyRepo, and once from the mirror itself. Yet only thread 4 (handling MyRepo) gives errors in extracting, and not thread 8, which is handling the mirror.
So where exactly did you download your ZYPKG_INFO.tgz?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group