GithubHelp home page GithubHelp logo

Comments (12)

uuxxcccc avatar uuxxcccc commented on May 28, 2024 1

Done, mipsel binaries already in Entware, arm/x86 binaries will arrive later.

Please, provide a feedback about it, I just tested binaries on target system with no any scripts.

It works! Even poor scripts work well!

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024
[B70 3.4.3.9-099_20-06-1]# 2020-06-14 17:43:39
[B70 /opt/home/admin]# which sexpect
/opt/bin/sexpect
[B70 /opt/home/admin]# cd /opt/bin
[B70 /opt/bin]# sexpect
-sh: sexpect: not found
[B70 /opt/bin]# sexpect -help
-sh: sexpect: not found
[B70 /opt/bin]# sexpect_ssh.sh 
sh: -p: unknown operand
/opt/bin/sexpect_ssh.sh: line 23: sexpect: not found
/opt/bin/sexpect_ssh.sh: line 33: sexpect: not found
/opt/bin/sexpect_ssh.sh: line 44: sexpect: not found
/opt/bin/sexpect_ssh.sh: line 47: sexpect: not found
!! unknown error: 127

from sexpect.

clarkwang avatar clarkwang commented on May 28, 2024

Could you help try /opt/bin/sexpect -help and see if it works?

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

Could you help try /opt/bin/sexpect -help and see if it works?

[B70 3.4.3.9-099_20-06-1]# 2020-06-14 20:44:17
[B70 /opt/home/admin]# /opt/bin/sexpect -help
-sh: /opt/bin/sexpect: not found

No, it doesn't work. As you can also see from the text up there from line7 to line8.
Additionally, I paste here the 'control' file from 'ipk' package out of the "Entware build environment", and the 'control' file from ipk file out of an "OpenWRT compile environment" which I have also compiled and successfully installed on a mipsel OpenWRT router and it runs as it is designed.

control file from OpenWRT env.

Package: sexpect
Version: 2.2.2-2
Depends: libc
Source: package/utils/sexpect
SourceName: sexpect
License: GPL-3.0
Section: utils
Architecture: mipsel_24kc
Installed-Size: 17210
Description:  Sexpect is another implementation of Expect.

control file from Entware env.

Package: sexpect
Version: 2.2.2-2
Depends: libc, libssp, librt, libpthread
Source: package/utils/sexpect
SourceName: sexpect
License: GPL-3.0
Section: utils
Architecture: mipsel-3.4
Installed-Size: 22194
Description:  Sexpect is another implementation of Expect.

Another difference is that there are 3 files in "control" folder of the ipk of OpenWRT env. , while only 1 of Entware env.

OpenWRT:

├─bin
│      sexpect
│      sexpect_ssh.sh
│
└─CONTROL
        control
        postinst
        prerm

Entware:

├─bin
│      sexpect
│      sexpect_ssh.sh
│
└─CONTROL
        control

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

Padavan--H大,up to date version.
Entware--https://github.com/Entware/Entware
Compile environment--VMware Ubuntu, up to date version.
git from lieonal openwrt, and git from Entware.

from sexpect.

clarkwang avatar clarkwang commented on May 28, 2024

I know nothing about the packaging system. :(

For my OpenWRT 18.06.4 (on Netgear R6220) I cross compiled sexpect on a Debian system and copied the executable to the router.

from sexpect.

clarkwang avatar clarkwang commented on May 28, 2024

To me it's weird that which sexpect outputs /opt/bin/sexpect but it cannot run. Just to be sure, what's the output of ls -l /opt/bin/sexpect? That's to say, does the file really exist and is it executable?

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

By searching and assuming, I tested the following.
It seems on "H大/Padavan/Asusware", there miss some dependencies, for this sexpect mipsel-3.4, probably cause it looks up in /lib dir. , while proper way for padavan linux is to look up in /opt/lib, where adequate libs are prepared there.
Maybe in source code, there are absolute paths of library links?

[B70 /]# ldd /opt/bin/sexpect
checking sub-depends for 'not found'
checking sub-depends for 'not found'
checking sub-depends for 'not found'
        librt.so.1 => not found (0x00000000)
        libgcc_s.so.1 => not found (0x00000000)
        libc.so.6 => not found (0x00000000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x00000000)

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

another hour of self-learning, I guess the makefile is the root.
i got this file from BBS.
Writer took it fine, for OpenWrt.
How to modify this "makefile", for Entware/Padavan?

include $(TOPDIR)/rules.mk

#Name and release number of this package
PKG_NAME:=sexpect
PKG_RELEASE:=2.2.2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/clarkwang/sexpect.git

PKG_REV:=e6e9fedc89b180084791524661b234a464b36e4e
PKG_VERSION:=2.2.2
PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0

PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)

include $(INCLUDE_DIR)/package.mk

MAKE_ARGS := CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC)

define Package/sexpect
        SECTION:=utils
        CATEGORY:=Utilities
        TITLE:=sexpect
endef

define Package/sexpect/description
        Sexpect is another implementation of Expect.
endef

#Specify what needs to be done to prepare for building the package.
define Build/Configure
	mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS) all
endef

#Specify where and how to install the program.
define Package/sexpect/install
	$(INSTALL_DIR) $(1)/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/sexpect $(1)/bin/
	$(INSTALL_BIN) ./files/sexpect_ssh.sh $(1)/bin/
endef

#This line executes the necessary commands to compile our program.
$(eval $(call BuildPackage,sexpect))

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

I have made an issue in project Entware, asking for help to add your sexpect program in Entware repo.

Perhaps it would also be a help to have another one's support to this issue(ask for adding sexpect into repo. of entware). Owner of project Entware would like to have a request supported by one or more users.

from sexpect.

ryzhovau avatar ryzhovau commented on May 28, 2024

Done, mipsel binaries already in Entware, arm/x86 binaries will arrive later.

Please, provide a feedback about it, I just tested binaries on target system with no any scripts.

from sexpect.

uuxxcccc avatar uuxxcccc commented on May 28, 2024

Done, mipsel binaries already in Entware, arm/x86 binaries will arrive later.
Please, provide a feedback about it, I just tested binaries on target system with no any scripts.

Thank you. ipk file, downloaded from repo., works fine on my newifi_y1/padavan. I will test this package, and give comment!

from sexpect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.