Entware-ng and Entware-3x merge into Entware

920 views
Skip to first unread message

Bill Rosenberg

unread,
Apr 29, 2018, 9:52:56 AM4/29/18
to Alt-F
Joao,

I recently discovered that Entware-ng and Entware-3x have merged into a new Entware project. The old Entware-ng repository used by Alt-F 1.0 is no longer being updated.


The new Entware has a different installer and repository location. Since I use Entware-ng with my DNS-323, I modified the Alt-F code to use the new Entware project. I successfully built and tested this firmware change with my 323 and everything seems good.

I've attached the diff file (had to modify 4 files in /usr/www/cgi-bin) so you can incorporate the changes.

Bill

diff.txt

João Cardoso

unread,
Apr 30, 2018, 10:56:16 AM4/30/18
to Alt-F
Hi Bill

Thanks, I have applied and lightly used it on a 320L and it works.

Joao 

mk360

unread,
May 1, 2018, 1:58:20 PM5/1/18
to al...@googlegroups.com

Hi,

How I appli this?

--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.

João Cardoso

unread,
May 2, 2018, 12:03:15 PM5/2/18
to Alt-F


On Tuesday, 1 May 2018 18:58:20 UTC+1, mk360 wrote:

Hi,

How I appli this?


Transfer the patch to the box:

jcard@silver:~/Alt-F/alt-f-sf> scp ~/Download/Bill-entware-support.diff root@dns-325:/tmp
Bill-entware-support.diff                                  100% 5492     5.4KB/s   00:00 

If you don't have a /Alt-F/usr/www/cgi-bin folder, create one using

[root@DNS-325]# aufs.sh -n
[root@DNS-325]# mkdir -p /Alt-F/usr/www/cgi-bin/
[root@DNS-325]# aufs.sh -r

then apply the patch:

[root@DNS-325]# cd /
[root@DNS-325]# patch -p2 -i /tmp/Bill-entware-support.diff 
patching file usr/www/cgi-bin/Packages.men
patching file usr/www/cgi-bin/entware.cgi
patching file usr/www/cgi-bin/packages_opkg.cgi
patching file usr/www/cgi-bin/packages_opkg_proc.cgi

If you have already a Entware-ng install you will have issues, as the architecture has changed.
You have to change the feed under Package->Entware to http://bin.entware.net/armv5sf-k3.2 and Submit, then UpdatePackageList.
I didn't try to solve compatibility issues, instead I just "removeAll" the previous -ng install first.


El 30/04/2018 a las 11:56, João Cardoso escribió:
Hi Bill

Thanks, I have applied and lightly used it on a 320L and it works.

Joao 

On Sunday, 29 April 2018 14:52:56 UTC+1, Bill Rosenberg wrote:
Joao,

I recently discovered that Entware-ng and Entware-3x have merged into a new Entware project. The old Entware-ng repository used by Alt-F 1.0 is no longer being updated.


The new Entware has a different installer and repository location. Since I use Entware-ng with my DNS-323, I modified the Alt-F code to use the new Entware project. I successfully built and tested this firmware change with my 323 and everything seems good.

I've attached the diff file (had to modify 4 files in /usr/www/cgi-bin) so you can incorporate the changes.

Bill

--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+unsubscribe@googlegroups.com.

mk360

unread,
Jul 2, 2018, 2:40:43 PM7/2/18
to al...@googlegroups.com

Hi,


I can't apply the patch.

I started to remove my latest entware-ng installation using these instructions  next, i tried to install the patch but apparently the patch command couldn't found the files, so i tried to install entware-ng again using the web UI, next I tried to install the patch again, but it failed again, here is the output:

