fix shellinabox compile issue

This commit is contained in:
coolsnowwolf 2018-05-13 11:10:07 +08:00
parent f4e81f50df
commit c9c505e51d
4 changed files with 23 additions and 33 deletions

View File

@ -2,13 +2,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=shellinabox PKG_NAME:=shellinabox
PKG_VERSION:=2.19 PKG_VERSION:=2.20
PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_RELEASE:=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shellinabox/shellinabox.git PKG_SOURCE_URL:=https://github.com/shellinabox/shellinabox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=1a8010f2c94a62e7398c4fa130dfe9e099dc55cd PKG_SOURCE_VERSION:=98e6eebc6c2026fb126a458c6cb5a2541447258e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
@ -31,11 +31,13 @@ define Package/shellinabox/description
enabled web browser and does not require any additional browser plugins. enabled web browser and does not require any additional browser plugins.
endef endef
CONFIGURE_ARGS += --disable-utmp
define Package/shellinabox/install define Package/shellinabox/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/shellinabox $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/shellinabox
$(INSTALL_BIN) $(PKG_BUILD_DIR)/shellinaboxd $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/shellinaboxd $(1)/usr/sbin
$(INSTALL_BIN) ./files/shellinaboxd.init $(1)/etc/init.d/shellinaboxd $(INSTALL_BIN) ./files/shellinaboxd.init $(1)/etc/init.d/shellinaboxd
$(INSTALL_DATA) $(PKG_BUILD_DIR)/shellinabox/white-on-black.css $(1)/etc/shellinabox $(INSTALL_DATA) $(PKG_BUILD_DIR)/shellinabox/*.css $(1)/etc/shellinabox
$(PKG_BUILD_DIR)/make-chained-cert.sh > $(1)/etc/shellinabox/certificate.pem $(PKG_BUILD_DIR)/make-chained-cert.sh > $(1)/etc/shellinabox/certificate.pem
endef endef

View File

@ -1 +0,0 @@
shellinabox运行需要busybox里面的login程序Makefile中已经依赖若是以ipk形式安装则需要重新安装busybox

View File

@ -7,18 +7,10 @@ START=99
BIN=/usr/sbin/shellinaboxd BIN=/usr/sbin/shellinaboxd
start_service() { start_service() {
libssl=$(find /lib /usr/lib -name "libssl.so*" -type f)
if [ -n "$libssl" ];then
dir=$(dirname $libssl)
libssl=$(basename $libssl)
cd $dir
[ ! -f libssl.so ] && ln -s $libssl libssl.so
cd - > /dev/null
fi
procd_open_instance procd_open_instance
procd_set_param command $BIN -u root -c /etc/shellinabox --css=/etc/shellinabox/white-on-black.css procd_set_param command $BIN -u root -c /etc/shellinabox \
--css=/etc/shellinabox/black-on-white.css \
--css=/etc/shellinabox/white-on-black.css \
--user-css Normal:+/etc/shellinabox/black-on-white.css,Reverse:-/etc/shellinabox/white-on-black.css
procd_close_instance procd_close_instance
} }

View File

@ -1,16 +1,13 @@
Index: shellinabox-2015-12-06/configure.ac diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c
=================================================================== index ba54b36..c802e00 100644
--- shellinabox-2015-12-06.orig/configure.ac 2016-04-27 15:24:07.000000000 +0800 --- a/shellinabox/launcher.c
+++ shellinabox-2015-12-06/configure.ac 2016-04-27 16:50:10.792530502 +0800 +++ b/shellinabox/launcher.c
@@ -75,11 +75,6 @@ @@ -769,7 +769,7 @@ void closeAllFds(int *exceptFds, int num) {
[AC_DEFINE(HAVE_ISNAN, 1, }
Define to 1 if you have support for isnan)])
-dnl Even if utmpx.h exists, not all systems have support for updwtmpx() #if !defined(HAVE_PTSNAME_R)
-AC_TRY_LINK([#include <utmp.h>], -static int ptsname_r(int fd, char *buf, size_t buflen) {
- [updwtmp(0, 0);], +int ptsname_r(int fd, char *buf, size_t buflen) {
- [AC_DEFINE(HAVE_UPDWTMP, 1, // It is unfortunate that ptsname_r is not universally available.
- Define to 1 if you have support for updwtmp)]) // For the time being, this is not a big problem, as ShellInABox is
AC_TRY_LINK([#include <utmpx.h>], // single-threaded (and so is the launcher process). But if this
[updwtmpx(0, 0);],
[AC_DEFINE(HAVE_UPDWTMPX, 1,