Index: head/net/mosh/files/patch-src_frontend_mosh-server.cc =================================================================== --- head/net/mosh/files/patch-src_frontend_mosh-server.cc (revision 437124) +++ head/net/mosh/files/patch-src_frontend_mosh-server.cc (nonexistent) @@ -1,55 +0,0 @@ ---- src/frontend/mosh-server.cc.orig 2016-08-10 10:58:28 UTC -+++ src/frontend/mosh-server.cc -@@ -409,7 +409,6 @@ static int run_server( const char *desir - } - - printf( "\nMOSH CONNECT %s %s\n", network->port().c_str(), network->get_key().c_str() ); -- fflush( stdout ); - - /* don't let signals kill us */ - struct sigaction sa; -@@ -421,25 +420,34 @@ static int run_server( const char *desir - - - /* detach from terminal */ -+ fflush( stdout ); -+ fflush( stderr ); - pid_t the_pid = fork(); - if ( the_pid < 0 ) { - perror( "fork" ); - } else if ( the_pid > 0 ) { -- _exit( 0 ); -- } -+ fprintf( stderr, "\nmosh-server (%s) [build %s]\n", PACKAGE_STRING, BUILD_VERSION ); -+ fprintf( stderr, "Copyright 2012 Keith Winstein \n" ); -+ fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later .\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n" ); - -- fprintf( stderr, "\nmosh-server (%s) [build %s]\n", PACKAGE_STRING, BUILD_VERSION ); -- fprintf( stderr, "Copyright 2012 Keith Winstein \n" ); -- fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later .\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n" ); -+ fprintf( stderr, "[mosh-server detached, pid = %d]\n", static_cast(the_pid) ); -+#ifndef HAVE_IUTF8 -+ fprintf( stderr, "\nWarning: termios IUTF8 flag not defined.\nCharacter-erase of multibyte character sequence\nprobably does not work properly on this platform.\n" ); -+#endif /* HAVE_IUTF8 */ - -- fprintf( stderr, "[mosh-server detached, pid = %d]\n", (int)getpid() ); -+ fflush( stdout ); -+ fflush( stderr ); -+ if ( isatty( STDOUT_FILENO ) ) { -+ tcdrain( STDOUT_FILENO ); -+ } -+ if ( isatty( STDERR_FILENO ) ) { -+ tcdrain( STDERR_FILENO ); -+ } -+ _exit( 0 ); -+ } - - int master; - --#ifndef HAVE_IUTF8 -- fprintf( stderr, "\nWarning: termios IUTF8 flag not defined.\nCharacter-erase of multibyte character sequence\nprobably does not work properly on this platform.\n" ); --#endif /* HAVE_IUTF8 */ -- - /* close file descriptors */ - if ( !verbose ) { - /* Necessary to properly detach on old versions of sshd (e.g. RHEL/CentOS 5.0). */ Property changes on: head/net/mosh/files/patch-src_frontend_mosh-server.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/mosh/files/patch-e4aed30d30dde6c58e8548f86fe7d67e8dd98ae4 =================================================================== --- head/net/mosh/files/patch-e4aed30d30dde6c58e8548f86fe7d67e8dd98ae4 (revision 437124) +++ head/net/mosh/files/patch-e4aed30d30dde6c58e8548f86fe7d67e8dd98ae4 (nonexistent) @@ -1,193 +0,0 @@ -From e4aed30d30dde6c58e8548f86fe7d67e8dd98ae4 Mon Sep 17 00:00:00 2001 -From: John Hood -Date: Mon, 14 Nov 2016 23:03:29 -0500 -Subject: [PATCH] Fix broken wrap behavior causing broken copy/paste. - -The terminal framebuffer was not resetting the wrap state of a row -when a previously-wrapping line was overwritten by a non-wrapping -line. Restore previous, subtle behavior of line wrap. Fix wrap -verification bug now exposed by emulation-wrap-across-frames.test. - -Also hoist some getters, mostly for clarity. - -Fixes #820. ---- - src/terminal/terminaldisplay.cc | 25 +++++++++++++++++++------ - src/terminal/terminalframebuffer.cc | 17 +++++++++++++---- - src/terminal/terminalframebuffer.h | 13 ++++++++----- - 3 files changed, 40 insertions(+), 15 deletions(-) - -diff --git a/src/terminal/terminaldisplay.cc b/src/terminal/terminaldisplay.cc -index 0298f2a..2993f85 100644 ---- src/terminal/terminaldisplay.cc -+++ src/terminal/terminaldisplay.cc -@@ -348,12 +348,14 @@ bool Display::put_row( bool initialized, FrameState &frame, const Framebuffer &f - return false; - } - -+ const bool wrap_this = row.get_wrap(); -+ const int row_width = f.ds.get_width(); - int clear_count = 0; - bool wrote_last_cell = false; - Renditions blank_renditions = initial_rendition(); - - /* iterate for every cell */ -- while ( frame_x < f.ds.get_width() ) { -+ while ( frame_x < row_width ) { - - const Cell &cell = cells.at( frame_x ); - -@@ -405,12 +407,23 @@ bool Display::put_row( bool initialized, FrameState &frame, const Framebuffer &f - - /* Now draw a character cell. */ - /* Move to the right position. */ -+ const int cell_width = cell.get_width(); -+ /* If we are about to print the last character in a wrapping row, -+ trash the cursor position to force explicit positioning. We do -+ this because our input terminal state may have the cursor on -+ the autowrap column ("column 81"), but our output terminal -+ states always snap the cursor to the true last column ("column -+ 80"), and we want to be able to apply the diff to either, for -+ verification. */ -+ if ( wrap_this && frame_x + cell_width >= row_width ) { -+ frame.cursor_x = frame.cursor_y = -1; -+ } - frame.append_silent_move( frame_y, frame_x ); - frame.update_rendition( cell.get_renditions() ); - frame.append_cell( cell ); -- frame_x += cell.get_width(); -- frame.cursor_x += cell.get_width(); -- if ( frame_x >= f.ds.get_width() ) { -+ frame_x += cell_width; -+ frame.cursor_x += cell_width; -+ if ( frame_x >= row_width ) { - wrote_last_cell = true; - } - } -@@ -423,7 +436,7 @@ bool Display::put_row( bool initialized, FrameState &frame, const Framebuffer &f - frame.append_silent_move( frame_y, frame_x - clear_count ); - frame.update_rendition( blank_renditions ); - -- bool can_use_erase = !row.get_wrap() && ( has_bce || ( frame.current_rendition == initial_rendition() ) ); -+ bool can_use_erase = !wrap_this && ( has_bce || ( frame.current_rendition == initial_rendition() ) ); - if ( can_use_erase ) { - frame.append( "\033[K" ); - } else { -@@ -438,7 +451,7 @@ bool Display::put_row( bool initialized, FrameState &frame, const Framebuffer &f - /* To hint that a word-select should group the end of one line - with the beginning of the next, we let the real cursor - actually wrap around in cases where it wrapped around for us. */ -- if ( row.get_wrap() ) { -+ if ( wrap_this ) { - /* Update our cursor, and ask for wrap on the next row. */ - frame.cursor_x = 0; - frame.cursor_y++; -diff --git a/src/terminal/terminalframebuffer.cc b/src/terminal/terminalframebuffer.cc -index 59a7a70..7132893 100644 ---- src/terminal/terminalframebuffer.cc -+++ src/terminal/terminalframebuffer.cc -@@ -42,13 +42,15 @@ Cell::Cell( color_type background_color ) - : contents(), - renditions( background_color ), - width( 1 ), -- fallback( false ) -+ fallback( false ), -+ wrap( false ) - {} - Cell::Cell() /* default constructor required by C++11 STL */ - : contents(), - renditions( 0 ), - width( 1 ), -- fallback( false ) -+ fallback( false ), -+ wrap( false ) - { - assert( false ); - } -@@ -59,6 +61,7 @@ void Cell::reset( color_type background_color ) - renditions = Renditions( background_color ); - width = 1; - fallback = false; -+ wrap = false; - } - - void DrawState::reinitialize_tabs( unsigned int start ) -@@ -350,11 +353,11 @@ void Framebuffer::delete_line( int row, int count ) - } - - Row::Row( const size_t s_width, const color_type background_color ) -- : cells( s_width, Cell( background_color ) ), wrap( false ), gen( get_gen() ) -+ : cells( s_width, Cell( background_color ) ), gen( get_gen() ) - {} - - Row::Row() /* default constructor required by C++11 STL */ -- : cells( 1, Cell() ), wrap( false ), gen( get_gen() ) -+ : cells( 1, Cell() ), gen( get_gen() ) - { - assert( false ); - } -@@ -650,5 +653,11 @@ bool Cell::compare( const Cell &other ) const - fprintf( stderr, "renditions differ\n" ); - } - -+ if ( wrap != other.wrap ) { -+ ret = true; -+ fprintf( stderr, "wrap: %d vs. %d\n", -+ wrap, other.wrap ); -+ } -+ - return ret; - } -diff --git a/src/terminal/terminalframebuffer.h b/src/terminal/terminalframebuffer.h -index beb00d2..1d98e50 100644 ---- src/terminal/terminalframebuffer.h -+++ src/terminal/terminalframebuffer.h -@@ -91,6 +91,7 @@ namespace Terminal { - Renditions renditions; - uint8_t width; - bool fallback; /* first character is combining character */ -+ bool wrap; - - public: - Cell( color_type background_color ); -@@ -103,7 +104,8 @@ namespace Terminal { - return ( (contents == x.contents) - && (fallback == x.fallback) - && (width == x.width) -- && (renditions == x.renditions) ); -+ && (renditions == x.renditions) -+ && (wrap == x.wrap) ); - } - - bool operator!=( const Cell &x ) const { return !operator==( x ); } -@@ -192,13 +194,14 @@ namespace Terminal { - void set_width( unsigned int w ) { width = w; } - bool get_fallback( void ) const { return fallback; } - void set_fallback( bool f ) { fallback = f; } -+ bool get_wrap( void ) const { return wrap; } -+ void set_wrap( bool f ) { wrap = f; } - }; - - class Row { - public: - typedef std::vector cells_type; - cells_type cells; -- bool wrap; /* if last cell, wrap to next line */ - // gen is a generation counter. It can be used to quickly rule - // out the possibility of two rows being identical; this is useful - // in scrolling. -@@ -214,11 +217,11 @@ namespace Terminal { - - bool operator==( const Row &x ) const - { -- return ( gen == x.gen && cells == x.cells && wrap == x.wrap ); -+ return ( gen == x.gen && cells == x.cells ); - } - -- bool get_wrap( void ) const { return wrap; } -- void set_wrap( bool w ) { wrap = w; } -+ bool get_wrap( void ) const { return cells.back().get_wrap(); } -+ void set_wrap( bool w ) { cells.back().set_wrap( w ); } - - uint64_t get_gen() const; - }; Property changes on: head/net/mosh/files/patch-e4aed30d30dde6c58e8548f86fe7d67e8dd98ae4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/mosh/Makefile =================================================================== --- head/net/mosh/Makefile (revision 437124) +++ head/net/mosh/Makefile (revision 437125) @@ -1,31 +1,30 @@ # Created by: Ryan Steinmetz # $FreeBSD$ PORTNAME= mosh -PORTVERSION= 1.2.6 -PORTREVISION= 4 +PORTVERSION= 1.3.0 CATEGORIES= net MASTER_SITES= http://mosh.mit.edu/ \ http://mirrors.rit.edu/zi/ MAINTAINER= zi@FreeBSD.org COMMENT= Mobile terminal that supports intermittent connectivity LICENSE= GPLv3 LIB_DEPENDS= libprotobuf.so:devel/protobuf USE_PERL5= run GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-utempter --without-ncurses CONFIGURE_ENV+= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \ TINFO_CFLAGS="-I/usr/include" INSTALL_TARGET= install-strip USES= autoreconf:autoconf ncurses perl5 pkgconfig ssl CONFLICTS_INSTALL= mosh-0.[2-9].* PLIST_FILES= bin/mosh bin/mosh-server bin/mosh-client \ man/man1/mosh-client.1.gz man/man1/mosh-server.1.gz man/man1/mosh.1.gz .include Index: head/net/mosh/distinfo =================================================================== --- head/net/mosh/distinfo (revision 437124) +++ head/net/mosh/distinfo (revision 437125) @@ -1,3 +1,3 @@ -TIMESTAMP = 1470957464 -SHA256 (mosh-1.2.6.tar.gz) = 7e82b7fbfcc698c70f5843bb960dadb8e7bd7ac1d4d2151c9d979372ea850e85 -SIZE (mosh-1.2.6.tar.gz) = 347185 +TIMESTAMP = 1490705139 +SHA256 (mosh-1.3.0.tar.gz) = 320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376 +SIZE (mosh-1.3.0.tar.gz) = 356220