From c9c505e51d4a258dd8977e6531ab94dac908eb78 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 13 May 2018 11:10:07 +0800 Subject: [PATCH] fix shellinabox compile issue --- package/lean/shellinabox/Makefile | 10 ++++--- package/lean/shellinabox/doc/readme | 1 - .../lean/shellinabox/files/shellinaboxd.init | 18 ++++--------- .../shellinabox/patches/001-fix-compile.patch | 27 +++++++++---------- 4 files changed, 23 insertions(+), 33 deletions(-) delete mode 100644 package/lean/shellinabox/doc/readme diff --git a/package/lean/shellinabox/Makefile b/package/lean/shellinabox/Makefile index bcea8c20d..23ebcdcf8 100644 --- a/package/lean/shellinabox/Makefile +++ b/package/lean/shellinabox/Makefile @@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=shellinabox -PKG_VERSION:=2.19 +PKG_VERSION:=2.20 PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/shellinabox/shellinabox.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=1a8010f2c94a62e7398c4fa130dfe9e099dc55cd +PKG_SOURCE_VERSION:=98e6eebc6c2026fb126a458c6cb5a2541447258e PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_FIXUP:=autoreconf @@ -31,12 +31,14 @@ define Package/shellinabox/description enabled web browser and does not require any additional browser plugins. endef +CONFIGURE_ARGS += --disable-utmp + define Package/shellinabox/install $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/shellinabox $(INSTALL_BIN) $(PKG_BUILD_DIR)/shellinaboxd $(1)/usr/sbin $(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 endef -$(eval $(call BuildPackage,shellinabox)) +$(eval $(call BuildPackage,shellinabox)) \ No newline at end of file diff --git a/package/lean/shellinabox/doc/readme b/package/lean/shellinabox/doc/readme deleted file mode 100644 index 55c487c29..000000000 --- a/package/lean/shellinabox/doc/readme +++ /dev/null @@ -1 +0,0 @@ -shellinabox运行需要busybox里面的login程序,Makefile中已经依赖,若是以ipk形式安装则需要重新安装busybox diff --git a/package/lean/shellinabox/files/shellinaboxd.init b/package/lean/shellinabox/files/shellinaboxd.init index e9b62c15e..e5b78218a 100755 --- a/package/lean/shellinabox/files/shellinaboxd.init +++ b/package/lean/shellinabox/files/shellinaboxd.init @@ -7,18 +7,10 @@ START=99 BIN=/usr/sbin/shellinaboxd 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_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 -} - +} \ No newline at end of file diff --git a/package/lean/shellinabox/patches/001-fix-compile.patch b/package/lean/shellinabox/patches/001-fix-compile.patch index 8fab53a46..81762d600 100644 --- a/package/lean/shellinabox/patches/001-fix-compile.patch +++ b/package/lean/shellinabox/patches/001-fix-compile.patch @@ -1,16 +1,13 @@ -Index: shellinabox-2015-12-06/configure.ac -=================================================================== ---- shellinabox-2015-12-06.orig/configure.ac 2016-04-27 15:24:07.000000000 +0800 -+++ shellinabox-2015-12-06/configure.ac 2016-04-27 16:50:10.792530502 +0800 -@@ -75,11 +75,6 @@ - [AC_DEFINE(HAVE_ISNAN, 1, - Define to 1 if you have support for isnan)]) +diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c +index ba54b36..c802e00 100644 +--- a/shellinabox/launcher.c ++++ b/shellinabox/launcher.c +@@ -769,7 +769,7 @@ void closeAllFds(int *exceptFds, int num) { + } --dnl Even if utmpx.h exists, not all systems have support for updwtmpx() --AC_TRY_LINK([#include ], -- [updwtmp(0, 0);], -- [AC_DEFINE(HAVE_UPDWTMP, 1, -- Define to 1 if you have support for updwtmp)]) - AC_TRY_LINK([#include ], - [updwtmpx(0, 0);], - [AC_DEFINE(HAVE_UPDWTMPX, 1, + #if !defined(HAVE_PTSNAME_R) +-static int ptsname_r(int fd, char *buf, size_t buflen) { ++int ptsname_r(int fd, char *buf, size_t buflen) { + // It is unfortunate that ptsname_r is not universally available. + // For the time being, this is not a big problem, as ShellInABox is + // single-threaded (and so is the launcher process). But if this \ No newline at end of file