# patch -p2 -i /tmp/Bill-entware-support.diff                                                                                                                   
 patching file usr/www/cgi-bin/Packages.men                                                                                                                                         

 Hunk 1 FAILED 1/1.                                                                                                                                                                 
  Alt-F|packages_ipkg.cgi                                                                                                                                                           
 -Entware-ng|packages_opkg.cgi                                                                                                                                                      
 +Entware|packages_opkg.cgi                                                                                                                                                         
  ffp|packages_ffp.cgi                                                                                                                                                              
 patching file usr/www/cgi-bin/entware.cgi                                                                                                                                          
 Hunk 1 FAILED 2/2.                                                                                                                                                                 
                                                                                                                                                                                    
  . common.sh                                                                                                                                                                       
  check_cookie                                                                                                                                                                      
 -write_header "Entware-ng Services Setup"                                                                                                                                          
 +write_header "Entware Services Setup"                                                                                                                                             
                                                                                                                                                                                    
  if ! test -f /opt/etc/init.d/rc.unslung; then                                                                                                                                     
 -       echo "No Entware-ng installation found.<br>$(back_button)</body></html>"                                                                                                   
 +       echo "No Entware installation found.<br>$(back_button)</body></html>"                                                                                                      
         exit 0                                                                                                                                                                     
  fi                                                                                                                                                                                
                                                                                                                                                                                    
 patching file usr/www/cgi-bin/packages_opkg.cgi                                                                                                                                    
 Hunk 1 FAILED 2/2.                                                                                                                                                                 
  . common.sh                                                                                                                                                                       
                                                                                                                                                                                    
  check_cookie                                                                                                                                                                      
 -write_header "Entware-ng Package Manager"                                                                                                                                         
 +write_header "Entware Package Manager"                                                                                                                                            
  parse_qstring                                                                                                                                                                     
                                                                                                                                                                                    
  #debug                                                                                                                                                                            
 patching file usr/www/cgi-bin/packages_opkg_proc.cgi                                                                                                                               
 Hunk 1 FAILED 13/13.                                                                                                                                                               
  opkg_cmd() {                                                                                                                                                                      
         opt=$1                                                                                                                                                                     
         if test $1 = "install"; then                                                                                                                                               
 -               write_header "Installing Entware-ng package $2"                                                                                                                    
 +               write_header "Installing Entware package $2"                                                                                                                       
         elif test $1 = "remove"; then                                                                                                                                              
 -               write_header "Removing Entware-ng package $2"                                                                                                                      
 +               write_header "Removing Entware package $2"                                                                                                                         
                 opt="--autoremove $opt"                                                                                                                                            
         elif test $1 = "upgrade"; then                                                                                                                                             
 -               write_header "Upgrading all Entware-ng packages"                                                                                                                   
 +               write_header "Upgrading all Entware packages"                                                                                                                      
         elif test $1 = "update"; then                                                                                                                                              
 -               write_header "Updating Entware-ng packages list"                                                                                                                   
 +               write_header "Updating Entware packages list"                                                                                                                      
         fi                                                                                                                                                                         
                                                                                                                                                                                    
         cat<<-EOF                                                                                                                                                                  


Any solution? sorry for the newvie questions, but I'm a casual Linux user and I don't know much about Linux internals without the usual distro comands...


Thanks,

mk.

To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.

João Cardoso

unread,
Jul 12, 2018, 11:01:10 PM7/12/18
to Alt-F


On Monday, 2 July 2018 19:40:43 UTC+1, mk360 wrote:

Hi,


I can't apply the patch.

I started to remove my latest entware-ng installation using these instructions  next, i tried to install the patch but apparently the patch command couldn't found the files, so i tried to install entware-ng again using the web UI, next I tried to install the patch again, but it failed again, here is the output:

# patch -p2 -i /tmp/Bill-entware-support.diff    


Have you executed the "cd /" command before the "patch" one?

mk360

unread,
Jul 20, 2018, 7:45:18 PM7/20/18
to al...@googlegroups.com, João Cardoso



El 12/07/2018 a las 23:01, João Cardoso escribió:


On Monday, 2 July 2018 19:40:43 UTC+1, mk360 wrote:

Hi,


I can't apply the patch.

I started to remove my latest entware-ng installation using these instructions  next, i tried to install the patch but apparently the patch command couldn't found the files, so i tried to install entware-ng again using the web UI, next I tried to install the patch again, but it failed again, here is the output:

# patch -p2 -i /tmp/Bill-entware-support.diff    


Have you executed the "cd /" command before the "patch" one?


Yeah, it is the sequence of commands that I followed:
 [root@DNS-320L-nas]# cp /Public/RW/Bill-entware-support.diff /tmp/                                                                                                                 
 [root@DNS-320L-nas]# cd /                                                                                                                                                          
 [root@DNS-320L-nas]# pwd                                                                                                                                                           
 /                                                                                                                                                                                  
 [root@DNS-320L-nas]# patch -p2 -i /tmp/Bill-entware-support.diff                                                                                                                   
 patching file usr/www/cgi-bin/Packages.men                                                                                                                                         
What is happening?

João Cardoso

unread,
Jul 28, 2018, 1:37:36 PM7/28/18
to Alt-F
I can't reproduce your issues, the instructions and patch works fine for me under Alt-F-1.0.

You might have EOL (End Of Line) issues on the patch file if you used MS-windows. Use linux for the download and transfer or, if you can't do that, use
dos2unix -u /tmp/Bill-entware-support.diff

to do the EOL conversion on the box before applying the patch


mk360

unread,
Jul 28, 2018, 2:40:15 PM7/28/18
to al...@googlegroups.com
Wow, I never heard about downloading on windows can change the end of file (I know about carriage returns), and the times that I opened the file I used notepad++. However, now all is working fine, and it is something that I learned for the future.
Thanks!
--
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.

Bill Rosenberg

unread,
May 9, 2021, 12:03:27 AM5/9/21
to Alt-F
Hi Joao,

It’s been a long time since I submitted this patch and I've been running my own build with it for a while. I don't know why I didn't notice before, but I just realized there is an issue with the Entware Package Manager page where I am never shown if there are package updates. I have verified that the feed in /opt/etc/opkg-lists is being updated. But somewhere in packages_opkg.cgi (I think) something is going wrong and the “opkg compare-versions” call never results in a package being marked as upgradable.

I was hoping you might have an idea what the problem is or some way for me to debug.

Thanks.

João Cardoso

unread,
May 9, 2021, 12:29:03 PM5/9/21
to Alt-F
Hi Bill

Replace the 
if (system("opkg -V0 compare_versions " v " \">\" " ver[uinst[nm]]))
with
if (system("opkg -V0 compare_versions " v " \"<\" " ver[uinst[nm]]))

ipkg has the comparison twisted, opkg has fixed that.  Let me know if it works for you.

In the "samba optimization on DNS-320" topic I posted my current package_opkg cgi scripts (still with the incorrect comparison operator), might be you could test it more thoroughly?

Bill Rosenberg

unread,
May 10, 2021, 7:31:57 PM5/10/21
to Alt-F
Yes that fixed it. I also changed the underscore to a dash as the opkg help text shows the parameters that way.

if (system("opkg -V0 compare-versions " v " \"<\" " ver[uinst[nm]]))

I'll load your updated scripts (plus the corrected comparison) and try it out. I don't want to do a re-install of Entware so I'll just check other operations.

Bill Rosenberg

unread,
May 10, 2021, 8:03:36 PM5/10/21
to Alt-F
I loaded the new scripts and I'm getting a warning "Outdated Entware-ng instalation found at md0" but this is a clean install of the new Entware using the earlier patched scripts.

Bill Rosenberg

unread,
May 10, 2021, 9:22:47 PM5/10/21
to Alt-F
I had to remove the ! and change the line from
if ! grep -qE armv5soft\|armv7soft $CONFF 2> /dev/null; then
to
if grep -qE armv5soft\|armv7soft $CONFF 2> /dev/null; then

João Cardoso

unread,
May 14, 2021, 1:03:22 PM5/14/21
to Alt-F
On Tuesday, May 11, 2021 at 2:22:47 AM UTC+1 Bill Rosenberg wrote:
I had to remove the ! and change the line from
if ! grep -qE armv5soft\|armv7soft $CONFF 2> /dev/null; then
to
if grep -qE armv5soft\|armv7soft $CONFF 2> /dev/null; then

Thanks. I'm now testing for the presence of an updated or recent installation instead of an old install, using

if ! grep -qE armv5-3.2\|armv7-3.2 $CONFF 2> /dev/null; then
 
There was also a wrong test in packages_opkg_proc.cgi at around line 227, it should be

if res=$(opkg update 2>&1); then



On Monday, May 10, 2021 at 7:03:36 PM UTC-5 Bill Rosenberg wrote:
I loaded the new scripts and I'm getting a warning "Outdated Entware-ng instalation found at md0" but this is a clean install of the new Entware using the earlier patched scripts.

On Monday, May 10, 2021 at 6:31:57 PM UTC-5 Bill Rosenberg wrote:
Yes that fixed it. I also changed the underscore to a dash as the opkg help text shows the parameters that way.

if (system("opkg -V0 compare-versions " v " \"<\" " ver[uinst[nm]]))

I'll load your updated scripts (plus the corrected comparison) and try it out. I don't want to do a re-install of Entware so I'll just check other operations.

On Sunday, May 9, 2021 at 11:29:03 AM UTC-5 João Cardoso wrote:
Hi Bill

Replace the 
if (system("opkg -V0 compare_versions " v " \">\" " ver[uinst[nm]]))
with
if (system("opkg -V0 compare_versions " v " \"<\" " ver[uinst[nm]]))

ipkg has the comparison twisted, opkg has fixed that.  Let me know if it works for you.

In the "samba optimization on DNS-320" topic I posted my current package_opkg cgi scripts (still with the incorrect comparison operator), might be you could test it more thoroughly?

(...)
 

Bill Rosenberg

unread,
May 18, 2021, 9:36:53 PM5/18/21
to Alt-F
Everything seems to be working fine with your additional changes. Are you eventually going to make an official commit of all this (also including the fix to mail_proc.cgi)?

João Cardoso

unread,
May 19, 2021, 2:26:21 PM5/19/21
to Alt-F
On Wednesday, May 19, 2021 at 2:36:53 AM UTC+1 Bill Rosenberg wrote:
Everything seems to be working fine with your additional changes. Are you eventually going to make an official commit of all this (also including the fix to mail_proc.cgi)?

I have tackled several Alt-F areas, made some improvements, add some new features, but some were not finished at my will, and I don't remember the details anymore... so an "official commit" will not happens, it will probably be just a jumbo commit without comments. And a proper "release" is not going to happens (perhaps only a "snapshot", i.e., a bleeding-edge for the braves). I now understand the "rolling release" concept -- making a proper old-times release takes too many effort and time and causes too many stress, specially regarding flashing. We'll see...
 
 
Reply all
Reply to author
Forward
0 new messages