New package: Entware-ng

Marvell Kirkwood based
Post Reply
dexhain
Posts: 27
Joined: Tue Apr 02, 2013 11:50 am

Re: New package: Entware-ng

Post by dexhain » Fri Feb 09, 2018 8:06 pm

philippetev wrote:Guys, do you know any way to start the processes as other user? Entware's rc.func-based init script subsystem doesn't seems to support starting the processes as other user than root and you know this is a potential security hole.
Use "PREARGS" and sudo e.g.:

Code: Select all

PREARGS="sudo -u nobody"

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

Re: New package: Entware-ng

Post by philippetev » Fri Feb 09, 2018 10:47 pm

dexhain wrote:
philippetev wrote:Guys, do you know any way to start the processes as other user? Entware's rc.func-based init script subsystem doesn't seems to support starting the processes as other user than root and you know this is a potential security hole.
Use "PREARGS" and sudo e.g.:

Code: Select all

PREARGS="sudo -u nobody"
Works like a charm! Thanks!
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

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

Re: New package: Entware-ng

Post by philippetev » Thu Mar 08, 2018 5:33 pm

It seems Entware-ng has been deprecated. They have added a "deprecated" label to the repo. There is a new repo here:
https://github.com/Entware/Entware
called Entware-ng-3x and the main change is dropped support for the 2.x kernels or at least 2.x is supported only for ARMv7, the rest use 3.x for building the packages.
I guess that's it for our old 2.6-powered boxes...
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

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

Re: New package: Entware-ng

Post by Mijzelf » Sun Mar 11, 2018 12:21 pm

Both the old Entware-ng github page and the Entware-ng-3x page shows the message
Entware-ng-3x and Entware-ng merged to become Entware
Entware-ng-3x and Entware-ng decided to join forces and merge the two projects into a new project called Entware. As a result the two projects Entware-ng-3x and Entware-ng will not be maintained anymore. All software and resources will be available at the new project webpage, including the documentation wiki.

More information (Russian and English) here
http://bin.entware.net/Readme.txt
That Readme.txt says:
Entware developers are happy to announce Entware-ng and Entware-3x merge. The new project is called Entware.
Entware will have all package repositories from Entware-3x (armv5, armv7, aarch64, mips, mipsel, x64) and
a repo for armv7 (Linux kernel 2.6.36) from Entware-ng. All other repositories will be available for installation but will not be
updated.

We have updated the toolchain in Entware. We use GCC 7.3 to build binaries and glibc 2.27 as a system library
(glibc 2.23 is used for kernel 2.6.36 - it is glibс limitation).
So it will support armv5 and armv7 from kernel 3.x and up and armv7 from 2.6.36 and up?

So far the Wiki is identical to the old Entware-ng Wiki,

As soon as the repository and sources get available, I'll look if the recompile-glibc-for-older-kernel trick will also work for Entware.

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

Re: New package: Entware-ng

Post by Mijzelf » Tue Mar 27, 2018 1:05 pm

OK, managed to get Entware running on my 325, using an adapted libc. So far it's running fine, I only found one small problem. When starting Midnight Commander there is a 10 seconds delay. (And when I say 10 seconds, I mean 10 seconds:

Code: Select all

13:21:22.492726 read(4, "$(eval $PRECMD)admin@NAS520:/i-d"..., 128) = 52
13:21:22.492860 _newselect(7, [4 6], NULL, NULL, {tv_sec=9, tv_usec=996093}) = 0 (Timeout)
13:21:32.495294 rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x2aee0ee0}, NULL, 8) = 0
13:21:32.495569 fstat64(1, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 0), ...}) = 0
OK. 9.996 seconds)

This seems to have nothing to do with that libc, as on my '520 the same problem exists, which uses stock Entware libc, so it's probably a Midnight Commander bug, and has something to do with subshells. mc -u solves the problem.

Any volunteers to test this?

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

Re: New package: Entware-ng

Post by philippetev » Wed Mar 28, 2018 3:05 pm

Mijzelf wrote:OK, managed to get Entware running on my 325, using an adapted libc. So far it's running fine, I only found one small problem. When starting Midnight Commander there is a 10 seconds delay. (And when I say 10 seconds, I mean 10 seconds:

Code: Select all

