From a42f2cccf1b3207d0d1d462303125138258f3fde Mon Sep 17 00:00:00 2001 From: Adrian Carpenter Date: Thu, 17 Jan 2019 10:09:29 +0000 Subject: [PATCH 1/3] added libutempter mosh now builds against libutempter, this is a requirement for adding support for displaying detached sessions. --- cross/libutempter/Makefile | 22 ++++++++++++++++++++++ cross/libutempter/PLIST | 3 +++ cross/libutempter/digests | 3 +++ cross/libutempter/patches/Makefile.patch | 18 ++++++++++++++++++ cross/mosh/Makefile | 2 +- 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 cross/libutempter/Makefile create mode 100644 cross/libutempter/PLIST create mode 100644 cross/libutempter/digests create mode 100644 cross/libutempter/patches/Makefile.patch diff --git a/cross/libutempter/Makefile b/cross/libutempter/Makefile new file mode 100644 index 00000000000..3681d0cec66 --- /dev/null +++ b/cross/libutempter/Makefile @@ -0,0 +1,22 @@ +PKG_NAME = libutempter +PKG_VERS = 1.1.5 +PKG_EXT = tar.bz2 +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = ftp://ftp.altlinux.org/pub/people/ldv/utempter/ +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +CONFIGURE_TARGET = nop +DEPENDS = + +POST_PATCH_TARGET = libutempter_post_patch + +HOMEPAGE = http://freshmeat.sourceforge.net/projects/libutempter +COMMENT = libutempter provides a library interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files. +LICENSE = LGPLv2 + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: libutempter_post_patch +libutempter_post_patch: + $(RUN) sed -e 's#@INSTALL_PREFIX@#$(STAGING_INSTALL_PREFIX)#' -i Makefile + diff --git a/cross/libutempter/PLIST b/cross/libutempter/PLIST new file mode 100644 index 00000000000..af5b56d30f4 --- /dev/null +++ b/cross/libutempter/PLIST @@ -0,0 +1,3 @@ +lnk:lib/libutempter.so +lnk:lib/libutempter.so.0 +lib:lib/libutempter.so.1.1.5 diff --git a/cross/libutempter/digests b/cross/libutempter/digests new file mode 100644 index 00000000000..7d13ec5ee7d --- /dev/null +++ b/cross/libutempter/digests @@ -0,0 +1,3 @@ +libutempter-1.1.5.tar.bz2 SHA1 fd250c317c92a300508365593bf68fbd5f2b9e9a +libutempter-1.1.5.tar.bz2 SHA256 73d0576b16caeb22874dc80d0ce7a6aeebb3181b117e95c147cd8d29df99e70e +libutempter-1.1.5.tar.bz2 MD5 d62a93ba9f3796a91cf03be5ef25a9a1 diff --git a/cross/libutempter/patches/Makefile.patch b/cross/libutempter/patches/Makefile.patch new file mode 100644 index 00000000000..97420e92de9 --- /dev/null +++ b/cross/libutempter/patches/Makefile.patch @@ -0,0 +1,18 @@ +--- Makefile 2007-02-19 12:14:08.000000000 +0000 ++++ Makefile.new 2019-01-17 08:33:09.000000000 +0000 +@@ -30,9 +30,12 @@ + TARGETS = $(PROJECT) $(SHAREDLIB) $(STATICLIB) + + INSTALL = install +-libdir = /usr/lib +-libexecdir = /usr/lib +-includedir = /usr/include ++prefix = @INSTALL_PREFIX@ ++exec_prefix =${prefix} ++libdir =${exec_prefix}/lib ++libexecdir =${exec_prefix}/lib ++sharedlibdir =${libdir} ++includedir =${prefix}/include + DESTDIR = + + WARNINGS = -W -Wall -Waggregate-return -Wcast-align -Wconversion \ diff --git a/cross/mosh/Makefile b/cross/mosh/Makefile index 6c5fe2e9786..92954eec124 100644 --- a/cross/mosh/Makefile +++ b/cross/mosh/Makefile @@ -5,7 +5,7 @@ PKG_DIR = $(PKG_NAME)-$(PKG_VERS) PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/mobile-shell/mosh/releases/download/$(PKG_DIR) -DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses +DEPENDS = cross/zlib cross/openssl cross/protobuf cross/ncurses cross/libutempter HOMEPAGE = https://mosh.org COMMENT = Mosh: the mobile shell From e3a01a6ed1361be75490f026da4fd381d68b8930 Mon Sep 17 00:00:00 2001 From: Adrian Carpenter Date: Fri, 18 Jan 2019 10:32:18 +0000 Subject: [PATCH 2/3] updated libutempter to 1.1.6 --- cross/libutempter/Makefile | 2 +- cross/libutempter/PLIST | 2 +- cross/libutempter/digests | 6 +++--- cross/libutempter/patches/Makefile.patch | 9 +++++---- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cross/libutempter/Makefile b/cross/libutempter/Makefile index 3681d0cec66..0299a378208 100644 --- a/cross/libutempter/Makefile +++ b/cross/libutempter/Makefile @@ -1,5 +1,5 @@ PKG_NAME = libutempter -PKG_VERS = 1.1.5 +PKG_VERS = 1.1.6 PKG_EXT = tar.bz2 PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = ftp://ftp.altlinux.org/pub/people/ldv/utempter/ diff --git a/cross/libutempter/PLIST b/cross/libutempter/PLIST index af5b56d30f4..525d87b640f 100644 --- a/cross/libutempter/PLIST +++ b/cross/libutempter/PLIST @@ -1,3 +1,3 @@ lnk:lib/libutempter.so lnk:lib/libutempter.so.0 -lib:lib/libutempter.so.1.1.5 +lib:lib/libutempter.so.1.1.6 diff --git a/cross/libutempter/digests b/cross/libutempter/digests index 7d13ec5ee7d..762e36610e5 100644 --- a/cross/libutempter/digests +++ b/cross/libutempter/digests @@ -1,3 +1,3 @@ -libutempter-1.1.5.tar.bz2 SHA1 fd250c317c92a300508365593bf68fbd5f2b9e9a -libutempter-1.1.5.tar.bz2 SHA256 73d0576b16caeb22874dc80d0ce7a6aeebb3181b117e95c147cd8d29df99e70e -libutempter-1.1.5.tar.bz2 MD5 d62a93ba9f3796a91cf03be5ef25a9a1 +libutempter-1.1.6.tar.bz2 SHA1 1964279755290c4b576f2db0ed518e2b45a9ca53 +libutempter-1.1.6.tar.bz2 SHA256 b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397 +libutempter-1.1.6.tar.bz2 MD5 b43827806923903aba2bc7cd3a2d45b7 diff --git a/cross/libutempter/patches/Makefile.patch b/cross/libutempter/patches/Makefile.patch index 97420e92de9..674bd28b969 100644 --- a/cross/libutempter/patches/Makefile.patch +++ b/cross/libutempter/patches/Makefile.patch @@ -1,18 +1,19 @@ ---- Makefile 2007-02-19 12:14:08.000000000 +0000 -+++ Makefile.new 2019-01-17 08:33:09.000000000 +0000 -@@ -30,9 +30,12 @@ +--- Makefile 2010-11-04 17:14:53.000000000 +0000 ++++ Makefile.new 2019-01-18 09:48:35.000000000 +0000 +@@ -30,10 +30,12 @@ TARGETS = $(PROJECT) $(SHAREDLIB) $(STATICLIB) INSTALL = install -libdir = /usr/lib -libexecdir = /usr/lib -includedir = /usr/include +-mandir = /usr/share/man +prefix = @INSTALL_PREFIX@ +exec_prefix =${prefix} +libdir =${exec_prefix}/lib +libexecdir =${exec_prefix}/lib +sharedlibdir =${libdir} +includedir =${prefix}/include + man3dir = $(mandir)/man3 DESTDIR = - WARNINGS = -W -Wall -Waggregate-return -Wcast-align -Wconversion \ From f08ecd645ac31c4d07819d0006e083c060ee882f Mon Sep 17 00:00:00 2001 From: Adrian Carpenter Date: Sat, 9 Feb 2019 07:24:36 +0000 Subject: [PATCH 3/3] libutempter: fixed helper binary so that it runs under DSM --- cross/libutempter/patches/utempter.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cross/libutempter/patches/utempter.patch diff --git a/cross/libutempter/patches/utempter.patch b/cross/libutempter/patches/utempter.patch new file mode 100644 index 00000000000..699a413243d --- /dev/null +++ b/cross/libutempter/patches/utempter.patch @@ -0,0 +1,20 @@ +--- utempter.c 2010-11-04 17:14:53.000000000 +0000 ++++ utempter-new.c 2019-02-09 07:17:05.000000000 +0000 +@@ -191,16 +191,7 @@ + const char *device, *host; + struct passwd *pw; + pid_t pid; +- int add = 0, i; +- +- for (i = 0; i <= 2; ++i) +- { +- struct stat sb; +- +- if (fstat(i, &sb) < 0) +- /* At this stage, we shouldn't even report error. */ +- exit(EXIT_FAILURE); +- } ++ int add = 0; + + if (argc < 2) + usage();