--- tmux-1.1.orig/debian/watch +++ tmux-1.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/tmux/tmux-(.+)\.tar\.gz debian uupdate --- tmux-1.1.orig/debian/control +++ tmux-1.1/debian/control @@ -0,0 +1,23 @@ +Source: tmux +Section: admin +Priority: optional +Maintainer: Karl Ferdinand Ebert +Build-Depends: debhelper (>= 7), libncurses5-dev, quilt +Standards-Version: 3.8.3 +Homepage: http://sf.net/projects/tmux + +Package: tmux +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: terminal multiplexer + tmux enables a number of terminals (or windows) to be accessed and + controlled from a single terminal like screen. tmux runs as a + server-client system. A server is created automatically when + necessary and holds a number of sessions, each of which may have + a number of windows linked to it. Any number of clients may connect + to a session, or the server may be controlled by issuing commands + with tmux. Communication takes place through a socket, by default + placed in /var/run. Moreover tmux provides a consistent and + well-documented command interface, with the same syntax whether used + interactively, as a key binding, or from the shell. It offers a + choice of vim or emacs key layouts. --- tmux-1.1.orig/debian/README.source +++ tmux-1.1/debian/README.source @@ -0,0 +1,57 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. --- tmux-1.1.orig/debian/changelog +++ tmux-1.1/debian/changelog @@ -0,0 +1,138 @@ +tmux (1.1-2~ppa0) karmic; urgency=low + + * Bump version so I can use tmux 1.1 on karmic from my Launchpad PPA. + + -- Kenyon Ralph Tue, 29 Dec 2009 21:08:44 -0800 + +tmux (1.1-1) unstable; urgency=low + + [ Karl Ferdinand Ebert ] + * New upstream release fixes "tmux does not support screen-256color like + it claims". Thanks very much Tim Allen for pointing this out. + (Closes: #550701). + + -- Karl Ferdinand Ebert Fri, 06 Nov 2009 17:03:29 +0100 + +tmux (1.0-1) unstable; urgency=low + + * New upstream release + + fixes "add a setenv command like in Screen" (Closes: #531151) + + and "Omit tmux-generated line-wrapping newlines from paste buffer" + (Closes: #531497) + * Fix lintian info with 07_fix_hyphen.diff. + + -- Karl Ferdinand Ebert Thu, 24 Sep 2009 09:52:15 +0200 + +tmux (0.9-2) unstable; urgency=low + + * Fixing FTBFS for kfreebsd and hurd with 05_build_kfreebsd_hurd.dpatch + * with DEB_BUILD_HARDENING=1 detected minor unchecked return values, fixed + with 06_hardening_write_return.dpatch + * added README.source from azureus package to satisfy lintian + + -- Karl Ferdinand Ebert Wed, 26 Aug 2009 18:43:47 +0200 + +tmux (0.9-1) unstable; urgency=low + + * New upstream release (Closes: #536087) + * better handling of UTF8, therefore dropping hint in README.Debian + * Dropping patch 01_fix_wring_location (applied upstream) + * Modified patches 02_fix_wring_location and + 03_proper_socket_handling to fit in. + + -- Karl Ferdinand Ebert Tue, 07 Jul 2009 17:05:31 +0200 + +tmux (0.8-5) unstable; urgency=low + + * Fix "Bad sockethandling" sockets are now created in /var/run/tmux with + sgid flag and utmp group. Modified program drops these privileges + immediately. (Closes: #529082) + * contains now a README.Debian as a hint for UTF-8 + * using dpatch system and a clean debian/rules + * mentioned scripts from screen in debian/copyright which cover now an + init-script that cleans /var/run/tmux after reboot + + -- Karl Ferdinand Ebert Sun, 17 May 2009 21:24:02 +0200 + +tmux (0.8-4) unstable; urgency=low + + * included statement towards BSD-2,BSD-3 in debian/copyright + * filed a bugreport (Closes: #519339: ITP: tmux -- an alternative to + screen, licensed under BSD) + + -- Karl Ferdinand Ebert Sun, 26 Apr 2009 08:12:03 +0200 + +tmux (0.8-3) unstable; urgency=low + + * corrected debian/copyright file + + -- Karl Ferdinand Ebert Sat, 25 Apr 2009 19:40:55 +0200 + +tmux (0.8-2) unstable; urgency=low + + * changed debian/rules + + -- Karl Ferdinand Ebert Sat, 25 Apr 2009 17:04:33 +0200 + +tmux (0.8-1) unstable; urgency=low + + * New upstream release + + -- Karl Ferdinand Ebert Fri, 24 Apr 2009 16:33:16 +0200 + +tmux (0.7-3) unstable; urgency=low + + * extended documentation and long description + * mentioned BSD license in debian/copyright + * manpage is now free of hyphen + + -- Karl Ferdinand Ebert Thu, 12 Mar 2009 09:17:30 +0100 + +tmux (0.7-2) unstable; urgency=low + + * corrected changelog's first entry with useful bug number. + + -- Karl Ferdinand Ebert Thu, 12 Mar 2009 00:01:18 +0100 + +tmux (0.7-1) unstable; urgency=low + + * New upstream release + + -- Karl Ferdinand Ebert Wed, 11 Mar 2009 19:40:26 +0100 + +tmux (0.5-1) unstable; urgency=low + + * New upstream release + + -- Karl Ferdinand Ebert Tue, 16 Dec 2008 10:16:40 +0100 + +tmux (0.4a-3) unstable; urgency=low + + * Fixed Upstream-Maintainer in debian/copyright + + -- Karl Ferdinand Ebert Wed, 24 Sep 2008 10:53:16 +0200 + +tmux (0.4a-2) unstable; urgency=low + + * debian/copyright in appropriate format + + -- Karl Ferdinand Ebert Tue, 16 Sep 2008 08:28:17 +0200 + +tmux (0.4a-1) unstable; urgency=low + + * New upstream release + + -- Karl Ferdinand Ebert Mon, 15 Sep 2008 18:46:54 +0200 + +tmux (0.4-1) unstable; urgency=low + + * New upstream release + + -- Karl Ferdinand Ebert Fri, 29 Aug 2008 12:01:45 +0200 + +tmux (0.2-1) unstable; urgency=low + + * Initial release. + + -- Karl Ferdinand Ebert Mon, 02 Jun 2008 21:17:30 +0200 + --- tmux-1.1.orig/debian/postinst +++ tmux-1.1/debian/postinst @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +if ! test -d /var/run/tmux; then + install -g utmp -m 0775 -d /var/run/tmux + [ `stat -c%a /usr/bin/tmux` -lt 4000 ] || chmod 0755 /var/run/tmux +fi + +#DEBHELPER# --- tmux-1.1.orig/debian/init +++ tmux-1.1/debian/init @@ -0,0 +1,44 @@ +#!/bin/sh +# $Id: init,v 1.3 2004/03/16 01:43:45 zal Exp $ +# +# Script to remove stale tmux named pipes on bootup. +# + +### BEGIN INIT INFO +# Provides: tmux-cleanup +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: +# Short-Description: tmux sessions cleaning +### END INIT INFO + +set -e + +TMUXDIR=/var/run/tmux + +case "$1" in +start) + if test -L $TMUXDIR || ! test -d $TMUXDIR; then + rm -f $TMUXDIR + mkdir $TMUXDIR + chown root:utmp $TMUXDIR + fi + find $TMUXDIR -type p -print0 | xargs -0r rm -f -- +# If the local admin has used dpkg-statoverride to install the tmux +# binary with different set[ug]id bits, change the permissions of +# $TMUXDIR accordingly + BINARYPERM=`stat -c%a /usr/bin/tmux` + if [ "$BINARYPERM" -ge 4000 ]; then + chmod 0755 $TMUXDIR + elif [ "$BINARYPERM" -ge 2000 ]; then + chmod 0775 $TMUXDIR + else + chmod 0777 $TMUXDIR + fi + ;; +stop|restart|reload|force-reload) + ;; +esac + +exit 0 --- tmux-1.1.orig/debian/docs +++ tmux-1.1/debian/docs @@ -0,0 +1,4 @@ +TODO +FAQ +NOTES +examples --- tmux-1.1.orig/debian/postrm +++ tmux-1.1/debian/postrm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = purge ] || [ "$1" = remove ]; then + rm -rf /var/run/tmux +fi + +#DEBHELPER# --- tmux-1.1.orig/debian/compat +++ tmux-1.1/debian/compat @@ -0,0 +1 @@ +7 --- tmux-1.1.orig/debian/copyright +++ tmux-1.1/debian/copyright @@ -0,0 +1,147 @@ +Upstream-Name: tmux +Upstream-Source: http://sf.net/projects/tmux +Upstream Author: Nicholas Marriott + +Files: * +Copyright: + Copyright (c) 2007-2009 Nicholas Marriott on + everything not listed thereunder + Copyright (c) 2009 Joshua Elsasser on + attributes.c + osdep-darwin.c + Copyright (c) 2008-2009 Tiago Cunha on + cmd-confirm-before.c + cmd-copy-buffer.c + cmd-display-message.c + cmd-if-shell.c + cmd-load-buffer.c + cmd-save-buffer.c + cmd-source-file.c + examples/tmux.vim + Copyright (c) 2002 Todd C. Miller on + getopt_long.c + Copyright (c) 2004, 2005, 2007 Darren Tucker (dtucker at zip com au) on + bsd-poll.c + Copyright (c) 1998 Todd C. Miller on + strlcat.c + Copyright (c) 1998 Todd C. Miller on + strlcpy.c + Copyright (c) 2004 Ted Unangst and Todd Miller on + strtonum.c + +License: + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER + IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Files: compat/{bitstring.h,daemon.c,fgetln.c,queue.h,str{casestr,sep}.c, + unvis.h,vis.h,vis.c} +Copyright: + Copyright (c) 1989, 1993 The Regents of the University of California on + bitstring.h + unvis.c + Copyright (c) 1990, 1993 The Regents of the University of California on + strcasestr.c + strsep.c + Copyright (c) 1989, 1993 The Regents of the University of California on + vis.c + Copyright (c) 1990 The Regents of the University of California on + vis.h + Copyright (c) 1990, 1993 The Regents of the University of California on + daemon.c + Copyright (c) 1998 The NetBSD Foundation, Inc. on + fgetln.c + Copyright (c) 1991, 1993 The Regents of the University of California on + queue.h + +License: BSD-3 + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +Files: compat/{bsd-poll.h,imsg.{c,h},imsg-buffer.c,getopt.h,getopt_long.c,tree.h} +Copyright: + Copyright (c) 1996 Theo de Raadt on + bsd-poll.h + Copyright (c) 2003, 2004 Henning Brauer on + imsg-buffer.c + Copyright (c) 2003, 2004 Henning Brauer on + imsg.c + Copyright (c) 2006, 2007 Pierre-Yves Ritschard and + Copyright (c) 2006, 2007, 2008 Reyk Floeter and + Copyright (c) 2003, 2004 Henning Brauer on + imsg.h + Copyright (c) 2000 The NetBSD Foundation, Inc. on + getopt.h + Copyright (c) 2000 The NetBSD Foundation, Inc. on + getopt_long.c + Copyright 2002 Niels Provos on + tree,h + +License: BSD-2 + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The Debian packaging is Copyright (C) 2008, 2009, Karl Ferdinand Ebert + and is licensed under BSD-2 except scripts taken from the +screen package of Debian but modified for tmux and the README.source from the + azureus package of Debian. Those are: + +Files: debian/{init,postinst,postrm} +Copyright: + Copyright (C) 1996 Ian Murdock + Copyright (C) 1997 joost witteveen + Copyright (C) 1997-2001 Juan Cespedes + Copyright (C) 2001-2003 Adam Lazur + Copyright (C) 2007 Jan Christoph Nordholz + +File: debian/patches/08_fix_colours.diff + Copyright (c) 2009 Nicholas Marriott + --- tmux-1.1.orig/debian/rules +++ tmux-1.1/debian/rules @@ -0,0 +1,62 @@ +#!/usr/bin/make -f + +export DEB_BUILD_HARDENING=1 + +configure: configure-stamp + +include /usr/share/quilt/quilt.make + +configure-stamp: patch + dh_testdir + ./configure + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + rm -f tmux *.o .depend *~ *.core *.log compat/*.o + rm -f config.h config.mk + #$(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + #dh_clean -k + dh_prep + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/tmux install + # lintian override for sgid + install -m 755 -d $(CURDIR)/debian/tmux/usr/share/lintian/overrides + install -m 644 debian/tmux.lintian.overrides $(CURDIR)/debian/tmux/usr/share/lintian/overrides/tmux + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGES + dh_installdocs + dh_installexamples + dh_installman + dh_installinit --no-start --init-script='tmux-cleanup' --update-rcd-params='start 70 S .' + dh_link + dh_strip + dh_compress + dh_fixperms -X/usr/bin/tmux + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: patch build clean binary-indep binary-arch binary install configure --- tmux-1.1.orig/debian/dirs +++ tmux-1.1/debian/dirs @@ -0,0 +1 @@ +usr/bin --- tmux-1.1.orig/debian/tmux.lintian.overrides +++ tmux-1.1/debian/tmux.lintian.overrides @@ -0,0 +1 @@ +tmux: setgid-binary usr/bin/tmux 2755 root/utmp --- tmux-1.1.orig/debian/patches/06_hardening_write_return.diff +++ tmux-1.1/debian/patches/06_hardening_write_return.diff @@ -0,0 +1,56 @@ +# Harden write and chdir because of ignored return value +--- a/tty.c ++++ b/tty.c +@@ -283,7 +283,8 @@ + void + tty_raw(struct tty *tty, const char *s) + { +- write(tty->fd, s, strlen(s)); ++ if (write(tty->fd, s, strlen(s)) == -1) ++ fatal("write failed"); + } + + void +@@ -316,7 +317,8 @@ + buffer_write(tty->out, s, strlen(s)); + + if (tty->log_fd != -1) +- write(tty->log_fd, s, strlen(s)); ++ if (write(tty->log_fd, s, strlen(s)) == -1) ++ fatal("write failed"); + } + + void +@@ -342,7 +344,8 @@ + } + + if (tty->log_fd != -1) +- write(tty->log_fd, &ch, 1); ++ if (write(tty->log_fd, &ch, 1) == -1) ++ fatal("write failed"); + } + + void +@@ -355,7 +358,8 @@ + break; + buffer_write8(tty->out, gu->data[i]); + if (tty->log_fd != -1) +- write(tty->log_fd, &gu->data[i], 1); ++ if (write(tty->log_fd, &gu->data[i], 1) == -1) ++ fatal("write failed"); + } + + tty->cx += gu->width; +--- a/window.c ++++ b/window.c +@@ -516,7 +516,9 @@ + return (-1); + case 0: + if (chdir(wp->cwd) != 0) +- chdir("/"); ++ if (chdir("/") <0 ) ++ fatal("chdir failed"); ++ + + if (tcgetattr(STDIN_FILENO, &tio2) != 0) + fatal("tcgetattr failed"); --- tmux-1.1.orig/debian/patches/07_fix_hyphen.diff +++ tmux-1.1/debian/patches/07_fix_hyphen.diff @@ -0,0 +1,111 @@ +# fixes lintian's complains about missing hyphens. +--- a/tmux.1 ++++ b/tmux.1 +@@ -334,13 +334,13 @@ + .Pp + Examples include: + .Bd -literal -offset indent +-refresh-client -t/dev/ttyp2 ++refresh-client \-t/dev/ttyp2 + +-rename-session -tfirst newname ++rename-session \-tfirst newname + +-set-window-option -t:0 monitor-activity on ++set-window-option \-t:0 monitor-activity on + +-new-window ; split-window -d ++new-window ; split-window \-d + .Ed + .Sh CLIENTS AND SESSIONS + The following commands are available: +@@ -670,7 +670,7 @@ + and the result executed as a command. + If + .Ar template +-is not given, "detach-client -t '%%'" is used. ++is not given, "detach-client \-t '%%'" is used. + This command works only from inside + .Nm . + .It Xo +@@ -687,7 +687,7 @@ + and the result executed as a command. + If + .Ar template +-is not given, "switch-client -t '%%'" is used. ++is not given, "switch-client \-t '%%'" is used. + This command works only from inside + .Nm . + .It Xo +@@ -704,7 +704,7 @@ + and the result executed as a command. + If + .Ar template +-is not given, "select-window -t '%%'" is used. ++is not given, "select-window \-t '%%'" is used. + This command works only from inside + .Nm . + .It Ic display-panes Op Fl t Ar target-client +@@ -870,7 +870,7 @@ + option only opens a new pipe if no previous pipe exists, allowing a pipe to + be toggled with a single key, for example: + .Bd -literal -offset indent +-bind-key C-p pipe-pane -o 'cat >>~/output' ++bind-key C-p pipe-pane \-o 'cat >>~/output' + .Ed + .It Xo Ic previous-window + .Op Fl a +@@ -1493,7 +1493,7 @@ + Examples are: + .Bd -literal -offset indent + #(sysctl vm.loadavg) +-#[fg=yellow,bold]#(apm -l)%%#[default] [#S] ++#[fg=yellow,bold]#(apm \-l)%%#[default] [#S] + .Ed + .Pp + Where appropriate, special character sequences may be prefixed with a number to +@@ -1673,7 +1673,7 @@ + .Ic rename-window . + It may be switched off globally with: + .Bd -literal -offset indent +-set-window-option -g automatic-rename off ++set-window-option \-g automatic-rename off + .Ed + .Pp + .It Ic clock-mode-colour Ar colour +@@ -2189,29 +2189,29 @@ + .Pp + Changing the default prefix key: + .Bd -literal -offset indent +-set-option -g prefix C-a ++set-option \-g prefix C-a + unbind-key C-b + bind-key C-a send-prefix + .Ed + .Pp + Turning the status line off, or changing its colour: + .Bd -literal -offset indent +-set-option -g status off +-set-option -g status-bg blue ++set-option \-g status off ++set-option \-g status-bg blue + .Ed + .Pp + Setting other options, such as the default command, + or locking after 30 minutes of inactivity: + .Bd -literal -offset indent +-set-option -g default-command "exec /bin/ksh" +-set-option -g lock-after-time 1800 ++set-option \-g default-command "exec /bin/ksh" ++set-option \-g lock-after-time 1800 + .Ed + .Pp + Creating new key bindings: + .Bd -literal -offset indent + bind-key b set-option status + bind-key / command-prompt "split-window 'exec man %%'" +-bind-key S command-prompt "new-window -n %1 'ssh %1'" ++bind-key S command-prompt "new-window \-n %1 'ssh %1'" + .Ed + .Sh SEE ALSO + .Xr pty 4 --- tmux-1.1.orig/debian/patches/04_dropping_unnecessary_privileges.diff +++ tmux-1.1/debian/patches/04_dropping_unnecessary_privileges.diff @@ -0,0 +1,26 @@ +# using setresgid() for safely dropping utmp group membership. +--- a/tmux.c ++++ b/tmux.c +@@ -261,9 +261,11 @@ + { + char base[MAXPATHLEN], *path; + struct stat sb; +- u_int uid; ++ u_int uid,gid; + + uid = getuid(); ++ gid = getgid(); ++ + xsnprintf(base, MAXPATHLEN, "%s/%s/%s-%d", _PATH_VARRUN, __progname, __progname, uid); + + if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) +@@ -279,6 +281,9 @@ + errno = EACCES; + return (NULL); + } ++ /* drop unnecessary privileges */ ++ if (setresgid(gid, gid, gid) != 0) ++ return (NULL); + + xasprintf(&path, "%s/%s", base, label); + return (path); --- tmux-1.1.orig/debian/patches/series +++ tmux-1.1/debian/patches/series @@ -0,0 +1,6 @@ +02_fix_wring_location.diff +03_proper_socket_handling.diff +04_dropping_unnecessary_privileges.diff +05_build_kfreebsd_hurd.diff +06_hardening_write_return.diff +07_fix_hyphen.diff --- tmux-1.1.orig/debian/patches/03_proper_socket_handling.diff +++ tmux-1.1/debian/patches/03_proper_socket_handling.diff @@ -0,0 +1,45 @@ +# setting /usr/bin/tmux with sgid and proper location of socket +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -53,7 +53,7 @@ + + PREFIX?= /usr/ + INSTALLDIR= install -d +-INSTALLBIN= install -g bin -o root -m 555 ++INSTALLBIN= install -g utmp -o root -m 2755 + INSTALLMAN= install -g bin -o root -m 444 + + SRCS= $(shell echo *.c|sed 's|osdep-[a-z0-9]*.c||g') +--- a/Makefile ++++ b/Makefile +@@ -49,7 +49,7 @@ + + PREFIX?= /usr + INSTALLDIR= install -d +-INSTALLBIN= install -g bin -o root -m 555 ++INSTALLBIN= install -g utmp -o root -m 2755 + INSTALLMAN= install -g bin -o root -m 444 + + SRCS!= echo *.c|sed 's|osdep-[a-z0-9]*.c||g' +--- a/compat.h ++++ b/compat.h +@@ -25,7 +25,7 @@ + + #ifndef HAVE_PATHS_H + #define _PATH_BSHELL "/bin/sh" +-#define _PATH_TMP "/tmp/" ++#define _PATH_VARRUN "/var/run/" + #define _PATH_DEVNULL "/dev/null" + #define _PATH_TTY "/dev/tty" + #define _PATH_DEV "/dev/" +--- a/tmux.c ++++ b/tmux.c +@@ -264,7 +264,7 @@ + u_int uid; + + uid = getuid(); +- xsnprintf(base, MAXPATHLEN, "%s/tmux-%d", _PATH_TMP, uid); ++ xsnprintf(base, MAXPATHLEN, "%s/%s/%s-%d", _PATH_VARRUN, __progname, __progname, uid); + + if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) + return (NULL); --- tmux-1.1.orig/debian/patches/.dpkg-source-applied +++ tmux-1.1/debian/patches/.dpkg-source-applied @@ -0,0 +1,6 @@ +02_fix_wring_location.diff +03_proper_socket_handling.diff +04_dropping_unnecessary_privileges.diff +05_build_kfreebsd_hurd.diff +06_hardening_write_return.diff +07_fix_hyphen.diff --- tmux-1.1.orig/debian/patches/02_fix_wring_location.diff +++ tmux-1.1/debian/patches/02_fix_wring_location.diff @@ -0,0 +1,59 @@ +# correct directory /usr/local +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -23,7 +23,7 @@ + + CC?= cc + CFLAGS+= -DBUILD="\"$(VERSION)\"" +-LDFLAGS+= -L/usr/local/lib ++LDFLAGS+= -L/usr/lib + LIBS+= + + # Sun CC +@@ -51,7 +51,7 @@ + endif + endif + +-PREFIX?= /usr/local ++PREFIX?= /usr/ + INSTALLDIR= install -d + INSTALLBIN= install -g bin -o root -m 555 + INSTALLMAN= install -g bin -o root -m 444 +@@ -80,7 +80,7 @@ + install: all + $(INSTALLDIR) $(DESTDIR)$(PREFIX)/bin + $(INSTALLBIN) tmux $(DESTDIR)$(PREFIX)/bin/tmux +- $(INSTALLDIR) $(DESTDIR)$(PREFIX)/man/man1 +- $(INSTALLMAN) tmux.1 $(DESTDIR)$(PREFIX)/man/man1/tmux.1 ++ $(INSTALLDIR) $(DESTDIR)$(PREFIX)share/man/man1 ++ $(INSTALLMAN) tmux.1 $(DESTDIR)$(PREFIX)share/man/man1/tmux.1 + + -include .depend +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,7 @@ + + CC?= cc + CFLAGS+= -DBUILD="\"$(VERSION)\"" +-LDFLAGS+= -L/usr/local/lib ++LDFLAGS+= -L/usr/lib + LIBS+= + + .ifdef FDEBUG +@@ -47,7 +47,7 @@ + .endif + .endif + +-PREFIX?= /usr/local ++PREFIX?= /usr + INSTALLDIR= install -d + INSTALLBIN= install -g bin -o root -m 555 + INSTALLMAN= install -g bin -o root -m 444 +@@ -79,5 +79,5 @@ + install: all + ${INSTALLDIR} ${DESTDIR}${PREFIX}/bin + ${INSTALLBIN} tmux ${DESTDIR}${PREFIX}/bin/ +- ${INSTALLDIR} ${DESTDIR}${PREFIX}/man/man1 +- ${INSTALLMAN} tmux.1 ${DESTDIR}${PREFIX}/man/man1/ ++ ${INSTALLDIR} ${DESTDIR}${PREFIX}/share/man/man1 ++ ${INSTALLMAN} tmux.1 ${DESTDIR}${PREFIX}/share/man/man1/ --- tmux-1.1.orig/debian/patches/05_build_kfreebsd_hurd.diff +++ tmux-1.1/debian/patches/05_build_kfreebsd_hurd.diff @@ -0,0 +1,36 @@ +# Enable kFreeBSD and Hurd specific configure script +--- a/configure ++++ b/configure +@@ -88,7 +88,7 @@ + EOF + ;; + # ------------------------------------------------------------------------------ +- Linux) ++ Linux|GNU|GNU/kFreeBSD) + cat <>$CONFIG_H + #define HAVE_ASPRINTF + #define HAVE_BZERO +--- a/tmux.h ++++ b/tmux.h +@@ -399,6 +399,10 @@ + char argv[COMMAND_LENGTH]; + }; + ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 4096 ++#endif ++ + struct msg_identify_data { + char cwd[MAXPATHLEN]; + +@@ -1057,6 +1061,10 @@ + u_char y; + }; + ++#ifndef IOV_MAX ++#define IOV_MAX 1024 ++#endif ++ + /* Client connection. */ + struct client { + struct imsgbuf ibuf;