13:21:22.492726 read(4, "$(eval $PRECMD)admin@NAS520:/i-d"..., 128) = 52
13:21:22.492860 _newselect(7, [4 6], NULL, NULL, {tv_sec=9, tv_usec=996093}) = 0 (Timeout)
13:21:32.495294 rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x2aee0ee0}, NULL, 8) = 0
13:21:32.495569 fstat64(1, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 0), ...}) = 0
OK. 9.996 seconds)

This seems to have nothing to do with that libc, as on my '520 the same problem exists, which uses stock Entware libc, so it's probably a Midnight Commander bug, and has something to do with subshells. mc -u solves the problem.

Any volunteers to test this?
Sure, why not?
I was going to suggest you to turn off the subshell. Did you try it with bash? That bug seems to affect only if MC is used with busybox, at least I get the same delay on my NSA-310 with it and there is no delay at all with bash. Seems like the subshell support in bash is better than the same in busybox (if it has it at all).
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

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

Re: New package: Entware-ng

Post by Mijzelf » Wed Mar 28, 2018 7:07 pm

I PM'ed you a downloadlink. Unzip it to \\<nas>\admin\MyRepo, and refresh the package list. Disable Entware-ng before you install Entware2.
I was going to suggest you to turn off the subshell.
As in 'recompile with other settings'? No thanks. The whole point of using an existing repo is that I don't have to maintain it myself.
Did you try it with bash? That bug seems to affect only if MC is used with busybox, at least I get the same delay on my NSA-310 with it and there is no delay at all with bash. Seems like the subshell support in bash is better than the same in busybox (if it has it at all).
Ah thanks. Starting mc within a bash shell didn't solve the problem, but starting it with 'SHELL=/opt/bin/bash mc' did the trick.

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

Re: New package: Entware-ng

Post by philippetev » Thu Mar 29, 2018 4:18 pm

Thanks! I'll look at it this weekend.
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

finnsloss
Posts: 5
Joined: Mon Feb 10, 2014 9:09 pm

Re: New package: Entware-ng

Post by finnsloss » Mon Apr 02, 2018 1:29 pm

Hi,

I've rebuilt one of my NSA310's and decided to try out entware-ng rather than ffp. Got it all up and running without hassle.

I then needed to access an HFS+ drive, so installed the zyxel-modules-2.6.31.8 package.
But, when I try to install the hfsplus module i get errors:

Code: Select all

root@poxel:/# ls /opt/lib/modules/2.6.31.8/kernel/fs/
autofs      befs        cachefiles  cramfs      freevxfs    fuse        hfsplus     jfs         nilfs2      ocfs2       qnx4        squashfs
autofs4     btrfs       configfs    dlm         fscache     gfs2        hpfs        minix       ntfs        omfs        romfs       ufs
root@poxel:/# which modprobe
/sbin/modprobe
root@poxel:/# modprobe hfsplus
modprobe: module hfsplus not found in modules.dep
root@poxel:/# which depmod
/sbin/depmod
root@poxel:/# depmod -a
depmod: can't open 'modules.dep': Read-only file system
root@poxel:/# 
As you can see it is trying to use the stock firmware modprobe and depmod, which I guess is the source of my problem.
On FFP there was a package module_utils-1.20.2-arm-1 that contained the tools required to install the module.
Is there such a package on entware-ng? or is there another way of installing the module?

Thanks,
Finn

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

Re: New package: Entware-ng

Post by Mijzelf » Mon Apr 02, 2018 8:31 pm

finnsloss wrote:Is there such a package on entware-ng?
I don't know. Maybe busybox.
or is there another way of installing the module?
Yes. Locate the module in /opt/lib/modules/<kernel-version>/, and load it with

Code: Select all

insmod /path/to/module.ko
If the module is dependent on others, you'll have to load them first.

finnsloss
Posts: 5
Joined: Mon Feb 10, 2014 9:09 pm

Re: New package: Entware-ng

Post by finnsloss » Wed Apr 11, 2018 8:57 am

Thanks Mijzelf, the insmod method works perfectly. :D

It appears that busybox is supposed to have a submodule modutils https://github.com/Entware/Entware-ng/b ... /Config.in
But it doesn't appear to be available for the NSA310, I'm guessing because it's kernel is too old?..

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

Re: New package: Entware-ng

Post by Mijzelf » Wed Apr 11, 2018 6:32 pm

finnsloss wrote:I'm guessing because it's kernel is too old?..
No, that has nothing to do with it. The repository doesn't know the age of your kernel.

Why do you think it's not available? Did you install busybox?

Post Reply