Comments (12)
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.
[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.
Could you help try /opt/bin/sexpect -help
and see if it works?
from sexpect.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- The option "-zombie-ttl N" does not work as expected HOT 2
- Add test for "-zombie-idle N"
- [v2.3.4] issue with "-zombie-idle" HOT 1
- [v2.3.7] interact -re PATTERN: detach upon matching a specified pattern HOT 2
- [v2.3.7-dev] 2 issues with "interact -re"
- Implement "interact_out" like in Expect? HOT 2
- Don't run the specified command as session leader? HOT 1
- cmake: add "make install" support HOT 2
- [v2.3.8] 0.4% CPU usage on macOS 11.6 (32GB Mem) HOT 1
- syntax error: unexpected "(" HOT 3
- [v2.3.10] "-nonblock on": don't drop data too quickly HOT 1
- [v2.3.9] Add version check when the client connects to the server HOT 1
- [v2.3.11] New subcommand "get -expect-buf N": dump data in the internal expect buffer HOT 2
- [doc] get -expect-buf
- Release missing tags HOT 1
- [v2.3.12] Add an option to pass a file descriptor to the "send" command HOT 17
- [v2.3.13] interact -subst PATTERN::REPLACE HOT 1
- [v2.3.14] add a new cli option to enable "regcomp(cflags|=REG_NEWLINE)"
- Add testcases for v2.3.12..v2.3.14
- option to discard color codes & al HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sexpect.